From 8c8b3632355d90e50b6a7d20db53a9d47e1d12ce Mon Sep 17 00:00:00 2001 From: Sebastien Jourdain Date: Fri, 16 Apr 2021 14:37:52 -0600 Subject: [PATCH] Misc fix (#43) * fix css in demo apps * Update vtk helper to support binary encoding * update react-vtk-js@1.5.0 to support binary arrays * Trigger CI * fix numpy int64/uint64 conversion * bump react-vtk-js@1.5.1 to fix cell handling from json when points are binary * Update changelog * Bump version Co-authored-by: xhlulu Co-authored-by: xhlulu --- DESCRIPTION | 2 +- Project.toml | 2 +- R/internal.R | 8 +- README.md | 1 + dash_vtk/async-ReactVTK.js | 2 +- dash_vtk/dash_vtk.min.js | 2 +- dash_vtk/package-info.json | 4 +- dash_vtk/utils/vtk.py | 377 +++-- demos/pyvista-terrain-following-mesh/app.py | 2 +- demos/slice-rendering/app.py | 2 +- demos/usage-algorithm/app.py | 2 +- deps/async-ReactVTK.js | 2 +- deps/dash_vtk.min.js | 2 +- docs/CHANGELOG.md | 9 + inst/deps/async-ReactVTK.js | 2 +- inst/deps/dash_vtk.min.js | 2 +- package-lock.json | 1527 ++++++++++++------- package.json | 4 +- src/DashVtk.jl | 10 +- 19 files changed, 1206 insertions(+), 756 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9be9783..8021699 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: dashVtk Title: React based declarative usage of vtk.js for Dash -Version: 0.0.8 +Version: 0.0.9 Description: React based declarative usage of vtk.js for Dash Depends: R (>= 3.0.2) Imports: diff --git a/Project.toml b/Project.toml index 55b7d86..5727412 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "DashVtk" uuid = "1b08a953-4be3-4667-9a23-818b1eccd4c7" authors = ["Kitware Inc and Plotly Technologies "] -version = "0.0.8" +version = "0.0.9" [deps] Dash = "1b08a953-4be3-4667-9a23-3db579824955" diff --git a/R/internal.R b/R/internal.R index 157a43d..5cffc5c 100644 --- a/R/internal.R +++ b/R/internal.R @@ -1,24 +1,24 @@ .dashVtk_js_metadata <- function() { deps_metadata <- list(`dash_vtk` = structure(list(name = "dash_vtk", -version = "0.0.8", src = list(href = NULL, +version = "0.0.9", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_vtk.min.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashVtk", all_files = FALSE), class = "html_dependency"), `dash_vtk` = structure(list(name = "dash_vtk", -version = "0.0.8", src = list(href = NULL, +version = "0.0.9", src = list(href = NULL, file = "deps"), meta = NULL, script = 'dash_vtk.min.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashVtk", all_files = FALSE, dynamic = TRUE), class = "html_dependency"), `dash_vtk` = structure(list(name = "dash_vtk", -version = "0.0.8", src = list(href = NULL, +version = "0.0.9", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-ReactVTK.js', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashVtk", all_files = FALSE, async = TRUE), class = "html_dependency"), `dash_vtk` = structure(list(name = "dash_vtk", -version = "0.0.8", src = list(href = NULL, +version = "0.0.9", src = list(href = NULL, file = "deps"), meta = NULL, script = 'async-ReactVTK.js.map', stylesheet = NULL, head = NULL, attachment = NULL, package = "dashVtk", diff --git a/README.md b/README.md index ddf9b41..e5972f9 100644 --- a/README.md +++ b/README.md @@ -217,3 +217,4 @@ You can find the complete API reference in [`docs/REFERENCES.md`](https://github [dicom-ct-lung]: https://github.com/plotly/dash-vtk/blob/master/demos/dicom-ct-lung/demo.jpg?raw=true [dicom-mri-brain]: https://github.com/plotly/dash-vtk/blob/master/demos/dicom-mri-brain/demo.jpg?raw=true [dicom-mri-pancreas]: https://github.com/plotly/dash-vtk/blob/master/demos/dicom-mri-pancreas/demo.jpg?raw=true + diff --git a/dash_vtk/async-ReactVTK.js b/dash_vtk/async-ReactVTK.js index 564bec1..b1c71c8 100644 --- a/dash_vtk/async-ReactVTK.js +++ b/dash_vtk/async-ReactVTK.js @@ -1,4 +1,4 @@ /*! For license information please see async-ReactVTK.js.LICENSE.txt */ -(window.webpackJsonpdash_vtk=window.webpackJsonpdash_vtk||[]).push([[0],[,,,function(e,t,n){"use strict";(function(e){var t=n(43),r=n(47),a=n(26),o=n(9);Object(o.c)("/$$rollup_base$$/node_modules/readable-stream/lib/_stream_duplex.js",(function(n,o){var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};n.exports=d;var l=t.a,s=r.a;Object(a.a)(d,l);for(var c=i(s.prototype),g=0;g0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(t);var n=[];function r(e){n[e]=null}function a(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++g),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?C("instance deleted - cannot call any method"):r&&r0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(l){var s=a?null:e["set".concat(y(l))];s&&Array.isArray(n[l])&&s.length>1?o=s.apply(void 0,Object(i.a)(n[l]))||o:s?o=s(n[l])||o:(-1!==["mtime"].indexOf(l)||r||I("Warning: Set value to model directly ".concat(l,", ").concat(n[l])),t[l]=n[l],o=!0)})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error("Cannot ShallowCopy ".concat(n.getClassName()," into ").concat(e.getClassName()));var a=n.get(),o=Object.keys(t).sort(),i=Object.keys(a).sort();i.forEach((function(e){var n=o.indexOf(e);-1===n?r&&p("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=a[e]})),o.length&&r&&p("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function B(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["get".concat(y(n.name))]=function(){return t[n.name]}:e["get".concat(y(n))]=function(){return t[n]}}))}var V={enum:function(e,t,n){return function(r){if("string"==typeof r){if(void 0!==n.enum[r])return t[n.name]!==n.enum[r]&&(t[n.name]=n.enum[r],e.modified(),!0);throw C("Set Enum with invalid argument ".concat(n,", ").concat(r)),new RangeError("Set Enum with invalid string argument")}if("number"==typeof r){if(t[n.name]!==r){if(-1!==Object.keys(n.enum).map((function(e){return n.enum[e]})).indexOf(r))return t[n.name]=r,e.modified(),!0;throw C("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw C("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function R(e){if("object"===Object(a.a)(e)){var t=V[e.type];if(t)return function(n,r){return t(n,r,e)};throw C("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(C("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function w(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["set".concat(y(n.name))]=R(n)(e,t):e["set".concat(y(n))]=R(n)(e,t)}))}function k(e,t,n){B(e,t,n),w(e,t,n)}function W(e,t,n){n.forEach((function(n){e["get".concat(y(n))]=function(){return[].concat(t[n])},e["get".concat(y(n),"ByReference")]=function(){return t[n]}}))}function x(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(y(n))]=function(){if(t.deleted)return C("instance deleted - cannot call any method"),!1;for(var o=arguments.length,i=new Array(o),l=0;l4&&void 0!==arguments[4]?arguments[4]:void 0;W(e,t,n),x(e,t,n,r,a)}var J=Symbol("Event abort");function X(e,t,n){var a=[],o=e.delete,i=1;function l(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return C("instance deleted - cannot call any method"),null;var o=i++;return a.push([o,e,r]),a.sort((function(e,t){return t[2]-e[2]})),s(o)},e.delete=function(){o(),a.forEach((function(e){return l(Object(r.a)(e,1)[0])}))}}function O(e,t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return e(r,n,t),Object.freeze(r)};return t&&l.a.register(t,n),n}function N(e){return e&&e.isA&&e.isA("vtkObject")}function H(e,t,n){var r,a=this;return function(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=function(e,n){t.keystore[e]=n},e.getKey=function(e){return t.keystore[e]},e.getAllKeys=function(){return Object.keys(t.keystore)},e.deleteKey=function(e){return delete t.keystore[e]},e.clearKeystore=function(){return e.getAllKeys().forEach((function(e){return delete t.keystore[e]}))}}var F=1;var P={algo:function(e,t,n,r){function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?C("instance deleted - cannot call any method"):r>=t.numberOfInputs?C("algorithm ".concat(e.getClassName()," only has ").concat(t.numberOfInputs," input ports. To add more input ports, use addInputData()")):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)C("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var a="algorithm ".concat(e.getClassName()," only has ");return a+="".concat(t.numberOfInputs),void C(a+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(C("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(l.a):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(l.a):t.inputConnection=[],t.output?t.output=t.output.map(l.a):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(l.a):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),a=r,o=1/0;a--;){if(!t.output[a])return!0;var i=t.output[a].getMTime();if(io)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=o,e.addInputData=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,a(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,o(e,t.numberOfInputs-1))},e.getInputData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=i,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return i(t)};return n.filter=e,n}),e.update=function(){var n=[];if(t.numberOfInputs)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:"Scalars";t.inputArrayToProcess.length1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],a=Number(e),o="B";a>n;)a/=n,o=r.pop();return"".concat(a.toFixed(t)," ").concat(o)},formatNumbersWithThousandSeparator:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=[],r=e;r>1e3;)n.push("000".concat(r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)},get:B,getArray:W,getCurrentGlobalMTime:function(){return g},getStateArrayMapFunc:A,isVtkObject:N,keystore:Y,newInstance:O,normalizeWheel:function(e){var t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}},obj:S,proxy:function(e,t){Y(e,t);var n=e.delete;t.proxyId="".concat(F++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),B(e,t,["proxyId","proxyGroup","proxyName"]),k(e,t,["proxyManager"]);var r={},a={};function i(e,t){a[t]||(a[t]=[]);for(var n=a[t],o=0;o0&&void 0!==arguments[0]?arguments[0]:"__root__";return a[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__root__",r=[],a=t.proxyId,o=l(n)||[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,a=[],i=0,l=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l)return null;var c=[],g=null;for(i=a.length;i--;){var u=a[i];u.instance===n?g=u:c.push(u)}if(!g)return null;var d=g.instance["get".concat(y(g.propertyName))]();if(!Z(d,r)||s){for(r=d,l=!0;c.length;){var m=c.pop();m.instance.set(Object(o.a)({},m.propertyName,r))}l=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function c(e,t){var n=[];for(i=a.length;i--;){var r=a[i];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(i))}for(;n.length;)a.splice(n.pop(),1)}function g(n,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.onModified(s),g=a[0];return a.push({instance:n,propertyName:r,subscription:l}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(Object(o.a)({},r,t.propertyLinkMap[e].value)):g&&s(g.instance,!0)),{unsubscribe:function(){return c(n,r)}}}function u(){for(;a.length;)a.pop().subscription.unsubscribe()}var d={bind:g,unbind:c,unsubscribe:u,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=function(){return s().map((function(e){return e.name}))},e.getPropertyByName=function(e){return s().find((function(t){return t.name===e}))},e.getPropertyDomainByName=function(e){return(r[e]||{}).domain},e.getProxySection=function(){return{id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}},e.delete=function(){for(var r=Object.keys(t.propertyLinkMap),a=r.length;a--;)t.propertyLinkMap[r[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},G((function(){if(t.links)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function a(e){for(var n=Object.keys(e),r=n.length;r--;){var a=n[r];t[a].set(e[a])}}t.this=e;for(var o=Object.keys(r),i=o.length,l=function(){var l=o[i];t[l]=r[l];var s=n[l];e["set".concat(y(l))]=function(n){n!==t[l]&&(t[l]=n,a(s[n]),e.modified())}};i--;)l();o.length&&B(e,t,o)},safeArrays:v,set:w,setArray:x,setGet:k,setGetArray:T,setImmediate:G,setLoggerFunction:function(e,t){f[e]&&(f[e]=t||m)},throttle:function(e,t){var n=!1,r=null;function a(){n=!1,null!==r&&(o.apply(void 0,Object(i.a)(r)),r=null)}function o(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(N(t)){if(a.indexOf(t)>=0)return r;a.push(t);var o=n(t);void 0!==o&&r.push(o);var i=t.get();Object.keys(i).forEach((function(t){var o=i[t];Array.isArray(o)?o.forEach((function(t){e(t,n,r,a)})):e(o,n,r,a)}))}return r},TYPED_ARRAYS:b,uncapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},VOID:u,vtkDebugMacro:p,vtkErrorMacro:C,vtkInfoMacro:function(){f.info.apply(f,arguments)},vtkLogMacro:function(){f.log.apply(f,arguments)},vtkOnceErrorMacro:function(e){h[e]||(f.error(e),h[e]=!0)},vtkWarningMacro:I};t.c=P}).call(this,n(20))},function(e,t,n){"use strict";t.a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return Y})),n.d(t,"k",(function(){return Z})),n.d(t,"l",(function(){return T})),n.d(t,"m",(function(){return u})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return J})),n.d(t,"q",(function(){return p})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return b})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return h})),n.d(t,"z",(function(){return v})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return i})),n.d(t,"C",(function(){return V})),n.d(t,"D",(function(){return x})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return l}));var r=n(14),a=(n(3),n(53),n(4).c.vtkWarningMacro);function o(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[];t.length1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,a=-1/0,o=t,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t-e;return e+n*Math.random()}function m(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function f(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){var r=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=a,n[2]=o,n}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:for(var n=0,r=0;r2&&void 0!==arguments[2]?arguments[2]:1e-6;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!"".concat(e).includes("e"))return+"".concat(Math.round("".concat(e,"e+").concat(t)),"e-").concat(t);var n="".concat(e).split("e"),r="";return+n[1]+t>0&&(r="+"),+"".concat(Math.round("".concat(+n[0],"e").concat(r).concat(+n[1]+t)),"e-").concat(t)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=G(e[0],n),t[1]=G(e[1],n),t[2]=G(e[2],n),t}function B(e,t,n){var r,i,l,s,c,g,u,d=0,m=o(n);for(r=0;rs&&(s=u);if(0===s)return a("Unable to factor linear system"),0;m[r]=1/s}for(i=0;i=s&&(s=g,d=r)}if(i!==d){for(l=0;l=0)for(o=i;o<=a-1;o++)s-=e[a][o]*n[o];else 0!==s&&(i=a);n[a]=s}for(a=r-1;a>=0;a--){for(s=n[a],o=a+1;oc?c=l:lc?c=s:s0?(c-g)/c:0)>0?(n=i===c?1/6*(l-s)/(c-g):l===c?1/3+1/6*(s-i)/(c-g):2/3+1/6*(i-l)/(c-g))<0&&(n+=1):n=0,t[0]=n,t[1]=a,t[2]=u}function w(e,t){var n,a,o,i=Object(r.a)(e,3),l=i[0],s=i[1],c=i[2],g=1/3,u=1/6,d=2/3;l>u&&l<=g?(a=1,n=(g-l)/u,o=0):l>g&&l<=.5?(a=1,o=(l-g)/u,n=0):l>.5&&l<=d?(o=1,a=(d-l)/u,n=0):l>d&&l<=5/6?(o=1,n=(l-d)/u,a=0):l>5/6&&l<=1?(n=1,o=(1-l)/u,a=0):(n=1,a=l/u,o=0),n=s*n+(1-s),a=s*a+(1-s),o=s*o+(1-s),n*=c,a*=c,o*=c,t[0]=n,t[1]=a,t[2]=o}function k(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2];a>.04045?a=Math.pow((a+.055)/1.055,2.4):a/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,t[0]=.4124*a+.3576*o+.1805*i,t[1]=.2126*a+.7152*o+.0722*i,t[2]=.0193*a+.1192*o+.9505*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0]/.9505,o=n[1]/1,i=n[2]/1.089;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t[0]=116*o-16,t[1]=500*(a-o),t[2]=200*(o-i)}(n,t)}function W(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=(n[0]+16)/116,o=n[1]/500+a,i=a-n[2]/200;a=Math.pow(a,3)>.008856?Math.pow(a,3):(a-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,t[0]=.9505*o,t[1]=1*a,t[2]=1.089*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2],l=3.2406*a+-1.5372*o+-.4986*i,s=-.9689*a+1.8758*o+.0415*i,c=.0557*a+-.204*o+1.057*i;l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,c>.0031308?c=1.055*Math.pow(c,1/2.4)-.055:c*=12.92;var g=l;g1&&(l/=g,s/=g,c/=g),l<0&&(l=0),s<0&&(s=0),c<0&&(c=0),t[0]=l,t[1]=s,t[2]=c}(n,t)}function x(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function T(e){return!(e[1]-e[0]<0)}function J(e,t,n){n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2])}function X(e,t,n){return en?n:e}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=X(e[0],t[0],n[0]),r[1]=X(e[1],t[1],n[1]),r[2]=X(e[2],t[2],n[2]),r}var N=function(e){return!Number.isFinite(e)},H=Number.isNaN;function Y(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(15)),o=n(4),i=n(6);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ta&&(e=a),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=u(),a=e.length,o=0;if(t<0&&n>1){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}var p={computeRange:d,createRangeHelper:u,getDataType:f,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=a)}return n}};function C(e,t){function n(){t.ranges=null,e.modified()}t.classHierarchy.push("vtkDataArray"),e.getElementComponentSize=function(){return t.values.BYTES_PER_ELEMENT},e.getComponent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=function(e,r,a){a!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=a,n())},e.getData=function(){return t.values},e.getRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=e<0?t.numberOfComponents:e,r=null;return t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=d(t.values,e,t.numberOfComponents),t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple)},e.setRange=function(e,n){t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents));var r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=function(e,n){for(var r=e*t.numberOfComponents,a=0;a1&&void 0!==arguments[1]?arguments[1]:g,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var a=e*r;if(1===r)n[0]=t.values[a];else if(2===r)n[0]=t.values[a],n[1]=t.values[a+1];else if(3===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2];else if(4===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2],n[3]=t.values[a+3];else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=function(){return t.numberOfComponents},e.getNumberOfValues=function(){return t.values.length},e.getNumberOfTuples=function(){return t.values.length/t.numberOfComponents},e.getDataType=function(){return t.dataType},e.newClone=function(){return b({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkDataArray".concat(e.getMTime())),t.name},e.setData=function(e,r){t.values=e,t.size=e.length,t.dataType=f(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=s(s({},t),{},{vtkClass:e.getClassName()});n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((function(e){n[e]||delete n[e]}));var r={};return Object.keys(n).sort().forEach((function(e){r[e]=n[e]})),r.mtime&&delete r.mtime,r}}var I={name:"",numberOfComponents:1,size:0,dataType:c,rangeTuple:[0,0]};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,I,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=window[t.dataType].from(t.values)):t.values=new window[t.dataType](t.size),t.values&&(t.size=t.values.length,t.dataType=f(t.values)),Object(o.h)(e,t),Object(o.i)(e,t,["name","numberOfComponents"]),C(e,t)}var b=Object(o.g)(h,"vtkDataArray"),y=s(s({newInstance:b,extend:h},p),a.c);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return Z})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return u})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return c}));var r=n(24);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],o=t[6],i=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],s=t[6],c=t[7],g=t[8],u=t[9],d=t[10],m=t[11],f=t[12],p=t[13],C=t[14],I=t[15],h=n*l-r*i,b=n*s-a*i,y=n*c-o*i,v=r*s-a*l,Z=r*c-o*l,A=a*c-o*s,G=g*p-u*f,S=g*C-d*f,B=g*I-m*f,V=u*C-d*p,R=u*I-m*p,w=d*I-m*C,k=h*w-b*R+y*V+v*B-Z*S+A*G;return k?(k=1/k,e[0]=(l*w-s*R+c*V)*k,e[1]=(a*R-r*w-o*V)*k,e[2]=(p*A-C*Z+I*v)*k,e[3]=(d*Z-u*A-m*v)*k,e[4]=(s*B-i*w-c*S)*k,e[5]=(n*w-a*B+o*S)*k,e[6]=(C*y-f*A-I*b)*k,e[7]=(g*A-d*y+m*b)*k,e[8]=(i*R-l*B+c*G)*k,e[9]=(r*B-n*R-o*G)*k,e[10]=(f*Z-p*y+I*h)*k,e[11]=(u*y-g*Z-m*h)*k,e[12]=(l*S-i*V-s*G)*k,e[13]=(n*V-r*S+a*G)*k,e[14]=(p*b-f*v-C*h)*k,e[15]=(g*v-u*b+d*h)*k,e):null}function s(e,t,n){var r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],p=t[12],C=t[13],I=t[14],h=t[15],b=n[0],y=n[1],v=n[2],Z=n[3];return e[0]=b*r+y*l+v*u+Z*p,e[1]=b*a+y*s+v*d+Z*C,e[2]=b*o+y*c+v*m+Z*I,e[3]=b*i+y*g+v*f+Z*h,b=n[4],y=n[5],v=n[6],Z=n[7],e[4]=b*r+y*l+v*u+Z*p,e[5]=b*a+y*s+v*d+Z*C,e[6]=b*o+y*c+v*m+Z*I,e[7]=b*i+y*g+v*f+Z*h,b=n[8],y=n[9],v=n[10],Z=n[11],e[8]=b*r+y*l+v*u+Z*p,e[9]=b*a+y*s+v*d+Z*C,e[10]=b*o+y*c+v*m+Z*I,e[11]=b*i+y*g+v*f+Z*h,b=n[12],y=n[13],v=n[14],Z=n[15],e[12]=b*r+y*l+v*u+Z*p,e[13]=b*a+y*s+v*d+Z*C,e[14]=b*o+y*c+v*m+Z*I,e[15]=b*i+y*g+v*f+Z*h,e}function c(e,t,n){var r,a,o,i,l,s,c,g,u,d,m,f,p=n[0],C=n[1],I=n[2];return t===e?(e[12]=t[0]*p+t[4]*C+t[8]*I+t[12],e[13]=t[1]*p+t[5]*C+t[9]*I+t[13],e[14]=t[2]*p+t[6]*C+t[10]*I+t[14],e[15]=t[3]*p+t[7]*C+t[11]*I+t[15]):(r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=s,e[6]=c,e[7]=g,e[8]=u,e[9]=d,e[10]=m,e[11]=f,e[12]=r*p+l*C+u*I+t[12],e[13]=a*p+s*C+d*I+t[13],e[14]=o*p+c*C+m*I+t[14],e[15]=i*p+g*C+f*I+t[15]),e}function g(e,t,n){var r=n[0],a=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u(e,t,n,a){var o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B,V,R,w=a[0],k=a[1],W=a[2],x=Math.hypot(w,k,W);return x0?(I=2*Math.sqrt(C+1),e[3]=.25*I,e[0]=(d-f)/I,e[1]=(m-c)/I,e[2]=(s-g)/I):l>u&&l>p?(I=2*Math.sqrt(1+l-u-p),e[3]=(d-f)/I,e[0]=.25*I,e[1]=(s+g)/I,e[2]=(m+c)/I):u>p?(I=2*Math.sqrt(1+u-l-p),e[3]=(m-c)/I,e[0]=(s+g)/I,e[1]=.25*I,e[2]=(d+f)/I):(I=2*Math.sqrt(1+p-l-u),e[3]=(s-g)/I,e[0]=(m+c)/I,e[1]=(d+f)/I,e[2]=.25*I),e}function y(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=t[3],s=a+a,c=o+o,g=i+i,u=a*s,d=a*c,m=a*g,f=o*c,p=o*g,C=i*g,I=l*s,h=l*c,b=l*g,y=r[0],v=r[1],Z=r[2];return e[0]=(1-(f+C))*y,e[1]=(d+b)*y,e[2]=(m-h)*y,e[3]=0,e[4]=(d-b)*v,e[5]=(1-(u+C))*v,e[6]=(p+I)*v,e[7]=0,e[8]=(m+h)*Z,e[9]=(p-I)*Z,e[10]=(1-(u+f))*Z,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function v(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=n+n,l=r+r,s=a+a,c=n*i,g=r*i,u=r*l,d=a*i,m=a*l,f=a*s,p=o*i,C=o*l,I=o*s;return e[0]=1-u-f,e[1]=g+I,e[2]=d-C,e[3]=0,e[4]=g-I,e[5]=1-c-f,e[6]=m+p,e[7]=0,e[8]=d+C,e[9]=m-p,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Z(e,t,n,r,a,o,i){var l=1/(t-n),s=1/(r-a),c=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(i+o)*c,e[15]=1,e}function A(e,t,n,a){var i,l,s,c,g,u,d,m,f,p,C=t[0],I=t[1],h=t[2],b=a[0],y=a[1],v=a[2],Z=n[0],A=n[1],G=n[2];return Math.abs(C-Z)0?(n[0]=2*(s*l+u*a+c*i-g*o)/d,n[1]=2*(c*l+u*o+g*a-s*i)/d,n[2]=2*(g*l+u*i+s*o-c*a)/d):(n[0]=2*(s*l+u*a+c*i-g*o),n[1]=2*(c*l+u*o+g*a-s*i),n[2]=2*(g*l+u*i+s*o-c*a)),I(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:h,getRotation:b,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(e,t,n,r,a){var o=t[0],i=t[1],l=t[2],s=t[3],c=o+o,g=i+i,u=l+l,d=o*c,m=o*g,f=o*u,p=i*g,C=i*u,I=l*u,h=s*c,b=s*g,y=s*u,v=r[0],Z=r[1],A=r[2],G=a[0],S=a[1],B=a[2],V=(1-(p+I))*v,R=(m+y)*v,w=(f-b)*v,k=(m-y)*Z,W=(1-(d+I))*Z,x=(C+h)*Z,T=(f+b)*A,J=(C-h)*A,X=(1-(d+p))*A;return e[0]=V,e[1]=R,e[2]=w,e[3]=0,e[4]=k,e[5]=W,e[6]=x,e[7]=0,e[8]=T,e[9]=J,e[10]=X,e[11]=0,e[12]=n[0]+G-(V*G+k*S+T*B),e[13]=n[1]+S-(R*G+W*S+J*B),e[14]=n[2]+B-(w*G+x*S+X*B),e[15]=1,e},fromQuat:v,frustum:function(e,t,n,r,a,o,i){var l=1/(n-t),s=1/(a-r),c=1/(o-i);return e[0]=2*o*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(i+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*c,e[15]=0,e},perspective:function(e,t,n,r,a){var o,i=1/Math.tan(t/2);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(o=1/(r-a),e[10]=(a+r)*o,e[14]=2*a*r*o):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(i+l),c=2/(a+o);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(i-l)*s*.5,e[9]=(a-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:Z,lookAt:A,targetTo:function(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=r[0],s=r[1],c=r[2],g=a-n[0],u=o-n[1],d=i-n[2],m=g*g+u*u+d*d;m>0&&(g*=m=1/Math.sqrt(m),u*=m,d*=m);var f=s*d-c*u,p=c*g-l*d,C=l*u-s*g;return(m=f*f+p*p+C*C)>0&&(f*=m=1/Math.sqrt(m),p*=m,C*=m),e[0]=f,e[1]=p,e[2]=C,e[3]=0,e[4]=u*C-d*p,e[5]=d*f-g*C,e[6]=g*p-u*f,e[7]=0,e[8]=g,e[9]=u,e[10]=d,e[11]=0,e[12]=a,e[13]=o,e[14]=i,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:G,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var n=e[0],a=e[1],o=e[2],i=e[3],l=e[4],s=e[5],c=e[6],g=e[7],u=e[8],d=e[9],m=e[10],f=e[11],p=e[12],C=e[13],I=e[14],h=e[15],b=t[0],y=t[1],v=t[2],Z=t[3],A=t[4],G=t[5],S=t[6],B=t[7],V=t[8],R=t[9],w=t[10],k=t[11],W=t[12],x=t[13],T=t[14],J=t[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-y)<=r.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(o-v)<=r.b*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-Z)<=r.b*Math.max(1,Math.abs(i),Math.abs(Z))&&Math.abs(l-A)<=r.b*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(s-G)<=r.b*Math.max(1,Math.abs(s),Math.abs(G))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(g-B)<=r.b*Math.max(1,Math.abs(g),Math.abs(B))&&Math.abs(u-V)<=r.b*Math.max(1,Math.abs(u),Math.abs(V))&&Math.abs(d-R)<=r.b*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(m-w)<=r.b*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(f-k)<=r.b*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-W)<=r.b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(C-x)<=r.b*Math.max(1,Math.abs(C),Math.abs(x))&&Math.abs(I-T)<=r.b*Math.max(1,Math.abs(I),Math.abs(T))&&Math.abs(h-J)<=r.b*Math.max(1,Math.abs(h),Math.abs(J))},mul:S,sub:B})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return p(e,null==t?n.path:t)}},n.exports),n.exports}function i(e,t){l[e]=t}const l=Object.create(null),s=Object.create(null),c={id:"",exports:{},parent:void 0,filename:null,loaded:!1,children:[],paths:[]},g=["",".js",".json"];function u(e){const t=(e=e.replace(/\\/g,"/")).split("/"),n=""===t[0];for(let e=1;e0&&".."!==t[e-1]&&"."!==t[e-1]&&(t.splice(--e,2),e--);return e=t.join("/"),n&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}function d(){if(0===arguments.length)return".";let e;for(let t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":e}function m(e){if(0===e.length)return".";let t=e.length-1;for(;t>0;){const n=e.charCodeAt(t);if((47===n||92===n)&&t!==e.length-1)break;t--}return t>0?e.substr(0,t):47===e.chartCodeAt(0)||92===e.chartCodeAt(0)?e.charAt(0):"."}function f(e,t,n){const r=function(e){let t=e[0];if("/"===t||"\\"===t)return!1;let n=e[1],r=e[2];return!(!("."!==t||n&&"/"!==n&&"\\"!==n)||!("."!==t||"."!==n||r&&"/"!==r&&"\\"!==r))&&(":"!==n||"/"!==r&&"\\"!==r)}(e);let a;for("/"===(e=u(e))[0]&&(t="/");a=r?u(t?t+"/node_modules/"+e:d("node_modules",e)):t?u(t+"/"+e):e,!a.endsWith("/..");){for(let e=0;e1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function u(e,t){for(var n=0;n0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[0],l=n[1],s=n[2];return e[0]=a*s-o*l,e[1]=o*i-r*s,e[2]=r*l-a*i,e}function v(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[3]*r+n[7]*a+n[11]*o+n[15];return i=i||1,e[0]=(n[0]*r+n[4]*a+n[8]*o+n[12])/i,e[1]=(n[1]*r+n[5]*a+n[9]*o+n[13])/i,e[2]=(n[2]*r+n[6]*a+n[10]*o+n[14])/i,e}function Z(e,t,n){var r=t[0],a=t[1],o=t[2];return e[0]=r*n[0]+a*n[3]+o*n[6],e[1]=r*n[1]+a*n[4]+o*n[7],e[2]=r*n[2]+a*n[5]+o*n[8],e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function G(e,t){var n=e[0],a=e[1],o=e[2],i=t[0],l=t[1],s=t[2];return Math.abs(n-i)<=r.b*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-s)<=r.b*Math.max(1,Math.abs(o),Math.abs(s))}var S,B=c,V=g,R=u,w=m,k=f,W=o,x=p,T=(S=a(),function(e,t,n,r,a,o){var i,l;for(t||(t=3),n||(n=0),l=r?Math.min(r*t+n,e.length):e.length,i=n;i1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=new(window[e.getDataType()])(3*t.pointsIds.length));var a=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=a[n],r[++o]=a[++n],r[++o]=a[++n]})),t.points.setData(r)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(var o=e.getNumberOfPoints()-1;o>=0;--o)t.pointsIds[o]=o}},e.getBounds=function(){var e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(var r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else Object(s.D)(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,a=0;a<3;a++)n+=(r=t.bounds[2*a+1]-t.bounds[2*a])*r;return n},e.getParametricDistance=function(e){for(var t,n=0,r=0;r<3;r++)(t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0)>n&&(n=t);return n},e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.deepCopy=function(e){e.initialize(t.points,t.pointsIds)},e.getCellDimension=function(){},e.intersectWithLine=function(e,t,n,r,a,o,i){},e.evaluatePosition=function(e,t,n,r,a,o){}}var u={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.c.obj(e,t),t.points||(t.points=c.a.newInstance()),a.c.get(e,t,["points","pointsIds"]),g(e,t)}var m={newInstance:a.c.newInstance(d,"vtkCell"),extend:d};function f(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),a=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((function(){return{ncells:0,cells:null}})),t.extend=n,t.maxId=-1},e.initialize=function(){t.array=null},e.getLink=function(e){return t.array[e]},e.getNcells=function(e){return t.array[e].ncells},e.getCells=function(e){return t.array[e].cells},e.insertNextPoint=function(e){t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=function(e,n){t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=function(e){t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=function(e,n){t.array[n].cells=t.array[n].cells.filter((function(t){return t!==e})),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=function(e,n){t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=function(e,n){t.array[e].cells.length=n},e.squeeze=function(){!function(e,t){var n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=function(){t.maxId=-1},e.deepCopy=function(e){t.array=Object(l.a)(e.array),t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=function(e){++t.array[e].ncells},e.allocateLinks=function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.c.obj(e,t),f(e,t)}var I={newInstance:a.c.newInstance(C,"vtkCellLinks"),extend:C},h=0,b=1,y=2,v=3,Z=4,A=5,G=6,S=7,B=9,V=21,R=41,w=42,k=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=function(e,n,r){t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=function(n,r){return e.insertCell(++t.maxId,n,r),t.maxId},e.setCellTypes=function(e,n,r){t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=function(e){return t.locationArray[e]},e.deleteCell=function(e){t.typeArray[e]=h},e.getNumberOfTypes=function(){return t.maxId+1},e.isType=function(t){for(var n=e.getNumberOfTypes(),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J,n),a.c.obj(e,t),a.c.get(e,t,["size","maxId","extend"]),a.c.getArray(e,t,["typeArray","locationArray"]),T(e,t)}var O=function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},i=[];i[0]=n[0]-t[0],i[1]=n[1]-t[1],i[2]=n[2]-t[2];var l=i[0]*(e[0]-t[0])+i[1]*(e[1]-t[1])+i[2]*(e[2]-t[2]),c=Object(s.q)(i,i),g=1e-5*l;return 0!==c&&(o.t=l/c),g<0&&(g=-g),-g1?r=n:(r=i,i[0]=t[0]+o.t*i[0],i[1]=t[1]+o.t*i[1],i[2]=t[2]+o.t*i[2]),a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2]),o.distance=Object(s.s)(r,e),o}function K(e,t,n,r,a,o){var i=[],l=[],c=[];a[0]=0,o[0]=0,i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],l[0]=r[0]-n[0],l[1]=r[1]-n[1],l[2]=r[2]-n[2],c[0]=n[0]-e[0],c[1]=n[1]-e[1],c[2]=n[2]-e[2];var g=[];g[0]=[Object(s.q)(i,i),-Object(s.q)(i,l)],g[1]=[g[0][1],Object(s.q)(l,l)];var u=[];if(u[0]=Object(s.q)(i,c),u[1]=-Object(s.q)(l,c),0===Object(s.C)(g,u,2)){for(var d,m=Number.MAX_VALUE,f=[e,t,n,r],p=[n,n,e,e],C=[r,r,t,t],I=[o[0],o[0],a[0],a[0]],h=[a[0],a[0],o[0],o[0]],b=0;b<4;b++)(d=P(f[b],p[b],C[b])).distance=0&&a[0]<=1&&o[0]>=0&&o[0]<=1?F.YES_INTERSECTION:F.NO_INTERSECTION}var M={distanceToLine:P,intersection:K};function L(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,a,o){var i={intersect:0,t:Number.MIN_VALUE,subId:0};o[1]=0,o[2]=0;var l=[],c=[],g=[];t.points.getPoint(0,c),t.points.getPoint(1,g);var u=[],d=[],m=K(e,n,c,g,u,d);if(i.t=u[0],o[0]=d[0],m===F.YES_INTERSECTION){for(var f=0;f<3;f++)a[f]=c[f]+o[0]*(g[f]-c[f]),l[f]=e[f]+i.t*(n[f]-e[f]);if(Object(s.s)(a,l)<=r*r)return i.intersect=1,i}else{var p;if(i.t<0)return i.t=0,p=P(e,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(i.t>1)return i.t=1,p=P(n,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[0]<0)return o[0]=0,p=P(c,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[1]>1)return o[1]=1,p=P(g,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i}return i},e.evaluatePosition=function(e,t,n,r,a,o){}}var D={};function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),m.extend(e,t,n),L(e,t)}var U=Y(Y({newInstance:a.c.newInstance(E,"vtkLine"),extend:E},M),N),z=n(30);function _(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=Object(o.a)(t.points):t.points=c.a.newInstance(),e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.getBounds=function(){return t.points.getBounds()},e.computeBounds=function(){e.getBounds()};var n=e.shallowCopy;e.shallowCopy=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=c.a.newInstance(),t.points.shallowCopy(e.getPoints())}}var j={};function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),z.a.extend(e,t,n),a.c.setGet(e,t,["points"]),_(e,t)}var q={newInstance:a.c.newInstance(Q,"vtkPointSet"),extend:Q},$=n(39);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n,r){var a=n[0]-t[0],o=n[1]-t[1],i=n[2]-t[2],l=e[0]-t[0],s=e[1]-t[1],c=e[2]-t[2];r[0]=o*c-i*s,r[1]=i*l-a*c,r[2]=a*s-o*l}function ne(e,t,n,r){te(e,t,n,r);var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==a&&(r[0]/=a,r[1]/=a,r[2]/=a)}var re={computeNormalDirection:te,computeNormal:ne};function ae(e,t){t.classHierarchy.push("vtkTriangle"),e.getCellDimension=function(){return 2},e.intersectWithLine=function(n,r,a,o,i){var l={subId:0,t:0,intersect:-1};i[2]=0;var c=a*a,g=[],u=[],d=[];t.points.getPoint(0,g),t.points.getPoint(1,u),t.points.getPoint(2,d);var m=[];if(ne(g,u,d,m),0!==m[0]||0!==m[1]||0!==m[2]){var f=$.a.intersectWithLine(n,r,g,m);if(l.t=f.t,o[0]=f.x[0],o[1]=f.x[1],o[2]=f.x[2],!f.intersection)return i[0]=0,i[1]=0,l.intersect=0,l;var p=e.evaluatePosition(o,[],i,[]);if(p.evaluation>=0)return p.dist2<=c?(l.intersect=1,l):(l.intersect=p.evaluation,l)}var C=Object(s.s)(g,u),I=Object(s.s)(u,d),h=Object(s.s)(d,g);if(t.line||(t.line=U.newInstance()),C>I&&C>h?(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,u)):I>h&&I>C?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,g)),t.line.intersectWithLine(n,r,a,o,i).intersect){for(var b=[],y=[],v=[],Z=0;Z<3;Z++)b[Z]=g[Z]-d[Z],y[Z]=u[Z]-d[Z],v[Z]=o[Z]-d[Z];return i[0]=Object(s.q)(v,b)/h,i[1]=Object(s.q)(v,y)/I,l.evaluation=1,l}return i[0]=0,i[1]=0,l.evaluation=0,l},e.evaluatePosition=function(e,n,r,a){var o,i,l,c,g,u,d,m={subId:0,dist2:0,evaluation:-1},f=[],p=[],C=[],I=[],h=[],b=[],y=[],v=0,Z=[],A=[],G=[],S=[],B=[];m.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,p),t.points.getPoint(0,C),te(f,p,C,I),$.a.generalizedProjectPoint(e,f,I,B);var V=0;for(o=0;o<3;o++)(l=I[o]<0?-I[o]:I[o])>V&&(V=l,v=o);for(i=0,o=0;o<3;o++)o!==v&&(Z[i++]=o);for(o=0;o<2;o++)h[o]=B[Z[o]]-C[Z[o]],b[o]=f[Z[o]]-C[Z[o]],y[o]=p[Z[o]]-C[Z[o]];if(0===(c=Object(s.z)(b,y)))return r[0]=0,r[1]=0,m.evaluation=-1,m;if(r[0]=Object(s.z)(h,y)/c,r[1]=Object(s.z)(b,h)/c,a[0]=1-(r[0]+r[1]),a[1]=r[0],a[2]=r[1],a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&a[2]>=0&&a[2]<=1)n&&(m.dist2=Object(s.s)(B,e),n[0]=B[0],n[1]=B[1],n[2]=B[2]),m.evaluation=1;else{var R;if(n)if(a[1]<0&&a[2]<0)for(g=Object(s.s)(e,C),u=U.distanceToLine(e,f,C,R,G),d=U.distanceToLine(e,C,p,R,S),g1?r[a]-1:0)>n&&(n=t);return n}}var oe={};function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oe,n),m.extend(e,t,n),ae(e,t)}var le,se=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),ce.forEach((function(n){t[n]=i.a.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),a=e.getNumberOfPolys(),o=e.getNumberOfStrips(),i=n+r+a+o,l=new Uint8Array(i),s=l,c=new Uint32Array(i),g=c;if(n){var u=0;t.verts.getCellSizes().forEach((function(e,t){g[t]=u,s[t]=e>1?y:b,u+=e+1})),g=g.subarray(n),s=s.subarray(n)}if(r){var d=0;t.lines.getCellSizes().forEach((function(e,t){g[t]=d,s[t]=e>2?Z:v,1===e&&ge("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),d+=e+1})),g=g.subarray(r),s=s.subarray(r)}if(a){var m=0;t.polys.getCellSizes().forEach((function(e,t){switch(g[t]=m,e){case 3:s[t]=A;break;case 4:s[t]=B;break;default:s[t]=S}e<3&&ge("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),m+=e+1})),g+=g.subarray(a),s+=s.subarray(a)}if(o){var f=0;s.fill(G,0,o),t.strips.getCellSizes().forEach((function(e,t){g[t]=f,f+=e+1}))}t.cells=O.newInstance(),t.cells.setCellTypes(i,l,c)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=I.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellPoints=function(e){var n=t.cells.getCellType(e),r=null;switch(n){case b:case y:r=t.verts;break;case v:case Z:r=t.lines;break;case A:case B:case S:r=t.polys;break;case G:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var a=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(a)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var a=t.links.getLink(n),o=t.links.getLink(r);return a.cells.filter((function(t){return t!==e&&-1!==o.cells.indexOf(t)}))},e.getCell=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.getCellPoints(t),a=n||ue[r.cellType].newInstance();return a.initialize(e.getPoints(),r.cellPointIds),a}}var me={};function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,me,n),q.extend(e,t,n),a.c.get(e,t,["cells","links"]),a.c.setGet(e,t,["verts","lines","polys","strips"]),de(e,t)}var pe={newInstance:a.c.newInstance(fe,"vtkPolyData"),extend:fe};t.a=pe},function(e,t,n){"use strict";var r=function(e){if(Array.isArray(e))return e};var a=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}},o=n(41);var i=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};t.a=function(e,t){return r(e)||a(e,t)||Object(o.a)(e,t)||i()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},a={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"},o={DefaultDataType:a.FLOAT,DataTypeByteSize:r,VtkDataTypes:a};t.c=o},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.d(t,"a",(function(){return a})),r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}};var a=r},function(e,t,n){"use strict";(function(e){var r=n(48),a=n(5);n(3);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i={vtkObject:function(){return null}};function l(t){if(null==t)return t;if(t.isA)return t;if(!t.vtkClass)return e.console&&e.console.error&&e.console.error("Invalid VTK object"),null;var n=i[t.vtkClass];if(!n)return e.console&&e.console.error&&e.console.error("No vtk class found for Object of type ".concat(t.vtkClass)),null;var s=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:a,registerType:o};t.a=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),a=n(54),o=Object(r.d)((function(t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!a.a.Readable}catch(t){n.nodestream=!1}}),"/$$rollup_base$$/node_modules/jszip/lib")}).call(this,n(35).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],g=!1,u=-1;function d(){g&&s&&(g=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!g){var e=l(d);g=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,a,i;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+".".length>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var i={codes:r}},function(e,t,n){"use strict";var r=n(11),a=n(51),o=n(52),i=(n(3),n(24)),l=n(8),s=n(12),c=n(6),g=function(e){return e},u=Object(l.h)(new Float64Array(16)),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(a.a)(this,e),this.matrix=Object(l.h)(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?i.d:g}return Object(o.a)(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(16);Object(s.p)(n,e[0],e[1],e[2]),Object(s.p)(r,t[0],t[1],t[2]),Object(s.l)(n,n),Object(s.l)(r,r);var o=Object(s.d)(n,r);return o>=1||(Object(s.c)(this.tmp,n,r),Object(s.j)(this.tmp)<1e-6&&(Object(s.c)(this.tmp,[1,0,0],e),Object(s.j)(this.tmp)<1e-6&&Object(s.c)(this.tmp,[0,1,0],e)),Object(l.f)(a,Math.acos(o),this.tmp),Object(l.l)(this.matrix,this.matrix,a)),this}},{key:"rotate",value:function(e,t){return s.p.apply(s.r,[this.tmp].concat(Object(r.a)(t))),Object(s.l)(this.tmp,this.tmp),Object(l.q)(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Object(l.a)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return Object(l.b)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Object(l.c)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.s)(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.r)(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Object(l.l)(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Object(l.h)(this.matrix),this}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Object(c.n)(u,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,a=t;a2&&void 0!==arguments[2]?arguments[2]:{},a=new XMLHttpRequest;return a.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return a.setRequestHeader(n,o)})),n.progressCallback&&a.addEventListener("progress",n.progressCallback),a}var m={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r&&r.compression?g():n.ref&&!n.ref.pending?new Promise((function(a,l){var g=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);g.onreadystatechange=function(t){1===g.readyState&&(n.ref.pending=!0,1==++u&&e.invokeBusy&&e.invokeBusy(!0)),4===g.readyState&&(n.ref.pending=!1,200===g.status||0===g.status?(n.buffer=g.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.a.ENDIANNESS!==n.ref.encode&&o.a.ENDIANNESS&&(c("Swap bytes of ".concat(n.name)),o.a.swapBytes(n.buffer,i.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&s("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--u&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):l({xhr:g,e:t}))},g.responseType="string"!==n.dataType?"arraybuffer":"text",g.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=d("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(l.b)("http")||Object(l.c)("http",(function(e){return m}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),a=Object(r.d)((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),"/$$rollup_base$$/node_modules/inherits")},function(e,t,n){"use strict";n(3);var r=n(4),a=n(7),o=n(15),i=r.c.vtkErrorMacro,l=[1,-1,1,-1,1,-1];function s(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=new window[t.dataType](t.size),e.setNumberOfComponents(r),e.modified())},e.setPoint=function(e){for(var n=e*t.numberOfComponents,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.a.extend(e,t,n),s(e,t)}var u={newInstance:r.c.newInstance(g,"vtkPoints"),extend:g};t.a=u},function(e,t,n){"use strict";var r,a,o=n(9),i=o.b.MutationObserver||o.b.WebKitMutationObserver;if(i){var l=0,s=new i(d),c=o.b.document.createTextNode("");s.observe(c,{characterData:!0}),r=function(){c.data=l=++l%2}}else if(o.b.setImmediate||void 0===o.b.MessageChannel)r="document"in o.b&&"onreadystatechange"in o.b.document.createElement("script")?function(){var e=o.b.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},o.b.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var g=new o.b.MessageChannel;g.port1.onmessage=d,r=function(){g.port2.postMessage(0)}}var u=[];function d(){var e,t;a=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e=0&&e=0},e.getArrayName=function(e){var n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=function(){return t.copyFieldFlags},e.getFlag=function(e){return t.copyFieldFlags[e]},e.passData=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((function(n){var o=e.getFlag(n.getName());if(!1!==o&&(!t.doCopyAllOff||!0===o)&&n){var l=e.getArrayByName(n.getName());if(l){if(n.getNumberOfComponents()===l.getNumberOfComponents())if(r>-1&&r-1?a:r;l.setTuple(s,n.getTuple(r))}else for(var c=0;cn.getNumberOfTuples())e.addArray(n);else{var g=n.getNumberOfComponents(),u=n.getNumberOfValues(),d=a>-1?a:r;ue?t.data.getMTime():e}),t.mtime)},e.getNumberOfComponents=function(){return t.arrays.reduce((function(e,t){return e+t.data.getNumberOfComponents()}),0)},e.getNumberOfTuples=function(){return t.arrays.length>0?t.arrays[0].getNumberOfTuples():0},e.getState=function(){var e=n();return e.arrays=t.arrays.map((function(e){return{data:e.data.getState()}})),e}}var s={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),a.c.obj(e,t),l(e,t)}var g={newInstance:a.c.newInstance(c,"vtkFieldData"),extend:c},u=n(37);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=u.c.AttributeTypes,f=u.c.AttributeCopyOperations,p=a.c.vtkWarningMacro;function C(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return m[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()}));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes"),e.checkNumberOfComponents=function(e){return!0},e.setAttribute=function(n,a){var o=r(a);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return p("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return p("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var i=t["active".concat(o)];if(i>=0&&i=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),g.extend(e,t,n),a.c.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),C(e,t)}var b=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Z.forEach((function(n){t[n]=b.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var G={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,G,n),a.c.obj(e,t),a.c.setGet(e,t,Z),A(e,t)}var B=function(e){for(var t=1;t0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,i=[],l=t;l>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var d=function(e){var t,n,r=g(e),a=r[0],l=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,u=l>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===l&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[c++]=255&t),1===l&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},m=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,l=0,s=n-r;ls?s:l+i));return 1===r?(t=e[n-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")},f=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},p=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p};n.d(t,"a",(function(){return C}));var C=Object(r.d)((function(e,t){const n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;const r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|C(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return o.from(r,t,n);const i=function(e){if(o.isBuffer(e)){const t=0|u(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),a(e<0?0:0|u(e))}function c(e){const t=e.length<0?0:0|u(e.length),n=a(t);for(let r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function C(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return r?-1:U(e).length;t=(""+t).toLowerCase(),a=!0}}function I(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){let o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){let r=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;ra&&(r=a):r=a;const o=t.length;let i;for(r>o/2&&(r=o/2),i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function V(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a239?4:t>223?3:t>191?2:1;if(a+i<=n){let n,r,l,s;switch(i){case 1:t<128&&(o=t);break;case 2:n=e[a+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[a+1],r=e[a+2],l=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&l)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},o.byteLength=C,o.prototype._isBuffer=!0,o.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,n,r,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0);const s=Math.min(i,l),c=this.slice(r,a),g=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return Z(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return G(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;ar)&&(n=r);let a="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function X(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function O(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function N(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,4),p(e,t,n,r,23,4),n+4}function Y(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,8),p(e,t,n,r,52,8),n+8}o.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o=a&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);let r=t,a=1,o=this[e+--r];for(;r>0&&(a*=256);)o+=this[e+--r]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||T(e,4,this.length),f(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),f(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=0,o=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=n-1,o=1,i=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/o>>0)-i&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return Y(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Y(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||D(t,e.length-(n+1))}(r,a,o)}function L(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function D(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=K(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=K(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const E=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;const r=e.length;let a=null;const o=[];for(let i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function $(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}),"/$$rollup_base$$/node_modules/buffer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,a="object"==typeof Reflect?Reflect:null,o=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}var s=l;l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var c=10;function g(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var a,o,i,l;if(g(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=u(e))>0&&i.length>a&&!i.warned){i.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=i.length,l=s,console&&console.warn&&console.warn(l)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=m.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,g=I(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},l.prototype.listenerCount=C,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},s.once=function(e,t){return new Promise((function(n,r){function a(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,a),r(n)},e.once("error",o)),e.once(t,a)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22).a.codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}var o=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function I(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:h(e,t,n,r,a);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):h(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,n,r,a){var o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var g=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){for(var u=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+u<=n)switch(u){case 1:c<128&&(g=c);break;case 2:128==(192&(o=e[a+1]))&&(s=(31&c)<<6|63&o)>127&&(g=s);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(s=(15&c)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:o=e[a+1],i=e[a+2],l=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&l)&&(s=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&l)>65535&&s<1114112&&(g=s)}null===g?(g=65533,u=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),a+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,a){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),l=Math.min(o,i),c=this.slice(r,a),g=e.slice(t,n),u=0;ua)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return Z(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,a,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function J(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function X(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||X(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||X(e,0,n,8),a.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},s.prototype.readUInt8=function(e,t){return t||W(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||W(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||W(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||W(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||W(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):J(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=0,i=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=n-1,i=1,l=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/i>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):J(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(7),i=n(15);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};o.a.extend(e,t,d(n)),u(e,t)}var f=s({newInstance:a.c.newInstance(m,"vtkCellArray"),extend:m},g);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},a={DEFAULT:0,SINGLE:1,DOUBLE:2},o={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:r,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:a,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};t.c=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));n(3);var r={UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},a={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7},o={FieldDataTypes:r,FieldAssociations:a};t.c=o},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(6)),o=n(4);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){var r=n[0]*(e[0]-t[0])+n[1]*(e[1]-t[1])+n[2]*(e[2]-t[2]);return Math.abs(r)}function s(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o);r[0]=e[0]-i*n[0],r[1]=e[1]-i*n[1],r[2]=e[2]-i*n[2]}function c(e,t,n){var r=Object(a.q)(e,t),o=Object(a.q)(t,t);return 0===o&&(o=1),n[0]=e[0]-r*t[0]/o,n[1]=e[1]-r*t[1]/o,n[2]=e[2]-r*t[2]/o,n}function g(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o),l=Object(a.q)(n,n);0!==l?(r[0]=e[0]-i*n[0]/l,r[1]=e[1]-i*n[1]/l,r[2]=e[2]-i*n[2]/l):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function u(e,t,n,r){var o={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],l=[];Object(a.t)(t,e,i),Object(a.t)(n,e,l);var s=Object(a.q)(r,l),c=Object(a.q)(r,i);return(c<0?-c:c)<=(s<0?1e-6*-s:1e-6*s)||(o.t=s/c,o.x[0]=e[0]+o.t*i[0],o.x[1]=e[1]+o.t*i[1],o.x[2]=e[2]+o.t*i[2],o.intersection=!0,o.betweenPoints=o.t>=0&&o.t<=1),o}function d(e,t,n,r){var o={intersection:!1,l0:[],l1:[],error:null},i=[];Object(a.w)(t,r,i);var l,s=i.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<1e-6){var c=[];return Object(a.t)(e,n,c),0===Object(a.q)(t,c)?o.error="coincide":o.error="disjoint",o}l=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var g=[],u=-Object(a.q)(t,e),d=-Object(a.q)(r,n);switch(l){case"x":g[0]=0,g[1]=(d*t[2]-u*r[2])/i[0],g[2]=(u*r[1]-d*t[1])/i[0];break;case"y":g[0]=(u*r[2]-d*t[2])/i[1],g[1]=0,g[2]=(d*t[0]-u*r[0])/i[1];break;case"z":g[0]=(d*t[1]-u*r[1])/i[2],g[1]=(u*r[0]-d*t[0])/i[2],g[2]=0}return o.l0=g,Object(a.x)(g,i,o.l1),o.intersection=!0,o}var m={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:s,projectVector:c,generalizedProjectPoint:g,intersectWithLine:u,intersectWithPlane:d,DISJOINT:"disjoint",COINCIDE:"coincide"};function f(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return l(e,t.origin,t.normal)},e.projectPoint=function(e,n){s(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return c(e,t.normal,n)},e.push=function(e){if(0!==e)for(var n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=function(e,n){g(e,t.origin,t.normal,n)},e.evaluateFunction=function(e,n,r){return Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2])},e.evaluateGradient=function(e){return[t.normal[0],t.normal[1],t.normal[2]]},e.intersectWithLine=function(e,n){return u(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return d(e,n,t.origin,t.normal)}}var p={normal:[0,0,1],origin:[0,0,0]};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.c.obj(e,t),o.c.setGetArray(e,t,["normal","origin"],3),f(e,t)}var I=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,a=r(e),o=t.exec(a);if(!o)return{text:a};var i=o.index+o[0].length,l=a.substring(0,i),s=null,c=n?n.exec(a):null;if(c){var g=a.substr(c.index);s={text:l+g,binaryBuffer:e.slice(i,c.index)}}else s={text:l,binaryBuffer:e.slice(i)};return s}};t.a=a},function(e,t,n){"use strict";var r=n(42);t.a=function(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===b.prototype||(t=function(e){return b.from(e)}(t)),r)i.endEmitted?k(e,new w):X(e,i,t,!0);else if(i.ended)k(e,new V);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):Y(e,i)):X(e,i,t,!1)}else r||(i.reading=!1,Y(e,i));return!i.ended&&(i.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(t){var n=t._readableState;I("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(I("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(H,t))}function H(e){var t=e._readableState;I("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function Y(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(F,t,n))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){I("readable nexttick read 0"),e.read(0)}function M(e,t){I("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function E(t){var n=t._readableState;I("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(U,n,t))}function U(e,t){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):N(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&E(this),null;var r,a=t.needReadable;return I("need readable",a),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){k(this,new R("_read()"))},T.prototype.pipe=function(t,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,I("pipe count=%d opts=%j",a.pipesCount,n);var o=n&&!1===n.end||t===e.stdout||t===e.stderr?m:i;function i(){I("onend"),t.end()}a.endEmitted?e.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){I("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,I("cleanup"),t.removeListener("close",u),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),s=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(e,"data")&&(t.flowing=!0,L(e))}}(r);t.on("drain",l);var s=!1;function c(e){I("ondata");var n=t.write(e);I("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==z(a.pipes,t))&&!s&&(I("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function g(e){I("onerror",e),m(),t.removeListener("error",g),0===h(t,"error")&&k(t,e)}function u(){t.removeListener("finish",d),m()}function d(){I("onfinish"),t.removeListener("close",u),m()}function m(){I("unpipe"),r.unpipe(t)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",u),t.once("finish",d),t.emit("pipe",r),a.flowing||(I("pipe resume"),r.resume()),t},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==a.flowing&&this.resume()):"readable"===t&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,I("on readable",a.length,a.reading),a.length?N(this):a.reading||e.nextTick(K,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,n){var r=o.a.prototype.removeListener.call(this,t,n);return"readable"===t&&e.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var n=o.a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||e.nextTick(P,this),n},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!t.readableListening,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(M,t,n))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(I("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){I("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new V(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),W.prototype._write=function(e,t,n){n(new v("_write()"))},W.prototype._writev=null,W.prototype.end=function(t,n,r){var a=this._writableState;return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),a.corked&&(a.corked=1,this.uncork()),a.ending||function(t,n,r){n.ending=!0,N(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,a,r),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),W.prototype.destroy=s.a.destroy,W.prototype._undestroy=s.a.undestroy,W.prototype._destroy=function(e,t){t(e)}}).call(this,n(21))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),a=n(19),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){for(var t,n,a,i,l,s,c,g=[],u=0,d=e.length,m=d,f="string"!==r.a.getTypeOf(e);u>2,l=(3&t)<<4|n>>4,s=m>1?(15&n)<<2|a>>6:64,c=m>2?63&a:64,g.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(c));return g.join("")},decode:function(e){var t,n,r,i,l,s,c=0,g=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,m=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&m--,e.charAt(e.length-2)===o.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.a.uint8array?new Uint8Array(0|m):new Array(0|m);c>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(c++)))>>2,r=(3&l)<<6|(s=o.indexOf(e.charAt(c++))),d[g++]=t,64!==l&&(d[g++]=n),64!==s&&(d[g++]=r);return d}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(67),o=n(16),i=n(49),l=n(19),s=n(28),c=n(68),g=null;if(l.a.nodestream)try{g=c.a}catch(e){}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,r.a.checkSupport(i),this._worker=e.pipe(new a.a(i)),e.lock()}catch(e){this._worker=new o.a("error"),this._worker.error(e)}}u.prototype={accumulate:function(t){return n=this,a=t,new s.a.Promise((function(t,o){var l=[],s=n._internalType,c=n._outputType,g=n._mimeType;n.on("data",(function(e,t){l.push(e),a&&a(t)})).on("error",(function(e){l=[],o(e)})).on("end",(function(){try{var n=function(e,t,n){switch(e){case"blob":return r.a.newBlob(r.a.transformTo("arraybuffer",t),n);case"base64":return i.a.encode(t);default:return r.a.transformTo(e,t)}}(c,function(t,n){var r,a=0,o=null,i=0;for(r=0;r>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new r(e),o=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.alea=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),o=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor128=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),i=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorwow=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),l=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,a=t.i;return e=r[a],n=(e^=e>>>7)^e<<24,n^=(e=r[a+1&7])^e>>>10,n^=(e=r[a+3&7])^e>>>3,n^=(e=r[a+4&7])^e<<7,e=r[a+7&7],n^=(e^=e<<13)^e<<9,r[a]=n,t.i=a+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.x&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorshift7=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),s=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,a=t.X,o=t.i;return t.w=r=r+1640531527|0,n=a[o+34&127],e=a[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=a[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,a,o,i,l=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),a=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(i=i+1640531527|0,a=0==(n=l[127&o]^=r+i)?a+1:0);for(a>=128&&(l[127&(t&&t.length||0)]=-1),a=127,o=512;o>0;--o)r=l[a+34&127],n=l[a=a+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,l[a]=r^n;e.w=i,e.X=l,e.i=a}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.X&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor4096=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),c=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,a=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^a,a=a-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^a,t.a=a-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.tychei=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),g=Object.freeze({__proto__:null,default:{}}),u=Object(r.e)(g),d=Object(r.d)((function(e){!function(t,n,r){var a,o=256,i=r.pow(o,6),l=r.pow(2,52),s=2*l,c=255;function g(e,c,g){var u=[],C=f(function e(t,n){var r,a=[],o=typeof t;if(n&&"object"==o)for(r in t)try{a.push(e(t[r],n-1))}catch(t){}return a.length?a:"string"==o?t:t+"\0"}((c=1==c?{entropy:!0}:c||{}).entropy?[e,p(n)]:null==e?function(){try{var e;return a&&(e=a.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),p(e)}catch(e){var r=t.navigator,i=r&&r.plugins;return[+new Date,t,i,t.screen,p(n)]}}():e,3),u),I=new d(u),h=function(){for(var e=I.g(6),t=i,n=0;e=s;)e/=2,t/=2,n>>>=1;return(e+n)/t};return h.int32=function(){return 0|I.g(4)},h.quick=function(){return I.g(4)/4294967296},h.double=h,f(p(I.S),n),(c.pass||g||function(e,t,n,a){return a&&(a.S&&m(a,I),e.state=function(){return m(I,{})}),n?(r.random=e,t):e})(h,C,"global"in c?c.global:this==r,c.state)}function d(e){var t,n=e.length,r=this,a=0,i=r.i=r.j=0,l=r.S=[];for(n||(e=[n++]);a0,(function(e){r||(r=e),e&&o.forEach(k),i||(o.forEach(k),a(r))}))}));return t.reduce(W)},X.Stream=X,X.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",i),n.on("close",l));var o=!1;function i(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===J.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e},n.d(t,"a",(function(){return O}));var O=T},function(e,t,n){"use strict";var r=Object.freeze({__proto__:null,default:{}}),a=n(9);n.d(t,"a",(function(){return o}));var o=Object(a.e)(r)},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=56},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(31),a=n(55);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=r.a.Buffer,s=a.a.inspect,c=s&&s.custom||"inspect",g=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,a=l.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,n=a,r=i,l.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return a},t.consume=function(e,t){var n;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++r}return this.length-=r,t},t[c]=function(e,t){return s(this,function(e){for(var t=1;t0?i-4:i;for(n=0;n>16&255,s[g++]=t>>8&255,s[g++]=255&t;2===l&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,s[g++]=255&t);1===l&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,s[g++]=t>>8&255,s[g++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,l=n-a;il?l:i+16383));1===a?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],a=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=i.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var a,o,i=[],l=t;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},t.write=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,n(65).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,l,s=1,c={},g=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=a.compression,o=a.progressCallback;return t.binary?a.dataAccessHelper.fetchBinary(e,{compression:r,progressCallback:o}):a.dataAccessHelper.fetchText(n,e,{compression:r,progressCallback:o})}a.classHierarchy.push("vtkSTLReader"),a.dataAccessHelper||(a.dataAccessHelper=r.a.get("http")),n.setUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};a.url=e;var r=e.split("/");return r.pop(),a.baseURL=r.join("/"),a.compression=t.compression,n.loadData({progressCallback:t.progressCallback,binary:!!t.binary})},n.loadData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(a.url,e);return t.then(n.parse),t},n.parse=function(e){"string"==typeof e?n.parseAsText(e):n.parseAsArrayBuffer(e)},n.parseAsArrayBuffer=function(r){if(r&&r!==a.parseData)if(n.modified(),a.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var c=r.slice(0,80),g=function(e){for(var t=e.split(" ").filter((function(e){return e.indexOf("=")>-1})),n={},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.c.obj(e,t),a.c.get(e,t,["url","baseURL"]),a.c.setGet(e,t,["dataAccessHelper"]),a.c.algo(e,t,0,1),u(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkSTLReader")}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9),a=n(31),o=Object(r.d)((function(e,t){var n=a.a.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a.a:(r(a.a,t),t.Buffer=o),r(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof r?a.fill(t,r):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.a.SlowBuffer(e)}}),"/$$rollup_base$$/node_modules/safe-buffer");n.d(t,"a",(function(){return h}));var i=o.Buffer,l=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=c;function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===l||!l(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=C,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function g(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C(e){return e.toString(this.encoding)}function I(e){return e&&e.length?this.write(e):""}c.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(e.lastNeed=a-1),a):--r=0?(a>0&&(e.lastNeed=a-2),a):--r=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var h={StringDecoder:s}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return OZ})),n.d(r,"Algorithm",(function(){return kZ})),n.d(r,"Calculator",(function(){return WZ})),n.d(r,"CellData",(function(){return xZ})),n.d(r,"Contexts",(function(){return XZ})),n.d(r,"DataArray",(function(){return RZ})),n.d(r,"FieldData",(function(){return wZ})),n.d(r,"GeometryRepresentation",(function(){return SZ})),n.d(r,"GlyphRepresentation",(function(){return BZ})),n.d(r,"ImageData",(function(){return VZ})),n.d(r,"PointCloudRepresentation",(function(){return TZ})),n.d(r,"PointData",(function(){return yZ})),n.d(r,"PolyData",(function(){return vZ})),n.d(r,"Reader",(function(){return ZZ})),n.d(r,"ShareDataSet",(function(){return AZ})),n.d(r,"SliceRepresentation",(function(){return hZ})),n.d(r,"View",(function(){return GZ})),n.d(r,"VolumeController",(function(){return bZ})),n.d(r,"VolumeDataRepresentation",(function(){return JZ})),n.d(r,"VolumeRepresentation",(function(){return IZ}));var a=n(14);n(3);function o(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);o(g);const u=new Array(60);o(u);const d=new Array(512);o(d);const m=new Array(256);o(m);const f=new Array(29);o(f);const p=new Array(30);function C(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let I,h,b;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}o(p);const v=e=>e<256?d[e]:d[256+(e>>>7)],Z=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},A=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{A(e,n[2*t],n[2*t+1])},S=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},B=(e,t,n)=>{const r=new Array(16);let a,o,i=0;for(a=1;a<=15;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=S(r[t]++,t))}},V=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},R=e=>{e.bi_valid>8?Z(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},w=(e,t,n,r)=>{const a=2*t,o=2*n;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],a=e.pending_buf[e.l_buf+c],c++,0===r?G(e,a,t):(o=m[a],G(e,o+256+1,t),s=i[o],0!==s&&(a-=f[o],A(e,a,s)),r--,o=v(r),G(e,o,n),s=l[o],0!==s&&(r-=p[o],A(e,r,s)))}while(c{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)k(e,n,i);s=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,n[2*s]=n[2*i]+n[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,n[2*i+1]=n[2*l+1]=s,e.heap[1]=s++,k(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,g,u,d,m,f,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)g=e.heap[c],d=n[2*n[2*g+1]+1]+1,d>s&&(d=s,p++),n[2*g+1]=d,g>r||(e.bl_count[d]++,m=0,g>=l&&(m=i[g-l]),f=n[2*g],e.opt_len+=f*(d+m),o&&(e.static_len+=f*(a[2*g+1]+m)));if(0!==p){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;0!==d;d--)for(g=e.bl_count[d];0!==g;)u=e.heap[--c],u>r||(n[2*u+1]!==d&&(e.opt_len+=(d-n[2*u+1])*n[2*u],n[2*u+1]=d),g--)}})(e,t),B(n,c,e.bl_count)},T=(e,t,n)=>{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),r=0;r<=n;r++)if(a=i,i=t[2*(r+1)+1],!(++l{A(e,0+(r?1:0),3),((e,t,n,r)=>{R(e),Z(e,n),Z(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var N={_tr_init:e=>{X||((()=>{let e,t,n,r,a;const o=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<>=7;r<30;r++)for(p[r]=a<<7,e=0;e<1<{let a,o,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),x(e,e.l_desc),x(e,e.d_desc),i=(e=>{let t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?O(e,t,n,r):4===e.strategy||o===a?(A(e,2+(r?1:0),3),W(e,g,u)):(A(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),a=0;a(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{A(e,2,3),G(e,256,g),(e=>{16===e.bi_valid?(Z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},H=(e,t,n,r)=>{let a=65535&e|0,o=e>>>16&65535|0,i=0;for(;0!==n;){i=n>2e3?2e3:n,n-=i;do{a=a+t[r++]|0,o=o+a|0}while(--i);a%=65521,o%=65521}return a|o<<16|0};const Y=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var F=(e,t,n,r)=>{const a=Y,o=r+n;e^=-1;for(let n=r;n>>8^a[255&(e^t[n])];return-1^e},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:M,_tr_stored_block:L,_tr_flush_block:D,_tr_tally:E,_tr_align:U}=N,{Z_NO_FLUSH:z,Z_PARTIAL_FLUSH:_,Z_FULL_FLUSH:j,Z_FINISH:Q,Z_BLOCK:q,Z_OK:$,Z_STREAM_END:ee,Z_STREAM_ERROR:te,Z_DATA_ERROR:ne,Z_BUF_ERROR:re,Z_DEFAULT_COMPRESSION:ae,Z_FILTERED:oe,Z_HUFFMAN_ONLY:ie,Z_RLE:le,Z_FIXED:se,Z_DEFAULT_STRATEGY:ce,Z_UNKNOWN:ge,Z_DEFLATED:ue}=K,de=(e,t)=>(e.msg=P[t],t),me=e=>(e<<1)-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let pe=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ie=(e,t)=>{D(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ce(e.strm)},he=(e,t)=>{e.pending_buf[e.pending++]=t},be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ye=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=H(e.adler,t,a,n):2===e.state.wrap&&(e.adler=F(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},ve=(e,t)=>{let n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258;let m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(n=t,c[n+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead},Ze=e=>{const t=e.w_size;let n,r,a,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{a=e.head[--n],e.head[n]=a>=t?a-t:0}while(--r);r=t,n=r;do{a=e.prev[--n],e.prev[n]=a>=t?a-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=ye(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pe(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Ae=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=ve(e,n)),e.match_length>=3)if(r=E(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=pe(e,e.ins_h,e.window[e.strstart+1]);else r=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2},Ge=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=E(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ie(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=E(e,0,e.window[e.strstart-1]),r&&Ie(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=E(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2};function Se(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Be=[new Se(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ze(e),0===e.lookahead&&t===z)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ie(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Ie(e,!1),e.strm.avail_out),1)}),new Se(4,4,8,4,Ae),new Se(4,5,16,8,Ae),new Se(4,6,32,32,Ae),new Se(4,4,16,16,Ge),new Se(8,16,32,32,Ge),new Se(8,16,128,128,Ge),new Se(8,32,128,256,Ge),new Se(32,128,258,1024,Ge),new Se(32,258,258,4096,Ge)];function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Re=e=>{if(!e||!e.state)return de(e,te);e.total_in=e.total_out=0,e.data_type=ge;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=z,M(t),$},we=e=>{const t=Re(e);var n;return t===$&&((n=e.state).window_size=2*n.w_size,fe(n.head),n.max_lazy_match=Be[n.level].max_lazy,n.good_match=Be[n.level].good_length,n.nice_match=Be[n.level].nice_length,n.max_chain_length=Be[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ke=(e,t,n,r,a,o)=>{if(!e)return te;let i=1;if(t===ae&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>se)return de(e,te);8===r&&(r=9);const l=new Ve;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e&&e.state?2!==e.state.wrap?te:(e.state.gzhead=t,$):te,Te=(e,t)=>{let n,r;if(!e||!e.state||t>q||t<0)return e?de(e,te):te;const a=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===a.status&&t!==Q)return de(e,0===e.avail_out?re:te);a.strm=e;const o=a.last_flush;if(a.last_flush=t,42===a.status)if(2===a.wrap)e.adler=0,he(a,31),he(a,139),he(a,8),a.gzhead?(he(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),he(a,255&a.gzhead.time),he(a,a.gzhead.time>>8&255),he(a,a.gzhead.time>>16&255),he(a,a.gzhead.time>>24&255),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(he(a,255&a.gzhead.extra.length),he(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=F(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(he(a,0),he(a,0),he(a,0),he(a,0),he(a,0),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,3),a.status=113);else{let t=ue+(a.w_bits-8<<4)<<8,n=-1;n=a.strategy>=ie||a.level<2?0:a.level<6?1:6===a.level?2:3,t|=n<<6,0!==a.strstart&&(t|=32),t+=31-t%31,a.status=113,be(a,t),0!==a.strstart&&(be(a,e.adler>>>16),be(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending!==a.pending_buf_size));)he(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Ce(e),a.pending+2<=a.pending_buf_size&&(he(a,255&e.adler),he(a,e.adler>>8&255),e.adler=0,a.status=113)):a.status=113),0!==a.pending){if(Ce(e),0===e.avail_out)return a.last_flush=-1,$}else if(0===e.avail_in&&me(t)<=me(o)&&t!==Q)return de(e,re);if(666===a.status&&0!==e.avail_in)return de(e,re);if(0!==e.avail_in||0!==a.lookahead||t!==z&&666!==a.status){let n=a.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ze(e),0===e.lookahead)){if(t===z)return 1;break}if(e.match_length=0,n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):a.strategy===le?((e,t)=>{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=258){if(Ze(e),e.lookahead<=258&&t===z)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=E(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):Be[a.level].func(a,t);if(3!==n&&4!==n||(a.status=666),1===n||3===n)return 0===e.avail_out&&(a.last_flush=-1),$;if(2===n&&(t===_?U(a):t!==q&&(L(a,0,0,!1),t===j&&(fe(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Ce(e),0===e.avail_out))return a.last_flush=-1,$}return t!==Q?$:a.wrap<=0?ee:(2===a.wrap?(he(a,255&e.adler),he(a,e.adler>>8&255),he(a,e.adler>>16&255),he(a,e.adler>>24&255),he(a,255&e.total_in),he(a,e.total_in>>8&255),he(a,e.total_in>>16&255),he(a,e.total_in>>24&255)):(be(a,e.adler>>>16),be(a,65535&e.adler)),Ce(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$:ee)},Je=e=>{if(!e||!e.state)return te;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?de(e,te):(e.state=null,113===t?de(e,ne):$)},Xe=(e,t)=>{let n=t.length;if(!e||!e.state)return te;const r=e.state,a=r.wrap;if(2===a||1===a&&42!==r.status||r.lookahead)return te;if(1===a&&(e.adler=H(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(fe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ze(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=pe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ze(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=i,e.input=l,e.avail_in=o,r.wrap=a,$};const Oe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ne=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Oe(n,t)&&(e[t]=n[t])}}return e},He=e=>{let t=0;for(let n=0,r=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Pe=e=>{let t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Ke=(e,t)=>{let n,r;const a=t||e.length,o=new Array(2*a);for(r=0,n=0;n4)o[r++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fe[e[n]]>t?n:t},Le=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const De=Object.prototype.toString,{Z_NO_FLUSH:Ee,Z_SYNC_FLUSH:Ue,Z_FULL_FLUSH:ze,Z_FINISH:_e,Z_OK:je,Z_STREAM_END:Qe,Z_DEFAULT_COMPRESSION:qe,Z_DEFAULT_STRATEGY:$e,Z_DEFLATED:et}=K;function tt(e){this.options=Ne({level:qe,method:et,chunkSize:16384,windowBits:15,memLevel:8,strategy:$e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=We(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==je)throw new Error(P[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Pe(t.dictionary):"[object ArrayBuffer]"===De.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Xe(this.strm,e),n!==je)throw new Error(P[n]);this._dict_set=!0}}function nt(e,t){const n=new tt(t);if(n.push(e,!0),n.err)throw n.msg||P[n.err];return n.result}tt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?_e:Ee,"string"==typeof e?n.input=Pe(e):"[object ArrayBuffer]"===De.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Ue||o===ze)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Te(n,o),a===Qe)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Je(this.strm),this.onEnd(a),this.ended=!0,a===je;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},tt.prototype.onData=function(e){this.chunks.push(e)},tt.prototype.onEnd=function(e){e===je&&(this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:tt,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:K},at=function(e,t){let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S;const B=e.state;n=e.next_in,G=e.input,r=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),i=a+(e.avail_out-257),l=B.dmax,s=B.wsize,c=B.whave,g=B.wnext,u=B.window,d=B.hold,m=B.bits,f=B.lencode,p=B.distcode,C=(1<>>24,d>>>=b,m-=b,b=h>>>16&255,0===b)S[a++]=65535&h;else{if(!(16&b)){if(0==(64&b)){h=f[(65535&h)+(d&(1<>>=b,m-=b),m<15&&(d+=G[n++]<>>24,d>>>=b,m-=b,b=h>>>16&255,!(16&b)){if(0==(64&b)){h=p[(65535&h)+(d&(1<l){e.msg="invalid distance too far back",B.mode=30;break e}if(d>>>=b,m-=b,b=a-o,v>b){if(b=v-b,b>c&&B.sane){e.msg="invalid distance too far back",B.mode=30;break e}if(Z=0,A=u,0===g){if(Z+=s-b,b2;)S[a++]=A[Z++],S[a++]=A[Z++],S[a++]=A[Z++],y-=3;y&&(S[a++]=A[Z++],y>1&&(S[a++]=A[Z++]))}else{Z=a-v;do{S[a++]=S[Z++],S[a++]=S[Z++],S[a++]=S[Z++],y-=3}while(y>2);y&&(S[a++]=S[Z++],y>1&&(S[a++]=S[Z++]))}break}}break}}while(n>3,n-=y,m-=y<<3,d&=(1<{const s=l.bits;let c,g,u,d,m,f,p=0,C=0,I=0,h=0,b=0,y=0,v=0,Z=0,A=0,G=0,S=null,B=0;const V=new Uint16Array(16),R=new Uint16Array(16);let w,k,W,x=null,T=0;for(p=0;p<=15;p++)V[p]=0;for(C=0;C=1&&0===V[h];h--);if(b>h&&(b=h),0===h)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==h))return-1;for(R[1]=0,p=1;p<15;p++)R[p+1]=R[p]+V[p];for(C=0;C852||2===e&&A>592)return 1;for(;;){w=p-v,i[C]f?(k=x[T+i[C]],W=S[B+i[C]]):(k=96,W=0),c=1<>v)+g]=w<<24|k<<16|W|0}while(0!==g);for(c=1<>=1;if(0!==c?(G&=c-1,G+=c):G=0,C++,0==--V[p]){if(p===h)break;p=t[n+i[C]]}if(p>b&&(G&d)!==u){for(0===v&&(v=b),m+=I,y=p-v,Z=1<852||2===e&&A>592)return 1;u=G&d,a[u]=b<<24|y<<16|m-o|0}}return 0!==G&&(a[m+G]=p-v<<24|64<<16|0),l.bits=b,0};const{Z_FINISH:gt,Z_BLOCK:ut,Z_TREES:dt,Z_OK:mt,Z_STREAM_END:ft,Z_NEED_DICT:pt,Z_STREAM_ERROR:Ct,Z_DATA_ERROR:It,Z_MEM_ERROR:ht,Z_BUF_ERROR:bt,Z_DEFLATED:yt}=K,vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Zt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const At=e=>{if(!e||!e.state)return Ct;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,mt},Gt=e=>{if(!e||!e.state)return Ct;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,At(e)},St=(e,t)=>{let n;if(!e||!e.state)return Ct;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ct:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gt(e))},Bt=(e,t)=>{if(!e)return Ct;const n=new Zt;e.state=n,n.window=null;const r=St(e,t);return r!==mt&&(e.state=null),r};let Vt,Rt,wt=!0;const kt=e=>{if(wt){Vt=new Int32Array(512),Rt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ct(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ct(2,e.lens,0,32,Rt,0,e.work,{bits:5}),wt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=Rt,e.distbits=5},Wt=(e,t,n,r)=>{let a;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),(r-=a)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G=0;const S=new Uint8Array(4);let B,V;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ct;n=e.state,12===n.mode&&(n.mode=13),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,u=l,d=s,A=mt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&c)!==yt){e.msg="unknown compression method",n.mode=30;break}if(c>>>=4,g-=4,Z=8+(15&c),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=F(n.check,S,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m=n.length,m>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+m),Z)),512&n.flags&&(n.check=F(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1,g-=1,3&c){case 0:n.mode=14;break;case 1:if(kt(n),n.mode=20,t===dt){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,t===dt)break e;case 15:n.mode=16;case 16:if(m=n.length,m){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;a.set(r.subarray(o,o+m),i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},A=ct(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(V=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(V=C+3;g>>=C,g-=C,Z=0,m=3+(7&c),c>>>=3,g-=3}else{for(V=C+7;g>>=C,g-=C,Z=0,m=11+(127&c),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},A=ct(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},A=ct(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===dt)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,at(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;G=n.lencode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=n.distcode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<{if(!e||!e.state)return Ct;let t=e.state;return t.window&&(t.window=null),e.state=null,mt},Ot=(e,t)=>{if(!e||!e.state)return Ct;const n=e.state;return 0==(2&n.wrap)?Ct:(n.head=t,t.done=!1,mt)},Nt=(e,t)=>{const n=t.length;let r,a,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?Ct:11===r.mode&&(a=1,a=H(a,t,n,0),a!==r.check)?It:(o=Wt(e,t,n,n),o?(r.mode=31,ht):(r.havedict=1,mt))):Ct},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Yt=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_FINISH:Pt,Z_OK:Kt,Z_STREAM_END:Mt,Z_NEED_DICT:Lt,Z_STREAM_ERROR:Dt,Z_DATA_ERROR:Et,Z_MEM_ERROR:Ut}=K;function zt(e){this.options=Ne({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=Tt(this.strm,t.windowBits);if(n!==Kt)throw new Error(P[n]);if(this.header=new Ht,Ot(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Pe(t.dictionary):"[object ArrayBuffer]"===Yt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Nt(this.strm,t.dictionary),n!==Kt)))throw new Error(P[n])}function _t(e,t){const n=new zt(t);if(n.push(e),n.err)throw n.msg||P[n.err];return n.result}zt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Pt:Ft,"[object ArrayBuffer]"===Yt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Jt(n,i),o===Lt&&a&&(o=Nt(n,a),o===Kt?o=Jt(n,i):o===Et&&(o=Lt));n.avail_in>0&&o===Mt&&n.state.wrap>0&&0!==e[n.next_in];)xt(n),o=Jt(n,i);switch(o){case Dt:case Et:case Lt:case Ut:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(0===n.avail_out||o===Mt))if("string"===this.options.to){let e=Me(n.output,n.next_out),t=n.next_out-e,a=Ke(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Kt||0!==l){if(o===Mt)return o=Xt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},zt.prototype.onData=function(e){this.chunks.push(e)},zt.prototype.onEnd=function(e){e===Kt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jt={Inflate:zt,inflate:_t,inflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},ungzip:_t,constants:K};const{Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en}=rt,{Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an}=jt;var on={Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en,Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an,constants:K},ln=n(4),sn=n(34),cn=n(15),gn=n(18),un=ln.c.vtkErrorMacro,dn=ln.c.vtkDebugMacro,mn=0;function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(a.a)(e,2),n=t[0],o=t[1];return r.setRequestHeader(n,o)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var pn={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise((function(a,o){var i=fn("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);i.onreadystatechange=function(t){1===i.readyState&&(n.ref.pending=!0,1==++mn&&e.invokeBusy&&e.invokeBusy(!0)),4===i.readyState&&(n.ref.pending=!1,200===i.status||0===i.status?(n.buffer=i.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=on.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=on.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sn.a.ENDIANNESS!==n.ref.encode&&sn.a.ENDIANNESS&&(dn("Swap bytes of ".concat(n.name)),sn.a.swapBytes(n.buffer,cn.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&un("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--mn&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):o({xhr:i,e:t}))},i.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",i.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(on.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(un("Supported algorithms are: [gz]"),un("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(on.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=fn("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(gn.c)("http",(function(e){return pn}));var Cn=n(9),In=n(10),hn=n(19),bn=n(29),yn=n(16),vn=Object(Cn.d)((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;function a(){yn.a.call(this,"utf-8 decode"),this.leftOver=null}function o(){yn.a.call(this,"utf-8 encode")}n[254]=n[254]=1,t.utf8encode=function(e){return hn.a.nodebuffer?bn.a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},t.utf8decode=function(e){return hn.a.nodebuffer?In.a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,a,o,i=e.length,l=new Array(2*i);for(r=0,t=0;t4)l[r++]=65533,t+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),In.a.applyFromCharCode(l)}(e=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e))},In.a.inherits(a,yn.a),a.prototype.processChunk=function(e){var r=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(hn.a.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),i=r;o!==r.length&&(hn.a.uint8array?(i=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(i=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=a,In.a.inherits(o,yn.a),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o}),"/$$rollup_base$$/node_modules/jszip/lib"),Zn=n(50),An={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},Gn=n(28);function Sn(e){yn.a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=In.a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}In.a.inherits(Sn,yn.a),Sn.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this.data=null},Sn.prototype.resume=function(){return!!yn.a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,In.a.delay(this._tickAndRepeat,[],this)),!0)},Sn.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(In.a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sn.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Bn=Sn;function Vn(e){yn.a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}In.a.inherits(Vn,yn.a),Vn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}yn.a.prototype.processChunk.call(this,e)};var Rn=Vn,wn=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),kn=function(e,t){return void 0!==e&&e.length?"string"!==In.a.getTypeOf(e)?function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t[i])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t.charCodeAt(i))];return-1^e}(0|t,e,e.length):0};function Wn(){yn.a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}In.a.inherits(Wn,yn.a),Wn.prototype.processChunk=function(e){this.streamInfo.crc32=kn(e.data,this.streamInfo.crc32||0),this.push(e)};var xn=Wn;function Tn(e,t,n,r,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=a}Tn.prototype={getContentWorker:function(){var e=new Bn(Gn.a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Rn("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Bn(Gn.a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Tn.createWorkerFrom=function(e,t,n){return e.pipe(new xn).pipe(new Rn("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Rn("compressedSize")).withStreamInfo("compression",t)};var Jn=Tn,Xn=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Xn.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new vn.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new vn.Utf8DecodeWorker))}catch(e){(t=new yn.a("error")).error(e)}return new Zn.a(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Jn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new vn.Utf8EncodeWorker)),Jn.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Jn?this._data.getContentWorker():this._data instanceof yn.a?this._data:new Bn(this._data)}};for(var On=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Nn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Hn=0;Hn=0;)e[t]=0}var Kn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ln=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Dn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=new Array(576);Pn(En);var Un=new Array(60);Pn(Un);var zn=new Array(512);Pn(zn);var _n=new Array(256);Pn(_n);var jn=new Array(29);Pn(jn);var Qn,qn,$n,er=new Array(30);function tr(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function nr(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function rr(e){return e<256?zn[e]:zn[256+(e>>>7)]}function ar(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function or(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function sr(e,t,n){var r,a,o=new Array(16),i=0;for(r=1;r<=15;r++)o[r]=i=i+n[r-1]<<1;for(a=0;a<=t;a++){var l=e[2*a+1];0!==l&&(e[2*a]=lr(o[l]++,l))}}function cr(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function gr(e){e.bi_valid>8?ar(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ur(e,t,n,r){var a=2*t,o=2*n;return e[a]>1;n>=1;n--)dr(e,o,n);a=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],dr(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*a]=o[2*n]+o[2*r],e.depth[a]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=a,e.heap[1]=a++,dr(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,o,i,l,s=t.dyn_tree,c=t.max_code,g=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,p=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,p++),s[2*r+1]=o,r>c||(e.bl_count[o]++,i=0,r>=m&&(i=d[r-m]),l=s[2*r],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(g[2*r+1]+i)));if(0!==p){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,p-=2}while(p>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(a=e.heap[--n])>c||(s[2*a+1]!==o&&(e.opt_len+=(o-s[2*a+1])*s[2*a],s[2*a+1]=o),r--)}}(e,t),sr(o,c,e.bl_count)}function pr(e,t,n){var r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l>=7;r<30;r++)for(er[r]=a<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),fr(e,e.l_desc),fr(e,e.d_desc),i=function(e){var t;for(pr(e,e.dyn_ltree,e.l_desc.max_code),pr(e,e.dyn_dtree,e.d_desc.max_code),fr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Dn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?hr(e,t,n,r):4===e.strategy||o===a?(or(e,2+(r?1:0),3),mr(e,En,Un)):(or(e,4+(r?1:0),3),function(e,t,n,r){var a;for(or(e,t-257,5),or(e,n-1,5),or(e,r-4,4),a=0;a>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(_n[n]+256+1)]++,e.dyn_dtree[2*rr(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){or(e,2,3),ir(e,256,En),function(e){16===e.bi_valid?(ar(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},vr=function(e,t,n,r){for(var a=65535&e|0,o=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{o=o+(a=a+t[r++]|0)|0}while(--i);a%=65521,o%=65521}return a|o<<16|0},Zr=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),Ar=function(e,t,n,r){var a=Zr,o=r+n;e^=-1;for(var i=r;i>>8^a[255&(e^t[i])];return-1^e},Gr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Sr(e,t){return e.msg=Gr[t],t}function Br(e){return(e<<1)-(e>4?9:0)}function Vr(e){for(var t=e.length;--t>=0;)e[t]=0}function Rr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Fn.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function wr(e,t){yr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rr(e.strm)}function kr(e,t){e.pending_buf[e.pending++]=t}function Wr(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function xr(e,t){var n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258,m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(c[(n=t)+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead}function Tr(e){var t,n,r,a,o,i,l,s,c,g,u=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){Fn.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);a+=u}if(0===e.strm.avail_in)break;if(i=e.strm,l=e.window,s=e.strstart+e.lookahead,c=a,g=void 0,(g=i.avail_in)>c&&(g=c),n=0===g?0:(i.avail_in-=g,Fn.arraySet(l,i.input,i.next_in,g,s),1===i.state.wrap?i.adler=vr(i.adler,l,g,s):2===i.state.wrap&&(i.adler=Ar(i.adler,l,g,s)),i.next_in+=g,i.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=yr._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=yr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<15&&(i=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return Sr(e,-2);8===r&&(r=9);var l=new Nr;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tr(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wr(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wr(e,!1),e.strm.avail_out),1)})),new Or(4,4,8,4,Jr),new Or(4,5,16,8,Jr),new Or(4,6,32,32,Jr),new Or(4,4,16,16,Xr),new Or(8,16,32,32,Xr),new Or(8,16,128,128,Xr),new Or(8,32,128,256,Xr),new Or(32,128,258,1024,Xr),new Or(32,258,258,4096,Xr)];var Pr={deflateInit:function(e,t){return Fr(e,t,8,15,8,0)},deflateInit2:Fr,deflateReset:Yr,deflateResetKeep:Hr,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,a,o;if(!e||!e.state||t>5||t<0)return e?Sr(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Sr(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kr(r,31),kr(r,139),kr(r,8),r.gzhead?(kr(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kr(r,255&r.gzhead.time),kr(r,r.gzhead.time>>8&255),kr(r,r.gzhead.time>>16&255),kr(r,r.gzhead.time>>24&255),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kr(r,255&r.gzhead.extra.length),kr(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ar(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,3),r.status=113);else{var i=8+(r.w_bits-8<<4)<<8;i|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),i+=31-i%31,r.status=113,Wr(r,i),0!==r.strstart&&(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending!==r.pending_buf_size));)kr(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rr(e),r.pending+2<=r.pending_buf_size&&(kr(r,255&e.adler),kr(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rr(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Br(t)<=Br(n)&&4!==t)return Sr(e,-5);if(666===r.status&&0!==e.avail_in)return Sr(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var l=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Tr(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,a,o,i=e.window;;){if(e.lookahead<=258){if(Tr(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=i[a=e.strstart-1])===i[++a]&&r===i[++a]&&r===i[++a]){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=yr._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):br[r.level].func(r,t);if(3!==l&&4!==l||(r.status=666),1===l||3===l)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===t?yr._tr_align(r):5!==t&&(yr._tr_stored_block(r,0,0,!1),3===t&&(Vr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rr(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(kr(r,255&e.adler),kr(r,e.adler>>8&255),kr(r,e.adler>>16&255),kr(r,e.adler>>24&255),kr(r,255&e.total_in),kr(r,e.total_in>>8&255),kr(r,e.total_in>>16&255),kr(r,e.total_in>>24&255)):(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),Rr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Sr(e,-2):(e.state=null,113===t?Sr(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,a,o,i,l,s,c,g=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=vr(e.adler,t,g,0)),n.wrap=0,g>=n.w_size&&(0===o&&(Vr(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new Fn.Buf8(n.w_size),Fn.arraySet(c,t,g-n.w_size,n.w_size,0),t=c,g=n.w_size),i=e.avail_in,l=e.next_in,s=e.input,e.avail_in=g,e.next_in=0,e.input=t,Tr(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<=252?6:Dr>=248?5:Dr>=240?4:Dr>=224?3:Dr>=192?2:1;function Er(e,t){if(t<65534&&(e.subarray&&Mr||!e.subarray&&Kr))return String.fromCharCode.apply(null,Fn.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},zr=function(e){return Er(e,e.length)},_r=function(e){for(var t=new Fn.Buf8(e.length),n=0,r=t.length;n4)l[r++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return Er(l,r)},Qr=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Lr[e[n]]>t?n:t},qr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$r=Object.prototype.toString;function ea(e){if(!(this instanceof ea))return new ea(e);this.options=Fn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=Pr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(Gr[n]);if(t.header&&Pr.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ur(t.dictionary):"[object ArrayBuffer]"===$r.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Pr.deflateSetDictionary(this.strm,r)))throw new Error(Gr[n]);this._dict_set=!0}}function ta(e,t){var n=new ea(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}ea.prototype.push=function(e,t){var n,r,a=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=Ur(e):"[object ArrayBuffer]"===$r.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new Fn.Buf8(o),a.next_out=0,a.avail_out=o),1!==(n=Pr.deflate(a,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(zr(Fn.shrinkBuf(a.output,a.next_out))):this.onData(Fn.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===r?(n=Pr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),a.avail_out=0,!0)},ea.prototype.onData=function(e){this.chunks.push(e)},ea.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var na={Deflate:ea,deflate:ta,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ta(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ta(e,t)}},ra=function(e,t){var n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B;n=e.state,r=e.next_in,S=e.input,a=r+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,c=n.wsize,g=n.whave,u=n.wnext,d=n.window,m=n.hold,f=n.bits,p=n.lencode,C=n.distcode,I=(1<>>=y=b>>>24,f-=y,0==(y=b>>>16&255))B[o++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<>>=y,f-=y),f<15&&(m+=S[r++]<>>=y=b>>>24,f-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=C[(65535&b)+(m&(1<s){e.msg="invalid distance too far back",n.mode=30;break e}if(m>>>=y,f-=y,Z>(y=o-i)){if((y=Z-y)>g&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,G=d,0===u){if(A+=c-y,y2;)B[o++]=G[A++],B[o++]=G[A++],B[o++]=G[A++],v-=3;v&&(B[o++]=G[A++],v>1&&(B[o++]=G[A++]))}else{A=o-Z;do{B[o++]=B[A++],B[o++]=B[A++],B[o++]=B[A++],v-=3}while(v>2);v&&(B[o++]=B[A++],v>1&&(B[o++]=B[A++]))}break}}break}}while(r>3,m&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===k[v];v--);if(Z>v&&(Z=v),0===v)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(y=1;y0&&(0===e||1!==v))return-1;for(W[1]=0,h=1;h<15;h++)W[h+1]=W[h]+k[h];for(b=0;b852||2===e&&B>592)return 1;for(;;){f=h-G,i[b]m?(p=x[T+i[b]],C=R[w+i[b]]):(p=96,C=0),s=1<>G)+(c-=s)]=f<<24|p<<16|C|0}while(0!==c);for(s=1<>=1;if(0!==s?(V&=s-1,V+=s):V=0,b++,0==--k[h]){if(h===v)break;h=t[n+i[b]]}if(h>Z&&(V&u)!==g){for(0===G&&(G=Z),d+=y,S=1<<(A=h-G);A+G852||2===e&&B>592)return 1;a[g=V&u]=Z<<24|A<<16|d-o|0}}return 0!==V&&(a[d+V]=h-G<<24|64<<16|0),l.bits=Z,0};function ca(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fn.Buf16(320),this.work=new Fn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ua(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fn.Buf32(852),t.distcode=t.distdyn=new Fn.Buf32(592),t.sane=1,t.back=-1,0):-2}function da(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ua(e)):-2}function ma(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,da(e))):-2}function fa(e,t){var n,r;return e?(r=new ga,e.state=r,r.window=null,0!==(n=ma(e,t))&&(e.state=null),n):-2}var pa,Ca,Ia=!0;function ha(e){if(Ia){var t;for(pa=new Fn.Buf32(512),Ca=new Fn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sa(1,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sa(2,e.lens,0,32,Ca,0,e.work,{bits:5}),Ia=!1}e.lencode=pa,e.lenbits=9,e.distcode=Ca,e.distbits=5}function ba(e,t,n,r){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(Fn.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>r&&(a=r),Fn.arraySet(o.window,t,n-r,a,o.wnext),(r-=a)?(Fn.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ar(n.check,V,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,Z=8+(15&(c>>>=4)),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=Ar(n.check,V,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((m=n.length)>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Fn.arraySet(n.head.extra,r,o,m,Z)),512&n.flags&&(n.check=Ar(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(ha(n),n.mode=20,6===t){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(m=n.length){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;Fn.arraySet(a,r,o,m,i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},A=sa(0,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(S=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(S=C+3;g>>=C)),c>>>=3,g-=3}else{for(S=C+7;g>>=C)),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,G={bits:n.lenbits},A=sa(1,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},A=sa(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,ra(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=ya.inflateInit2(this.strm,t.windowBits);if(n!==va.Z_OK)throw new Error(Gr[n]);if(this.header=new Za,ya.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ur(t.dictionary):"[object ArrayBuffer]"===Aa.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ya.inflateSetDictionary(this.strm,t.dictionary))!==va.Z_OK))throw new Error(Gr[n])}function Sa(e,t){var n=new Ga(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}Ga.prototype.push=function(e,t){var n,r,a,o,i,l=this.strm,s=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?va.Z_FINISH:va.Z_NO_FLUSH,"string"==typeof e?l.input=_r(e):"[object ArrayBuffer]"===Aa.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new Fn.Buf8(s),l.next_out=0,l.avail_out=s),(n=ya.inflate(l,va.Z_NO_FLUSH))===va.Z_NEED_DICT&&c&&(n=ya.inflateSetDictionary(this.strm,c)),n===va.Z_BUF_ERROR&&!0===g&&(n=va.Z_OK,g=!1),n!==va.Z_STREAM_END&&n!==va.Z_OK)return this.onEnd(n),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&n!==va.Z_STREAM_END&&(0!==l.avail_in||r!==va.Z_FINISH&&r!==va.Z_SYNC_FLUSH)||("string"===this.options.to?(a=Qr(l.output,l.next_out),o=l.next_out-a,i=jr(l.output,a),l.next_out=o,l.avail_out=s-o,o&&Fn.arraySet(l.output,l.output,a,o,0),this.onData(i)):this.onData(Fn.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(g=!0)}while((l.avail_in>0||0===l.avail_out)&&n!==va.Z_STREAM_END);return n===va.Z_STREAM_END&&(r=va.Z_FINISH),r===va.Z_FINISH?(n=ya.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===va.Z_OK):r!==va.Z_SYNC_FLUSH||(this.onEnd(va.Z_OK),l.avail_out=0,!0)},Ga.prototype.onData=function(e){this.chunks.push(e)},Ga.prototype.onEnd=function(e){e===va.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ba={Inflate:Ga,inflate:Sa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Sa(e,t)},ungzip:Sa},Va={};(0,Fn.assign)(Va,na,Ba,va);var Ra=Va,wa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function ka(e,t){yn.a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}In.a.inherits(ka,yn.a),ka.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(In.a.transformTo(wa,e.data),!1)},ka.prototype.flush=function(){yn.a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},ka.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this._pako=null},ka.prototype._createPako=function(){this._pako=new Ra[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Wa={STORE:{magic:"\0\0",compressWorker:function(e){return new yn.a("STORE compression")},uncompressWorker:function(){return new yn.a("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new ka("Deflate",e)},uncompressWorker:function(){return new ka("Inflate",{})}}},xa="PK",Ta="PK",Ja="PK",Xa="PK",Oa="PK",Na="PK\b",Ha=function(e,t){var n,r="";for(n=0;n>>=8;return r},Ya=function(e,t,n,r,a,o){var i,l,s=e.file,c=e.compression,g=o!==vn.utf8encode,u=In.a.transformTo("string",o(s.name)),d=In.a.transformTo("string",vn.utf8encode(s.name)),m=s.comment,f=In.a.transformTo("string",o(m)),p=In.a.transformTo("string",vn.utf8encode(m)),C=d.length!==s.name.length,I=p.length!==m.length,h="",b="",y="",v=s.dir,Z=s.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var G=0;t&&(G|=8),g||!C&&!I||(G|=2048);var S,B,V=0,R=0;v&&(V|=16),"UNIX"===a?(R=798,V|=(B=S=s.unixPermissions,S||(B=v?16893:33204),(65535&B)<<16)):(R=20,V|=63&(s.dosPermissions||0)),i=Z.getUTCHours(),i<<=6,i|=Z.getUTCMinutes(),i<<=5,i|=Z.getUTCSeconds()/2,l=Z.getUTCFullYear()-1980,l<<=4,l|=Z.getUTCMonth()+1,l<<=5,l|=Z.getUTCDate(),C&&(b=Ha(1,1)+Ha(kn(u),4)+d,h+="up"+Ha(b.length,2)+b),I&&(y=Ha(1,1)+Ha(kn(f),4)+p,h+="uc"+Ha(y.length,2)+y);var w="";return w+="\n\0",w+=Ha(G,2),w+=c.magic,w+=Ha(i,2),w+=Ha(l,2),w+=Ha(A.crc32,4),w+=Ha(A.compressedSize,4),w+=Ha(A.uncompressedSize,4),w+=Ha(u.length,2),w+=Ha(h.length,2),{fileRecord:xa+w+u+h,dirRecord:Ta+Ha(R,2)+w+Ha(f.length,2)+"\0\0\0\0"+Ha(V,4)+Ha(r,4)+u+h+f}},Fa=function(e){return Na+Ha(e.crc32,4)+Ha(e.compressedSize,4)+Ha(e.uncompressedSize,4)};function Pa(e,t,n,r){yn.a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}In.a.inherits(Pa,yn.a),Pa.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,yn.a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Pa.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ya(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Pa.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ya(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Fa(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Pa.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},za=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_a=function(e,t){return t=void 0!==t?t:An.createFolders,e=za(e),this.files[e]||Ea.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function ja(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Qa={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(ja(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,Ea.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(ja(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=_a.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return In.a.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var $a=qa;function eo(e){$a.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===a)return o-this.zero;return-1},eo.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),a=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&a===o[3]},eo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var to=eo;function no(e){$a.call(this,e)}In.a.inherits(no,$a),no.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},no.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},no.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},no.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ro=no;function ao(e){to.call(this,e)}In.a.inherits(ao,to),ao.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var oo=ao;function io(e){oo.call(this,e)}In.a.inherits(io,oo),io.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var lo=io,so=function(e){var t=In.a.getTypeOf(e);return In.a.checkSupport(t),"string"!==t||hn.a.uint8array?"nodebuffer"===t?new lo(e):hn.a.uint8array?new oo(In.a.transformTo("uint8array",e)):new to(In.a.transformTo("array",e)):new ro(e)};function co(e,t){this.options=e,this.loadOptions=t}co.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Wa)if(Wa.hasOwnProperty(t)&&Wa[t].magic===e)return Wa[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+In.a.pretty(this.compressionMethod)+" unknown (inner file : "+In.a.transformTo("string",this.fileName)+")");this.decompressed=new Jn(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=so(this.extraFields[1].value);this.uncompressedSize===In.a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===In.a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===In.a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===In.a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,a=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,Ta)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=so(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var mo=uo;function fo(e){return new Gn.a.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new xn);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function po(){if(!(this instanceof po))return new po;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new po;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}po.prototype=Qa,po.prototype.loadAsync=function(e,t){var n=this;return t=In.a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:vn.utf8decode}),bn.a.isNode&&bn.a.isStream(e)?Gn.a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):In.a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new mo(t);return n.load(e),n})).then((function(e){var n=[Gn.a.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a1;){var i=o.shift();a=a.folder(i)}e.callback&&e.callback(r)})),{fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(l,s){t||Io("ERROR!!! zip not ready...");var c=vo([r,o.ref.basepath,i.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var g="string"!==o.dataType||i.compression?"uint8array":"string",u=yo[g](o,i.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),l(o)}));a.file(c).async(g).then(u)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(JSON.parse(e))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=vo(e);return t||Io("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,a.file(n).async("base64").then((function(e){r.src="data:image/".concat(bo(n),";base64,").concat(e)}))}))},fetchBinary:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).then((function(e){var t=on.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};Object(gn.c)("zip",(function(e){return Zo.create(e)}));var Ao=n(11),Go=n(13),So=n(23),Bo=n(7);function Vo(e,t){function n(){for(;t.cellFields.length0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=function(n,r){t.radius[n]=r,e.modified()},e.setCellField=function(n,r){t.cellFields[n]=r,e.modified()},e.removeMask=function(){t.mask=null,e.modified()},e.setMaskLayer=function(n,r){var a=!1;!t.mask&&r&&(a=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(a=!0),t.mask[n]=r),a&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var a;if(!t.deleted&&t.radius.length){n();var o=r[0],i=t.radius.length,l=t.height/2,s=0,c=0,g=t.startThetat.startTheta?t.endTheta:t.startTheta;u*=Math.PI/180;var d=t.resolution,m=!1;u>=g+2*Math.PI?u=g+2*Math.PI:(++d,m=!0);var f=(u-g)/t.resolution,p=d*i*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(s+=2*(d+1)+5*d+(m?10:0),c+=2+d+(m?2:0));for(var C=1;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.getArray(e,t,["cellFields"]),ln.c.algo(e,t,0,1),Vo(e,t)}),"vtkConcentricCylinderSource");function wo(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var a=n[0],o=2*Math.PI/t.resolution,i=-t.height/2,l=t.resolution+1,s=4*t.resolution+1+t.resolution,c=0,g=new window[t.pointType](3*l),u=0,d=new Uint32Array(s);g[0]=t.height/2,g[1]=0,g[2]=0,t.capping&&(d[u++]=t.resolution);for(var m=0;mt.resolution?1:f+2;(r=So.a.buildFromRadian()).translate.apply(r,Object(Ao.a)(t.center)).rotateFromDirections([1,0,0],t.direction).apply(g),(a=Go.a.newInstance()).getPoints().setData(g,3),a.getPolys().setData(d,1),n[0]=a}}}var ko={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ko,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),wo(e,t)}),"vtkConeSource");function Wo(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){var e=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))e=arguments.length<=0?void 0:arguments[0];else for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),ln.c.setGetArray(e,t,["center","rotations"],3),ln.c.algo(e,t,0,1),Wo(e,t)}),"vtkCubeSource");function To(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,a;if(!t.deleted){var o=n[0],i=2*Math.PI/t.resolution,l=2*t.resolution,s=5*t.resolution;t.capping&&(l=4*t.resolution,s=7*t.resolution+2);for(var c=new window[t.pointType](3*l),g=0,u=new Uint32Array(s),d=new Float32Array(3*l),m=Bo.a.newInstance({numberOfComponents:3,values:d,name:"Normals"}),f=new Float32Array(2*l),p=Bo.a.newInstance({numberOfComponents:2,values:f,name:"TCoords"}),C=[0,0,0],I=[0,0,0],h=[0,0,0],b=[0,0,0],y=[0,0],v=[0,0],Z=0;Z2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),To(e,t)}),"vtkCylinderSource");var Xo=n(6),Oo=ln.c.vtkWarningMacro;function No(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=new Float32Array(3);if(Object(Xo.t)(t.point2,t.point1,i),Object(Xo.A)(i)<=0)Oo("Zero-length line definition");else{var l=t.resolution,s=l+1,c=new window[a](3*s);o.getPoints().setData(c,3);var g=new Uint32Array(s+1);o.getLines().setData(g,1);for(var u=0,d=0,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),ln.c.obj(e,t),ln.c.setGet(e,t,["resolution"]),ln.c.setGetArray(e,t,["point1","point2"],3),ln.c.algo(e,t,0,1),No(e,t)}),"vtkLineSource");var Yo=n(8),Fo=n(12),Po=ln.c.vtkWarningMacro;function Ko(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var a=r[0],o=a?a.getPoints().getDataType():"Float32Array",i=Go.a.newInstance(),l=new Float32Array(3),s=new Float32Array(3);if(Object(Xo.t)(t.point1,t.origin,l),Object(Xo.t)(t.point2,t.origin,s),e.updatePlane(l,s)){var c=t.xResolution,g=t.yResolution,u=(c+1)*(g+1),d=c*g,m=new window[o](3*u);i.getPoints().setData(m,3);var f=new Uint32Array(5*d);i.getPolys().setData(f,1);var p=new Float32Array(3*u),C=Bo.a.newInstance({numberOfComponents:3,values:p,name:"Normals"});i.getPointData().setNormals(C);var I=new Float32Array(2*u),h=Bo.a.newInstance({numberOfComponents:2,values:I,name:"TextureCoordinates"});i.getPointData().setTCoords(h);for(var b=new Float32Array(2),y=0,v=0;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mo,n),t.normal=[0,0,1],t.center=[0,0,0],ln.c.obj(e,t),ln.c.setGet(e,t,["xResolution","yResolution"]),ln.c.setGetArray(e,t,["origin"],3),ln.c.getArray(e,t,["point1","point2","normal","center"],3),ln.c.algo(e,t,0,1),Ko(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}),"vtkPlaneSource");function Lo(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=t.numberOfPoints,l=new window[a](3*i);o.getPoints().setData(l,3);var s,c,g,u,d,m=new Uint32Array(i+1);o.getVerts().setData(m,1);for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Do,n),ln.c.obj(e,t),ln.c.setGet(e,t,["numberOfPoints","radius"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Lo(e,t)}),"vtkPointSource");function Eo(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array";r=Go.a.newInstance();var o=0,i=t.thetaResolution,l=t.startThetat.startTheta?t.endTheta:t.startTheta;s*=Math.PI/180;var c=t.startPhit.startPhi?t.endPhi:t.startPhi;g*=Math.PI/180,Math.abs(l-s)<2*Math.PI&&++i;var u=(s-l)/t.thetaResolution,d=t.startPhi<=0?1:0,m=t.phiResolution+(t.endPhi>=180?-1:0),f=t.phiResolution*i+2,p=2*t.phiResolution*t.thetaResolution,C=0,I=new window[a](3*f),h=new Float32Array(3*f),b=0,y=new Uint32Array(5*p);t.startPhi<=0&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]+t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=1,C++,o++),t.endPhi>=180&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]-t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=-1,C++,o++);for(var v=t.phiResolution-o,Z=(g-c)/(t.phiResolution-1),A=0;A=180)for(var W=v-1+o,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Eo(e,t)}),"vtkSphereSource");var zo=n(17),_o=n(27),jo=ln.c.vtkDebugMacro,Qo=ln.c.vtkErrorMacro;function qo(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var a=n[0];if(!a)return Qo("Invalid or missing input"),1;var o=a.getPoints(),i=a.getPointData().getNormals(),l=e.getInputArrayToProcess(0);if(!o||!l)return jo("No data to warp",!!o,!!l),r[0]=n[0],1;var s=o.getNumberOfPoints(),c=null,g=[0,0,1];i&&!t.useNormal?(c=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},jo("Using data normals")):e.getXyPlane()?(c=function(e,t){return g},jo("Using x-y plane normal")):(c=function(e,n){return t.normal},jo("Using Normal instance variable"));for(var u=new Float32Array(3*s),d=o.getData(),m=0,f=[0,0,1],p=1,C=l.getData(),I=l.getNumberOfComponents(),h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$o,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),ln.c.setGetArray(e,t,["normal"],3),qo(e,t)}),"vtkWarpScalar");var ei=n(36),ti=n(37),ni={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}},ri=ni.VaryRadius,ai=ni.GenerateTCoords,oi=ln.c.vtkDebugMacro,ii=ln.c.vtkErrorMacro,li=ln.c.vtkWarningMacro;function si(e,t){function n(e,n){var r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){for(var r=t[n],a=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],i=t,l=i[0],s=0;s1){var c=0,g=[0,0,0],u=[0,0,0],d=i.slice(s+1,s+1+l);if((c=r(e,d,0))!==l)!function(){var t=d[c],i=e.slice(3*t,3*(t+1)),s=d[c+1],m=e.slice(3*s,3*(s+1));if(g=m.map((function(e,t){return e-i[t]})),Object(Xo.y)(g),a)o=a;else{for(;++c.001){o=p,g=u;break}}if(c>=l)for(var C=0;C<3;++C)if(0!==g[C]){o[(C+2)%3]=0,o[(C+1)%3]=1,o[C]=-g[(C+1)%3]/g[C];break}}Object(Xo.y)(o);for(var I=0;++c0?Math.sqrt(Z):0;for(var A=[0,0,0],G=0;G<3;++G)A[G]=u[G]+g[G];Object(Xo.y)(A),Object(Xo.w)(A,y,b),Object(Xo.w)(g,y,A),Object(Xo.q)(o,A)*Object(Xo.q)(b,A)<0&&(Z*=-1);for(var S=I;St.radiusFactor&&(B=t.radiusFactor);else if(c&&t.varyRadius===ri.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(B=c.getComponent(r[R],0))<0)return li("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var X=0;X1&&k){var q=Z.slice(j,j+A+1);a(u.getData(),q,R)}o(z,A,Q,u.getData(),I.getData(),g.getPointData(),L,b,H,F,P,K,w,U)?(V=i(z,A,_,V,g.getCellData(),M,B),D&&l(z,A,Q,u.getData(),H,D.getData())):li("Could not generate points"),z=n(z,A),_++}c.setPoints(I),c.setStrips(B),c.setPointData(L),L.setNormals(y),s[0]=c}}}}}else ii("Invalid or missing input")}}var ci={outputPointsPrecision:ti.b.DEFAULT,radius:.5,varyRadius:ri.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:ai.TCOORDS_OFF,textureLength:1};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),ln.c.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),ln.c.obj(e,t),ln.c.algo(e,t,1,1),si(e,t)}),"vtkTubeFilter");var gi=n(40),ui=(n(25),{diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"}),di={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function mi(e){var t="",n=0,r=di.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var a,o,i,l={comments:[],elements:[],headerLength:n},s=t.split("\n"),c=0;c0,u=e.uvs.length>0,d=e.normals.length>0,m=e.faceVertexUvs.length>0,f=0;f0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(a)}}function hi(e,t,n,r){var a;switch(n){case"int8":case"char":a=[e.getInt8(t),1];break;case"uint8":case"uchar":a=[e.getUint8(t),1];break;case"int16":case"short":a=[e.getInt16(t,r),2];break;case"uint16":case"ushort":a=[e.getUint16(t,r),2];break;case"int32":case"int":a=[e.getInt32(t,r),4];break;case"uint32":case"uint":a=[e.getUint32(t,r),4];break;case"float32":case"float":a=[e.getFloat32(t,r),4];break;case"float64":case"double":a=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return a}function bi(e,t,n,r){for(var a,o={},i=0,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},a=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:a,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:a,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n(t.url,r);return a.then(e.parse),a},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified();var r=mi(gi.a.arrayBufferToString(n));if("ascii"!==r.format){t.parseData=n;for(var a,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},i="binary_little_endian"===r.format,l=n instanceof ArrayBuffer?n:n.buffer,s=new DataView(l,r.headerLength),c=0,g=0;g=a.elements[c].count&&(c++,g=0);var m=Ci(a.elements[c].properties,d);Ii(o,a.elements[c].name,m),g++}}var f=fi(o,a.elements);t.output[0]=f}}},e.requestData=function(n,r){e.parse(t.parseData)}}var vi={};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),yi(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkPLYReader"),n(69);function Zi(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){return t.url=n,e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then((function(t){return e.parseAsText(t),!0}))},e.parseAsText=function(n){t.csv=n,t.elevation=[],t.csv.split("\n").forEach((function(e,n){t.elevation.push(e.split(",").map((function(e){return Number(e)})))})),e.modified()},e.requestData=function(e,n){var r=Go.a.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var a=t.elevation.length,o=t.elevation[0].length,i=r.getPoints();i.setNumberOfPoints(o*a,3);var l=i.getData(),s=ei.a.newInstance({size:5*(o-1)*(a-1)});r.setPolys(s);var c=s.getData(),g=0,u=new Float32Array(o*a*2),d=Bo.a.newInstance({numberOfComponents:2,values:u,name:"TextureCoordinates"});r.getPointData().setTCoords(d);for(var m=0;m0&&m>0&&(c[g++]=4,c[g++]=p,c[g++]=p-1,c[g++]=p-1-o,c[g++]=p-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Ai={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ai,n),ln.c.obj(e,t),ln.c.get(e,t,["url"]),ln.c.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Zi(e,t)}),"vtkElevationReader");var Gi={};function Si(e,t,n,r){for(var a=0;a0&&"\r"!==e})),i=o.length;a.push(i);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.obj");return e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=function(n){return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,Gi.splitOn=r,Gi.pieces=[],Gi.v=[],Gi.vt=[],Gi.vn=[],Gi.f=[[]],Gi.size=0,n.split("\n").forEach(Bi),function(e){var t=!!Gi.vt.length,n=!!Gi.vn.length;if(e.splitMode){e.numberOfOutputs=Gi.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper","splitMode"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Vi(e,t)}),"vtkOBJReader");var wi=["chemical json","name","inchi","formula","atoms","bonds","properties"];function ki(e,t){t.classHierarchy.push("vtkMolecule")}var Wi={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function xi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),ln.c.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),ln.c.setGet(e,t,wi),ki(0,t)}var Ti={newInstance:ln.c.newInstance(xi,"vtkMolecule"),extend:xi},Ji={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};function Xi(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}return e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText)},e.parseAsText=function(n){return t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0},e.requestData=function(e,n){var r=Ti.newInstance();if(t.molecule){var o=t.molecule.length,i=[],l=[];t.numberOfAtoms=0;for(var s=0;s=78&&(C=g.substr(76,2).replace(/\s+/g,"")),""===C&&(C=d.substr(0,2).replace(/\d/g,"")),i.push(m),i.push(f),i.push(p);var I=Object(a.a)(Ji[C],1)[0];l.push(I),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(l),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(i)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Oi={numberOfAtoms:0,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Xi(e,t)}),"vtkPDBReader");var Ni=[];Ni["-".charCodeAt(0)]=62,Ni["_".charCodeAt(0)]=63;for(var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yi=0;Yi>16&255,r[g++]=c>>8&255,r[g++]=255&c}switch(i){case 3:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<10;!Fi(e[s]);)s++;for(c|=Ni[e.charCodeAt(s++)]<<4;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>2,r[g++]=c>>8&255,r[g++]=255&c;break;case 2:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<2;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>4,r[g++]=255&c;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return g}var Ki={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();var r=function(e){return gi.a.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),a=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var i=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(a).firstChild,l=i.getAttribute("type"),s=i.getAttribute("compressor"),c=i.getAttribute("byte_order"),g=i.getAttribute("header_type")||"UInt32";if(s&&"vtkZLibDataCompressor"!==s)return console.error("Invalid compressor",s),!1;if(c&&"LittleEndian"!==c)return console.error("Only LittleEndian encoding is supported"),!1;if(l!==t.dataType)return console.error("Invalid data type",l,"expecting",t.dataType),!1;if(i.querySelector("AppendedData")){var u=i.querySelector("AppendedData"),d=u.getAttribute("encoding"),m=i.querySelectorAll("DataArray"),f=t.binaryBuffer;"base64"===d&&(f=u.textContent.trim().substr(1));for(var p=[],C=0;C0?0===Z[3]?new ArrayBuffer(Z[2]*A):new ArrayBuffer(Z[2]*(A-1)+Z[3]):new ArrayBuffer(0);for(var S=new Uint8Array(y),B={offset:0,uint8:S},V=0;V2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ji,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),_i(e,t)},processDataArray:zi,processFieldData:function(e,t,n,r,a,o,i){if(t){var l={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(l[r]=n["set".concat(e)])}));for(var s=t.getElementsByTagName("DataArray"),c=s.length,g=0;g(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=o<(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[3]=i>(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[4]=l<(arguments.length<=3?void 0:arguments[3])?l:arguments.length<=3?void 0:arguments[3],e[5]=s>(arguments.length<=3?void 0:arguments[3])?s:arguments.length<=3?void 0:arguments[3]}function cl(e,t,n,r,o,i,l){var s=Object(a.a)(e,6),c=s[0],g=s[1],u=s[2],d=s[3],m=s[4],f=s[5];void 0===l?(e[0]=Math.min(t[0],c),e[1]=Math.max(t[1],g),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],m),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,c),e[1]=Math.max(n,g),e[2]=Math.min(r,u),e[3]=Math.max(o,d),e[4]=Math.min(i,m),e[5]=Math.max(l,f))}function gl(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t,e[1]=t>l?t:l,e[2]=n,e[3]=n>c?n:c,e[4]=r,e[5]=r>u?r:u,i!==t||s!==n||g!==r}function ul(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function fl(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function pl(e,t){return e[2*t+1]-e[2*t]}function Cl(e){return[pl(e,0),pl(e,1),pl(e,2)]}function Il(e){return e.slice(0,2)}function hl(e){return e.slice(2,4)}function bl(e){return e.slice(4,6)}function yl(e){var t=Cl(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function vl(e){if(ol(e)){var t=Cl(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Zl(e){return[e[0],e[2],e[4]]}function Al(e){return[e[1],e[3],e[5]]}function Gl(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Sl(e,t){for(var n=0,r=0;r<2;r++)for(var a=2;a<4;a++)for(var o=4;o<6;o++)t[n]=[e[r],e[a],e[o]],n++}function Bl(e,t,n){t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5]}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=fl(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Rl(e,t,n,r){for(var a=[].concat(rl),o=e.getData(),i=0;ie[2*g+1]?(i[g]=0,c[g]=e[2*g+1],o=!1):i[g]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],a[0]=0,1;for(var u=0;u<3;u++)2!==i[u]&&0!==n[u]?s[u]=(c[u]-t[u])/n[u]:s[u]=-1;for(var d=0;d<3;d++)s[l]1||s[l]<0)return 0;a[0]=s[l];for(var m=0;m<3;m++)if(l!==m){if(r[m]=t[m]+s[l]*n[m],r[m]e[2*m+1])return 0}else r[m]=c[m];return 1}function kl(e,t,n){for(var r=[],a=0,o=1,i=1,l=4;l<=5;++l){r[2]=e[l];for(var s=2;s<=3;++s){r[1]=e[s];for(var c=0;c<=1;++c)if(r[0]=e[c],a=tl.a.evaluate(n,t,r),i&&(o=a>=0?1:-1,i=0),0===a||o>0&&a<0||o<0&&a>0)return 1}}return 0}function Wl(e,t){if(!ol(e)||!ol(t))return!1;for(var n,r=[0,0,0,0,0,0],a=0;a<3;a++)if(n=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(n=!0,r[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(n=!0,r[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(n=!0,r[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(n=!0,r[2*a+1]=e[2*a+1]),!n)return!1;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],!0}function xl(e,t){if(!ol(e)||!ol(t))return!1;for(var n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function Tl(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Jl(e,t,n){for(var r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],o=0,i=0;i<2;i++)for(var l=2;l<4;l++)for(var s=4;s<6;s++){var c=[e[i],e[l],e[s]];a[o++]=tl.a.evaluate(n,t,c)}for(var g=2;g--&&!(Gl(a[r[g][0]],a[r[g][4]])&&Gl(a[r[g][1]],a[r[g][5]])&&Gl(a[r[g][2]],a[r[g][6]])&&Gl(a[r[g][3]],a[r[g][7]])););if(g<0)return!1;for(var u=Math.sign(n[g]),d=Math.abs((e[2*g+1]-e[2*g])*n[g]),m=u>0?1:0,f=0;f<4;f++)if(0!==d){var p=Math.abs(a[r[g][f]])/d;u>0&&pm&&(m=p)}var C=(1-m)*e[2*g]+m*e[2*g+1];return u>0?e[2*g]=C:e[2*g+1]=C,!0}var Xl=function(){function e(t){Object($i.a)(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),il(this.bounds,rl))}return Object(el.a)(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return al(this.bounds,e)}},{key:"isValid",value:function(){return ol(this.bounds)}},{key:"setBounds",value:function(e){return il(this.bounds,e)}},{key:"reset",value:function(){return ll(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne[1]||e[2]>e[3]||e[4]>e[5]?Pl.EMPTY:3===t?Pl.XYZ_GRID:2===t?e[0]===e[1]?Pl.YZ_PLANE:e[2]===e[3]?Pl.XZ_PLANE:Pl.XY_PLANE:1===t?e[0]1&&(n*=t[r]-1)}return n},e.getNumberOfPoints=function(){var t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=function(n){var r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return es("Requesting a point from an empty image."),null;var a=new Float64Array(3);switch(t.dataDescription){case Hl.EMPTY:return null;case Hl.SINGLE_POINT:break;case Hl.X_LINE:a[0]=n;break;case Hl.Y_LINE:a[1]=n;break;case Hl.Z_LINE:a[2]=n;break;case Hl.XY_PLANE:a[0]=n%r[0],a[1]=n/r[0];break;case Hl.YZ_PLANE:a[1]=n%r[1],a[2]=n/r[1];break;case Hl.XZ_PLANE:a[0]=n%r[0],a[2]=n/r[0];break;case Hl.XYZ_GRID:a[0]=n%r[0],a[1]=n/r[0]%r[1],a[2]=n/(r[0]*r[1]);break;default:es("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(a,o),o},e.getBounds=function(){return e.extentToBounds(t.extent)},e.extentToBounds=function(t){var n=[t[0],t[2],t[4],t[1],t[2],t[4],t[0],t[3],t[4],t[1],t[3],t[4],t[0],t[2],t[5],t[1],t[2],t[5],t[0],t[3],t[5],t[1],t[3],t[5]],r=new Float64Array([n[0],n[1],n[2]]),a=new Float64Array(3);e.indexToWorld(r,a);for(var o=[a[0],a[0],a[1],a[1],a[2],a[2]],i=3;i<24;i+=3)Object(Fo.p)(r,n[i],n[i+1],n[i+2]),e.indexToWorld(r,a),a[0]o[1]&&(o[1]=a[0]),a[1]>o[3]&&(o[3]=a[1]),a[2]>o[5]&&(o[5]=a[2]);return o},e.computeTransforms=function(){Object(Yo.e)(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],Object(Yo.r)(t.indexToWorld,t.indexToWorld,t.spacing),Object(Yo.g)(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return es("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.indexToWorld),Object(Fo.q)(i,a,t.indexToWorld),Object(Xo.p)(o,i,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.worldToIndex),Object(Fo.q)(i,a,t.worldToIndex),Object(Xo.p)(o,i,n),n},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=function(){for(var t=e.getBounds(),n=[],r=0;r<3;r++)n[r]=(t[2*r+1]+t[2*r])/2;return n},e.computeHistogram=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);var a=[0,0,0],o=[0,0,0];Ol.computeCornerPoints(r,a,o),Object(Xo.o)(a,a),Object(Xo.o)(o,o);var i=e.getDimensions();Object(Xo.r)(a,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],a),Object(Xo.r)(o,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],o);for(var l=i[0],s=i[0]*i[1],c=e.getPointData().getScalars().getData(),g=-1/0,u=1/0,d=0,m=0,f=0,p=a[2];p<=o[2];p++)for(var C=a[1];C<=o[1];C++)for(var I=a[0]+C*l+p*s,h=a[0];h<=o[0];h++){if(!n||n([h,C,p],r)){var b=c[I];b>g&&(g=b),b0?m/f:0,v=d-y*y,Z=Math.sqrt(v);return{minimum:u,maximum:g,average:y,variance:v,sigma:Z}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,a=0;a<3;++a)n[a]=r,r*=e[2*a+1]-e[2*a]+1;return n},e.computeOffsetIndex=function(t){var n=Object(a.a)(t,3),r=n[0],o=n[1],i=n[2],l=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),c=e.computeIncrements(l,s);return Math.floor((Math.round(r)-l[0])*c[0]+(Math.round(o)-l[2])*c[1]+(Math.round(i)-l[4])*c[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),a=0;a<3;++a)if(r[a]n[2*a+1])return es("GetScalarPointer: Pixel ".concat(r," is not in memory. Current extent = ").concat(n)),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return es("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,n)}}var ns={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:Hl.EMPTY};function rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ns,n),Nl.a.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=El(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),ln.c.get(e,t,["direction","indexToWorld","worldToIndex"]),ln.c.setGetArray(e,t,["origin","spacing"],3),ln.c.getArray(e,t,["extent"],6),ts(e,t)}var as={newInstance:ln.c.newInstance(rs,"vtkImageData"),extend:rs};function os(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=function(e,n,r,a,o){for(var i=e.getElementsByTagName(t.dataType)[0],l=i.getAttribute("Origin").split(" ").map((function(e){return Number(e)})),s=i.getAttribute("Spacing").split(" ").map((function(e){return Number(e)})),c=i.getElementsByTagName("Piece"),g=c.length,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,is,n),Qi.extend(e,t,n),os(e,t)}),"vtkXMLImageDataReader");function ls(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,a,o){var i=e.getElementsByTagName(t.dataType)[0],l=i.getElementsByTagName("FieldData")[0],s=i.getElementsByTagName("Piece"),c=s.length,g=[];l&&(g=Object(Ao.a)(l.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,a){var o=Number(e.getAttribute("NumberOfTuples"));return Bo.a.newInstance(Qi.processDataArray(o,e,t,n,r,a))}(e,r,a,o,t.binaryBuffer)})));for(var u=function(e){var n=Go.a.newInstance(),i=s[e],l=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],c=Qi.processDataArray(l,s,r,a,o,i),g=c.values,u=c.numberOfComponents;e["get".concat(t)]().setData(g,u)}return l}(n,"Points",i,r,a,o,t.binaryBuffer),c=0;["Verts","Lines","Strips","Polys"].forEach((function(e){c+=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=Qi.processCells(l,n.getElementsByTagName(t)[0],r,a,o,i);e["get".concat(t)]().setData(s)}return l}(n,e,i,r,a,o,t.binaryBuffer)})),Qi.processFieldData(l,i.getElementsByTagName("PointData")[0],n.getPointData(),r,a,o,t.binaryBuffer),Qi.processFieldData(c,i.getElementsByTagName("CellData")[0],n.getCellData(),r,a,o,t.binaryBuffer);for(var u=n.getFieldData(),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ss,n),Qi.extend(e,t,n),ls(e,t)}),"vtkXMLPolyDataReader");var cs=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return Xs[e]&&Xs[e](t)}function Hs(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=function(n){e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=function(n){t.renderers=t.renderers.filter((function(e){return e!==n})),e.modified()},e.hasRenderer=function(e){return-1!==t.renderers.indexOf(e)},e.newAPISpecificView=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ns(e||t.defaultViewAPI,n)},e.addView=function(n){e.hasView(n)||(n.setRenderable(e),t.views.push(n),e.modified())},e.removeView=function(n){t.views=t.views.filter((function(e){return e!==n})),e.modified()},e.hasView=function(e){return-1!==t.views.indexOf(e)},e.render=function(){t.interactor?t.interactor.render():t.views.forEach((function(e){return e.traverseAllPasses()}))},e.getStatistics=function(){var e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((function(t){t.getViewProps().forEach((function(t){if(t.getVisibility()){e.propCount+=1;var n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){var r=n.getPrimitiveCount();Object.keys(r).forEach((function(t){e[t]||(e[t]=0),e[t]+=r[t]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n"),e},e.captureImages=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return ln.c.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n):void 0})).filter((function(e){return!!e}))}}var Ys={defaultViewAPI:Js,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function Fs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),ln.c.obj(e,t),ln.c.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),ln.c.get(e,t,["neverRendered"]),ln.c.getArray(e,t,["renderers"]),ln.c.event(e,t,"completion"),Hs(e,t)}var Ps={newInstance:ln.c.newInstance(Fs,"vtkRenderWindow"),extend:Fs,registerViewConstructor:Os,listViewAPIs:function(){return Object.keys(Xs)},newAPISpecificView:Ns},Ks={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},Ms={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},Ls={Wrap:Ks,Filter:Ms},Ds=ln.c.vtkErrorMacro;function Es(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),a=e[r];if(a)a(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Us,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),t.renderableChildMap=new Map,ln.c.get(e,t,["visited"]),ln.c.setGet(e,t,["parent","renderable","myFactory"]),ln.c.getArray(e,t,["children"]),Es(e,t)}var _s={newInstance:ln.c.newInstance(zs,"vtkViewNode"),extend:zs,PASS_TYPES:["Build","Render"]};function js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qs=Ls.Wrap,qs=Ls.Filter,$s=Bo.a.VtkDataTypes,ec=ln.c.vtkDebugMacro,tc=ln.c.vtkErrorMacro,nc=ln.c.vtkWarningMacro;function rc(e,t){var n=this;function r(e,n){var r=[];if(e!==$s.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=t.width*t.height*t.components,o=0;o=a&&(I=a-1);var h=p-C,b=1-h;C=C*r*o,I=I*r*o;for(var y=0;y=r&&(G=r-1);var S=Z-A;A*=o,G*=o;for(var B=0;Ba[s]&&(a[s]=n[i]),i++;for(var c=[],g=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null;if(n?t.openGLRenderWindow=n:(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent()),t.context=t.openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qs.LINEAR),e.setMagnificationFilter(qs.LINEAR)):(e.setMinificationFilter(qs.NEAREST),e.setMagnificationFilter(qs.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(Qs.REPEAT),e.setWrapS(Qs.REPEAT),e.setWrapT(Qs.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified()));var r=t.renderable.getInputData(0);if(r&&r.getPointData().getScalars()){for(var a=r.getExtent(),o=r.getPointData().getScalars(),i=[],l=0;lt.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;switch(t.target){case t.context.TEXTURE_2D:n=t.context.TEXTURE_BINDING_2D;break;default:nc("impossible case")}e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=function(){t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t.openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=function(n,r){return t.internalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||ec("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var a=0;return(a=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(a=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(ec("Unsupported internal texture type!"),ec("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),a},e.setInternalFormat=function(n){n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=function(n,r){return t.format=e.getDefaultFormat(n,r),t.format},e.getDefaultFormat=function(e,n){if(t.openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}},e.resetFormatAndType=function(){t.format=0,t.internalFormat=0,t.openGLDataType=0},e.getDefaultDataType=function(e){if(t.openGLRenderWindow.getWebgl2())switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.FLOAT}switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear")?t.context.FLOAT:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){return t.openGLDataType=e.getDefaultDataType(n),t.openGLDataType},e.getShiftAndScale=function(){var e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:e=(n=127.5)-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:e=(n=32767.5)-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:e=(n=2147483647.5)-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;break;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case qs.NEAREST:return t.context.NEAREST;case qs.LINEAR:return t.context.LINEAR;case qs.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qs.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qs.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qs.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case Qs.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case Qs.REPEAT:return t.context.REPEAT;case Qs.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=a(r(l,[s]));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=s.length/6-1,e.createTexture(),e.bind();for(var c=a(r(l,s)),g=[],u=t.width,d=t.height,m=0;m=1&&y>=1;){var v=null;h<=t.maxLevel&&(v=g[6*h+I]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+I,h,t.internalFormat,b,y,0,t.format,t.openGLDataType,v),h++,b/=2,y/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,a,o){return e.getOpenGLDataType(a),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?a===$s.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType($s.UNSIGNED_CHAR),e.getInternalFormat($s.UNSIGNED_CHAR,4),e.getFormat($s.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.width=n.width,t.height=n.height,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);var r=!Object(Xo.m)(n.width)||!Object(Xo.m)(n.height),a=document.createElement("canvas");a.width=r?Object(Xo.h)(n.width):n.width,a.height=r?Object(Xo.h)(n.height):n.height;var o=a.getContext("2d");o.translate(0,a.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,a.width,a.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var i=a;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,i),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,a,o,i,l){return e.getOpenGLDataType(i),e.getInternalFormat(i,o),e.getFormat(i,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,l),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,a,i,l,s){for(var c=n*r*a,g=[],u=[],d=0;d4096&&(G===$s.FLOAT||i>=3)&&(B=4096);var V=1,R=1;c>B*B&&(R=V=Math.ceil(Math.sqrt(c/(B*B))));var w=Math.sqrt(c)/V;w=Object(Xo.h)(w);var k,W=Math.floor(w*V/n),x=Math.ceil(a/W),T=Object(Xo.h)(r*x/R);t.width=w,t.height=T,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=W,t.volumeInfo.yreps=x,t.volumeInfo.xstride=V,t.volumeInfo.ystride=R,t.volumeInfo.offset=Z.offset,t.volumeInfo.scale=Z.scale;var J=w*T*i;k=G===$s.FLOAT?new Float32Array(J):new Uint8Array(J);for(var X=0,O=Math.floor(n/V),N=Math.floor(r/R),H=0;H2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ac,n),_s.extend(e,t,n),t.sendParametersTime={},ln.c.obj(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},ln.c.obj(t.textureBuildTime,{mtime:0}),ln.c.set(e,t,["format","openGLDataType"]),ln.c.setGet(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ln.c.get(e,t,["width","height","volumeInfo","components","handle","target"]),rc(e,t)}var ic=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,a=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");a+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,a,r.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.context,r=n.COLOR_ATTACHMENT0;if(e>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");r+=e}n.framebufferTexture2D(n.FRAMEBUFFER,r,n.TEXTURE_2D,null,0)},e.setDepthBuffer=function(e){if(t.openGLRenderWindow.getWebgl2()){var n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else Object(ln.m)("Attaching depth buffer textures to fbo requires WebGL 2")},e.removeDepthBuffer=function(){if(t.openGLRenderWindow.getWebgl2()){var e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else Object(ln.m)("Attaching depth buffer textures to framebuffers requires WebGL 2")},e.getGLFramebuffer=function(){return t.glFramebuffer},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))},e.releaseGraphicsResources=function(){t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer),t.colorTexture&&t.colorTexture.releaseGraphicsResources()},e.getSize=function(){var e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=function(){e.bind();var n=t.context,r=ic.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(Ms.LINEAR),r.setMagnificationFilter(Ms.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,cn.b.UNSIGNED_CHAR,null),e.setColorBuffer(r),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)}}var sc={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function cc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Object(ln.h)(e,t),Object(ln.j)(e,t,["colorTexture"]),lc(e,t)}var gc={newInstance:Object(ln.g)(cc,"vtkFramebuffer"),extend:cc};function uc(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(ln.c.capitalize(t.currentOperation))},e.getTraverseOperation=function(){return t.currentTraverseOperation},e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t.currentParent=r,t.preDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((function(t){t.traverse(n,e)})),t.postDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})))}}var dc={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dc,n),ln.c.obj(e,t),ln.c.get(e,t,["currentOperation"]),ln.c.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),uc(e,t)}var fc={newInstance:ln.c.newInstance(mc,"vtkRenderPass"),extend:mc};function pc(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.deleted){t.currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);for(var a=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),i=0;i0&&t.volumeCount>0||t.depthRequested){var g=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=gc.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var u=t.framebuffer.getSize();null!==u&&u[0]===g[0]&&u[1]===g[1]||(t.framebuffer.create(g[0],g[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),s.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),s.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),s.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),s.traverse(e))}}}},e.getZBufferTexture=function(){return t.framebuffer?t.framebuffer.getColorTexture():null},e.requestDepth=function(){t.depthRequested=!0},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.incrementVolumeCount=function(){return t.volumeCount++}}var Cc={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cc,n),fc.extend(e,t,n),ln.c.get(e,t,["framebuffer"]),pc(e,t)}var hc={newInstance:ln.c.newInstance(Ic,"vtkForwardPass"),extend:Ic};function bc(e,t){t.classHierarchy.push("vtkGenericWidgetRepresentation")}var yc={};function vc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yc,n),_s.extend(e,t,n),bc(0,t)}var Zc={newInstance:ln.c.newInstance(vc),extend:vc};function Ac(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=function(n){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(var r=0;rt.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?El(t.keyMatrices.normalMatrix):(Dl(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Ul(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var Gc={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gc,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Ac(e,t)}var Bc={newInstance:ln.c.newInstance(Sc),extend:Sc};function Vc(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.activateTextures=function(){t.activeTextures=[],t.children.forEach((function(e){e.isA("vtkOpenGLTexture")&&(e.render(),e.getHandle()&&t.activeTextures.push(e))}))},e.opaquePass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}var Rc={context:null,activeTextures:[]};function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rc,n),_s.extend(e,t,n),Object(ln.j)(e,t,["context"]),Object(ln.e)(e,t,["activeTextures"]),Vc(e,t)}var kc={newInstance:Object(ln.g)(wc),extend:wc};function Wc(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=function(n){n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext())},e.opaquePass=function(e){if(e){var n=t.openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize),t.context.scissor(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)}},e.translucentPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=function(n){if(n!==t.lastRenderer||t.openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){Object(Yo.d)(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),Dl(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Object(Yo.i)(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Object(Yo.d)(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Object(Yo.i)(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Object(Yo.l)(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var xc={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function Tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),_s.extend(e,t,n),t.keyMatrixTime={},Object(ln.h)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Object(ln.j)(e,t,["context","keyMatrixTime"]),Wc(e,t)}var Jc={newInstance:Object(ln.g)(Tc),extend:Tc},Xc={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Oc={ObjectType:Xc};function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pc,n),ln.c.obj(e,t),ln.c.get(e,t,["openGLRenderWindow"]),Fc(e,t)}var Mc=Hc(Hc({newInstance:ln.c.newInstance(Kc),extend:Kc},{}),Oc),Lc={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}},Dc={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zc,n),ln.c.obj(e,t),t.properties={},ln.c.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Uc(e,t)}var jc=function(e){for(var t=1;t0&&(--o in t.hitProps||(t.hitProps[o]=!0))}},e.renderProp=function(n){t.currentPass===qc.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+t.idOffset),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===qc.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+t.idOffset)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.getPropFromID=function(e){return e>=0&&et.area[2]||n[1]t.area[3])return null;var i=[n[0]-t.area[0],n[1]-t.area[1]],l=e.convert(i[0],i[1],t.pixBuffer[qc.ACTOR_PASS]);if(l<=0)return null;var s={valid:!0};s.propID=l-t.idOffset,s.prop=e.getPropFromID(s.propID);var c=e.convert(i[0],i[1],t.pixBuffer[qc.COMPOSITE_INDEX_PASS]);if((c<0||c>16777215)&&(c=0),s.compositeID=c-t.idOffset,t.captureZValues){var g=4*(i[1]*(t.area[2]-t.area[0]+1)+i[0]);s.zValue=(256*t.zBuffer[g]+t.zBuffer[g+1])/65535,s.displayPosition=n}return s}var u=[n[0],n[1]],d=[0,0],m=e.getPixelInformation(n,0,a);if(m&&m.valid)return m;for(var f=1;ff?u[1]-f:0;p<=u[1]+f;++p){if(d[1]=p,u[0]>=f&&(d[0]=u[0]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[0]=u[0]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}for(var C=u[0]>=f?u[0]-(f-1):0;C<=u[0]+(f-1);++C){if(d[0]=C,u[1]>=f&&(d[1]=u[1]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[1]=u[1]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}}return a[0]=n[0],a[1]=n[1],null},e.convertSelection=function(e,n){var r=[],a=0;return n.forEach((function(n,o){var i=jc.newInstance();switch(i.setContentType($c.INDICES),e){case tg.FIELD_ASSOCIATION_CELLS:i.setFieldType(eg.CELL);break;case tg.FIELD_ASSOCIATION_POINTS:i.setFieldType(eg.POINT);break;default:ng("Unknown field association")}i.getProperties().propID=n.info.propID,i.getProperties().prop=n.info.prop,i.getProperties().compositeID=n.info.compositeID,i.getProperties().pixelCount=n.pixelCount,t.captureZValues&&(i.getProperties().displayPosition=[n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue],i.getProperties().worldPosition=t.openGLRenderWindow.displayToWorld(n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue,t.renderer)),i.setSelectionList(n.attributeIDs),r[a]=i,a++})),r},e.getInfoHash=function(e){return"".concat(e.propID," ").concat(e.compositeID)},e.generateSelection=function(n,r,a,o){for(var i=Math.floor(n),l=Math.floor(r),s=Math.floor(a),c=Math.floor(o),g=new Map,u=[0,0],d=l;d<=c;d++)for(var m=i;m<=s;m++){var f=[m,d],p=e.getPixelInformation(f,0,u);if(p&&p.valid){var C=e.getInfoHash(p);if(g.has(C)){var I=g.get(C);I.pixelCount++,t.captureZValues&&p.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ag,n),ln.c.obj(e,t),t.area=[0,0,0,0],t.propColorValue=[0,0,0],t.props=[],ln.c.setGet(e,t,["fieldAssociation","renderer","currentPass","captureZValues"]),ln.c.setGetArray(e,t,["area"],4),ln.c.setGetArray(e,t,["propColorValue"],3),ln.c.event(e,t,"event"),rg(e,t)}var ig=function(e){for(var t=1;t0&&(e=1/(t.ambient+t.diffuse+t.specular));for(var n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.addShaderVariable=mg("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(dg.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(dg.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(dg.PHONG)},e.getInterpolationAsString=function(){return ln.c.enumToString(dg,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ug.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ug.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ug.POINTS)},e.getRepresentationAsString=function(){return ln.c.enumToString(ug,t.representation)}}var pg={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,specular:0,specularPower:1,opacity:1,interpolation:dg.GOURAUD,representation:ug.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),ln.c.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),fg(e,t)}var Ig,hg=function(e){for(var t=1;t2)for(var r=0;r2){for(var r=0;r1?2*(e-1):0},polysToWireframe:function(e,t){return e>2?2*e:0},stripsToWireframe:function(e,t){return e>2?4*e-6:0},polysToSurface:function(e,t){return e>2?3*(e-2):0},stripsToSurface:function(e,t,n){return e>2?3*(e-2):0}},v=null,Z=null;a===sg.POINTS||"verts"===r?(v=b.anythingToPoints,Z=y.anythingToPoints):a===sg.WIREFRAME||"lines"===r?(v=b["".concat(r,"ToWireframe")],Z=y["".concat(r,"ToWireframe")]):(v=b["".concat(r,"ToSurface")],Z=y["".concat(r,"ToSurface")]);for(var A=n.getData(),G=A.length,S=0,B=0;B0&&(Math.abs(x)/W>1e6||Math.abs(Math.log10(W))>3||0===W&&x>1e6)){for(var N=new Float64Array(3),H=new Float64Array(3),Y=0;Y<3;++Y){var F=o.points.getRange(Y),P=F[1]-F[0];N[Y]=.5*(F[1]+F[0]),H[Y]=P>0?1/P:1}e.setCoordShiftAndScale(N,H)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);d=function(e){if(m=3*e,t.coordShiftAndScaleEnabled?(R[w++]=(i[m++]-t.coordShift[0])*t.coordScale[0],R[w++]=(i[m++]-t.coordShift[1])*t.coordScale[1],R[w++]=(i[m++]-t.coordShift[2])*t.coordScale[2]):(R[w++]=i[m++],R[w++]=i[m++],R[w++]=i[m++]),null!==l&&(f=o.haveCellNormals?3*(h+o.cellOffset):3*e,R[w++]=l[f++],R[w++]=l[f++],R[w++]=l[f++]),t.customData.forEach((function(t){I=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bg,n),Mc.extend(e,t,n),ln.c.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),ln.c.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),Sg(e,t)}var Rg={newInstance:ln.c.newInstance(Vg),extend:Vg},wg=ln.c.vtkErrorMacro;function kg(e,t){t.classHierarchy.push("vtkShader"),e.compile=function(){var e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;switch(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),t.shaderType){case"Fragment":e=t.context.FRAGMENT_SHADER;break;case"Vertex":default:e=t.context.VERTEX_SHADER}if(t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle),!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){var n=t.context.getShaderInfoLog(t.handle);return wg("Error compiling shader '".concat(t.source,"': ").concat(n)),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}var Wg={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["shaderType","source","error","handle","context"]),kg(e,t)}var Tg={newInstance:ln.c.newInstance(xg,"vtkShader"),extend:xg},Jg=ln.c.vtkErrorMacro;function Xg(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=function(){return t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(Jg("Links failed: ".concat(t.error)),0):(Jg(t.error),0):(Jg(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.fragmentShader.getError()),0):(Jg(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.vertexShader.getError()),0)},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=function(){return!(!t.linked&&!e.link()||(t.context.useProgram(t.handle),e.setBound(!0),0))},e.isBound=function(){return!!t.bound},e.release=function(){t.context.useProgram(null),e.setBound(!1)},e.setContext=function(e){t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=function(){if(t.inked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;if(t.uniformLocs={},t.context.linkProgram(t.handle),!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){var n=t.context.getProgramInfoLog(t.handle);return Jg("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(a,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(a,!1,o),!0},e.setUniformf=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(a,r),!0)},e.setUniformfv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(a,r),!0)},e.setUniformi=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(a,r),!0)},e.setUniformiv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(a,r),!0)},e.setUniform2f=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,a),!0},e.setUniform2fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(a,r),!0)},e.setUniform2i=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,a),!0},e.setUniform2iv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(a,r),!0)},e.setUniform3f=function(n,r,a,o){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r,a,o),!0},e.setUniform3fArray=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(a,r),!0)},e.setUniform3i=function(n){var r=e.findUniform(n);if(-1===r)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i1?a-1:0),i=1;i1?a-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=Tg.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=Tg.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=Tg.newInstance(),t.geometryShader.setShaderType("Geometry"),ln.c.obj(e,t),ln.c.get(e,t,["lastCameraMTime"]),ln.c.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),Xg(e,t)}var Hg={newInstance:ln.c.newInstance(Ng,"vtkShaderProgram"),extend:Ng,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var i="";r&&(i="g");var l=new RegExp(t,i),s=e.replace(l,a);return{replace:o,result:s}}};function Yg(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=function(){},e.initialize=function(){t.instancingExtension=null,t.openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t.openGLRenderWindow&&t.openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=function(){return 0!==t.handleVAO||!1===t.supported},e.bind=function(){if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,1):n.vertexAttribDivisor(i.index+s,1))}},e.release=function(){if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,0):n.vertexAttribDivisor(i.index+s,0)),n.disableVertexAttribArray(i.index+s)}},e.shaderProgramChanged=function(){e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=function(){e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=function(t,n,r,a,o,i,l,s){return e.addAttributeArrayWithDivisor(t,n,r,a,o,i,l,s,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,a,o,i,l,s,c,g,u){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Xc.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;var d=t.context,m={};if(m.name=a,m.index=d.getAttribLocation(t.handleProgram,a),m.offset=o,m.stride=i,m.type=l,m.size=s,m.normalize=c,m.isMatrix=u,m.divisor=g,-1===m.Index)return!1;if(r.bind(),d.enableVertexAttribArray(m.index),d.vertexAttribPointer(m.index,m.size,m.type,m.normalize,m.stride,m.offset),g>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m.index,1):d.vertexAttribDivisor(m.index,1)),m.buffer=r.getHandle(),!t.supported){for(var f=!1,p=0;p0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m+f,1):d.vertexAttribDivisor(m+f,1));return!0},e.removeAttributeArray=function(n){if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fg,n),t.buffers=[],ln.c.obj(e,t),ln.c.get(e,t,["supported"]),ln.c.setGet(e,t,["forceEmulation"]),Yg(e,t)}var Kg={newInstance:ln.c.newInstance(Pg,"vtkOpenGLVertexArrayObject"),extend:Pg};function Mg(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=function(e){t.program.setContext(e.getContext()),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=function(e){t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)}}var Lg={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lg,n),ln.c.obj(e,t),t.shaderSourceTime={},ln.c.obj(t.shaderSourceTime),t.attributeUpdateTime={},ln.c.obj(t.attributeUpdateTime),ln.c.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=Hg.newInstance(),t.VAO=Kg.newInstance(),t.CABO=Rg.newInstance(),Mg(e,t)}var Eg={newInstance:ln.c.newInstance(Dg),extend:Dg};function Ug(e,t){e.update=function(){e.getInputData()},e.addClippingPlane=function(e){"vtkPlane"===e.getClassName()&&t.clippingPlanes.push(e)},e.getNumberOfClippingPlanes=function(){return t.clippingPlanes.length},e.removeAllClippingPlanes=function(){t.clippingPlanes.length=0},e.removeClippingPlane=function(e){e<0||e>=6||t.clippingPlanes.splice(e,1)},e.getClippingPlanes=function(){return t.clippingPlanes},e.setClippingPlanes=function(t){if(t)if(Array.isArray(t))for(var n=t.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Ug(e,t)}};function jg(e,t){e.getBounds=function(){return 0},e.getBounds=function(n){e.getBounds();for(var r=0;r<6;r++)n[r]=t.bounds[r]},e.getCenter=function(){e.getBounds();for(var n=0;n<3;n++)t.center[n]=(t.bounds[2*n+1]+t.bounds[2*n])/2;return t.center.slice()},e.getLength=function(){var n=0,r=0;e.getBounds();for(var a=0;a<3;a++)r+=(n=t.bounds[2*a+1]-t.bounds[2*a])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var a=t.clippingPlanes,o=e;if(a){var i=a.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qg,n),_g.extend(e,t,n),t.bounds||Object(Xo.D)(t.bounds),t.center||(t.center=[0,0,0]),jg(e,t)}},$g={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},eu={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:$g},tu={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ru=eu.ScalarMappingTarget,au=eu.VectorMode,ou=Bo.a.VtkDataTypes,iu=tu.ColorMode,lu=ln.c.vtkErrorMacro;function su(e){return e}function cu(e){return Math.floor(255*e+.5)}function gu(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(au.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(au.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(au.RGBCOLORS)},e.build=function(){},e.isOpaque=function(){return!0},e.setAnnotations=function(n,r){if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)lu("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var a=r.length,o=0;o=0?t.annotationArray[a].annotation!==r&&(t.annotationArray[a].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),a=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=function(){return t.annotationArray.length},e.getAnnotatedValue=function(e){return e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value},e.getAnnotation=function(e){return void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation},e.getAnnotatedValueIndex=function(n){return t.annotationArray.length?e.checkForAnnotatedValue(n):-1},e.removeAnnotation=function(n){var r=e.checkForAnnotatedValue(n),a=r>=0;return a&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var a=e.getAnnotatedValueIndex(n);e.getIndexedColor(a,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=function(t){return e.getAnnotatedValueIndexInternal(t)},e.getAnnotatedValueIndexInternal=function(e){if(void 0!==t.annotatedValueMap[e]){var n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=function(e,t){t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=function(){t.annotatedValueMap=[];for(var e=t.annotationArray.length,n=0;n1?e.mapVectorsThroughTable(t,o,ru.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,o,ru.RGBA,s))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),a=e.getNumberOfComponents(),o=t.getData(),i=e.getData(),l=0;l=c&&(s=c-1)):(-1===l&&(l=e.getVectorSize()),l<=0?(s=0,l=c):(s<0&&(s=0),s>=c&&(s=c-1),s+l>c&&(l=c-s)),i!==au.MAGNITUDE||1!==c&&1!==l||(i=au.COMPONENT));var g=0;switch(s>0&&(g=s),i){case au.COMPONENT:e.mapScalarsThroughTable(t,n,r,g);break;default:case au.MAGNITUDE:var u=Bo.a.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,u,l),e.mapScalarsThroughTable(u,n,r,0);break;case au.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var a=r(n),o=t.getData(),i=e.getData(),l=o.length,s=0,c=0;c=1&&n.getDataType()===ou.UNSIGNED_CHAR)return n;var i=Bo.a.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:ou.UNSIGNED_CHAR});if(a<=0)return i;o=(o=o>0?o:0)<1?o:1;var l=su;switch(n.getDataType()!==ou.FLOAT&&n.getDataType()!==ou.DOUBLE||(l=cu),r){case 1:e.luminanceToRGBA(i,n,o,l);break;case 2:e.luminanceAlphaToRGBA(i,n,l);break;case 3:e.rGBToRGBA(i,n,o,l);break;case 4:e.rGBAToRGBA(i,n,o,l);break;default:return lu("Cannot convert colors"),null}return i},e.usingLogScale=function(){return!1},e.getNumberOfAvailableColors=function(){return 16777216},e.setRange=function(t,n){return e.setMappingRange(t,n)},e.getRange=function(t,n){return e.getMappingRange()}}var uu={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:au.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uu,n),ln.c.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],ln.c.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),ln.c.setArray(e,t,["mappingRange"],2),ln.c.getArray(e,t,["mappingRange"]),gu(e,t)}var mu=function(e){for(var t=1;tt.range[1]?t.maxIndex+1+1.5:(n=(e+t.shift)*t.scale)e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=function(n,r,a,o){var i=e.linearLookup;t.indexedLookup&&(i=e.indexedLookupFunction);var l=e.getMappingRange(),s={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,s);var c=e.getAlpha(),g=n.getNumberOfTuples(),u=n.getNumberOfComponents(),d=r.getData(),m=n.getData();if(c>=1){if(a===$g.RGBA)for(var f=0;ft.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Cu={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),mu.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},ln.c.obj(t.buildTime),t.opaqueFlagBuildTime={},ln.c.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},ln.c.obj(t.insertTime,{mtime:0}),ln.c.get(e,t,["buildTime"]),ln.c.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),ln.c.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),pu(e,t)}var hu={newInstance:ln.c.newInstance(Iu,"vtkLookupTable"),extend:Iu},bu=1,yu=0,vu=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Zu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;yu=e}var Au={getResolveCoincidentTopologyAsString:function(){return vu[yu]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bu},getResolveCoincidentTopology:function(){return yu},setResolveCoincidentTopology:Zu,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bu=e},setResolveCoincidentTopologyToDefault:function(){Zu(0)},setResolveCoincidentTopologyToOff:function(){Zu(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Zu(1)}};function Gu(e,t,n){n.forEach((function(n){e["get".concat(n.method)]=function(){return t[n.key]},e["set".concat(n.method)]=function(e,r){t[n.key]={factor:e,offset:r}}}))}var Su=["Polygon","Line","Point"],Bu={};Gu(Bu,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Su.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Vu={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),ln.c.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Au).forEach((function(t){e[t]=Au[t]})),Object.keys(Bu).forEach((function(t){e[t]=Bu[t]})),Gu(e,t.topologyOffset,Su.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Bu.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Bu,otherStaticMethods:Au,CATEGORIES:Su};function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:a}},e.createColorTextureCoordinates=function(t,n,r,a,o,i,l,s,c){var g=(i[1]-i[0])/s,u=[];u[0]=i[0]-g,u[1]=i[1]+g;var d=1/(u[1]-u[0]),m=n.getData(),f=t.getData(),p=0,C=0;if(o<0||o>=a)for(var I=0;It.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var l=t.lookupTable.getNumberOfAvailableColors();l>4094&&(l=4094),l+=2;for(var s=(a[1]-a[0])/(l-1-2),c=new Float64Array(2*l),g=0;gt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var m=n.getNumberOfComponents(),f=n.getNumberOfTuples();t.colorCoordinates=Bo.a.newInstance({numberOfComponents:2,values:new Float32Array(2*f)});var p=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Xu.MAGNITUDE&&n.getNumberOfComponents()>1&&(p=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,f,m,p,a,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,o)}},e.getIsOpaque=function(){var t=e.getLookupTable();return!t||(t.build(),t.isOpaque())},e.canUseTextureMapForColoring=function(n){if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;var r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),a=r.scalars;return!(!a||r.cellFlag||t.colorMode===xu.DEFAULT&&a.getDataType()===Ou.UNSIGNED_CHAR||t.colorMode===xu.DIRECT_SCALARS)},e.clearColorArrays=function(){t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=function(){return t.lookupTable||e.createDefaultLookupTable(),t.lookupTable},e.getMTime=function(){var e=t.mtime;if(null!==t.lookupTable){var n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=function(){var t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells()}},e.acquireInvertibleLookupTable=Nu("AcquireInvertibleLookupTable"),e.valueToColor=Nu("ValueToColor"),e.colorToValue=Nu("ColorToValue"),e.useInvertibleColorFor=Nu("UseInvertibleColorFor"),e.clearInvertibleColor=Nu("ClearInvertibleColor")}var Yu={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,viewSpecificProperties:null,customShaderAttributes:[]};function Fu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),qg.extend(e,t,n),ln.c.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),ln.c.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),ln.c.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Vu.implementCoincidentTopologyMethods(e,t),Hu(e,t)}var Pu=wu(wu(wu({newInstance:ln.c.newInstance(Fu,"vtkMapper"),extend:Fu},ku),Wu),tu),Ku="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",Mu="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n",Lu={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,a){var o=e.getCoincidentParameters(r,a);if(o&&(0!==o.factor||0!==o.offset)){var i=n.Fragment;i=Hg.substitute(i,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=i}}}},Du={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Eu=hg.Representation,Uu=hg.Shading,zu=Pu.ScalarMode,_u=ic.Filter,ju=ic.Wrap,Qu=ln.c.vtkErrorMacro,qu={type:"StartEvent"},$u={type:"EndEvent"};function ed(e,t){function n(e,t,n){return t.identity(n),e.reduce((function(e,n,r){return 0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e}),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=function(n){n&&(t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t.openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.openGLCamera=t.openGLRenderer.getViewNodeFor(t.openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.render=function(){var n=t.openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(var r=Du.Start;r= cos(radians(lightConeAngle".concat(u,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(u,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(u,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(u,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(u,");")," }"]);l=l.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),a=Hg.substitute(a,"//VTK::Light::Impl",l,!1).result;break;default:Qu("bad light complexity")}e.Fragment=a},e.replaceShaderNormal=function(n,r,a){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,i=n.Geometry,l=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Hg.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,l=Hg.substitute(l,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(a.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));"," vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," fdx = normalize(fdx);"," fdy = normalize(fdy);"," if (abs(fdx.x) > 0.0)"," { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),n.Vertex=o,n.Geometry=i,n.Fragment=l}},e.replaceShaderPositionVC=function(e,n,r){var a=e.Vertex,o=e.Geometry,i=e.Fragment;r.getProperty().getRepresentation()!==Eu.POINTS&&t.lastBoundBO.getPrimitiveType()!==Du.Points||(a=Hg.substitute(a,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(a=Hg.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=a,e.Geometry=o,e.Fragment=i},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var a=e.Vertex,o=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;a=Hg.substitute(a,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var l=t.openGLActor.getActiveTextures(),s=2,c=2;if(l&&l.length>0&&(s=l[0].getComponents(),l[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(c=3)),t.renderable.getColorTextureMap()&&(s=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),c=2),2===c){if(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,l&&l.length>=1)switch(s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=a,e.Geometry=o,e.Fragment=i}},e.replaceShaderClip=function(e,n,r){var a=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6),a=Hg.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,a=Hg.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Hg.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=Hg.substitute(o,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=a,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,a=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||a.getEdgeVisibility()&&a.getRepresentation()===Eu.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Du.Points||a.getRepresentation()===Eu.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Du.Lines||a.getRepresentation()===Eu.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Du.Tris&&o!==Du.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Du.TrisEdges&&o!==Du.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=Hg.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Hg.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderValues=function(n,r,a){if(e.replaceShaderColor(n,r,a),e.replaceShaderNormal(n,r,a),e.replaceShaderLight(n,r,a),e.replaceShaderTCoord(n,r,a),e.replaceShaderPicking(n,r,a),e.replaceShaderClip(n,r,a),e.replaceShaderCoincidentOffset(n,r,a),e.replaceShaderPositionVC(n,r,a),t.haveSeenDepthRequest){var o=n.Fragment;o=Hg.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=Hg.substitute(o,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=o}},e.getNeedToRebuildShaders=function(n,r,a){var o=0,i=0,l=n.getPrimitiveType(),s=t.currentInput,c=!1,g=s.getPointData().getNormals(),u=s.getCellData().getNormals(),d=a.getProperty().getInterpolation()===Uu.FLAT,m=a.getProperty().getRepresentation(),f=e.getOpenGLMode(m,l);if(f===t.context.TRIANGLES||u&&!g||!d&&g?c=!0:d||f!==t.context.LINES||(c=!0),a.getProperty().getLighting()&&c){o=0;for(var p=r.getLightsByReference(),C=0;C0&&(i++,0===o&&(o=1)),1===o&&(i>1||1!==I.getIntensity()||!I.lightTypeIsHeadLight())&&(o=2),o<3&&I.getPositional()&&(o=3)}}var h=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),y=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&y===i||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:i},!0),h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===n.getProgram()||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){var o=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&o>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach((function(e,r){n.getProgram().isAttributeUsed("".concat(e,"MC"))&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"".concat(e,"MC"),n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||Qu("Error setting ".concat(e,"MC in shader VAO.")))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||Qu("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||Qu("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6);for(var l=[],s=0;s0){var g=c.getColorByReference(),u=c.getIntensity();t.lightColor[0]=g[0]*u,t.lightColor[1]=g[1]*u,t.lightColor[2]=g[2]*u;var d=c.getDirection(),m=n.getActiveCamera().getViewMatrix(),f=Object(Ao.a)(d);c.lightTypeIsSceneLight()&&(f[0]=m[0]*d[0]+m[1]*d[1]+m[2]*d[2],f[1]=m[4]*d[0]+m[5]*d[1]+m[6]*d[2],f[2]=m[8]*d[0]+m[9]*d[1]+m[10]*d[2],Object(Xo.y)(f)),t.lightDirection[0]=f[0],t.lightDirection[1]=f[1],t.lightDirection[2]=f[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],Object(Xo.y)(t.lightDirection),o.setUniform3fArray("lightColor".concat(i),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(i),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(i),t.lightHalfAngle),i++}}if(!(a<3)){var p=n.getActiveCamera().getViewMatrix();Object(Yo.i)(p,p),i=0;for(var C=0;C0){var h=I.getTransformedPosition(),b=new Float64Array(3);Object(Fo.q)(b,h,p),o.setUniform3fArray("lightAttenuation".concat(i),I.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(i),I.getPositional()),o.setUniformf("lightExponent".concat(i),I.getExponent()),o.setUniformf("lightConeAngle".concat(i),I.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(i),[b[0],b[1],b[2]]),i++}}}}},e.setCameraShaderParameters=function(e,r,a){var o=e.getProgram(),i=t.openGLCamera.getKeyMatrices(r),l=r.getActiveCamera(),s=t.openGLCamera.getKeyMatrixTime().getMTime(),c=o.getLastCameraMTime(),g=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,u=a.getIsIdentity(),d=u?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();o.setUniformMatrix("MCPCMatrix",n([i.wcpc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("MCVCMatrix")&&o.setUniformMatrix("MCVCMatrix",n([i.wcvc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("normalMatrix")&&o.setUniformMatrix3x3("normalMatrix",n([i.normalMatrix,d.normalMatrix],$l,t.tmpMat3)),c!==s&&(o.isUniformUsed("cameraParallel")&&o.setUniformi("cameraParallel",l.getParallelProjection()),o.setLastCameraMTime(s)),u||o.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram(),o=r.getProperty(),i=o.getOpacity(),l=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),s=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),c=t.drawingEdges?1:o.getAmbient(),g=t.drawingEdges?0:o.getDiffuse(),u=t.drawingEdges?0:o.getSpecular(),d=o.getSpecularPower();a.setUniformf("opacityUniform",i),a.setUniform3fArray("ambientColorUniform",l),a.setUniform3fArray("diffuseColorUniform",s),a.setUniformf("ambient",c),a.setUniformf("diffuse",g);var m=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(m<1)){var f=o.getSpecularColorByReference();if(a.setUniform3fArray("specularColorUniform",f),a.setUniformf("specularPowerUniform",d),a.isUniformUsed("ambientIntensityBF")){if(i=(o=r.getBackfaceProperty()).getOpacity(),l=o.getAmbientColor(),c=o.getAmbient(),s=o.getDiffuseColor(),g=o.getDiffuse(),f=o.getSpecularColor(),u=o.getSpecular(),a.setUniformf("ambientIntensityBF",c),a.setUniformf("diffuseIntensityBF",g),a.setUniformf("opacityUniformBF",i),a.setUniform3fArray("ambientColorUniformBF",l),a.setUniform3fArray("diffuseColorUniformBF",s),m<1)return;a.setUniformf("specularIntensityBF",u),a.setUniform3fArray("specularColorUniformBF",f),a.setUniformf("specularPowerUniformBF",d)}}},e.renderPieceStart=function(n,r){t.primitiveIDOffset=0,t.openGLRenderer.getSelector()&&(t.openGLRenderer.getSelector().getCurrentPass(),t.openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===Eu.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var l=Du.Start;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,td,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=Du,t.tmpMat3=El(new Float64Array(9)),t.tmpMat4=Object(Yo.h)(new Float64Array(16));for(var r=Du.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,a)},e.replaceShaderColor=function(e,r,a){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,i=e.Geometry,l=e.Fragment,s=t.lastBoundBO.getReferenceByName("lastLightComplexity"),c=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];s&&(c=c.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var g=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(g=g.concat([" vec3 specularColor;"," float specularPower;"])),g=g.concat([" opacity = opacityUniform;"]),s&&(g=g.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(c=c.concat(["varying vec4 vertexColorVSOutput;"]),o=Hg.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,i=Hg.substitute(i,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,g=g.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),l=Hg.substitute(l,"//VTK::Color::Impl",g).result,l=Hg.substitute(l,"//VTK::Color::Dec",c).result,e.Vertex=o,e.Geometry=i,e.Fragment=l}n.replaceShaderColor(e,r,a)},e.replaceShaderPositionVC=function(e,r,a){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,a)},e.replaceShaderPicking=function(e,r,a){if(t.hardwareSupport){var o=e.Fragment,i=e.Vertex;i=Hg.substitute(i,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,i=Hg.substitute(i,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=i,o=Hg.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=Hg.substitute(o,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=o}else n.replaceShaderPicking(e,r,a)},e.updateGlyphShaderParameters=function(n,r,a,o,i,l,s,c){var g=a.getProgram();if(n){var u=t.normalMatrix,d=l,m=9*s,f=t.tmpMat3,p=u[0],C=u[1],I=u[2],h=u[3],b=u[4],y=u[5],v=u[6],Z=u[7],A=u[8],G=d[m],S=d[m+1],B=d[m+2],V=d[m+3],R=d[m+4],w=d[m+5],k=d[m+6],W=d[m+7],x=d[m+8];f[0]=G*p+S*h+B*v,f[1]=G*C+S*b+B*Z,f[2]=G*I+S*y+B*A,f[3]=V*p+R*h+w*v,f[4]=V*C+R*b+w*Z,f[5]=V*I+R*y+w*A,f[6]=k*p+W*h+x*v,f[7]=k*C+W*b+x*Z,f[8]=k*I+W*y+x*A,g.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,i,16*s),g.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,i,16*s),g.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var T=o.getData();t.tmpColor[0]=T[4*s]/255,t.tmpColor[1]=T[4*s+1]/255,t.tmpColor[2]=T[4*s+2]/255,g.setUniform3fArray("ambientColorUniform",t.tmpColor),g.setUniform3fArray("diffuseColorUniform",t.tmpColor)}c&&g.setUniform3fArray("mapperIndex",c.getPropColorValue())},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===id.SURFACE,l=t.openGLCamera.getKeyMatrices(n),s=t.openGLActor.getKeyMatrices();_l(t.normalMatrix,l.normalMatrix,s.normalMatrix),Object(Yo.l)(t.mcpcMatrix,l.wcpc,s.mcwc),Object(Yo.l)(t.mcvcMatrix,l.wcvc,s.mcwc);var c=t.renderable.getMatrixArray(),g=t.renderable.getNormalArray(),u=t.renderable.getColorArray(),d=c.length/16,m=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===sd.COMPOSITE_INDEX_PASS&&(m=!0);for(var f=t.primTypes.Start;fe.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||od("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||od("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,a),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,a)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(a,ld.ARRAY_BUFFER),t.normalBuffer.upload(o,ld.ARRAY_BUFFER),i?t.colorBuffer.upload(i.getData(),ld.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var l=a.length/16,s=new Uint8Array(4*l),c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),rd.extend(e,t,n),t.tmpMat3=El(new Float64Array(9)),t.normalMatrix=El(new Float64Array(9)),t.mcpcMatrix=Object(Yo.h)(new Float64Array(16)),t.mcvcMatrix=Object(Yo.h)(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},ln.c.obj(t.glyphBOBuildTime,{mtime:0}),ud(e,t)}var fd={newInstance:ln.c.newInstance(md,"vtkOpenGLGlyph3DMapper"),extend:md},pd={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}},Cd={NEAREST:0,LINEAR:1},Id={InterpolationType:Cd},hd=ln.c.vtkErrorMacro,bd=pd.SlicingMode;function yd(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function vd(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=function(n){if(n){t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera()),t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(r.getActiveCamera())}},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.getCoincidentParameters=function(e,n){return t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null},e.render=function(){var n=t.openGLImageSlice.getRenderable(),r=t.openGLRenderer.getRenderable();e.renderPiece(r,n)},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=Ku,e.Fragment=Mu,e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Vertex,i=n.Fragment;o=Hg.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var l=t.openGLTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(s){for(var g=1;gn.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||hd("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||hd("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var i=t.openGLTexture.getComponents(),l=a.getProperty().getIndependentComponents();if(l)for(var s=0;s1?1:0;var M=o.getData(),L=null;if(T===bd.I){L=new M.constructor(H[2]*H[1]*s);for(var D=0,E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zd,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=Eg.newInstance(),t.openGLTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.pwfTexture=ic.newInstance(),t.imagemat=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,[]),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime),vd(e,t)}var Gd={newInstance:ln.c.newInstance(Ad,"vtkOpenGLImageMapper"),extend:Ad};function Sd(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.opaqueZBufferPass=function(t,n){return e.opaquePass(t,n)},e.opaquePass=function(n,r){n&&(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}var Bd={context:null,keyMatrixTime:null,keyMatrices:null};function Vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bd,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),Sd(e,t)}var Rd={newInstance:ln.c.newInstance(Vd,"vtkOpenGLImageSlice"),extend:Vd},wd=ln.c.vtkDebugMacro;function kd(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var a=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,i=t.openGLRenderer.getTiledSizeAndOrigin(),l=null;if(t.renderable.getUseZValues()){var s=r.getZBufferTexture(),c=Math.floor(s.getWidth()),g=Math.floor(s.getHeight()),u=t.openGLRenderWindow.getContext();s.bind();var d=r.getFramebuffer();d?d.saveCurrentBindingsAndBuffers():wd("No framebuffer to save/restore");var m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.getHandle(),0),u.checkFramebufferStatus(u.FRAMEBUFFER)===u.FRAMEBUFFER_COMPLETE&&(l=new Uint8Array(c*g*4),u.viewport(0,0,c,g),u.readPixels(0,0,c,g,u.RGBA,u.UNSIGNED_BYTE,l)),d&&d.restorePreviousBindingsAndBuffers(),u.deleteFramebuffer(m)}t.renderable.invokeCallback(t.renderable.getInputData(),o,a,i,l)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var Wd={};function xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),_s.extend(e,t,n),kd(e,t)}var Td={newInstance:ln.c.newInstance(xd,"vtkOpenGLPixelSpaceCallbackMapper"),extend:xd},Jd=ln.c.vtkDebugMacro;function Xd(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.renderable.isActiveCameraCreated()||t.renderable.resetCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=function(){for(var e=0,n=t.renderable.getLightsByReference(),r=0;r0&&e++;return e||(Jd("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,a=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=a.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(a.clearDepth(1),r|=a.DEPTH_BUFFER_BIT,a.depthMask(!0));var o=e.getTiledSizeAndOrigin();a.enable(a.SCISSOR_TEST),a.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.colorMask(!0,!0,!0,!0),a.clear(r),a.enable(a.DEPTH_TEST)}},e.cameraPass=function(t){t&&e.clear()},e.getAspectRatio=function(){var e=t.parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=function(){var e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=Object(Xo.a)(e[0]-n[0],0,1),a=Object(Xo.a)(e[1]-n[1],0,1),o=t.parent.normalizedDisplayToDisplay(r,a),i=Math.round(o[0]),l=Math.round(o[1]),s=Object(Xo.a)(e[2]-n[0],0,1),c=Object(Xo.a)(e[3]-n[1],0,1);s>n[2]-n[0]&&(s=n[2]-n[0]),c>n[3]-n[1]&&(c=n[3]-n[1]);var g=t.parent.normalizedDisplayToDisplay(s,c),u=Math.round(g[0])-i,d=Math.round(g[1])-l;return u<0&&(u=0),d<0&&(d=0),{usize:u,vsize:d,lowerLeftU:i,lowerLeftV:l}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var a=t.renderable.getBackgroundByReference();t.context.clearColor(a[0],a[1],a[2],a[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,r.depthMask(!0)),r.colorMask(!0,!0,!0,!0);var o=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=function(){null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))}}var Od={context:null,openGLRenderWindow:null,selector:null};function Nd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),_s.extend(e,t,n),ln.c.get(e,t,["shaderCache"]),ln.c.setGet(e,t,["selector"]),Xd(e,t)}var Hd={newInstance:ln.c.newInstance(Nd,"vtkOpenGLRenderer"),extend:Nd},Yd=ln.c.vtkErrorMacro;function Fd(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=function(n){if(n){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera())}},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=function(n,r){if(n&&!t.openGLRenderer.getSelector()){e.updateBufferObjects(),t.openGLRenderWindow.enableDepthMask(),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var a=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",a);var o=t.openGLRenderer.getRenderable(),i=t.openGLCamera.getKeyMatrices(o),l=new Float64Array(16);if(Object(Yo.g)(l,i.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",l),"box"===t.lastFormat){var s=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",s[0],s[1],s[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=function(){if(!t.tris.getCABO().getElementCount()){for(var e=new Float32Array(12),n=0;n<4;n++)e[3*n]=n%2*2-1,e[3*n+1]=n>1?1:-1,e[3*n+2]=1;var r=Bo.a.newInstance({numberOfComponents:3,values:e});r.setName("points");var a=new Uint16Array(8);a[0]=3,a[1]=0,a[2]=1,a[3]=3,a[4]=3,a[5]=0,a[6]=3,a[7]=2;var o=Bo.a.newInstance({numberOfComponents:1,values:a});t.tris.getCABO().createVBO(o,"polys",sg.SURFACE,{points:r,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Yd("Error setting vertexMC in shader VAO."));var i=t.renderable.getTextures();i.length||Yd("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==i[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(i[0]))}}var Pd={context:null};function Kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),_s.extend(e,t,n),t.openGLTexture=ic.newInstance(),t.tris=Eg.newInstance(),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Fd(e,t)}var Md={newInstance:ln.c.newInstance(Kd),extend:Kd};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dd=ln.c.vtkErrorMacro;function Ed(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||Dd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),a.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())a.setUniformMatrix("MCVCMatrix",i.wcvc);else{var l=t.openGLActor.getKeyMatrices(),s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(g=i.getArray(t.renderable.getScaleArray()).getData());var u=null,d=0,m=null;a?(d=a.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),u=a.getData(),m=new Uint8Array(3*s*4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(d);var f=new Float32Array(5*s*3);o.setStride(20);for(var p=Math.cos(Object(Xo.B)(30)),C=0,I=0,h=0,b=0,y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ud,n),rd.extend(e,t,n),Ed(e,t)}var _d={newInstance:ln.c.newInstance(zd,"vtkOpenGLSphereMapper"),extend:zd};function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qd=ln.m;function qd(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||Qd("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||Qd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||Qd("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),r.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",i.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",i.normalMatrix);else{var l=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){var s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}if(a.isUniformUsed("normalMatrix")){var c=new Float64Array(9);_l(c,i.normalMatrix,l.normalMatrix),a.setUniformMatrix3x3("normalMatrix",c)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null,u=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),a&&(u=a.getNumberOfComponents(),o.setColorOffset(4),g=a.getData(),o.setColorBOStride(8)),o.setColorComponents(u),o.setStride(28);var d=new Float32Array(7*s*12),m=new Uint8Array(12*s*(g?8:4)),f=null,p=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(f=i.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&i.hasArray(t.renderable.getOrientationArray())?p=i.getArray(t.renderable.getOrientationArray()).getData():Qd(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var C=[0,1,3,0,3,2,2,3,5,2,5,4],I=0,h=0,b=0,y=0,v=0;v=4?255:0,m[y++]=C[G]>=2?255:0,m[y++]=255,h=v*u,g&&(m[y++]=g[h],m[y++]=g[h+1],m[y++]=g[h+2],m[y++]=g[h+3])}o.setElementCount(b/7),o.upload(d,Xc.ARRAY_BUFFER),o.getColorBO().upload(m,Xc.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var $d={};function em(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),rd.extend(e,t,n),qd(e,t)}var tm={newInstance:Object(ln.g)(em,"vtkOpenGLStickMapper"),extend:em},nm="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n",rm=hg.Representation;function am(e,t,n,r){var o=Object(a.a)(t,2),i=o[0],l=o[1],s=e.getContext(),c=ic.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:s.FLOAT,baseLevel:0,maxLevel:0});return c.setOpenGLRenderWindow(e),c.setInternalFormat(s.RGBA32F),c.create2DFromRaw(i,l,4,"Float32Array",null),c.activate(),c.sendParameters(),c.deactivate(),c}function om(e,t){return am(e,t,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE)}function im(e,t){t.classHierarchy.push("vtkLICPingPongBufferManager"),t.openGLRenderWindow?(t.quad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",rm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow),t.context=t.openGLRenderWindow.getContext(),t.licTexture0=om(t.openGLRenderWindow,t.size),t.seedTexture0=om(t.openGLRenderWindow,t.size),t.licTexture1=om(t.openGLRenderWindow,t.size),t.seedTexture1=om(t.openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?am(t.openGLRenderWindow,t.size,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE):null,t.imageVectorTexture=t.doVTPass?function(e,t){return am(e,t,ic.Filter.LINEAR,ic.Wrap.CLAMP_TO_EDGE)}(t.openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=function(){t.readIndex=1-t.readIndex},e.renderQuad=function(e,n){var r=t.quad,a=t.context,o=t.quadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=function(){return 0===t.readIndex?t.licTexture0:t.licTexture1},e.getLastSeedBuffer=function(){return 0===t.readIndex?t.seedTexture0:t.seedTexture1},e.getLICBuffer=function(){return 1-t.readIndex==0?t.licTexture0:t.licTexture1},e.getSeedBuffer=function(){return 1-t.readIndex==0?t.seedTexture0:t.seedTexture1},e.getLICTextureUnit=function(){var e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=function(){var e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=function(){return t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()},e.getImageVectorTextureUnit=function(){return t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit()},e.getMaskVectorTextureUnit=function(){return t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit()},e.clearBuffers=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);var a=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),a.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(a),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=function(e){var n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,a=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1])},e.detachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=function(){var e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=function(){var e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=function(){t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);var e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=function(){var e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]),t.textures[t.readIndex][0].deactivate()},e.detachBuffers=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);var r=t.textures[t.readIndex],a=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),a[0]&&a[0].deactivate(),a[1]&&a[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=function(){return 1-t.readIndex},e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}var lm={openGLRenderWindow:null,vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lm,n),ln.c.obj(e,t),ln.c.get(e,t,["readIndex"]),ln.c.setGet(e,t,["doEEPass","doVTPass","openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),im(e,t)}var cm={newInstance:ln.c.newInstance(sm,"vtkLICPingPongBufferManager"),extend:sm},gm=0,um=1,dm=2,mm=3,fm=0,pm=1;function Cm(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.dumpTextureValues=function(e,n){var r=Object(a.a)(n,2),o=r[0],i=r[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,g=gc.newInstance(),u=l,d=null;return g.setOpenGLRenderWindow(s),g.saveCurrentBindingsAndBuffers(),g.create(o,i),g.populateFramebuffer(),g.setColorBuffer(e),d=new Float32Array(o*i*c),u.readPixels(0,0,o,i,4===c?u.RGBA:u.RGB,u.FLOAT,d),g.restorePreviousBindingsAndBuffers(),d},e.getTextureMinMax=function(n,r){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,i=e.dumpTextureValues(n,r,a,o,4),l=Number.MAX_VALUE,s=Number.MIN_VALUE,c=0;cs&&(s=g)}return{min:l,max:s}},e.getComponentSelectionProgram=function(e){var t="xyzw";return".".concat(t[e[0]]).concat(t[e[1]])},e.buildShaders=function(){t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");var n=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl","vec2 V = texture2D(texVectors, tcoordVC.st)".concat(e.getComponentSelectionProgram(t.componentIds),";")).result;t.VTProgram=e.buildAShader(n);var r=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){var e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=function(a,o,i,l,s,c){if(t.openGLRenderWindow=s,t.context=s.getContext(),Object.assign(t,c),a[0]<=0||a[1]<=0)return null;var g=[1/a[0],1/a[1]],u=t.stepSize*Math.sqrt(g[0]*g[0]+g[1]*g[1]);u<=0&&(u=1e-10);var d,m=t.context,f=t.framebuffer;f&&a[0]===f.getSize()[0]&&a[1]===f.getSize()[1]||((f=gc.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),(d=f).create.apply(d,Object(Ao.a)(a)),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),m.viewport.apply(m,[0,0].concat(Object(Ao.a)(a))),m.scissor.apply(m,[0,0].concat(Object(Ao.a)(a))),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(i),t.bufs.setNoiseTexture(l)):t.bufs=cm.newInstance({openGLRenderWindow:s,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:i,noiseTexture:l,framebuffer:f,size:a});var p=[(l.getWidth()+1)/a[0],(l.getHeight()+1)/a[1]],C=1/a[0],I=1/a[1],h=t.openGLRenderWindow.getShaderCache();if(t.transformVectors){var b=t.VTProgram;h.readyShaderProgram(b),t.bufs.attachImageVectorBuffer(),b.setUniform2f.apply(b,["uTexSize"].concat(Object(Ao.a)(a))),b.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),t.bufs.renderQuad(a,b),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);var y=t.LIC0ShaderProgram;h.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f.apply(y,["uNoiseBoundsPt1"].concat(p)),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,a,y);var v=t.LICIShaderProgram;h.readyShaderProgram(v),v.setUniformi("uPassNo",0),v.setUniformf("uStepSize",-u),v.setUniform2f.apply(v,["uNoiseBoundsPt1"].concat(p)),v.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),v.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(var Z=0;Z1||l<0)&&(console.error("Invalid color range: ",l,s),l=0,s=1);var c=s-l;n&&(l+=c*t.lowLICContrastEnhancementFactor,c=(s-=c*t.highLICContrastEnhancementFactor)-l);var g=t.CEProgram;o.readyShaderProgram(g),g.setUniformi("texLIC",t.bufs.getLICTextureUnit()),g.setUniformf("uMin",l),g.setUniformf("uMaxMinDiff",c),r(t.bufs,a,g)}}var Im={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Im,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),Cm(e,t)}var bm={newInstance:ln.c.newInstance(hm,"vtkLineIntegralConvolution2D"),extend:hm},ym=n(53);function vm(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}var Zm={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:gm,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:0,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:pm,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function Am(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),ln.c.obj(e,t),ln.c.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),vm(0,t)}var Gm={newInstance:ln.c.newInstance(Am,"vtkSurfaceLICInterface"),extend:Am},Sm=hg.Representation;function Bm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=function(e,n){var r=t.licQuad,a=t.context,o=t.licQuadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=function(e){if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Object(ym.a)(t.noiseGeneratorSeed,{global:!0});var n=[],r=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue"),o=r.noiseTextureType,i=r.noiseGrainSize,l=r.numberOfNoiseLevels,s=r.noiseImpulseProbability,c=r.noiseImpulseBackgroundValue,g=r.minNoiseValue,u=r.maxNoiseValue;switch(o){case pm:n=function(e,t,n,r,a,o){var i=Math.max(0,Math.min(1,n)),l=Float32Array.from({length:e*e},(function(){var e=0;if(1===i||Math.random()>1-i)for(var t=0;t<2048;++t)e+=Math.random();return e})),s=0,c=2049;l.forEach((function(e){c=1===i?e0?e:c,s=e>s?e:s}));var g=s-c;0===g&&(c=0,g=0===s?1:s);var u=t-1,d=0!==u?1/u:0,m=o-a;return l.map((function(e){var n=e=c?1===t?o:a+(i>u?u:i)*d*m:r}))}(Math.floor(e/i),l,s,c,g,u);break;case fm:default:n=function(e,t,n,r){var o=Object(a.a)(e,2),i=o[0],l=o[1],s=r-n;return Float32Array.from({length:i*l},(function(){var e=Math.random();return(e=(e=Math.floor(e*t)/t)*s+n)>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],l,g,u)}var d=1/i,m=Float32Array.from({length:e*e*4},(function(t,r){var a=r/4;if(r%4==0){var o=Math.floor(a%e*d),l=Math.floor(a/e*d);return n[l*(e/i)+o]}return r%4==1||r%4==3?1:0})),f=ic.newInstance({wrapS:ic.Wrap.REPEAT,wrapT:ic.Wrap.REPEAT,minificationFilter:ic.Filter.NEAREST,magnificationFilter:ic.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});f.setOpenGLRenderWindow(t.openGLRenderWindow),f.create2DFromRaw(e,e,4,"Float32Array",m),f.activate(),f.sendParameters(),f.deactivate(),t.noiseTexture=f}},e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.allocateTextures=function(){var n=ic.Filter.NEAREST,r=ic.Filter.LINEAR,a=t.openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(a,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(a,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(a,r)),t.LICImage||(t.LICImage=e.allocateTexture(a,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(a,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(a,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(a))},e.allocateTexture=function(e,n){var r=t.context,a=ic.newInstance({wrapS:ic.Wrap.CLAMP_TO_EDGE,wrapT:ic.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return a.setOpenGLRenderWindow(e),a.setInternalFormat(r.RGBA32F),a.create2DFromRaw.apply(a,Object(Ao.a)(t.size).concat([4,"Float32Array",null])),a.activate(),a.sendParameters(),a.deactivate(),a},e.allocateDepthTexture=function(e){var n=t.context,r=ic.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw.apply(r,Object(Ao.a)(t.size).concat(["Float32Array",null])),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=function(){if(!t.framebuffer){t.licHelper=null;var e=gc.newInstance();e.setOpenGLRenderWindow(t.openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create.apply(e,Object(Ao.a)(t.size)),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=function(){t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=function(){e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",Sm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow)),t.licHelper||(t.licHelper=bm.newInstance())},e.prepareForGeometry=function(){var e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(1),e.removeColorBuffer(2),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,1),e.setColorBuffer(t.maskVectorImage,2),e.setDepthBuffer(t.depthTexture);var n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1,n.COLOR_ATTACHMENT2]),n.viewport.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.scissor.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=function(n){t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();var r=t.licCopyPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(r);var a=t.context;a.viewport.apply(a,[0,0].concat(Object(Ao.a)(n))),a.scissor.apply(a,[0,0].concat(Object(Ao.a)(n))),a.disable(a.BLEND),a.enable(a.DEPTH_TEST),a.disable(a.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=function(){var n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create.apply(r,Object(Ao.a)(t.size)),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();var a=t.licColorPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(a),a.setUniformi("texVectors",t.vectorImage.getTextureUnit()),a.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());var o=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor"),i=o.colorMode,l=o.LICIntensity,s=o.mapModeBias,c=o.maskIntensity,g=o.maskColor,u=o.enhanceContrast,d=o.lowColorContrastEnhancementFactor,m=o.highColorContrastEnhancementFactor;if(a.setUniformi("texLIC",t.LICImage.getTextureUnit()),a.setUniformi("uScalarColorMode",i),a.setUniformf("uLICIntensity",l),a.setUniformf("uMapBias",s),a.setUniformf("uMaskIntensity",c),a.setUniform3f.apply(a,["uMaskColor"].concat(Object(Ao.a)(g))),e.renderQuad(t.size,a),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),u===dm||u===mm){var f=0,p=1,C=p-f;C=(p-=C*m)-(f+=C*d),r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();var I=t.enhanceContrastPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(I),I.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),I.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),I.setUniformi("texLIC",t.LICImage.getTextureUnit()),I.setUniformf("uLMin",f),I.setUniformf("uLMaxMinDiff",C),e.renderQuad(t.size,I),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=function(){var e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t.openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=function(n){Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=function(){t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}var Vm={context:null,openGLRenderWindow:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vm,n),Gm.extend(e,t,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","reallocateTextures","licInterface","size"]),Bm(e,t)}var wm={newInstance:ln.c.newInstance(Rm,"vtkSurfaceLICInterface"),extend:Rm};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=ln.c.vtkErrorMacro;function xm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");var n=function(e){for(var t=1;t1&&t.renderable.setCustomShaderAttributes([a.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=function(e){var n;t.stateCache=(Object(qi.a)(n={},e.BLEND,e.isEnabled(e.BLEND)),Object(qi.a)(n,e.DEPTH_TEST,e.isEnabled(e.DEPTH_TEST)),Object(qi.a)(n,e.SCISSOR_TEST,e.isEnabled(e.SCISSOR_TEST)),n)},e.popState=function(e){var n=function(n){return t.stateCache[n]?e.enable(n):e.disable(n)};n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST)},e.renderPiece=function(r,a){var o=!0;t.openGLRenderWindow.getWebgl2()||(Wm("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(Wm("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(Wm("No input"),o=!1);var i=t.renderable.getLicInterface();i||(i=Gm.newInstance(),t.renderable.setLicInterface(i)),t.openGLLicInterface||(t.openGLLicInterface=wm.newInstance()),i!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(i);var l=t.renderable.getInputArrayToProcess(0);if(i.getEnableLIC()&&(!l||l.getNumberOfComponents()<2)&&(Wm("No vector input array"),o=!1),i.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,o&&i.getEnableLIC()){var s=t.openGLRenderWindow.getSize(),c=s.map((function(e){return Math.round(e*i.getViewPortScale())}));t.openGLLicInterface.setSize(c),t.openGLLicInterface.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,a),n.renderPieceDraw(r,a),n.renderPieceFinish(r,a),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(s),e.popState(t.context)}else n.renderPiece(r,a)}}var Tm={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tm,n),rd.extend(e,t,n),xm(e,t),ln.c.setGet(e,t,["openGLLicInterface"])}var Xm={newInstance:ln.c.newInstance(Jm,"vtkOpenGLSurfaceLICMapper"),extend:Jm};function Om(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0))},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.MCWCMatrix,t.renderable.getMatrix()),Object(Yo.i)(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?El(t.normalMatrix):(Dl(t.normalMatrix,t.MCWCMatrix),zl(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}var Nm={};function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nm,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),ln.c.setGet(e,t,["context"]),Om(e,t)}var Ym={newInstance:ln.c.newInstance(Hm,"vtkOpenGLVolume"),extend:Hm},Fm={NEAREST:0,LINEAR:1,FAST_LINEAR:2},Pm={FRACTIONAL:0,PROPORTIONAL:1},Km={InterpolationType:Fm,OpacityMode:Pm},Mm={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3},Lm={BlendMode:Mm};function Dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Em=ln.c.vtkWarningMacro,Um=ln.c.vtkErrorMacro;function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n// Lighting values\n//VTK::Light::Dec\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing triliear values from multiple z slices\n#ifdef vtkTriliearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)).a - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)).a - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)).a - scalar;\n\n // divide by spacing\n result.xyz /= vSpacing;\n\n result.w = length(result.xyz);\n\n // rotate to View Coords\n result.xyz =\n result.x * vPlaneNormal0 +\n result.y * vPlaneNormal2 +\n result.z * vPlaneNormal4;\n\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - 0.5) * 2.0,\n (fragCoord.y / vpHeight - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n return (vWCtoIDX * vertex).xyz / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\n//\nfloat computeGradientOpacityFactor(\n vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n#if vtkLightComplexity > 0\nvoid applyLighting(inout vec3 tColor, vec4 normal)\n{\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n //VTK::Light::Impl\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n}\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = 1.0;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normal0 = computeNormal(posIS, tValue.a, tstep);\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n applyLighting(tColor.rgb, normal0);\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n#endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\n\n\n\n\n\n\n\nreturn tColor;\n}\n\n\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, float sampleDistanceIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 //AVERAGE_INTENSITY_BLEND\n vec4 averageIPScalarRangeMin = vec4 (\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n 1.0);\n vec4 averageIPScalarRangeMax = vec4(\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n 1.0);\n\n vec4 sum = vec4(0.);\n\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n // - We are setting the alpha channel for averageIPScalarRangeMin and\n // averageIPScalarRangeMax so that we do not trigger this 'continue'\n // based on the alpha channel comparison.\n // - There might be a better way to do this. I'm not sure if there is an\n // equivalent of 'any' which only operates on RGB, though I suppose\n // we could write an 'anyRGB' function and see if that is faster.\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n if (any(lessThan(tValue, averageIPScalarRangeMin)) ||\n any(greaterThan(tValue, averageIPScalarRangeMax))) {\n continue;\n }\n\n // Sum the values across each step in the path\n sum += tValue;\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (result == 0.0)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*(tdims - 1.0);\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, out float sampleDistanceIS, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n}\n\nvoid main()\n{\n\n vec3 rayDirVC;\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n float sampleDistanceIS;\n computeIndexSpaceValues(posIS, endIS, sampleDistanceIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, sampleDistanceIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Fragment;a.getProperty().getInterpolationType()===Fm.LINEAR&&(o=Hg.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===a.getProperty().getUseLabelOutline()&&(o=Hg.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var i=t.scalarTexture.getComponents();o=Hg.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(i)).result;var l=a.getProperty().getIndependentComponents();if(l){o=Hg.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var s=[],c=0;c0&&(o=Hg.substitute(o,"//VTK::vtkProportionalComponents",s.join("\n")).result)}var g=t.currentInput.getExtent(),u=t.currentInput.getSpacing(),d=new Float64Array(3);Object(Fo.p)(d,(g[1]-g[0])*u[0],(g[3]-g[2])*u[1],(g[5]-g[4])*u[2]);var m=Object(Fo.j)(d)/t.renderable.getSampleDistance();o=Hg.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(m))).result,o=Hg.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=a.getProperty().getUseGradientOpacity(0);for(var f=1;l&&!t.gopacity&&f0&&(a=Hg.substitute(a,"//VTK::Light::Dec",["uniform vec3 lightColor".concat(o,";"),"uniform vec3 lightDirectionVC".concat(o,"; // normalized"),"uniform vec3 lightHalfAngleVC".concat(o,"; // normalized"),"//VTK::Light::Dec"],!1).result,a=Hg.substitute(a,"//VTK::Light::Impl",[" float df = abs(dot(normal.rgb, -lightDirectionVC".concat(o,"));")," diffuse += ((df".concat("",") * lightColor").concat(o,");")," float sf = pow( abs(dot(lightHalfAngleVC".concat(o,",normal.rgb)), vSpecularPower);")," specular += ((sf".concat("",") * lightColor").concat(o,");")," //VTK::Light::Impl"],!1).result,o++)}))}e.Fragment=a},e.replaceShaderClippingPlane=function(e,n,r){var a=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;a=Hg.substitute(a,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,a=Hg.substitute(a,"//VTK::ClipPlane::Impl",["for(int i = 0; i < ".concat(o,"; i++) {")," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=a},e.getNeedToRebuildShaders=function(n,r,a){var o=0;a.getProperty().getShade()&&t.renderable.getBlendMode()===Mm.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((function(e){e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));var i=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,i=!0);var l=t.scalarTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=!1,g=[];if(s){for(var u=0;u0&&(c=!0)}var d=t.currentInput.getExtent(),m=t.currentInput.getSpacing(),f=new Float64Array(3);Object(Fo.p)(f,(d[1]-d[0])*m[0],(d[3]-d[2])*m[1],(d[5]-d[4])*m[2]);var p=Object(Fo.j)(f)/t.renderable.getSampleDistance(),C={interpolationType:a.getProperty().getInterpolationType(),useLabelOutline:a.getProperty().getUseLabelOutline(),numComp:l,usesProportionalComponents:c,iComps:s,maxSamples:p,useGradientOpacity:a.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),averageIPScalarMode:t.renderable.getAverageIPScalarRange(),proportionalComponents:g};return t.previousState&&t.previousState.interpolationType===C.interpolationType&&t.previousState.useLabelOutline===C.useLabelOutline&&t.previousState.numComp===C.numComp&&t.previousState.usesProportionalComponents===C.usesProportionalComponents&&t.previousState.iComps===C.iComps&&t.previousState.maxSamples===C.maxSamples&&t.previousState.useGradientOpacity===C.useGradientOpacity&&t.previousState.blendMode===C.blendMode&&zm(t.previousState.averageIPScalarMode,C.averageIPScalarMode)&&zm(t.previousState.proportionalComponents,C.proportionalComponents)?!!(0===n.getProgram()||i||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||!!t.lastZBufferTexture!=!!t.zBufferTexture||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance()),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var i=e.getRenderTargetSize();o.setUniformf("vpWidth",i[0]),o.setUniformf("vpHeight",i[1])}},e.setCameraShaderParameters=function(n,r,a){var o=t.openGLCamera.getKeyMatrices(r),i=t.openGLVolume.getKeyMatrices();Object(Yo.l)(t.modelToView,o.wcvc,i.mcwc);var l=n.getProgram(),s=t.openGLCamera.getRenderable(),c=s.getClippingRange();l.setUniformf("camThick",c[1]-c[0]),l.setUniformf("camNear",c[0]),l.setUniformf("camFar",c[1]);for(var g=t.currentInput.getBounds(),u=t.currentInput.getDimensions(),d=new Float64Array(3),m=new Float64Array(3),f=1,p=-1,C=1,I=-1,h=0;h<8;++h){if(Object(Fo.p)(d,g[h%2],g[2+Math.floor(h/2)%2],g[4+Math.floor(h/4)]),Object(Fo.q)(d,d,t.modelToView),!s.getParallelProjection()){Object(Fo.l)(m,d);var b=-c[0]/d[2];Object(Fo.b)(d,m,b)}Object(Fo.q)(d,d,o.vcpc),f=Math.min(d[0],f),p=Math.max(d[0],p),C=Math.min(d[1],C),I=Math.max(d[1],I)}l.setUniformf("dcxmin",f),l.setUniformf("dcxmax",p),l.setUniformf("dcymin",C),l.setUniformf("dcymax",I),l.isUniformUsed("cameraParallel")&&l.setUniformi("cameraParallel",s.getParallelProjection());var y=t.currentInput.getExtent(),v=t.currentInput.getSpacing(),Z=new Float64Array(3);Object(Fo.p)(Z,(y[1]-y[0]+1)*v[0],(y[3]-y[2]+1)*v[1],(y[5]-y[4]+1)*v[2]),l.setUniform3f("vSpacing",v[0],v[1],v[2]),Object(Fo.p)(d,y[0],y[2],y[4]),t.currentInput.indexToWorldVec3(d,d),Object(Fo.q)(d,d,t.modelToView),l.setUniform3f("vOriginVC",d[0],d[1],d[2]);var A=t.currentInput.getIndexToWorld();Object(Yo.l)(t.idxToView,t.modelToView,A),_l(t.idxNormalMatrix,o.normalMatrix,i.normalMatrix),_l(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var G=Object(Fo.j)(Z)/t.renderable.getSampleDistance();G>t.renderable.getMaximumSamplesPerRay()&&Em("The number of steps required ".concat(Math.ceil(G)," is larger than the\n specified maximum number of steps ").concat(t.renderable.getMaximumSamplesPerRay(),".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));var S=new Float64Array(3);if(Object(Fo.p)(S,1,1,1),Object(Fo.k)(S,S,Z),l.setUniform3f("vVCToIJK",S[0],S[1],S[2]),l.setUniform3i("volumeDimensions",u[0],u[1],u[2]),!t.openGLRenderWindow.getWebgl2()){var B=t.scalarTexture.getVolumeInfo();l.setUniformf("texWidth",t.scalarTexture.getWidth()),l.setUniformf("texHeight",t.scalarTexture.getHeight()),l.setUniformi("xreps",B.xreps),l.setUniformi("xstride",B.xstride),l.setUniformi("ystride",B.ystride)}for(var V=new Float64Array(3),R=new Float64Array(3),w=0;w<6;++w){switch(w){default:case 0:Object(Fo.p)(V,1,0,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 1:Object(Fo.p)(V,-1,0,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 2:Object(Fo.p)(V,0,1,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 3:Object(Fo.p)(V,0,-1,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 4:Object(Fo.p)(V,0,0,1),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 5:Object(Fo.p)(V,0,0,-1),Object(Fo.p)(R,y[0],y[2],y[4])}Object(Fo.m)(V,V,t.idxNormalMatrix),Object(Fo.q)(R,R,t.idxToView);var k=-1*Object(Fo.d)(R,V);if(l.setUniform3f("vPlaneNormal".concat(w),V[0],V[1],V[2]),l.setUniformf("vPlaneDistance".concat(w),k),a.getProperty().getUseLabelOutline()){var W=t.currentInput.getWorldToIndex();l.setUniformMatrix("vWCtoIDX",W),Object(Yo.g)(t.projectionToWorld,o.wcpc),l.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var x=e.getRenderTargetSize();l.setUniformf("vpWidth",x[0]),l.setUniformf("vpHeight",x[1])}}switch(Object(Yo.g)(t.projectionToView,o.vcpc),l.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var T=0,J=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();J[0]=t[0]*n,J[1]=t[1]*n,J[2]=t[2]*n,l.setUniform3fArray("lightColor".concat(T),J);var r=e.getDirection();Object(Fo.p)(V,r[0],r[1],r[2]),Object(Fo.m)(V,V,o.normalMatrix),l.setUniform3f("lightDirectionVC".concat(T),V[0],V[1],V[2]);var a=[-.5*V[0],-.5*V[1],-.5*(V[2]-1)];l.setUniform3fArray("lightHalfAngleVC".concat(T),a),T++}}))}},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram();a.setUniformi("ctexture",t.colorTexture.getTextureUnit()),a.setUniformi("otexture",t.opacityTexture.getTextureUnit()),a.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),i=r.getProperty(),l=t.scalarTexture.getComponents(),s=r.getProperty().getIndependentComponents();if(s&&l>=2)for(var c=0;c0&&(a.setUniformf("vAmbient",i.getAmbient()),a.setUniformf("vDiffuse",i.getDiffuse()),a.setUniformf("vSpecular",i.getSpecular()),a.setUniformf("vSpecularPower",i.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var a=t.openGLCamera.getKeyMatrices(n),o=[],i=[],l=t.renderable.getClippingPlanes(),s=l.length,c=0;c1.43){var e=t.framebuffer.getSize();return[t.fvp[0]*e[0],t.fvp[1]*e[1]]}return t.openGLRenderWindow.getFramebufferSize()},e.renderPieceStart=function(n,r){if(t.renderable.getAutoAdjustSampleDistances()){var a=n.getVTKWindow().getInteractor(),o=a.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var i=Math.sqrt(t.avgFrameTime*a.getDesiredUpdateRate()/t.avgWindowArea);i>10&&(i=10),t.targetXYF=i}else t.targetXYF=Math.sqrt(t.avgFrameTime*a.getStillUpdateRate()/t.avgWindowArea);t.targetXYF<1.53&&t.targetXYF>1.33&&(t.targetXYF=t.lastXYF),Math.abs(1-t.targetXYF/t.lastXYF)<.1&&(t.targetXYF=t.lastXYF),t.lastXYF=t.targetXYF}else t.lastXYF=t.renderable.getImageSampleDistance();t.lastXYF<=1.43&&(t.lastXYF=1);var l=t.lastXYF,s=t.openGLRenderWindow.getFramebufferSize();if(l>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer();else{var c=t.framebuffer.getSize();c[0]===Math.floor(.7*s[0])&&c[1]===Math.floor(.7*s[1])||(t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var g=t.context;g.clearColor(0,0,0,0),g.colorMask(!0,!0,!0,!0),g.clear(g.COLOR_BUFFER_BIT),g.viewport(0,0,s[0]/l,s[1]/l),t.fvp=[Math.floor(s[0]/l)/Math.floor(.7*s[0]),Math.floor(s[1]/l)/Math.floor(.7*s[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===Fm.NEAREST?(t.scalarTexture.setMinificationFilter(Ms.NEAREST),t.scalarTexture.setMagnificationFilter(Ms.NEAREST)):(t.scalarTexture.setMinificationFilter(Ms.LINEAR),t.scalarTexture.setMagnificationFilter(Ms.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var a=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),a.drawArrays(a.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=function(e,n){if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t.lastXYF>1.43){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");var r=t.copyShader;t.copyVAO=Kg.newInstance(),t.copyVAO.setOpenGLRenderWindow(t.openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(r,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var a=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,a[0],a[1]);var o=t.framebuffer.getColorTexture();o.activate(),t.copyShader.setUniformi("texture",o.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);var i=t.context;i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=function(n,r){e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Um("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():Object(Xo.D)(t.Bounds)},e.updateBufferObjects=function(t,n){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=function(n,r){return t.VBOBuildTime.getMTime()1?1:-1,k[3*W+2]=-1;var x=new Uint16Array(8);x[0]=3,x[1]=0,x[2]=1,x[3]=3,x[4]=3,x[5]=0,x[6]=3,x[7]=2;var T=Bo.a.newInstance({numberOfComponents:3,values:k});T.setName("points");var J=Bo.a.newInstance({numberOfComponents:1,values:x});t.tris.getCABO().createVBO(J,"polys",sg.SURFACE,{points:T,cellOffset:0})}t.VBOBuildTime.modified()}}}}var jm={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function Qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jm,n),_s.extend(e,t,n),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime,{mtime:0}),t.tris=Eg.newInstance(),t.scalarTexture=ic.newInstance(),t.opacityTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.jitterTexture=ic.newInstance(),t.jitterTexture.setWrapS(Ks.REPEAT),t.jitterTexture.setWrapT(Ks.REPEAT),t.framebuffer=gc.newInstance(),t.idxToView=Object(Yo.h)(new Float64Array(16)),t.idxNormalMatrix=El(new Float64Array(9)),t.modelToView=Object(Yo.h)(new Float64Array(16)),t.projectionToView=Object(Yo.h)(new Float64Array(16)),t.projectionToWorld=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,["context"]),_m(e,t)}var qm={newInstance:ln.c.newInstance(Qm,"vtkOpenGLVolumeMapper"),extend:Qm};function $m(e,t){t.overrides={},t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,a=n.getClassName(r++),o=!1,i=Object.keys(t.overrides);a&&!o;)-1!==i.indexOf(a)?o=!0:a=n.getClassName(r++);if(!o)return null;var l=t.overrides[a]();return l.setMyFactory(e),l},e.registerOverride=function(e,n){t.overrides[e]=n}}var ef={};function tf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ef,n),ln.c.obj(e,t),$m(e,t)}var nf={newInstance:ln.c.newInstance(tf,"vtkViewNodeFactory"),extend:tf};function rf(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var af={};function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,af,n),nf.extend(e,t,n),rf(0,t),e.registerOverride("vtkActor",Bc.newInstance),e.registerOverride("vtkActor2D",kc.newInstance),e.registerOverride("vtkCamera",Jc.newInstance),e.registerOverride("vtkGlyph3DMapper",fd.newInstance),e.registerOverride("vtkImageMapper",Gd.newInstance),e.registerOverride("vtkImageSlice",Rd.newInstance),e.registerOverride("vtkMapper",rd.newInstance),e.registerOverride("vtkPixelSpaceCallbackMapper",Td.newInstance),e.registerOverride("vtkRenderer",Hd.newInstance),e.registerOverride("vtkSkybox",Md.newInstance),e.registerOverride("vtkSphereMapper",_d.newInstance),e.registerOverride("vtkStickMapper",tm.newInstance),e.registerOverride("vtkTexture",ic.newInstance),e.registerOverride("vtkSurfaceLICMapper",Xm.newInstance),e.registerOverride("vtkVolume",Ym.newInstance),e.registerOverride("vtkVolumeMapper",qm.newInstance),e.registerOverride("vtkWidgetRepresentation",Zc.newInstance)}var lf={newInstance:ln.c.newInstance(of,"vtkOpenGLViewNodeFactory"),extend:of},sf=Object(Cn.d)((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,a,o,i){return n((l=n(n(t,e),n(a,i)))<<(s=o)|l>>>32-s,r);var l,s}function a(e,t,n,a,o,i,l){return r(t&n|~t&a,e,t,o,i,l)}function o(e,t,n,a,o,i,l){return r(t&a|n&~a,e,t,o,i,l)}function i(e,t,n,a,o,i,l){return r(t^n^a,e,t,o,i,l)}function l(e,t,n,a,o,i,l){return r(n^(t|~a),e,t,o,i,l)}function s(e,t){var r,s,c,g,u;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,m=-271733879,f=-1732584194,p=271733878;for(r=0;r>5]>>>t%32&255);return n}function g(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function d(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return c(s(g(e),8*e.length))}(d(e))}function f(e,t){return function(e,t){var n,r,a=g(e),o=[],i=[];for(o[15]=i[15]=void 0,a.length>16&&(a=s(a,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^a[n],i[n]=1549556828^a[n];return r=s(o.concat(g(t)),512+8*t.length),c(s(i.concat(r),640))}(d(e),d(t))}function p(e,t,n){return t?n?f(t,e):u(f(t,e)):n?m(e):u(m(e))}e.exports?e.exports=p:t.md5=p}(Cn.b)}),"/$$rollup_base$$/node_modules/blueimp-md5/js"),cf=["lastShaderBound","context","openGLRenderWindow"];function gf(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var a=n;r.length>0&&(a=Hg.substitute(a,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),i="\n",l="#version 100\n";o?l="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(i="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),a=Hg.substitute(a,"//VTK::System::Dec",["".concat(l,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",i,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var s=Hg.substitute(e,"//VTK::System::Dec",["".concat(l,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(s=Hg.substitute(s,"varying","out").result,a=Hg.substitute(a,"varying","in").result,a=Hg.substitute(a,"gl_FragData\\[0\\]","fragOutput0").result,a=Hg.substitute(a,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:s,FSSource:a,GSSource:Hg.substitute(r,"//VTK::System::Dec",l).result}},e.readyShaderProgramArray=function(t,n,r){var a=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(a.VSSource,a.FSSource,a.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=function(t){return t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null},e.getShaderProgram=function(e,n,r){var a="".concat(e).concat(n).concat(r),o=sf(a);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var i=Hg.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=function(n){e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((function(e){return t.shaderPrograms[e]})).forEach((function(e){return e.releaseGraphicsResources(n)}))},e.releaseGraphicsResources=function(){t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=function(e){return t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1}}var uf={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign(t,uf,n),t.shaderPrograms={},ln.c.obj(e,t),ln.c.setGet(e,t,cf),gf(e,t),Object.freeze(e)}var mf={newInstance:ln.c.newInstance(df,"vtkShaderCache"),extend:df},ff=ln.c.vtkErrorMacro;function pf(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),ln.c.obj(e,t),t.textureUnits=[],ln.c.get(e,t,["numberOfTextureUnits"]),ln.c.setGet(e,t,["context"]),pf(e,t)}var hf={newInstance:ln.c.newInstance(If,"vtkOpenGLTextureUnitManager"),extend:If},bf=ln.c.vtkDebugMacro,yf=ln.c.vtkErrorMacro,vf=-1!==navigator.userAgent.indexOf("Chrome");function Zf(e,t,n){var r=e.createFramebuffer(),a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}var Af=0,Gf=[];function Sf(){Af++,Gf.forEach((function(e){return e(Af)}))}function Bf(){Af--,Gf.forEach((function(e){return e(Af)}))}function Vf(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");var n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=function(n){if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((function(t){t.setOpenGLRenderWindow(e)}))}},e.initialize=function(){if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=hf.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);var n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=function(){t.context.makeCurrent()},e.setContainer=function(n){t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&yf("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=function(){return t.el},e.getContainerSize=function(){if(!t.containerSize&&t.el){var e=t.el.getBoundingClientRect(),n=e.width,r=e.height;t.containerSize=[n,r]}return t.containerSize||t.size},e.getFramebufferSize=function(){return t.activeFramebuffer?t.activeFramebuffer.getSize():t.size},e.isInViewport=function(t,n,r){var a=r.getViewportByReference(),o=e.getFramebufferSize();return a[0]*o[0]<=t&&a[2]*o[0]>=t&&a[1]*o[1]<=n&&a[3]*o[1]>=n},e.getViewportSize=function(t){var n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=function(t){var n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t/a[0],n/a[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t*a[0],n*a[1],r]},e.worldToView=function(e,t,n,r){return r.worldToView(e,t,n)},e.viewToWorld=function(e,t,n,r){return r.viewToWorld(e,t,n)},e.worldToDisplay=function(t,n,r,a){var o=a.worldToView(t,n,r),i=e.getViewportSize(a),l=a.viewToProjection(o[0],o[1],o[2],i[0]/i[1]),s=a.projectionToNormalizedDisplay(l[0],l[1],l[2]);return e.normalizedDisplayToDisplay(s[0],s[1],s[2])},e.displayToWorld=function(t,n,r,a){var o=e.displayToNormalizedDisplay(t,n,r),i=a.normalizedDisplayToProjection(o[0],o[1],o[2]),l=e.getViewportSize(a),s=a.projectionToView(i[0],i[1],i[2],l[0]/l[1]);return a.viewToWorld(s[0],s[1],s[2])},e.normalizedDisplayToViewport=function(t,n,r,a){var o=a.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var i=e.normalizedDisplayToDisplay(t,n,r);return[i[0]-o[0]-.5,i[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,a){var o=e.getViewportSize(a);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=function(t,n,r){var a=e.getFramebufferSize();return[t*(a[0]-1),n*(a[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,a){var o=a.getViewportByReference(),i=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,l=n+o[1]+.5;return e.displayToNormalizedDisplay(i,l,r)},e.getPixelData=function(e,n,r,a){var o=new Uint8Array((r-e+1)*(a-n+1)*4);return t.context.readPixels(e,n,r-e+1,a-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,a="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&a&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bf("using webgl2")),r||(bf("using webgl1"),r=t.canvas.getContext("webgl",n)||t.canvas.getContext("experimental-webgl",n)),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(n){n.length>0&&(t.vrDisplay=n[0],t.vrDisplay.depthNear=.01,t.vrDisplay.depthFar=100,e.invokeHaveVRDisplay())})),t.canvas.addEventListener("webglcontextlost",(function(e){e.preventDefault()}),!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1),r},e.startVR=function(){t.oldCanvasSize=t.size.slice(),t.vrDisplay.capabilities.canPresent?t.vrDisplay.requestPresent([{source:t.canvas}]).then((function(){if(t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&t.hideCanvasInVR&&(t.el.style.display="none"),t.queryVRSize){var n=t.vrDisplay.getEyeParameters("left"),r=t.vrDisplay.getEyeParameters("right"),a=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(a,o)}else e.setSize(t.vrResolution);t.renderable.getRenderers()[0].resetCamera(),t.vrFrameData=new VRFrameData,t.renderable.getInteractor().switchToVRAnimation(),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),vf&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):yf("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,Object(Ao.a)(t.oldCanvasSize)),t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&(t.el.style.display="block");var n=t.renderable.getRenderers()[0];n.getActiveCamera().setProjectionMatrix(null),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.vrRender=function(){if(t.vrDisplay.isPresenting){t.renderable.getInteractor().updateGamepads(t.vrDisplay.displayId),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),t.vrDisplay.getFrameData(t.vrFrameData);var n=t.renderable.getRenderers()[0];n.setViewport(0,0,.5,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.leftViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.leftProjectionMatrix),e.traverseAllPasses(),n.setViewport(.5,0,1,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.rightViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.rightProjectionMatrix),e.traverseAllPasses(),t.vrDisplay.submitFrame()}},e.restoreContext=function(){var t=fc.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t.textureResourceIds.get(n);if(void 0===r){var a=e.getTextureUnitManager().allocate();a<0?yf("Hardware does not support the number of textures defined."):(t.textureResourceIds.set(n,a),t.context.activeTexture(t.context.TEXTURE0+a))}else t.context.activeTexture(t.context.TEXTURE0+r)},e.deactivateTexture=function(n){var r=t.textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t.textureResourceIds.delete(n))},e.getTextureUnitForTexture=function(e){var n=t.textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n,r){if(t.webgl2)switch(e){case cn.b.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;case 4:default:return t.context.RGBA8}default:case cn.b.FLOAT:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;case 4:default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:default:return t.context.RGBA}},e.setBackgroundImage=function(e){t.bgImage.src=e.src},e.setUseBackgroundImage=function(e){t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(t.deleted)return null;t.imageFormat=n;var r=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,new Promise((function(n,a){var o=e.onImageReady((function(e){t.notifyStartCaptureImage=r,o.unsubscribe(),n(e)}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),o=n.getExtension("OES_texture_half_float"),i=n.getExtension("WEBGL_debug_renderer_info"),l=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),c=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&Zf(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[o&&Zf(n,n.RGBA,o.HALF_FLOAT_OES)?"RGBA":"",o&&Zf(n,n.RGB,o.HALF_FLOAT_OES)?"RGB":"",o&&Zf(n,n.LUMINANCE,o.HALF_FLOAT_OES)?"LUMINANCE":"",o&&Zf(n,n.ALPHA,o.HALF_FLOAT_OES)?"ALPHA":"",o&&Zf(n,n.LUMINANCE_ALPHA,o.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&Zf(n,n.RGB,n.FLOAT)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",l?n.getParameter(l.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",i&&n.getParameter(i.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",i&&n.getParameter(i.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],g={};c.length;){var u=c.pop(),d=Object(a.a)(u,3),m=d[0],f=d[1],p=d[2];f&&(g[f]={label:m,value:p})}return g},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,a.drawImage(t.canvas,0,0);var o=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rf,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",Sf(),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t.textureResourceIds=new Map,_s.extend(e,t,n),t.myFactory=lf.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",kf),t.shaderCache=mf.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hc.newInstance(),ln.c.event(e,t,"imageReady"),ln.c.event(e,t,"haveVRDisplay"),ln.c.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),ln.c.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),ln.c.setGetArray(e,t,["size","vrResolution"],2),Vf(e,t)}var kf=ln.c.newInstance(wf,"vtkOpenGLRenderWindow");Os("WebGL",kf);var Wf={newInstance:kf,extend:wf,pushMonitorGLContextCount:function(e){Gf.push(e)},popMonitorGLContextCount:function(e){return Gf.pop()}},xf={Device:{Unknown:0,LeftController:1,RightController:2},Input:{Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4}};function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,i=n?"addEventListener":"removeEventListener",l=n?"removeEventListener":"addEventListener";!a&&!n&&r>0&&--r,r&&!a||(r=0,t.container&&t.container[l]("mousemove",e.handleMouseMove),o[i]("mouseup",e.handleMouseUp),o[i]("mousemove",e.handleMouseMove),o[i]("touchend",e.handleTouchEnd,!1),o[i]("touchcancel",e.handleTouchEnd,!1),o[i]("touchmove",e.handleTouchMove,!1)),!a&&n&&++r}function g(){t.view&&t.enabled&&t.enableRender&&(t.inRender=!0,t.view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.start=function(){(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=function(e){Hf("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=function(n){t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=function(){t.initialized=!0,e.enable(),e.render()},e.enable=function(){return e.setEnabled(!0)},e.disable=function(){return e.setEnabled(!1)},e.startEventLoop=function(){return Nf("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||a(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Mf),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("mouseenter",e.handleMouseEnter),n.addEventListener("mouseleave",e.handleMouseLeave),n.addEventListener("mousemove",e.handleMouseMove),n.addEventListener("mousedown",e.handleMouseDown),document.querySelector("body").addEventListener("keypress",e.handleKeyPress),document.querySelector("body").addEventListener("keydown",e.handleKeyDown),document.querySelector("body").addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){c(!1,!0),t.container.removeEventListener("contextmenu",Mf),t.container.removeEventListener("wheel",e.handleWheel),t.container.removeEventListener("DOMMouseScroll",e.handleWheel),t.container.removeEventListener("mouseenter",e.handleMouseEnter),t.container.removeEventListener("mouseleave",e.handleMouseLeave),t.container.removeEventListener("mousemove",e.handleMouseMove),t.container.removeEventListener("mousedown",e.handleMouseDown),document.querySelector("body").removeEventListener("keypress",e.handleKeyPress),document.querySelector("body").removeEventListener("keydown",e.handleKeyDown),document.querySelector("body").removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=s(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=s(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=s(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){c(!0),t.stopPropagation(),t.preventDefault();var n=Jf(Jf({},l(t)),{},{position:o(t)});switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:Hf("Unknown mouse button pressed: ".concat(t.button))}}},e.requestPointerLock=function(){e.getView().getCanvas().requestPointerLock()},e.exitPointerLock=function(){return document.exitPointerLock()},e.isPointerLocked=function(){return!!document.pointerLockElement},e.handlePointerLockChange=function(){e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=function(r){void 0!==r?n.has(r)?Nf("requester is already registered for animating"):(n.add(r),1===n.size&&(t.lastFrameTime=.1,t.lastFrameStart=Date.now(),t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):Hf("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!a){var o=r&&r.getClassName?r.getClassName():r;Nf("".concat(o," did not request an animation"))}},e.switchToVRAnimation=function(){t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.vrAnimation=!0},e.returnFromVRAnimation=function(){t.vrAnimation=!1,0!==n.size&&(t.FrameTime=-1,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateGamepads=function(n){for(var r=navigator.getGamepads(),a=0;a1){var r=i(n.touches);if(2===n.touches.length){var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(a)}e.recognizeGesture("TouchStart",r)}else{var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}},e.handleTouchMove=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures&&n.touches.length>1){var r=i(n.touches);e.recognizeGesture("TouchMove",r)}else{var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(a)}},e.handleTouchEnd=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures)if(0===n.touches.length)if(1===n.changedTouches.length){var r={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(r),c(!1)}else{var a=i(n.changedTouches);e.recognizeGesture("TouchEnd",a),c(!1)}else if(1===n.touches.length){var l=i(n.changedTouches);e.recognizeGesture("TouchEnd",l);var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}else{var g=i(n.touches);e.recognizeGesture("TouchMove",g)}else{var u={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(u),c(!1)}},e.setView=function(n){t.view!==n&&(t.view=n,t.view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=function(){return t.view.getRenderable().getRenderersByReference()[0]},e.findPokedRenderer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.view)return null;var r=t.view.getRenderable().getRenderers();r.sort((function(e,t){return e.getLayer()-t.getLayer()}));for(var a=null,o=null,i=null,l=r.length;l--;){var s=r[l];if(t.view.isInViewport(e,n,s)&&s.getInteractive()){i=s;break}null===a&&s.getInteractive()&&(a=s),null===o&&t.view.isInViewport(e,n,s)&&(o=s)}return null===i&&(i=a),null===i&&(i=o),null==i&&(i=r[0]),i},e.render=function(){null!==t.animationRequest||t.inRender||g()},Kf.forEach((function(n){var r=n.charAt(0).toLowerCase()+n.slice(1);e["".concat(r,"Event")]=function(r){if(t.enabled)if(e.getCurrentRenderer()){var a=Jf({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](a)}else Ff("\n Can not forward events without a current renderer on the interactor.\n ")}})),e.recognizeGesture=function(n,r){if(!(Object.keys(r).length>2)){if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((function(e){t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});var a=0,o=[],i=[];Object.keys(r).forEach((function(e){o[a]=r[e],i[a]=t.startingEventPositions[e],a++}));var l=Math.sqrt((i[0].x-i[1].x)*(i[0].x-i[1].x)+(i[0].y-i[1].y)*(i[0].y-i[1].y)),s=Math.sqrt((o[0].x-o[1].x)*(o[0].x-o[1].x)+(o[0].y-o[1].y)*(o[0].y-o[1].y)),c=Object(Xo.F)(Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)),g=Object(Xo.F)(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),u=g-c;g=g+180>=360?g-180:g+180,c=c+180>=360?c-180:c+180,Math.abs(g-c)m&&f>p&&f>C){t.currentGesture="Pinch";var I={scale:1,touches:r};e.startPinchEvent(I)}else if(p>m&&p>C){t.currentGesture="Rotate";var h={rotation:0,touches:r};e.startRotateEvent(h)}else if(C>m){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var y={rotation:u,touches:r};e.rotateEvent(y)}if("Pinch"===t.currentGesture){var v={scale:s/l,touches:r};e.pinchEvent(v)}if("Pan"===t.currentGesture){var Z={translation:d,touches:r};e.panEvent(Z)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()};var u=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),u()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Df={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,view:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{}};function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Df,n),ln.c.obj(e,t),ln.c.event(e,t,"RenderEvent"),Kf.forEach((function(n){return ln.c.event(e,t,n)})),ln.c.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),ln.c.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Lf(e,t)}var Uf=Jf({newInstance:ln.c.newInstance(Ef,"vtkRenderWindowInteractor"),extend:Ef,handledEvents:Kf},xf),zf=ln.c.vtkDebugMacro;function _f(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),o=Object(Yo.h)(new Float64Array(16)),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3),c=Object(Yo.h)(new Float64Array(16)),g=Object(Yo.h)(new Float64Array(16)),u=new Float64Array(3),d=new Float64Array(3);function m(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=function(){var n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=function(n,r,a){n===t.position[0]&&r===t.position[1]&&a===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,a){n===t.focalPoint[0]&&r===t.focalPoint[1]&&a===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,zf("Distance is set to minimum."));var r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()}},e.computeDistance=function(){var e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,zf("Distance is set to minimum.");var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,m()},e.dolly=function(n){if(!(n<=0)){var r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])}},e.roll=function(n){var r=t.position,a=t.focalPoint,o=t.viewUp,i=new Float64Array([o[0],o[1],o[2],0]);Object(Yo.h)(c);var l=new Float64Array([a[0]-r[0],a[1]-r[1],a[2]-r[2]]);Object(Yo.q)(c,c,Object(Xo.B)(n),l),bg(i,i,c),t.viewUp[0]=i[0],t.viewUp[1]=i[1],t.viewUp[2]=i[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.yaw=function(n){var r=t.position;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint(d[0],d[1],d[2])},e.elevation=function(n){var r=t.focalPoint,a=e.getViewMatrix(),o=[-a[0],-a[1],-a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.pitch=function(n){var r=t.position,a=e.getViewMatrix(),o=[a[0],a[1],a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint.apply(e,Object(Ao.a)(d))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,a){var o=[n,r,a];Object(Xo.x)(t.position,o,t.position),Object(Xo.x)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(Object(Ao.a)(t.viewUp),[1]),a=[],o=[],i=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],bg(a,[].concat(Object(Ao.a)(t.position),[1]),n),bg(o,[].concat(Object(Ao.a)(t.focalPoint),[1]),n),bg(i,r,n),i[0]-=a[0],i[1]-=a[1],i[2]-=a[2],e.setPosition.apply(e,Object(Ao.a)(a.slice(0,3))),e.setFocalPoint.apply(e,Object(Ao.a)(o.slice(0,3))),e.setViewUp.apply(e,Object(Ao.a)(i.slice(0,3)))},e.getThickness=function(){return t.clippingRange[1]-t.clippingRange[0]},e.setThickness=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=function(e){},e.getRoll=function(){},e.setObliqueAngles=function(e,t){},e.getOrientation=function(){},e.getOrientationWXYZ=function(){},e.getFrustumPlanes=function(e){},e.getCameraLightTransformMatrix=function(){},e.deepCopy=function(e){},e.physicalOrientationToWorldDirection=function(e){var t,n,r=Ag(e[0],e[1],e[2],e[3]),a=yg(),o=Ag(0,0,1,0);return n=r,(t=a)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Zg(o,r,o),Zg(o,o,a),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Object(Yo.g)(t,t)},e.getWorldToPhysicalMatrix=function(e){Object(Yo.h)(e);var n=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Object(Yo.i)(e,e),Object(Fo.p)(i,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Object(Yo.r)(e,e,i),Object(Yo.s)(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(c){Object(Yo.g)(o,c),Object(Fo.q)(i,n,o),e.computeDistance();var g=t.distance;e.setPosition(i[0],i[1],i[2]),Object(Fo.q)(l,r,o),Object(Fo.a)(l,l,i),Object(Fo.l)(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),Object(Fo.q)(s,a,o),Object(Fo.a)(s,s,i),Object(Fo.l)(s,s),e.setViewUp(s[0],s[1],s[2]),e.setDistance(g)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Object(Yo.l)(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Object(Yo.d)(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Object(Yo.i)(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;Object(Yo.k)(o,t.position,t.focalPoint,t.viewUp),Object(Yo.i)(o,o);var e=new Float64Array(16);return Object(Yo.d)(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var a=new Float64Array(16);if(Object(Yo.h)(a),t.projectionMatrix){var l=1/t.physicalScale;return Object(Fo.p)(i,l,l,l),Object(Yo.d)(a,t.projectionMatrix),Object(Yo.r)(a,a,i),Object(Yo.i)(a,a),a}Object(Yo.h)(o);var s=t.clippingRange[1]-t.clippingRange[0],c=[t.clippingRange[0]+(n+1)*s/2,t.clippingRange[0]+(r+1)*s/2];if(t.parallelProjection){var g=t.parallelScale*e,u=t.parallelScale,d=(t.windowCenter[0]-1)*g,m=(t.windowCenter[0]+1)*g,f=(t.windowCenter[1]-1)*u,p=(t.windowCenter[1]+1)*u;Object(Yo.n)(o,d,m,f,p,c[0],c[1]),Object(Yo.i)(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var C,I,h=Math.tan(Object(Xo.B)(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(C=t.clippingRange[0]*h,I=t.clippingRange[0]*h/e):(C=t.clippingRange[0]*h*e,I=t.clippingRange[0]*h);var b=(t.windowCenter[0]-1)*C,y=(t.windowCenter[0]+1)*C,v=(t.windowCenter[1]-1)*I,Z=(t.windowCenter[1]+1)*I,A=c[0],G=c[1];o[0]=2*A/(y-b),o[5]=2*A/(Z-v),o[2]=(b+y)/(y-b),o[6]=(v+Z)/(Z-v),o[10]=-(A+G)/(G-A),o[14]=-1,o[11]=-2*A*G/(G-A),o[15]=0}return Object(Yo.d)(a,o),a},e.getCompositeProjectionMatrix=function(t,n,r){var a=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Object(Yo.l)(o,a,o),o},e.setDirectionOfProjection=function(e,n,r){if(t.directionOfProjection[0]!==e||t.directionOfProjection[1]!==n||t.directionOfProjection[2]!==r){t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,m()}},e.setDeviceAngles=function(n,r,a,o){var i=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,i);var l=Object(Yo.h)(new Float64Array(16));Object(Yo.q)(l,l,Object(Xo.B)(n),t.physicalViewUp),Object(Yo.q)(l,l,Object(Xo.B)(r),i),Object(Yo.q)(l,l,Object(Xo.B)(a),t.physicalViewNorth),Object(Yo.q)(l,l,Object(Xo.B)(-o),t.physicalViewUp);var s=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),c=new Float64Array(t.physicalViewNorth);Object(Fo.q)(s,s,l),Object(Fo.q)(c,c,l),e.setDirectionOfProjection(s[0],s[1],s[2]),e.setViewUp(c[0],c[1],c[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,a){var o=Object(Yo.h)(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==a)){var i=Object(Xo.B)(t),l=yg();vg(l,[n,r,a],i),Object(Yo.j)(o,l)}var s=new Float64Array(3);Object(Fo.q)(s,[0,0,-1],o);var c=new Float64Array(3);Object(Fo.q)(c,[0,1,0],o),e.setDirectionOfProjection.apply(e,Object(Ao.a)(s)),e.setViewUp.apply(e,Object(Ao.a)(c)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var a=-n[0],o=-n[1],i=-n[2],l=-(a*r[0]+o*r[1]+i*r[2]),s=[a*e[0]+o*e[2]+i*e[4]+l,1e-18],c=0;c<2;c++)for(var g=0;g<2;g++)for(var u=0;u<2;u++){var d=a*e[u]+o*e[2+g]+i*e[4+c]+l;s[0]=ds[1]?d:s[1]}return s}}var jf={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function Qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jf,n),ln.c.obj(e,t),ln.c.get(e,t,["distance"]),ln.c.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),ln.c.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),ln.c.setGetArray(e,t,["clippingRange","windowCenter"],2),ln.c.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),_f(e,t)}var qf={newInstance:ln.c.newInstance(Qf,"vtkCamera"),extend:Qf};function $f(e,t){t.classHierarchy.push("vtkLight"),e.getTransformedPosition=function(){return t.transformMatrix?[]:[].concat(t.position)},e.getTransformedFocalPoint=function(){return t.transformMatrix?[]:[].concat(t.focalPoint)},e.getDirection=function(){return t.directionMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ep,n),ln.c.obj(e,t),ln.c.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),ln.c.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),$f(e,t)}var np={newInstance:ln.c.newInstance(tp,"vtkLight"),extend:tp,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},rp=ln.c.vtkErrorMacro;function ap(e,t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);var r=e.getNestedProps();if(r&&r.length)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,op,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),ln.c.setGetArray(e,t,["viewport"],4),ln.c.setGetArray(e,t,["background","background2"],3),ap(e,t)}var lp={newInstance:ln.c.newInstance(ip,"vtkViewport"),extend:ip},sp=ln.l,cp=ln.m,gp=ln.n;function up(e){return function(){return cp("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function dp(e,t){for(t.classHierarchy.push("vtkRenderer"),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1);var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},a={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(sp("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0},e.updateLightsGeometryToFollowCamera=function(){var n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((function(e){e.lightTypeIsSceneLight()||e.lightTypeIsCameraLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):cp("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=up("allocateTime"),e.updateGeometry=up("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){sp(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=function(n){return t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0)},e.makeCamera=function(){var t=qf.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=function(){return t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera},e.getActiveCameraAndResetIfCreated=function(){return t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera},e.getActors=function(){return t.actors=[],t.props.forEach((function(e){t.actors=t.actors.concat(e.getActors())})),t.actors},e.addActor=e.addViewProp,e.removeActor=function(n){t.actors=t.actors.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllActors=function(){e.getActors().forEach((function(t){e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=function(){return t.volumes=[],t.props.forEach((function(e){t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes},e.addVolume=e.addViewProp,e.removeVolume=function(n){t.volumes=t.volumes.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllVolumes=function(){e.getVolumes().forEach((function(t){e.removeViewProp(t)})),t.volumes=[],e.modified()},e.addLight=function(n){t.lights=[].concat(t.lights,n),e.modified()},e.removeLight=function(n){t.lights=t.lights.filter((function(e){return e!==n})),e.modified()},e.removeAllLights=function(){t.lights=[],e.modified()},e.setLightCollection=function(n){t.lights=n,e.modified()},e.makeLight=np.newInstance,e.createLight=function(){t.automaticLightCreation&&(t.createdLight&&(e.removeLight(t.createdLight),t.createdLight.delete(),t.createdLight=null),t.createdLight=e.makeLight(),e.addLight(t.createdLight),t.createdLight.setLightTypeToHeadLight(),t.createdLight.setPosition(e.getActiveCamera().getPosition()),t.createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=function(t,n,r,a){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],a),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,a){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],a),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return cp("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.g)(a,a),Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.projectionToView=function(e,n,r,a){if(null===t.activeCamera)return cp("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.g)(o,o),Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.worldToView=function(e,n,r){if(null===t.activeCamera)return cp("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.viewToProjection=function(e,n,r,a){if(null===t.activeCamera)return cp("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.computeVisiblePropBounds=function(){t.allBounds[0]=Ol.INIT_BOUNDS[0],t.allBounds[1]=Ol.INIT_BOUNDS[1],t.allBounds[2]=Ol.INIT_BOUNDS[2],t.allBounds[3]=Ol.INIT_BOUNDS[3],t.allBounds[4]=Ol.INIT_BOUNDS[4],t.allBounds[5]=Ol.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var a=0;at.allBounds[1]&&(t.allBounds[1]=i[1]),i[2]t.allBounds[3]&&(t.allBounds[3]=i[3]),i[4]t.allBounds[5]&&(t.allBounds[5]=i[5]))}}return r&&(Object(Xo.D)(t.allBounds),sp("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!Object(Xo.l)(r))return sp("Cannot reset camera!"),!1;var i=null;if(!e.getActiveCamera())return cp("Trying to reset non-existent camera"),!1;i=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;var l=r[1]-r[0],s=r[3]-r[2],c=r[5]-r[4],g=(l*=l)+(s*=s)+(c*=c);g=0===g?1:g,g=.5*Math.sqrt(g);var u=Object(Xo.B)(t.activeCamera.getViewAngle()),d=g,m=g/Math.sin(.5*u),f=t.activeCamera.getViewUp();return Math.abs(Object(Xo.q)(f,i))>.999&&(gp("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-f[2],f[0],f[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+m*i[0],o[1]+m*i[1],o[2]+m*i[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(d),t.activeCamera.setPhysicalScale(g),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(a),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=n||e.computeVisiblePropBounds();if(!Object(Xo.l)(a))return sp("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return cp("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(a),i=0;if(t.activeCamera.getParallelProjection())i=.1*t.activeCamera.getParallelScale();else{var l=Object(Xo.B)(t.activeCamera.getViewAngle());i=.2*Math.tan(l/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]e&&(e=n);var r=t.createdLight?t.createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=function(){return!!t.preserveColorBuffer},e.isActiveCameraCreated=function(){return!!t.activeCamera}}var mp={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,createdLight:null,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:Object(Xo.j)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,pass:0};function fp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mp,n),lp.extend(e,t,n),Object(ln.e)(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Object(ln.j)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Object(ln.f)(e,t,["actors","volumes","lights"]),Object(ln.k)(e,t,["background"],4,1),dp(e,t)}var pp={newInstance:Object(ln.g)(fp,"vtkRenderer"),extend:fp};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),ln.c.obj(e,t),ln.c.event(e,t,"InteractionEvent"),ln.c.event(e,t,"StartInteractionEvent"),ln.c.event(e,t,"EndInteractionEvent"),ln.c.get(e,t,["interactor","enabled"]),ln.c.setGet(e,t,["priority","processEvents"]),yp(e,t)}var Ap=Ip({newInstance:ln.c.newInstance(Zp,"vtkInteractorObserver"),extend:Zp},{computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}}),Gp={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}};function Sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bp=Gp.States,Vp={Rotate:Bp.IS_ROTATE,Pan:Bp.IS_PAN,Spin:Bp.IS_SPIN,Dolly:Bp.IS_DOLLY,CameraPose:Bp.IS_CAMERA_POSE,WindowLevel:Bp.IS_WINDOW_LEVEL,Slice:Bp.IS_SLICE};function Rp(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Vp).forEach((function(n){ln.c.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===Bp.IS_NONE&&(t.state=Vp[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},ln.c.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Vp[n]&&(t.state=Bp.IS_NONE,t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e["invokeEnd".concat(n,"Event")]({type:"End".concat(n,"Event")}),t.interactor.render())}})),e.handleKeyPress=function(e){var n=t.interactor;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}var wp={state:Bp.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function kp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wp,n),Ap.extend(e,t,n),Rp(e,t)}var Wp=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pp,n),Wp.extend(e,t,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),ln.c.setGetArray(e,t,["centerOfRotation"],3),Fp(e,t)}var Mp=function(e){for(var t=1;te&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Lp("pick"),e.hasKey=Lp("hasKey"),e.getRedrawMTime=function(){return t.mtime},e.setEstimatedRenderTime=function(e){t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=function(){t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=function(e){t.estimatedRenderTime+=e},e.setAllocatedRenderTime=function(e){t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=function(){return!1},e.getTextures=function(){return t.textures},e.hasTexture=function(e){return-1!==t.textures.indexOf(e)},e.addTexture=function(n){n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=function(n){var r=t.textures.filter((function(e){return e!==n}));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=function(){t.textures=[],e.modified()}}var Ep={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ep,n),ln.c.obj(e,t),ln.c.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),ln.c.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Dp(e,t)}var zp={newInstance:ln.c.newInstance(Up,"vtkProp"),extend:Up};function _p(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=function(n){t.position=t.position.map((function(e,t){return e+n[t]})),e.modified()},e.getOrientationWXYZ=function(){var e=yg();Object(Yo.m)(e,t.rotation);var n=new Float64Array(3),r=function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ml.b?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}(n,e);return[Object(Xo.F)(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Object(Yo.a)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateY=function(n){0!==n&&(Object(Yo.b)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Object(Yo.c)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateWXYZ=function(n,r,a,o){if(0!==n&&(0!==r||0!==a||0!==o)){var i=Object(Xo.B)(n),l=yg();vg(l,[r,a,o],i);var s=new Float64Array(16);Object(Yo.j)(s,l),Object(Yo.l)(t.rotation,t.rotation,s),e.modified()}},e.setOrientation=function(n,r,a){return(n!==t.orientation[0]||r!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[n,r,a],Object(Yo.h)(t.rotation),e.rotateZ(a),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Object(Yo.d)(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Object(Yo.h)(t.matrix),t.userMatrix&&Object(Yo.l)(t.matrix,t.matrix,t.userMatrix),Object(Yo.s)(t.matrix,t.matrix,t.origin),Object(Yo.s)(t.matrix,t.matrix,t.position),Object(Yo.l)(t.matrix,t.matrix,t.rotation),Object(Yo.r)(t.matrix,t.matrix,t.scale),Object(Yo.s)(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Object(Yo.i)(t.matrix,t.matrix),t.isIdentity=!0;for(var n=0;n<4;++n)for(var r=0;r<4;++r)(n===r?1:0)!==t.matrix[n+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=function(){return Ol.getCenter(t.bounds)},e.getLength=function(){return Ol.getLength(t.bounds)},e.getXRange=function(){return Ol.getXRange(t.bounds)},e.getYRange=function(){return Ol.getYRange(t.bounds)},e.getZRange=function(){return Ol.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var jp={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Qp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jp,n),zp.extend(e,t,n),t.matrixMTime={},ln.c.obj(t.matrixMTime),ln.c.get(e,t,["bounds","isIdentity"]),ln.c.getArray(e,t,["orientation"]),ln.c.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Object(Yo.h)(new Float64Array(16)),t.rotation=Object(Yo.h)(new Float64Array(16)),t.userMatrix=Object(Yo.h)(new Float64Array(16)),t.transform=null,_p(e,t)}var qp={newInstance:ln.c.newInstance(Qp,"vtkProp3D"),extend:Qp};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var eC=ln.c.vtkDebugMacro;function tC(e,t){t.classHierarchy.push("vtkActor");var n=function(e){for(var t=1;t=1;return(n=n&&(!t.texture||!t.texture.isTranslucent()))&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque())},e.makeProperty=hg.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){eC("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Ol.getCorners(n,r),e.computeMatrix();var a=new Float64Array(16);Object(Yo.i)(a,t.matrix),r.forEach((function(e){return Object(Fo.q)(e,e,a)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?r.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):r.reduce((function(e,n){return ee?r:e}if(null!==t.backfaceProperty){var a=t.backfaceProperty.getMTime();e=a>e?a:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var nC={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nC,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),tC(e,t)}var aC={newInstance:ln.c.newInstance(rC,"vtkActor"),extend:rC};function oC(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,a,o){if(t.callback){var i=n.getCompositeProjectionMatrix(r,-1,1);Object(Yo.i)(i,i);for(var l=e.getPoints(),s=new Float64Array(3),c=a.usize,g=a.vsize,u=c/2,d=g/2,m=[],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iC,n),Pu.extend(e,t,n),ln.c.setGet(e,t,["callback","useZValues"]),oC(e,t)}var sC={newInstance:ln.c.newInstance(lC,"vtkPixelSpaceCallbackMapper"),extend:lC};function cC(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=function(){t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setImage=function(n){t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null)),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())}}var gC={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function uC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gC,n),ln.c.obj(e,t),ln.c.algo(e,t,6,0),ln.c.get(e,t,["imageLoaded"]),ln.c.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),cC(e,t)}var dC={newInstance:ln.c.newInstance(uC,"vtkTexture"),extend:uC};function mC(e){return+e}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var CC=e=>()=>e;function IC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):CC(isNaN(e)?t:e)}function hC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yC(){}var vC="\\s*([+-]?\\d+)\\s*",ZC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GC=/^#([0-9a-f]{3,8})$/,SC=new RegExp("^rgb\\("+[vC,vC,vC]+"\\)$"),BC=new RegExp("^rgb\\("+[AC,AC,AC]+"\\)$"),VC=new RegExp("^rgba\\("+[vC,vC,vC,ZC]+"\\)$"),RC=new RegExp("^rgba\\("+[AC,AC,AC,ZC]+"\\)$"),wC=new RegExp("^hsl\\("+[ZC,AC,AC]+"\\)$"),kC=new RegExp("^hsla\\("+[ZC,AC,AC,ZC]+"\\)$"),WC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xC(){return this.rgb().formatHex()}function TC(){return this.rgb().formatRgb()}function JC(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XC(t):3===n?new YC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?OC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?OC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SC.exec(e))?new YC(t[1],t[2],t[3],1):(t=BC.exec(e))?new YC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VC.exec(e))?OC(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?OC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wC.exec(e))?MC(t[1],t[2]/100,t[3]/100,1):(t=kC.exec(e))?MC(t[1],t[2]/100,t[3]/100,t[4]):WC.hasOwnProperty(e)?XC(WC[e]):"transparent"===e?new YC(NaN,NaN,NaN,0):null}function XC(e){return new YC(e>>16&255,e>>8&255,255&e,1)}function OC(e,t,n,r){return r<=0&&(e=t=n=NaN),new YC(e,t,n,r)}function NC(e){return e instanceof yC||(e=JC(e)),e?new YC((e=e.rgb()).r,e.g,e.b,e.opacity):new YC}function HC(e,t,n,r){return 1===arguments.length?NC(e):new YC(e,t,n,null==r?1:r)}function YC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FC(){return"#"+KC(this.r)+KC(this.g)+KC(this.b)}function PC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function KC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function MC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DC(e,t,n,r)}function LC(e){if(e instanceof DC)return new DC(e.h,e.s,e.l,e.opacity);if(e instanceof yC||(e=JC(e)),!e)return new DC;if(e instanceof DC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-a,s=(o+a)/2;return l?(i=t===o?(n-r)/l+6*(n0&&s<1?0:i,new DC(i,l,s,e.opacity)}function DC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function EC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hC(yC,JC,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xC,formatHex:xC,formatHsl:function(){return LC(this).formatHsl()},formatRgb:TC,toString:TC}),hC(YC,HC,bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FC,formatHex:FC,formatRgb:PC,toString:PC})),hC(DC,(function(e,t,n,r){return 1===arguments.length?LC(e):new DC(e,t,n,null==r?1:r)}),bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new YC(EC(e>=240?e-240:e+120,a,r),EC(e,a,r),EC(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var UC=function e(t){var n=function(e){return 1==(e=+e)?IC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):CC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=HC(e)).r,(t=HC(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=IC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function zC(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;ni&&(a=t.slice(i,a),s[l]?s[l]+=a:s[++l]=a),(n=n[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,c.push({i:l,x:fC(n,r)})),i=qC.lastIndex;return it?1:e>=t?0:NaN}function rI(e){let t=e,n=e;function r(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)<0?r=o+1:a=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>nI(e(t),n)}(e)),{left:r,center:function(e,n,a,o){null==a&&(a=0),null==o&&(o=e.length);const i=r(e,n,a,o-1);return i>a&&t(e[i-1],n)>-t(e[i],n)?i-1:i},right:function(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)>0?a=o:r=o+1}return r}}}const aI=rI(nI).right;rI((function(e){return null===e?NaN:+e})).center;var oI=[0,1];function iI(e){return e}function lI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function sI(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return at&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=s>2?cI:sI,a=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),l,s)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(l,i.map(e),fC)))(n)))},u.domain=function(e){return arguments.length?(i=Array.from(e,mC),g()):i.slice()},u.range=function(e){return arguments.length?(l=Array.from(e),g()):l.slice()},u.rangeRound=function(e){return l=Array.from(e),s=pC,g()},u.clamp=function(e){return arguments.length?(c=!!e||iI,g()):c!==iI},u.interpolate=function(e){return arguments.length?(s=e,g()):s},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,g()}}()(iI,iI)}function dI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mI,fI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pI(e){if(!(t=fI.exec(e)))throw new Error("invalid format: "+e);var t;return new CI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CI(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hI(e){return(e=II(Math.abs(e)))?e[1]:NaN}function bI(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}pI.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bI(100*e,t),r:bI,s:function(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(mI=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+II(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vI(e){return e}var ZI,AI,GI,SI=Array.prototype.map,BI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ZI=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?vI:(t=SI.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?vI:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(SI.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=pI(e)).fill,n=e.align,u=e.sign,d=e.symbol,m=e.zero,f=e.width,p=e.comma,C=e.precision,I=e.trim,h=e.type;"n"===h?(p=!0,h="g"):yI[h]||(void 0===C&&(C=12),I=!0,h="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===d?o:/[%p]/.test(h)?s:"",v=yI[h],Z=/[defgprs%]/.test(h);function A(e){var a,o,s,d=b,A=y;if("c"===h)A=v(e)+A,e="";else{var G=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:v(Math.abs(e),C),I&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),G&&0==+e&&"+"!==u&&(G=!1),d=(G?"("===u?u:c:"-"===u||"("===u?"":u)+d,A=("s"===h?BI[8+mI/3]:"")+A+(G&&"("===u?")":""),Z)for(a=-1,o=e.length;++a(s=e.charCodeAt(a))||s>57){A=(46===s?i+e.slice(a+1):e.slice(a))+A,e=e.slice(0,a);break}}p&&!m&&(e=r(e,1/0));var S=d.length+e.length+A.length,B=S>1)+d+e+A+B.slice(S);break;default:e=B+d+e+A}return l(e)}return C=void 0===C?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=u(((e=pI(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hI(t)/3))),a=Math.pow(10,-r),o=BI[8+r/3];return function(e){return n(a*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),AI=ZI.format,GI=ZI.formatPrefix;var VI=Math.sqrt(50),RI=Math.sqrt(10),wI=Math.sqrt(2);function kI(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=VI?10:o>=RI?5:o>=wI?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=VI?10:o>=RI?5:o>=wI?2:1)}function WI(e,t,n,r){var a,o,i,l,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=VI?a*=10:o>=RI?a*=5:o>=wI&&(a*=2),t0)return[e];if((r=t0){let n=Math.round(e/i),r=Math.round(t/i);for(n*it&&--r,o=new Array(a=r-n+1);++lt&&--r,o=new Array(a=r-n+1);++l0;){if((a=kI(s,c,n))===r)return o[i]=s,o[l]=c,t(o);if(a>0)s=Math.floor(s/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function TI(){var e=uI();return e.copy=function(){return gI(e,TI())},dI.apply(e,arguments),xI(e)}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XI(e){for(var t=1;ta,t.camera.getParallelProjection()||(Object(Fo.l)(LI,LI),i=Object(Fo.d)(LI,MI)>a)),i!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=i,n=!0)}return n},e.updatePolyData=function(e,n,r){var a=0,o=0;a+=8;for(var i=0,l=0;l<12;l++)n[l]>0&&i++;if(o+=i,t.gridLines)for(var s=0;s<6;s++)e[s]&&(a+=2*r[FI[s][0]].length+2*r[FI[s][1]].length,o+=r[FI[s][0]].length+r[FI[s][1]].length);for(var c=new Float64Array(3*a),g=new Uint32Array(3*o),u=0,d=0,m=0;m<2;m++)for(var f=0;f<2;f++)for(var p=0;p<2;p++)c[3*u]=t.dataBounds[p],c[3*u+1]=t.dataBounds[2+f],c[3*u+2]=t.dataBounds[4+m],u++;for(var C=0;C<12;C++)n[C]>0&&(g[3*d]=2,g[3*d+1]=HI[C][0],g[3*d+2]=HI[C][1],d++);if(t.gridLines)for(var I=0;I<6;I++)if(e[I]){for(var h=Math.floor(I/2),b=r[FI[I][0]],y=0;y.5?Object(Fo.b)(MI,DI,i[0]*l):Object(Fo.b)(MI,DI,i[0]*l-c.width/2),Object(Fo.g)(PI,PI,MI),Object(Fo.b)(MI,EI,i[1]*l-c.height/2),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[0],s.tcoords[2*m+1]=c.tcoords[1],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[2],s.tcoords[2*m+1]=c.tcoords[3],m++,Object(Fo.b)(MI,EI,c.height),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[4],s.tcoords[2*m+1]=c.tcoords[5],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.a)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[6],s.tcoords[2*m+1]=c.tcoords[7],m++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-3,s.polys[4*f+3]=m-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-2,s.polys[4*f+3]=m-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n);var r=t.textValues.length,a=4*r,o=2*r,i=new Float64Array(3*a),l=new Uint16Array(4*o),s=new Float32Array(2*a);Object(Yo.g)(UI,n);for(var c={ptIdx:0,cellIdx:0,polys:l,points:i,tcoords:s},g=0,u=0,d=0,m=t.textPolyData.getPoints().getData();g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jI(n)),aC.extend(e,t,n),t.lastSize=[800,800],t.lastAspectRatio=1,t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.mapper=Pu.newInstance(),t.polyData=Go.a.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,a,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=aC.newInstance(),t.pixelActor.setMapper(t.pixelMapper),ln.c.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),ln.c.setGetArray(e,t,["dataBounds"],6),ln.c.setGetArray(e,t,["axisLabels"],3),ln.c.get(e,t,["axisTextStyle","tickTextStyle","camera"]),_I(e,t)}var qI={newInstance:ln.c.newInstance(QI,"vtkCubeAxesActor"),extend:QI};function $I(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=function(e,n){var r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}var eh={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var th={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eh,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.setGetArray(e,t,["displayCenter"],2),ln.c.setGetArray(e,t,["center"],3),$I(e,t)}};function nh(e,t){t.classHierarchy.push("vtkCompositeMouseManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onButtonDown=function(e,t,n){},e.onButtonUp=function(e){},e.onMouseMove=function(e,t,n){},e.onStartScroll=function(e,t,n){},e.onScroll=function(e,t,n){},e.onEndScroll=function(e){},e.isDragEnabled=function(){return t.dragEnabled},e.isScrollEnabled=function(){return t.scrollEnabled}}var rh={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var ah={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rh,n),ln.c.setGet(e,t,["button","shift","control","alt"]),ln.c.set(e,t,["dragEnabled","scrollEnabled"]),nh(e,t)}};function oh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,c,g){if(g){var u=c.getActiveCamera(),d=u.getPosition(),m=u.getFocalPoint();Object(Yo.h)(o);var f=t.center,p=t.rotationFactor;Object(Yo.s)(o,o,f);var C=t.previousPosition.x-g.x,I=t.previousPosition.y-g.y,h=e.getView().getSize(),b=u.getViewUp();Object(Yo.q)(o,o,Object(Xo.B)(360*C/h[0]*p),b),Object(Xo.w)(u.getDirectionOfProjection(),b,i),Object(Yo.q)(o,o,Object(Xo.B)(-360*I/h[1]*p),i),l[0]=-f[0],l[1]=-f[1],l[2]=-f[2],Object(Yo.s)(o,o,l),Object(Fo.q)(n,d,o),Object(Fo.q)(r,m,o),s[0]=b[0]+d[0],s[1]=b[1]+d[1],s[2]=b[2]+d[2],Object(Fo.q)(a,s,o),u.setPosition(n[0],n[1],n[2]),u.setFocalPoint(r[0],r[1],r[2]),u.setViewUp(a[0]-n[0],a[1]-n[1],a[2]-n[2]),u.orthogonalizeViewUp(),c.resetCameraClippingRange(),e.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=g}}}var ih={};function lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ih,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),oh(e,t)}var sh={newInstance:ln.c.newInstance(lh,"vtkMouseCameraTrackballRotateManipulator"),extend:lh};function ch(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(c,g,u){if(u){var d=g.getActiveCamera(),m=d.getPosition(),f=d.getFocalPoint(),p=d.getViewUp();n[0]=f[0]-m[0],n[1]=f[1]-m[1],n[2]=f[2]-m[2],e.computeDisplayCenter(c.getInteractorStyle(),g);var C=t.previousPosition.x-t.displayCenter[0],I=u.x-t.displayCenter[0],h=t.previousPosition.y-t.displayCenter[1],b=u.y-t.displayCenter[1];if(!(0===I&&0===b||0===C&&0===h)){var y=Object(Xo.F)((C*b-h*I)/(Math.sqrt(C*C+h*h)*Math.sqrt(I*I+b*b))),v=t.center;Object(Yo.h)(o),a[0]=-v[0],a[1]=-v[1],a[2]=-v[2],Object(Yo.s)(o,o,v),Object(Yo.q)(o,o,Object(Xo.B)(y),n),Object(Yo.s)(o,o,a),Object(Fo.q)(i,m,o),Object(Fo.q)(l,f,o),r[0]=p[0]+m[0],r[1]=p[1]+m[1],r[2]=p[2]+m[2],Object(Fo.q)(s,r,o),d.setPosition(i[0],i[1],i[2]),d.setFocalPoint(l[0],l[1],l[2]),d.setViewUp(s[0]-i[0],s[1]-i[1],s[2]-i[2]),d.orthogonalizeViewUp(),g.resetCameraClippingRange(),c.getLightFollowCamera()&&g.updateLightsGeometryToFollowCamera(),t.previousPosition=u}}}}var gh={};function uh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),ch(e,t)}var dh={newInstance:ln.c.newInstance(uh,"vtkMouseCameraTrackballRollManipulator"),extend:uh};function mh(e){return e*e}function fh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=sh.newInstance(),r=dh.newInstance(),a=null;e.onButtonDown=function(t,o,i){var l,s,c=t.getView().getSize(),g=[.5*c[0],.5*c[1]],u=.9*((l=g[0])<(s=g[1])?s:l),d=mh(g[0]-i.x)+mh(g[1]-i.y);(a=u*u>d?n:r).setButton(e.getButton()),a.setShift(e.getShift()),a.setControl(e.getControl()),a.setCenter(e.getCenter()),a.onButtonDown(t,i)},e.onButtonUp=function(e){a&&a.onButtonUp(e)},e.onMouseMove=function(e,t,n){a&&a.onMouseMove(e,t,n)}}var ph={};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ph,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),fh(e,t)}var Ih={newInstance:ln.c.newInstance(Ch,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ch};function hh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var a=r,o=t.previousPosition;t.previousPosition=r;var i=n.getActiveCamera(),l=i.getPosition(),s=i.getFocalPoint();if(i.getParallelProjection()){i.orthogonalizeViewUp();var c=i.getViewUp(),g=i.getViewPlaneNormal(),u=[0,0,0];Object(Xo.w)(g,c,u);var d=e.getView().getSize()[1],m=(a.x-o.x)/d,f=(o.y-a.y)/d,p=i.getParallelScale();f*=2*p;var C=u[0]*(m*=2*p)+c[0]*f;l[0]+=C,s[0]+=C,C=u[1]*m+c[1]*f,l[1]+=C,s[1]+=C,C=u[2]*m+c[2]*f,l[2]+=C,s[2]+=C,i.setPosition(l[0],l[1],l[2]),i.setFocalPoint(s[0],s[1],s[2])}else{var I=t.center,h=e.getInteractorStyle(),b=h.computeWorldToDisplay(n,I[0],I[1],I[2])[2],y=h.computeDisplayToWorld(n,a.x,a.y,b),v=h.computeDisplayToWorld(n,o.x,o.y,b),Z=[l[0]+(v[0]-y[0]),l[1]+(v[1]-y[1]),l[2]+(v[2]-y[2])],A=[s[0]+(v[0]-y[0]),s[1]+(v[1]-y[1]),s[2]+(v[2]-y[2])];i.setPosition(Z[0],Z[1],Z[2]),i.setFocalPoint(A[0],A[1],A[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var bh={};function yh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),hh(e,t)}var vh={newInstance:ln.c.newInstance(yh,"vtkMouseCameraTrackballPanManipulator"),extend:yh};function Zh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var a=e.getView().getSize(),o=n.getActiveCamera(),i=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/a[1]*i;else{var l=o.getClippingRange();t.zoomScale=l[1]/a[1]*1.5*i}},e.onMouseMove=function(e,n,r){if(r){var a=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var i=a*t.zoomScale;o.setParallelScale((1-i)*o.getParallelScale())}else{var l=o.getPosition(),s=o.getFocalPoint(),c=o.getDirectionOfProjection(),g=a*t.zoomScale,u=g*c[0];l[0]+=u,s[0]+=u,u=g*c[1],l[1]+=u,s[1]+=u,u=g*c[2],l[2]+=u,s[2]+=u,o.getFreezeFocalPoint()||o.setFocalPoint(s[0],s[1],s[2]),o.setPosition(l[0],l[1],l[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),a=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/a):(r.dolly(a),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Ah={zoomScale:0,flipDirection:!1};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ah,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),ln.c.setGet(e,t,["flipDirection"]),Zh(e,t)}var Sh={newInstance:ln.c.newInstance(Gh,"vtkMouseCameraTrackballZoomManipulator"),extend:Gh};function Bh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,a){n(e,r,a),t.zoomPosition=a},e.onMouseMove=function(e,n,r){if(r){var a=(t.previousPosition.y-r.y)*t.zoomScale;Mp.dollyToPosition(1-a,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var a=1-.1*n;Mp.dollyToPosition(a,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Vh={zoomPosition:null};function Rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vh,n),Sh.extend(e,t,n),Bh(e,t)}var wh={newInstance:ln.c.newInstance(Rh,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Rh};function kh(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onStartPinch=function(e,t){},e.onStartRotate=function(e,t){},e.onStartPan=function(e,t){},e.onPinch=function(e,t,n){},e.onRotate=function(e,t,n){},e.onPan=function(e,t,n){},e.onEndPinch=function(e){},e.onEndRotate=function(e){},e.onEndPan=function(e){},e.isPinchEnabled=function(){return t.pinchEnabled},e.isPanEnabled=function(){return t.panEnabled},e.isRotateEnabled=function(){return t.rotateEnabled}}var Wh={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var xh={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wh,n),ln.c.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),ln.c.setGet(e,t,["interactorStyle"]),kh(e,t)}};function Th(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=function(e,n){t.previousScale=n},e.onStartRotate=function(e,n){t.previousRotation=n},e.onStartPan=function(e,n){t.previousTranslation=n},e.onPinch=function(e,n,r){Mp.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=function(e,n,r){var a=n.getActiveCamera(),o=e.getInteractorStyle(),i=a.getFocalPoint(),l=(i=o.computeWorldToDisplay(n,i[0],i[1],i[2]))[2],s=r,c=t.previousTranslation,g=o.computeDisplayToWorld(n,i[0]+s[0]-c[0],i[1]+s[1]-c[1],l),u=o.computeDisplayToWorld(n,i[0],i[1],l),d=[];d[0]=u[0]-g[0],d[1]=u[1]-g[1],d[2]=u[2]-g[2],i=a.getFocalPoint();var m=a.getPosition();a.setFocalPoint(d[0]+i[0],d[1]+i[1],d[2]+i[2]),a.setPosition(d[0]+m[0],d[1]+m[1],d[2]+m[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=function(e,n,r){var a=n.getActiveCamera();a.roll(r-t.previousRotation),a.orthogonalizeViewUp(),t.previousRotation=r}}var Jh={};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jh,n),ln.c.obj(e,t),xh.extend(e,t,n),th.extend(e,t,n),Th(e,t)}var Oh={newInstance:ln.c.newInstance(Xh,"vtkGestureCameraManipulator"),extend:Xh};function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh(n)),Object(ln.h)(e,t),ah.extend(e,t,n),Object(ln.d)(e,t,"BoxSelectChange"),Object(ln.d)(e,t,"BoxSelectInput"),Object(ln.j)(e,t,["renderSelection","selectionStyle"]),Ph(e,t)}var Lh={newInstance:Object(ln.g)(Mh,"vtkMouseBoxSelectionManipulator"),extend:Mh},Dh=n(38);function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uh(e){for(var t=1;t.001?Math.acos(n/o):0,l=i>.001?Math.atan2(a,r):0;t[0]=o,t[1]=i,t[2]=l}function db(e,t){if(e[0]>=t-.1)return e[2];var n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function mb(e,t,n,r){var a=[],o=[];Object(Xo.e)(t,a),Object(Xo.e)(n,o);var i=[],l=[];ub(a,i),ub(o,l);var s=e;if(i[1]>.05&&l[1]>.05&&function(e,t){var n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(i[2],l[2])>.33*Math.PI){var c=Math.max(i[0],l[0]);c=Math.max(88,c),e<.5?(l[0]=c,l[1]=0,l[2]=0,s*=2):(i[0]=c,i[1]=0,i[2]=0,s=2*s-1)}i[1]<.05&&l[1]>.05?i[2]=db(l,i[0]):l[1]<.05&&i[1]>.05&&(l[2]=db(i,l[0]));var g=[];g[0]=(1-s)*i[0]+s*l[0],g[1]=(1-s)*i[1]+s*l[1],g[2]=(1-s)*i[2]+s*l[2];var u=[];!function(e,t){var n=e[0],r=e[1],a=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(a),t[2]=n*Math.sin(r)*Math.sin(a)}(g,u),Object(Xo.f)(u,r)}function fb(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,a){return e.addRGBPointLong(t,n,r,a,.5,0)},e.addRGBPointLong=function(n,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i<0||i>1)return cb("Midpoint outside range [0.0, 1.0]"),-1;if(l<0||l>1)return cb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var s={x:n,r:r,g:a,b:o,midpoint:i,sharpness:l};t.nodes.push(s),e.sortAndUpdateRange();for(var c=0;c4&&void 0!==arguments[4]?arguments[4]:.5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=[],s=[n,r,a];return Object(Xo.u)(s,l),e.addRGBPoint(t,l[0],l[1],l[2],o,i)},e.setNodes=function(n){t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=function(){t.nodes.sort((function(e,t){return e.x-t.x})),e.updateRange()||e.modified()},e.updateRange=function(){var n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];var r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=function(n){for(var r=0;r=t.nodes.length)return-1;var o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var a=0;a=n&&t.nodes[g].x<=i?t.nodes.splice(g,1):g++;e.addRGBPointLong(n,r,a,o,.5,0),e.addRGBPointLong(i,l,s,c,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,a,o,i,l,s){var c=[i,l,s],g=[],u=[];Object(Xo.u)([n,r,a],g),Object(Xo.u)(c,u),e.addRGBSegment(t,g[0],g[1],g[2],o,u[0],u[1],u[2])},e.mapValue=function(t){var n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=function(n,r){if(t.indexedLookup){var a=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===a)e.getNanColor(r);else{var i=[];e.getNodeValue(o%a,i),r[0]=i.r,r[1]=i.g,r[2]=i.b}}else e.getTable(n,n,1,r)},e.getRedValue=function(t){var n=[];return e.getColor(t,n),n[0]},e.getGreenValue=function(t){var n=[];return e.getColor(t,n),n[1]},e.getBlueValue=function(t){var n=[];return e.getColor(t,n),n[2]},e.getTable=function(n,r,a,o){if(Object(Xo.v)(n)||Object(Xo.v)(r))for(var i=0;i0);var v=0,Z=0,A=0;y&&(v=Math.log10(n),Z=Math.log10(r));for(var G=0;G1?y?(A=v+G/(a-1)*(Z-v),d=Math.pow(10,A)):d=n+G/(a-1)*(r-n):y?(A=.5*(v+Z),d=Math.pow(10,A)):d=.5*(n+r),t.discretize){var B=t.mappingRange;if(d>=B[0]&&d<=B[1]){var V=t.numberOfValues,R=B[1]-B[0];if(V<=1)d=B[0]+R/2;else{var w=(d-B[0])/R,k=Object(Xo.g)(V*w);d=B[0]+k/(V-1)*R}}}for(;lt.nodes[l].x;)++l.99999&&(I=.99999));if(d>t.mappingRange[1])o[S]=0,o[S+1]=0,o[S+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[S]=t.aboveRangeColor[0],o[S+1]=t.aboveRangeColor[1],o[S+2]=t.aboveRangeColor[2]):(o[S]=c,o[S+1]=g,o[S+2]=u));else if(d0&&(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b));else if(0===l&&(Math.abs(d-n)<1e-6||t.discretize))s>0?(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b):(o[S]=0,o[S+1]=0,o[S+2]=0);else{var W=0;if(W=(W=y?(A-m)/(f-m):(d-m)/(f-m)).99){if(W<.5){o[S]=p[0],o[S+1]=p[1],o[S+2]=p[2];continue}o[S]=C[0],o[S+1]=C[1],o[S+2]=C[2];continue}if(h<.01){if(t.colorSpace===ob.RGB)o[S]=(1-W)*p[0]+W*C[0],o[S+1]=(1-W)*p[1]+W*C[1],o[S+2]=(1-W)*p[2]+W*C[2];else if(t.colorSpace===ob.HSV){var x=[],T=[];Object(Xo.d)(p,x),Object(Xo.d)(C,T),t.hSVWrap&&(x[0]-T[0]>.5||T[0]-x[0]>.5)&&(x[0]>T[0]?x[0]-=1:T[0]-=1);var J=[];J[0]=(1-W)*x[0]+W*T[0],J[0]<0&&(J[0]+=1),J[1]=(1-W)*x[1]+W*T[1],J[2]=(1-W)*x[2]+W*T[2],Object(Xo.u)(J,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var X=[],O=[];Object(Xo.e)(p,X),Object(Xo.e)(C,O);var N=[];N[0]=(1-W)*X[0]+W*O[0],N[1]=(1-W)*X[1]+W*O[1],N[2]=(1-W)*X[2]+W*O[2],Object(Xo.f)(N,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.",t.colorSpace);continue}W<.5?W=.5*Math.pow(2*W,1+10*h):W>.5&&(W=1-.5*Math.pow(2*(1-W),1+10*h));var H=W*W,Y=H*W,F=2*Y-3*H+1,P=-2*Y+3*H,K=Y-2*H+W,M=Y-H,L=void 0;if(t.colorSpace===ob.RGB)for(var D=0;D<3;D++)L=(1-h)*(C[D]-p[D]),o[S+D]=F*p[D]+P*C[D]+K*L+M*L;else if(t.colorSpace===ob.HSV){var E=[],U=[];Object(Xo.d)(p,E),Object(Xo.d)(C,U),t.hSVWrap&&(E[0]-U[0]>.5||U[0]-E[0]>.5)&&(E[0]>U[0]?E[0]-=1:U[0]-=1);for(var z=[],_=0;_<3;_++)L=(1-h)*(U[_]-E[_]),z[_]=F*E[_]+P*U[_]+K*L+M*L,0===_&&z[_]<0&&(z[_]+=1);Object(Xo.u)(z,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var j=[],Q=[];Object(Xo.e)(p,j),Object(Xo.e)(C,Q);for(var q=[],$=0;$<3;$++)L=(1-h)*(Q[$]-j[$]),q[$]=F*j[$]+P*Q[$]+K*L+M*L;Object(Xo.f)(q,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[S+ee]=o[S+ee]<0?0:o[S+ee],o[S+ee]=o[S+ee]>1?1:o[S+ee]}}}},e.getUint8Table=function(n,r,a){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return cb("Attempting to lookup a value with no points in the function"),t.table;var i=o?4:3;t.tableSize===a&&t.tableWithAlpha===o||(t.table=new Uint8Array(a*i),t.tableSize=a,t.tableWithAlpha=o);var l=[];e.getTable(n,r,a,l);for(var s=0;s1&&(i=(r-n)/(a-1));for(var l=0;l=t.nodes.length?(cb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){if(n<0||n>=t.nodes.length)return cb("Index out of range!"),-1;var a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=function(){return t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216},e.getIndexedColor=function(t,n){var r=e.getSize();if(r>0&&t>=0){var a=[];e.getNodeValue(t%r,a);for(var o=0;o<3;++o)n[o]=a[o+1];n[3]=1}else e.getNanColor(n),n[3]=1},e.fillFromDataPointer=function(t,n){if(!(t<=0)&&n){e.removeAllPoints();for(var r=0;rn[1]?(e.getColor(n[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])):(e.getColor(r[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])),e.sortAndUpdateRange();for(var o=0;o=n[0]&&t.nodes[o].x<=n[1]?t.nodes.splice(o,1):++o;return 1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){if(t.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pb,n),mu.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},ln.c.obj(t.buildTime),ln.c.get(e,t,["buildTime","mappingRange"]),ln.c.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),fb(e,t)}var Ib=function(e){for(var t=1;t0&&(n=t.nodes[0].y);for(var a=1;an)switch(r){case 0:case 1:r=1;break;default:case 2:r=3}else switch(r){case 0:case 2:r=2;break;default:case 1:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:case 3:return"Varied"}},e.getDataPointer=function(){var e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(var n=0;n0?t.nodes[n-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=function(e,n){var r=t.nodes.length;return e<0||e>=r?(hb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){var a=t.nodes.length;if(n<0||n>=a)return hb("Index out of range!"),-1;var o=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],o!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=function(t,n){return e.addPointLong(t,n,.5,0)},e.addPointLong=function(n,r,a,o){if(a<0||a>1)return hb("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return hb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var i,l={x:n,y:r,midpoint:a,sharpness:o};for(t.nodes.push(l),e.sortAndUpdateRange(),i=0;i=t.nodes.length)return-1;var a=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,a,o){e.sortAndUpdateRange();for(var i=0;i=n&&t.nodes[i].x<=a?t.nodes.splice(i,1):i++;e.addPoint(n,r,.5,0),e.addPoint(a,o,.5,0)},e.getValue=function(t){var n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=function(n){if(n.length<2)return 0;var r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(var a=0;a=n[0]&&t.nodes[a].x<=n[1]?t.nodes.splice(a,1):++a;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){var e=t.nodes.length;if(e<2)return-1;for(var n=t.nodes[1].x-t.nodes[0].x,r=0;r4&&void 0!==arguments[4]?arguments[4]:1,l=0,s=t.nodes.length,c=0;0!==s&&(c=t.nodes[s-1].y);var g=0,u=0,d=0,m=0,f=0,p=0,C=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);lt.nodes[l].x;)++l.99999&&(p=.99999));if(l>=s)a[I]=t.clamping?c:0;else if(0===l)a[I]=t.clamping?t.nodes[0].y:0;else{var h=(g-u)/(d-u);if(h=h.99){if(h<.5){a[I]=m;continue}a[I]=f;continue}if(C<.01){a[I]=(1-h)*m+h*f;continue}h<.5?h=.5*Math.pow(2*h,1+10*C):h>.5&&(h=1-.5*Math.pow(2*(1-h),1+10*C));var b=h*h,y=b*h,v=2*y-3*b+1,Z=-2*y+3*b,A=y-2*b+h,G=y-b,S=f-m,B=(1-C)*S;a[I]=v*m+Z*f+A*B+G*B;var V=mf?m:f;a[I]=a[I]R?R:a[I]}}}}var yb={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yb,n),ln.c.obj(e,t),t.nodes=[],ln.c.setGet(e,t,["allowDuplicateScalars","clamping"]),ln.c.setArray(e,t,["range"],2),ln.c.getArray(e,t,["range"]),bb(e,t)}var Zb={newInstance:ln.c.newInstance(vb,"vtkPiecewiseFunction"),extend:vb};function Ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Gb=Km.InterpolationType,Sb=Km.OpacityMode,Bb=ln.c.vtkErrorMacro;function Vb(e,t){t.classHierarchy.push("vtkVolumeProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(n=n>(e=t.componentData[r].grayTransferFunction.getMTime())?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].scalarOpacity&&(n=n>(e=t.componentData[r].scalarOpacity.getMTime())?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(n=n>(e=t.componentData[r].gradientOpacity.getMTime())?n:e));return n},e.getColorChannels=function(e){return e<0||e>3?(Bb("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var a=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,a=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,a=!0),a&&e.modified(),a},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Zb.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction},e.setRGBTransferFunction=function(n,r){var a=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,a=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,a=!0),a&&e.modified(),a},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=Ib.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction},e.setScalarOpacity=function(n,r){return t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0)},e.getScalarOpacity=function(n){return null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=Zb.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Bb("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Bb("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Gb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Gb.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(Gb.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Gb,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["set".concat(r)]=function(r,a){return t.componentData[r]["".concat(n)]!==a&&(t.componentData[r]["".concat(n)]=a,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var Rb={independentComponents:!0,interpolationType:Gb.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function wb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rb,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;++r)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:Sb.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),Vb(e,t)}var kb=function(e){for(var t=1;tr[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){Wb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e}}var Tb={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function Jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tb,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),xb(e,t)}var Xb={newInstance:ln.c.newInstance(Jb,"vtkVolume"),extend:Jb},Ob=Lm.BlendMode;function Nb(e,t){t.classHierarchy.push("vtkVolumeMapper"),e.getBounds=function(){var n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=Object(Xo.j)(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(Ob.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(Ob.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(Ob.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(Ob.AVERAGE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return ln.c.enumToString(Ob,t.blendMode)}}var Hb={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:Ob.COMPOSITE_BLEND,averageIPScalarRange:[-1e6,1e6]};function Yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),_g.extend(e,t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),ln.c.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),ln.c.setGetArray(e,t,["averageIPScalarRange"],2),ln.c.event(e,t,"lightingActivated"),Nb(e,t)}var Fb={newInstance:ln.c.newInstance(Yb,"vtkVolumeMapper"),extend:Yb},Pb=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Pb[e.Name]=e}));var Kb=Object.keys(Pb);Kb.sort();var Mb={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Pb[e.Name]||(Kb.push(e.Name),Kb.sort()),Pb[e.Name]=e)},removePresetByName:function(e){var t=Kb.indexOf(e);t>-1&&Kb.splice(t,1),delete Pb[e]},getPresetByName:function(e){return Pb[e]},rgbPresetNames:Kb};var Lb=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.volume=Xb.newInstance({visibility:!1}),t.mapper=Fb.newInstance(),t.volume.setMapper(t.mapper),t.volume.getProperty().setRGBTransferFunction(0,t.lookupTable),t.volume.getProperty().setScalarOpacity(0,t.piecewiseFunction),t.volume.getProperty().setInterpolationTypeToLinear(),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addVolume(e.volume),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&(this.view.renderer.removeVolume(this.volume),this.view=null),this.volume.delete(),this.volume=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.volume,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange;if(!r||t&&r===t.volume||this.volume.set(r),!a||t&&a===t.property||this.volume.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var s,c=Mb.getPresetByName(i);this.lookupTable.applyColorMap(c),(s=this.lookupTable).setMappingRange.apply(s,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?(console.log("from update"),this.dataChanged()):(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.volume.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.volume.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();Lb.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},Lb.propTypes={id:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Db=Lb,Eb=Id.InterpolationType,Ub=ln.c.vtkErrorMacro;function zb(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].piecewiseFunction&&(n=n>(e=t.componentData[r].piecewiseFunction.getMTime())?n:e);return n},e.setRGBTransferFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].rGBTransferFunction!==o&&(t.componentData[a].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].piecewiseFunction!==o&&(t.componentData[a].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=function(t,n){var r=t,a=n;return Number.isInteger(t)||(a=t,r=0),e.setPiecewiseFunction(r,a)},e.getScalarOpacity=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Ub("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Ub("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Eb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Eb.LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Eb,t.interpolationType)}}var _b={independentComponents:!1,interpolationType:Eb.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,_b,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),zb(e,t)}var Qb={newInstance:ln.c.newInstance(jb,"vtkImageProperty"),extend:jb},qb=ln.c.vtkDebugMacro;function $b(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=function(){return e},e.getImages=function(){return e},e.getIsOpaque=function(){if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=Qb.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n,r=t.mapper.getBounds();if(!r||6!==r.length)return r;if(r[0]>r[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){qb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,a=t.mapper.getBoundsForSlice(n,r);if(!a||6!==a.length)return a;if(a[0]>a[1])return a;var o=[];Ol.getCorners(a,o),e.computeMatrix();var i=new Float64Array(16);Object(Yo.i)(i,t.matrix),o.forEach((function(e){return Object(Fo.q)(e,e,i)}));var l=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return l.map((function(e,t){return t%2==0?o.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):o.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}if(null!==t.property){var r=t.property.getMTime();e=r>e?r:e,null!==t.property.getRGBTransferFunction()&&(e=(r=t.property.getRGBTransferFunction().getMTime())>e?r:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var ey={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ey,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),$b(e,t)}var ny={newInstance:ln.c.newInstance(ty,"vtkImageSlice"),extend:ty};function ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ay(e){for(var t=1;ti&&(i=g,s=r[c]<0,l=c)}if(1!==i){var u="IJKXYZ"[t.slicingMode],d="IJKXYZ"[l];ly("Unaccurate slicing along ".concat(u," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(i,"% aligned). ")+"Necessitates slice reformat that is not yet implemented. You can switch the slicing mode on your mapper to do IJK slicing instead.")}t.closestIJKAxis={ijkMode:l,flip:s}}function r(n,r){var a=e.getInputData(),o=a.getExtent(),i=[o[0],o[2],o[4]],l=e.getClosestIJKAxis().ijkMode,s=t.slice;l!==t.slicingMode&&(s=e.getSliceAtPosition(s)),i[l]+=s;var c=[0,0,0];a.indexToWorld(i,c),i[l]+=1;var g=[0,0,0];a.indexToWorld(i,g),g[0]-=c[0],g[1]-=c[1],g[2]-=c[2],Object(Fo.l)(g,g);var u=tl.a.intersectWithLine(n,r,c,g);if(u.intersection){var d=u.x,m=[0,0,0];return a.worldToIndex(d,m),{t:u.t,absoluteIJK:m}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,a=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=a.getBounds();switch(t.slicingMode){case sy.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case sy.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case sy.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var i=[0,0,0];a.worldToIndex(r,i);var l=a.getExtent(),s=0;switch(e.getClosestIJKAxis().ijkMode){case sy.I:s=Object(Xo.a)(i[0],l[0],l[1]),s=Math.round(s);break;case sy.J:s=Object(Xo.a)(i[1],l[2],l[3]),s=Math.round(s);break;case sy.K:s=Object(Xo.a)(i[2],l[4],l[5]),s=Math.round(s);break;default:return 0}return s},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case sy.I:case sy.J:case sy.K:var a=e.getSliceAtPosition(r);e.setSlice(a);break;case sy.X:e.setSlice(r[0]);break;case sy.Y:e.setSlice(r[1]);break;case sy.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(sy.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(sy.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(sy.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(sy.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(sy.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(sy.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),a=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case sy.X:n[0]=1;break;case sy.Y:n[1]=1;break;case sy.Z:n[2]=1;break;case sy.I:Object(Xo.k)(a,[1,0,0],n);break;case sy.J:Object(Xo.k)(a,[0,1,0],n);break;case sy.K:Object(Xo.k)(a,[0,0,1],n)}return n},e.setSlicingMode=function(r){t.slicingMode!==r&&(t.slicingMode=r,e.getInputData()&&n(),e.modified())},e.getClosestIJKAxis=function(){return void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==sy.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return Object(Xo.j)();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),a=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(a!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),a){case sy.I:r[0]=o,r[1]=o;break;case sy.J:r[2]=o,r[3]=o;break;case sy.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getInputData();if(!a)return Object(Xo.j)();var o=a.getExtent(),i=e.getClosestIJKAxis(),l=i.ijkMode,s=n;switch(l!==t.slicingMode&&(s=e.getSliceAtPosition(n)),l){case sy.I:o[0]=s-r,o[1]=s+r;break;case sy.J:o[2]=s-r,o[3]=s+r;break;case sy.K:o[4]=s-r,o[5]=s+r}return a.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=[Math.round(a.absoluteIJK[0]),Math.round(a.absoluteIJK[1]),Math.round(a.absoluteIJK[2])];return i[0]o[1]||i[1]o[3]||i[2]o[5]?null:{t:a.t,ijk:i}}return null},e.intersectWithLineForCellPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=a.absoluteIJK,l=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])];if(l[0]o[1]-1||l[1]o[3]-1||l[2]o[5]-1)return null;var s=[i[0]-l[0],i[1]-l[1],i[2]-l[2]];return{t:a.t,ijk:l,pCoords:s}}return null}}var gy={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:sy.NONE,closestIJKAxis:{ijkMode:sy.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gy,n),_g.extend(e,t,n),ln.c.get(e,t,["slicingMode"]),ln.c.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),ln.c.setGetArray(e,t,["customDisplayExtent"],4),Vu.implementCoincidentTopologyMethods(e,t),cy(e,t)}var dy=ay(ay(ay({newInstance:ln.c.newInstance(uy,"vtkImageMapper"),extend:uy},oy),iy),pd);var my=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.actor=ny.newInstance({visibility:!1}),t.mapper=dy.newInstance(),t.actor.setMapper(t.mapper),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addActor(e.actor),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&this.view.renderer.removeActor(this.actor),this.actor.delete(),this.actor=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.actor,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange,s=e.iSlice,c=e.jSlice,g=e.kSlice,u=e.xSlice,d=e.ySlice,m=e.zSlice;if(!r||t&&r===t.actor||this.actor.set(r),!a||t&&a===t.property||this.actor.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var f,p=Mb.getPresetByName(i);this.lookupTable.applyColorMap(p),(f=this.lookupTable).setMappingRange.apply(f,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?this.dataChanged():(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),!s||t&&s===t.iSlice||this.mapper.setISlice(s),!c||t&&c===t.jSlice||this.mapper.setJSlice(c),!g||t&&g===t.kSlice||this.mapper.setKSlice(g),!u||t&&u===t.xSlice||this.mapper.setXSlice(u),!d||t&&d===t.ySlice||this.mapper.setYSlice(d),!m||t&&m===t.zSlice||this.mapper.setZSlice(m),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.actor.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.actor.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();my.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},my.propTypes={id:Rs.a.string,mapper:Rs.a.object,actor:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),iSlice:Rs.a.number,jSlice:Rs.a.number,kSlice:Rs.a.number,xSlice:Rs.a.number,ySlice:Rs.a.number,zSlice:Rs.a.number,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var fy=my,py=Object.create(null);[{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){py[e.Name]=e}));var Cy=Object.keys(py);Cy.sort();var Iy={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(py[e.Name]||(Cy.push(e.Name),Cy.sort()),py[e.Name]=e)},removePresetByName:function(e){var t=Cy.indexOf(e);t>-1&&Cy.splice(t,1),delete py[e]},getPresetByName:function(e){return py[e]},rgbPresetNames:Cy},hy=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments[3];return new Promise((function(o,i){var l=n._messageId++;n._messages.set(l,[o,i,a]),n._worker.postMessage([l,t,e],r||[])}))}},{key:"postMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return new Promise((function(a,o){var i=t._messageId++;t._messages.set(i,[a,o,r]),t._worker.postMessage([i,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+l||uo+s?d===s?o:o+d/(d-s)*(u-o-s):-d===s?o:o-d/(d+s)*(u-o-s))-o)/d,f=Math.exp(-4*m*m),p=1-m*m,C=1,I=i*(c<1?c*p+(1-c)*f:(2-c)*p+(c-1)*C);I>n[g]&&(n[g]=I)}}return n}function Xy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},a=t[3],o=t[2]/(n.length-1),i=!!r.fillStyle,l=a+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var s=0;s3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function Ny(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,Object(Ao.a)(n));return n.indexOf(r)}function Hy(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,a=n.offsetY;t&&n.preventDefault(),e(r,a)}}function Yy(){xy.filter((function(e){return e.ready})).forEach((function(e){e.callbacks.forEach((function(t){t.touches===e.touches&&t.clicks===e.count&&t.action.apply(t,Object(Ao.a)(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(a){var o=a.target.getBoundingClientRect(),i=Array.prototype.map.call(a.touches,(function(e){return[e.pageX-o.left,e.pageY-o.top]})).reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]).map((function(e){return e/a.touches.length}));"touchstart"===a.type?(clearTimeout(xy[e].timeout),xy[e].ts=a.timeStamp,xy[e].singleTouche=i,xy[e].touches=a.touches.length):"touchmove"===a.type?(xy[e].ts=0,xy[e].count=0,xy[e].ready=!1):"touchend"===a.type&&(a.timeStamp-xy[e].ts1&&void 0!==arguments[1]?arguments[1]:{},o=r.numberOfBinToConsiders,i=void 0===o?1:o,l=r.numberOfBinsToSkip,s=void 0===l?1:l,c=r.numberOfComponents,g=void 0===c?1:c,u=r.component,d=void 0===u?0:u;t.histogram=null,t.histogramArray=n,t.dataRange=Object(Xo.b)(n,d,g);var m=Object(a.a)(t.dataRange,2),f=m[0],p=m[1],C=4,I=Math.floor(n.length/C)||1;I+=I%g;for(var h=0,b=[],y=[];hr;)a.shift();for(var l=a.reduce((function(e,t){return e+t}),0)/r,c=0,g=t.histogram.length;c1){for(var c=t.style.iconSize+t.style.padding,g=c,u=0;r>g;)u+=1,g+=c;switch(u){case 0:var d=e.addGaussian(0,1,.1,0,0),m=t.gaussians[d],f=ky({},m),p=Ty.adjustPosition;t.activeGaussian=d,t.selectedGaussian=d,ln.c.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:p,gaussian:m,originalGaussian:f}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(l<0||l>1||s<0||s>1)t.selectedGaussian=-1,t.dragAction=null;else{var C=Ny(l,t.gaussians);C!==t.selectedGaussian&&(t.selectedGaussian=C,e.modified())}return!0},e.onHover=function(n,r){var o=20/t.canvas.height,i=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),l=Object(a.a)(i,2),s=l[0],c=l[1],g=Oy(n,r,t.graphArea),u=Object(a.a)(g,1)[0],d=s<0?t.selectedGaussian:Ny(s,t.gaussians);t.canvas.style.cursor="default";var m=t.gaussians[d];if(t.enableRangeZoom&&u>=0&&rt.rangeZoom[1]-f?t.canvas.style.cursor=Wy.adjustZoom:t.canvas.style.cursor=Wy.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:Ty.adjustZoom}}else if(m&&u>=0){var p,C=1-c;p=C>m.height+o?"adjustPosition":C>m.height-o?Math.abs(s-m.position).5*m.height+o?"adjustPosition":C>.5*m.height-o?Math.abs(s-m.position)o?"adjustPosition":"adjustWidth",t.canvas.style.cursor=Wy[p];var I=Ty[p],h=ky({},m);t.dragAction={originalXY:[s,c],action:I,gaussian:m,originalGaussian:h}}return d!==t.activeGaussian&&(t.activeGaussian=d,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);t.gaussianSide=0;var i=t.gaussians[o];return i&&(t.gaussianSide=i.position-a),o!==t.selectedGaussian&&a>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];(0,t.dragAction.action)(l,s,ky({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=Jy(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=function(n,r){return t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0},e.onLeave=function(n,r){return e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0},e.onAddGaussian=function(n,r){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];return l>=0&&e.addGaussian(l,1-s,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);return a>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=xy.length,t=arguments.length,n=new Array(t),r=0;r1){var c=Math.round(t.style.iconSize/2-t.style.strokeWidth),g=Math.round(c+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(g-i/2,g,c,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g),e.stroke(),e.moveTo(g-i/2,g-c+t.style.strokeWidth+2),e.lineTo(g-i/2,g+c-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(g-i/2,g+i/2+t.style.iconSize,c,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g+i/2+t.style.iconSize),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&Xy(e,l,Ky(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),Xy(e,l,Ky(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var u=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){var a=r||document.createElement("canvas");a.setAttribute("width",t),a.setAttribute("height",256);for(var o=a.getContext("2d"),i=e.getUint8Table(n[0],n[1],t,4),l=o.getImageData(0,0,t,256),s=0;s<256;s++)l.data.set(i,4*s*t);for(var c=256*t*4,g=4*t,u=3;u0&&(a=Math.min(a,i)),t.opacities[i]>0&&(o=Math.max(o,i));return[n[0]+a*r,n[0]+o*r]};var n=e.setEnableRangeZoom;e.setEnableRangeZoom=function(e){var r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};var r=e.setRangeZoom;e.setRangeZoom=function(){var e=r.apply(void 0,arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((function(){return e.render()})),e.setSize.apply(e,Object(Ao.a)(t.size))}var Dy={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),ln.c.obj(e,t),ln.c.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),ln.c.setGetArray(e,t,["rangeZoom"],2),ln.c.get(e,t,["size","canvas","gaussians"]),ln.c.event(e,t,"opacityChange"),ln.c.event(e,t,"animation"),ln.c.event(e,t,"zoomChange"),Ly(e,t)}var Uy=ky({newInstance:ln.c.newInstance(Ey,"vtkPiecewiseGaussianWidget"),extend:Ey},My),zy='',_y='',jy='';var Qy={container:"VolumeController-module_container__2HNSO",line:"VolumeController-module_line__3rtqL",button:"VolumeController-module_button__2T-xL",sliderEntry:"VolumeController-module_sliderEntry__27XSC",sliderIcon:"VolumeController-module_sliderIcon__U8YAZ VolumeController-module_button__2T-xL",slider:"VolumeController-module_slider__3PS68",piecewiseEditor:"VolumeController-module_piecewiseEditor__2_jav",select:"VolumeController-module_select__7mbfS",presets:"VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadow:"VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonDarkBG:"VolumeController-module_buttonDarkBG__3W1zO VolumeController-module_button__2T-xL",presetsDarkBG:"VolumeController-module_presetsDarkBG__2ZI2W VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowDarkBG:"VolumeController-module_shadowDarkBG__WHYZ- VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonBrightBG:"VolumeController-module_buttonBrightBG__2dstz VolumeController-module_button__2T-xL",presetsBrightBG:"VolumeController-module_presetsBrightBG__3_VRC VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowBrightBG:"VolumeController-module_shadowBrightBG__YCHpe VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".VolumeController-module_container__2HNSO {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n justify-content: space-between;\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(128, 128, 128, 0.5);\n border-radius: 5px;\n padding: 2px;\n border: 0.5px solid black;\n box-sizing: border-box;\n}\n\n.VolumeController-module_line__3rtqL {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.VolumeController-module_button__2T-xL {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module_button__2T-xL svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module_sliderEntry__27XSC {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module_sliderIcon__U8YAZ {\n height: 1rem;\n}\n\n.VolumeController-module_slider__3PS68 {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module_piecewiseEditor__2_jav {\n flex: 1;\n}\n\n.VolumeController-module_select__7mbfS {\n flex: 1;\n border: none;\n background: transparent;\n color: white;\n border: none;\n -moz-appearance: none;\n width: 5px;\n}\n\n.VolumeController-module_select__7mbfS select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module_presets__1h4j5 {\n}\n\n.VolumeController-module_shadow__29K9t {\n}\n\n.VolumeController-module_buttonDarkBG__3W1zO {\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W {\n color: white;\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W option {\n color: black;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- {\n color: white;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- option {\n color: black;\n}\n\n.VolumeController-module_buttonBrightBG__2dstz {\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC {\n color: black;\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC option {\n color: white;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe {\n color: black;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe option {\n color: white;\n}\n");var qy=Iy.rgbPresetNames.map((function(e){return'")}));function $y(e,t){function n(){var e=!!Number(t.el.querySelector(".js-shadow").value);t.actor.getProperty().setShade(e),t.renderWindow.render()}function r(){var e=t.actor.getMapper().getInputData();if(e){var n=e.getPointData().getScalars()||e.getPointData().getArrays()[0],r=t.rescaleColorMap?t.colorDataRange:n.getRange(),a=Iy.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(a),o.setMappingRange.apply(o,Object(Ao.a)(r)),o.updateRange(),t.renderWindow.render()}}function a(){var e=Number(t.el.querySelector(".js-spacing").value),n=t.actor.getMapper().getInputData(),r=.7*Math.sqrt(n.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.actor.getMapper().setSampleDistance(r*Math.pow(2,3*e-1.5)),t.renderWindow.render()}function o(){var e=Number(t.el.querySelector(".js-edge").value);if(0===e)t.actor.getProperty().setUseGradientOpacity(0,!1);else{var n=t.actor.getMapper().getInputData(),r=(n.getPointData().getScalars()||n.getPointData().getArrays()[0]).getRange();t.actor.getProperty().setUseGradientOpacity(0,!0);var a=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*a*a),t.actor.getProperty().setGradientOpacityMaximumValue(0,1*(r[1]-r[0])*e*e)}t.renderWindow.render()}t.classHierarchy.push("vtkVolumeController"),t.el=document.createElement("div"),t.el.setAttribute("class",Qy.container),t.widget=Uy.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(i,l,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(l),e.setRenderWindow(i);var u=t.actor.getMapper().getInputData(),d=u.getPointData().getScalars()||u.getPointData().getArrays()[0],m=t.actor.getProperty().getRGBTransferFunction(0),f=t.actor.getProperty().getScalarOpacity(0),p=s?"DarkBG":"BrightBG",C={};["button","presets","shadow"].forEach((function(e){C[e]=Qy["".concat(e).concat(p)]})),t.el.innerHTML='\n
\n
').concat(zy,'
\n \n \n
\n
\n
\n
').concat(jy,'
\n \n
\n
\n
').concat(_y,'
\n \n
\n
\n
\n ');var I=t.el.querySelector(".js-button"),h=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),y=t.el.querySelector(".js-spacing"),v=t.el.querySelector(".js-edge"),Z=t.el.querySelector(".js-pwf");t.widget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),t.widget.addGaussian(.5,1,.5,.5,.4),t.widget.setDataArray(d.getData()),t.widget.setColorTransferFunction(m),t.widget.applyOpacity(f),t.widget.setContainer(Z),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),I.addEventListener("click",e.toggleVisibility),h.addEventListener("change",n),b.addEventListener("change",r),y.addEventListener("input",a),v.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(f),t.colorDataRange=t.widget.getOpacityRange(),t.rescaleColorMap&&r(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),t.widget.onAnimation((function(e){e?t.renderWindow.getInteractor().requestAnimation(t.widget):(t.renderWindow.getInteractor().cancelAnimation(t.widget),t.renderWindow.render())})),m.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),h.value=Number(c)?"1":"0",b.value=g,n(),r(),a(),o()},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.el),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.el),e.modified())};var i=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!i(e)&&(r(),!0)},e.toggleVisibility=function(){e.setExpanded(!e.getExpanded())},e.setExpanded=function(e){var n=t.el.querySelectorAll(".js-toggle"),r=n.length;if(t.expanded=e,t.expanded)for(;r--;)n[r].style.display="flex";else for(;r--;)n[r].style.display="none"},e.getExpanded=function(){return t.expanded},e.setSize=t.widget.setSize,e.render=t.widget.render,e.onAnimation=t.widget.onAnimation,e.onModified(e.render),e.setSize.apply(e,Object(Ao.a)(t.size))}var ev={size:[600,300],expanded:!0,rescaleColorMap:!1};function tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ev,n),ln.c.obj(e,t),ln.c.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),ln.c.get(e,t,["widget"]),$y(e,t)}var nv={newInstance:ln.c.newInstance(tv,"vtkVolumeController"),extend:tv};var rv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;ps(this,n),(r=t.call(this,e)).subscriptions=[],r.containerRef=Bs.a.createRef();var a=e.size,o=e.rescaleColorMap;return r.controller=nv.newInstance({size:a,rescaleColorMap:o}),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return Bs.a.createElement(_h.Consumer,null,(function(n){return e.view=t,e.representation=n,Bs.a.createElement("div",{ref:e.containerRef})}))}))}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t,n){var r;(r=this.controller).setSize.apply(r,fs(this.props.size)),this.controller.render()}},{key:"componentWillUnmount",value:function(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.controller.setContainer(null),this.controller.delete(),this.controller=null}},{key:"init",value:function(){var e=this,t=this.containerRef.current,n=this.view,r=n.renderWindow,a=n.props,o=this.representation.volume,i=a.background[0]+a.background[1]+a.background[2]<1.5;if(o&&o.getMapper()&&o.getMapper().getInputData()){var l=o.getMapper().getInputData();this.controller.setContainer(t),this.controller.setupContent(r,o,i),this.controller.render(),this.view.resetCamera(),this.view.renderView(),this.subscriptions.push(l.onModified((function(){return e.onDataChange()}),-1))}else setTimeout((function(){return e.init()}),100)}},{key:"onDataChange",value:function(){var e=this.controller.getWidget();if(this.representation&&this.representation.volume){var t=this.representation.volume.getMapper().getInputData(),n=t.getPointData().getScalars()||t.getPointData().getArrays()[0];e.setDataArray(n.getData())}}}]),n}();rv.defaultProps={size:[400,150],rescaleColorMap:!0},rv.propTypes={id:Rs.a.string,size:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool};var av=rv;function ov(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getPointData()},e.children)}))}ov.defaultProps={},ov.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var iv=ov,lv={int32:Int32Array,int16:Int16Array,int8:Int8Array,uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array,float32:Float32Array,float64:Float64Array};function sv(e,t){if(!e)return null;if(Array.isArray(e))return t.from(e);if(e.dtype){var n=e.bvals,r=e.dtype,a=Ki.toArrayBuffer(n);return new lv[r](a)}return e}var cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).polydata=Go.a.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(jh.Provider,{value:e},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.polydata.delete(),this.polydata=null}},{key:"update",value:function(e,t){var n=e.connectivity,r=e.points,a=e.verts,o=e.lines,i=e.polys,l=e.strips,s=!1,c=r&&r.length>196608?Uint32Array:Uint16Array;if(!r||t&&r===t.points||(this.polydata.getPoints().setData(sv(r,Float64Array),3),s=!0),!a||t&&a===t.verts||(this.polydata.getVerts().setData(sv(a,c)),s=!0),!o||t&&o===t.lines||(this.polydata.getLines().setData(sv(o,c)),s=!0),!i||t&&i===t.polys||(this.polydata.getPolys().setData(sv(i,c)),s=!0),!l||t&&l===t.strips||(this.polydata.getStrips().setData(sv(l,c)),s=!0),n&&(n||!t||n!==t.connectivity)){var g=r.length/3;switch(n){case"points":var u=new Uint32Array(g+1);u[0]=g;for(var d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.event(e,t,"DataAvailable"),mv(e,t)}),"vtkTrivialProducer"),pv={},Cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(){return ps(this,n),t.apply(this,arguments)}return Is(n,[{key:"getTrivialProducer",value:function(){var e=pv[this.props.name];return e||(e=fv(),pv[this.props.name]=e),e}},{key:"render",value:function(){var e=this;return this.update(),Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.getTrivialProducer()},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}))}},{key:"update",value:function(){var e=this;this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.subscription=this.getTrivialProducer().onDataAvailable((function(){e.dataAvailable()}))}},{key:"dataAvailable",value:function(){this.downstream&&this.downstream.setInputConnection(this.getTrivialProducer().getOutputPort(),this.props.port),this.validData||(this.validData=!0,this.getTrivialProducer().invokeDataAvailable()),this.representation&&this.representation.dataAvailable()}},{key:"dataChanged",value:function(){this.representation&&this.representation.dataChanged()}}]),n}();Cv.defaultProps={port:0,name:"shared"},Cv.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Iv=Cv;function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*a,10):t.tickTextStyle.fontSize=Math.max(16*a,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var i=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var l=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];i+.4*l>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=i+.4*l,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=i+1.4*l,t.boxPosition=[.99-t.boxSize[0],-.92]),t.boxSize[1]=Math.max(1.2,Math.min(1.84/r,1.84))}else{t.axisTitlePixelOffset=2*t.tickTextStyle.fontSize,t.tickLabelPixelOffset=.5*t.tickTextStyle.fontSize;var s=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],c=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],g=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*g*(t.ticks.length+3))),t.boxSize[1]=s+c,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)},e.update=function(){if(t.scalarsToColors&&t.visibility){if(t.barMapper.setLookupTable(t.scalarsToColors),t.forceUpdate||Math.max(t.scalarsToColors.getMTime(),e.getMTime())>t.lastRebuildTime.getMTime()){var n=t.scalarsToColors.getMappingRange();t.lastTickBounds=Object(Ao.a)(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=TI().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var a=r.tickFormat(5);if(t.tickStrings=t.ticks.map(a),t.automated)e.computeAndApplyAutomatedSettings();else{var o=e.updateTextureAtlas();e.recomputeBarSegments(o)}t.forceViewUpdate=!0,t.lastRebuildTime.modified(),t.forceUpdate=!1}(t.forceViewUpdate||t.camera.getMTime()>t.lastRedrawTime.getMTime())&&(e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRedrawTime.modified(),t.forceViewUpdate=!1)}},e.completedImage=function(r){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,n=t.nextAtlas,t.nextAtlas=null,r&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,a=0,o=1;Rv(t.tmContext,t.axisTextStyle);var i=t.tmContext.measureText(t.axisLabel),l={height:i.actualBoundingBoxAscent+2,startingHeight:o,width:i.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,l),o+=l.height,a=l.width,n.titleWidth=l.width,n.titleHeight=l.height,n.tickWidth=0,n.tickHeight=0,Rv(t.tmContext,t.tickTextStyle);for(var s=[].concat(Object(Ao.a)(t.tickStrings),["NaN","Below","Above"]),c=0;ct.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var a=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){var o=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-a,t.barSize[1]=t.boxSize[1]-o}else{var i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-i-a,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+a,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var l=(2*e.tickWidth-8)/t.lastSize[0],s=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-s-n,t.barPosition[1]=t.boxPosition[1],r[0]=l}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var a=[0,0],o=t.vertical?1:0,i=t.vertical?.01:.02;function l(e,n){t.barSegments.push({corners:[[].concat(a),[a[0]+r[0],a[1]],[a[0]+r[0],a[1]+r[1]],[a[0],a[1]+r[1]]],scalars:n,title:e}),a[o]+=r[o]+i}"function"==typeof t.scalarsToColors.getNanColor&&l("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&l("Below",[-.1,-.1,-.1,-.1]);var s="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();a[o]+=i;var c=r[o];r[o]=s?1-2*i-r[o]-a[o]:1-i-a[o],l("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),s&&(r[o]=c,a[o]+=i,l("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,t,r,a,o,i,l){var s=n.get(e);if(s){var c=l.ptIdx,g=l.cellIdx;vv[0]=t[0],vv[1]=t[1],vv[2]=t[2],o[0]<-.5?Object(Fo.b)(Av,r,o[0]*i-s.width):o[0]>.5?Object(Fo.b)(Av,r,o[0]*i):Object(Fo.b)(Av,r,o[0]*i-s.width/2),Object(Fo.g)(vv,vv,Av),Object(Fo.b)(Av,a,o[1]*i-s.height/2),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[0],l.tcoords[2*c+1]=s.tcoords[1],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[2],l.tcoords[2*c+1]=s.tcoords[3],c++,Object(Fo.b)(Av,a,s.height),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[4],l.tcoords[2*c+1]=s.tcoords[5],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.a)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[6],l.tcoords[2*c+1]=s.tcoords[7],c++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-3,l.polys[4*g+3]=c-2,g++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-2,l.polys[4*g+3]=c-1,l.ptIdx+=4,l.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n),Object(Yo.g)(Vv,n);var r=t.lastSize;Av[0]=0,Av[1]=0,Av[2]=-.99,Object(Fo.q)(vv,Av,Vv),Av[0]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Sv,Zv,vv),Av[0]-=.1,Av[1]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Bv,Zv,vv);for(var a=0;a<3;a++)Sv[a]/=.05*r[0],Bv[a]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,i=4*o,l=2*o,s=new Float64Array(3*i),c=new Uint16Array(4*l),g=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:c,points:s,tcoords:g},d=t.vertical?0:1,m=t.vertical?1:0,f=[0,1];t.vertical?(t.topTitle?(Av[0]=t.boxPosition[0]+.5*t.boxSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,[0,1],t.axisTitlePixelOffset,u)):(Av[0]=t.barPosition[0]+t.barSize[0],Av[1]=t.barPosition[1]+.5*t.barSize[1],Object(Fo.q)(vv,Av,Vv),Object(Fo.b)(Sv,Sv,-1),e.createPolyDataForOneLabel(t.axisLabel,vv,Bv,Sv,[0,-1],t.axisTitlePixelOffset,u),Object(Fo.b)(Sv,Sv,-1)),f=[-1,0]):(Av[0]=t.barPosition[0]+.5*t.barSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,f,t.axisTitlePixelOffset,u)),Gv[2]=-.99,Gv[d]=t.barPosition[d]+(.5*f[d]+.5)*t.barSize[d],Gv[m]=t.barPosition[m]+.5*t.barSize[m];for(var p=null,C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kv(n)),aC.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=Pu.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=Go.a.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=aC.newInstance(),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},ln.c.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},ln.c.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmActor.setProperty(e.getProperty()),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.mapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,a,o,i){t.camera=r,t.lastSize[0]===i[0]&&t.lastSize[1]===i[1]||(t.lastSize[0]=i[0],t.lastSize[1]=i[1],t.lastAspectRatio=i[0]/i[1],t.forceUpdate=!0),e.update()})),ln.c.setGet(e,t,["automated","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),ln.c.get(e,t,["axisTextStyle","tickTextStyle"]),ln.c.getArray(e,t,["boxPosition","boxSize"]),ln.c.setArray(e,t,["boxPosition","boxSize"],2),wv(e,t)}var xv={newInstance:ln.c.newInstance(Wv,"vtkScalarBarActor"),extend:Wv};var Tv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).validData=!1,r.currentVisibility=!0,r.actor=aC.newInstance({visibility:!1,representationId:e.id}),r.lookupTable=Ib.newInstance(),r.mapper=Pu.newInstance({lookupTable:r.lookupTable,useLookupTableScalarRange:!0}),r.actor.setMapper(r.mapper),r.cubeAxes=qI.newInstance({visibility:!1,dataBounds:[-1,1,-1,1,-1,1]}),r.cubeAxes.getActors().forEach((function(e){return(0,e.setVisibility)(!1)})),r.scalarBar=xv.newInstance(),r.scalarBar.setScalarsToColors(r.lookupTable),r.scalarBar.setVisibility(!1),r.subscriptions=[],r.subscriptions.push(r.mapper.onModified((function e(){if(r.mapper.getInputData()){1===r.subscriptions.length&&r.subscriptions.push(r.mapper.getInputData().onModified(e));var t=r.mapper.getInputData().getBounds();t[0]t.bounds[1]&&(t.bounds[1]=g[0]),g[1]>t.bounds[3]&&(t.bounds[3]=g[1]),g[2]>t.bounds[5]&&(t.bounds[5]=g[2]);var R=new Float32Array(I,36*b,9);Dl(R,y),zl(R,R),Ul(R,R)}var w=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),t.colorArray=null;var k=e.getLookupTable();k&&w&&(k.build(),t.colorArray=k.mapScalars(w,t.colorMode,0)),t.buildTime.modified()}},e.getPrimitiveCount=function(){var t=e.getInputData(1),n=e.getInputData().getPoints().getNumberOfValues()/3;return{points:n*t.getPoints().getNumberOfValues()/3,verts:n*(t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells()),lines:n*(t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells()),triangles:n*(t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells())}}}var Pv={orient:!0,orientationMode:Nv.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:Hv.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function Kv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pv,n),Pu.extend(e,t,n),ln.c.algo(e,t,2,0),t.buildTime={},ln.c.obj(t.buildTime,{mtime:0}),t.boundsTime={},ln.c.obj(t.boundsTime,{mtime:0}),ln.c.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),ln.c.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),Fv(e,t)}var Mv=function(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};return{getArrays:function(){return{input:e.augmentInputArrays(t,n.map((function(e){return{location:t,name:e}}))),output:[{location:t,name:r,attribute:"outputAttributeType"in o?o.outputAttributeType:ti.a.SCALARS,numberOfComponents:"numberOfOutputComponents"in o?o.numberOfOutputComponents:1}]}},evaluate:function(e,t){var n=new Array(e.length),r=e.map((function(e,t){var r=e.getNumberOfComponents(),a=e.getData();return 1===r?function(e){return a[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],i=o.getData(),l=o.getNumberOfComponents(),s=new Array(l);if(1===l)i.forEach((function(e,t){i[t]=a.apply(void 0,Object(Ao.a)(r.map((function(e){return e(t)}))).concat([t,s]))}));else for(var c=o.getNumberOfTuples(),g=function(e){s=a.apply(void 0,Object(Ao.a)(r.map((function(t){return t(e)}))).concat([e,s])),o.setTuple(e,s)},u=0;u4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,a,o))},e.prepareArrays=function(e,t,n){var r=[],a=[];return e.input.forEach((function(e){if(e.location===Dh.b.COORDINATE)r.push(t.getPoints());else{var n=[[Dh.b.UNIFORM,function(e){return e.getFieldData()}],[Dh.b.POINT,function(e){return e.getPointData()}],[Dh.b.CELL,function(e){return e.getCellData()}],[Dh.b.VERTEX,function(e){return e.getVertexData()}],[Dh.b.EDGE,function(e){return e.getEdgeData()}],[Dh.b.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),a="location"in e&&e.location in n?n[e.location](t):null;a?e.name?r.push(a.getArrayByName(e.name)):"index"in e?r.push(a.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Dh.b.UNIFORM?r.push(a.getActiveAttribute(e.attribute)):(rZ('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rZ('Specifier "'.concat(JSON.stringify(e),'" did not provide a usable location.')),r.push(null))}})),e.output.forEach((function(e){var r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),aZ(e,t)}var lZ={newInstance:ln.c.newInstance(iZ,"vtkCalculator"),extend:iZ};var sZ=Nl.a.FieldDataTypes,cZ=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).calculator=lZ.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.arrays,a=t.location,o=t.formula;return this.calculator.setFormulaSimple(sZ[a],r,n,o),Bs.a.createElement(qh.Consumer,null,(function(t){return e.downstream||(t.setInputConnection(e.calculator.getOutputPort(),e.props.port),e.downstream=t),Bs.a.createElement(qh.Provider,{value:e.calculator},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}},{key:"componentWillUnmount",value:function(){this.calculator.delete(),this.calculator=null}}]),n}();cZ.defaultProps={port:0,name:"scalars",location:"POINT",arrays:[],formula:function(e){return e[0]}},cZ.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,location:Rs.a.string,arrays:Rs.a.arrayOf(Rs.a.string),formula:Rs.a.func,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var gZ=cZ;function uZ(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getCellData()},e.children)}))}uZ.defaultProps={},uZ.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var dZ={VolumeRepresentation:Db,SliceRepresentation:fy,VolumeController:av,PointData:iv,PolyData:gv,Reader:dv,ShareDataSet:Iv,View:nb,GeometryRepresentation:Jv,GlyphRepresentation:Dv,ImageData:Uv,DataArray:_v,FieldData:Qv,Algorithm:tZ,Calculator:gZ,CellData:uZ};function mZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r="Float32Array"),console.log("nbComponents",t),Bs.a.createElement(Jv,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,showCubeAxes:e.showCubeAxes,cubeAxesStyle:e.cubeAxesStyle,showScalarBar:e.showScalarBar,scalarBarTitle:e.scalarBarTitle,scalarBarStyle:e.scalarBarStyle},Bs.a.createElement(gv,{points:e.xyz,connectivity:"points"},t&&Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}mZ.defaultProps={xyz:[0,0,0],colorMapPreset:"erdc_rainbow_bright",colorDataRange:[0,1],showCubeAxes:!1,showScalarBar:!1,scalarBarTitle:""},mZ.propTypes={id:Rs.a.string,xyz:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),colorMapPreset:Rs.a.string,colorDataRange:Rs.a.arrayOf(Rs.a.number),property:Rs.a.object,showCubeAxes:Rs.a.bool,cubeAxesStyle:Rs.a.object,showScalarBar:Rs.a.bool,scalarBarTitle:Rs.a.string,scalarBarStyle:Rs.a.object};var fZ=mZ;function pZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r=e.scalarsType),Bs.a.createElement(Db,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,mapper:e.mapper,volume:e.volume},e.volumeController&&Bs.a.createElement(av,{rescaleColorMap:e.rescaleColorMap,size:e.controllerSize}),Bs.a.createElement(Uv,{dimensions:e.dimensions,origin:e.origin,spacing:e.spacing},Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}pZ.defaultProps={scalarsType:"Float32Array",colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto",volumeController:!0,rescaleColorMap:!0,controllerSize:[400,150]},pZ.propTypes={id:Rs.a.string,dimensions:Rs.a.arrayOf(Rs.a.number),spacing:Rs.a.arrayOf(Rs.a.number),origin:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),scalarsType:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,volumeController:Rs.a.bool,controllerSize:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string])};var CZ={PointCloudRepresentation:fZ,VolumeDataRepresentation:pZ},IZ=dZ.VolumeRepresentation,hZ=dZ.SliceRepresentation,bZ=dZ.VolumeController,yZ=dZ.PointData,vZ=dZ.PolyData,ZZ=dZ.Reader,AZ=dZ.ShareDataSet,GZ=dZ.View,SZ=dZ.GeometryRepresentation,BZ=dZ.GlyphRepresentation,VZ=dZ.ImageData,RZ=dZ.DataArray,wZ=dZ.FieldData,kZ=dZ.Algorithm,WZ=dZ.Calculator,xZ=dZ.CellData,TZ=CZ.PointCloudRepresentation,JZ=CZ.VolumeDataRepresentation,XZ={ViewContext:zh,RepresentationContext:_h,DataSetContext:jh,FieldsContext:Qh,DownstreamContext:qh},OZ={Core:dZ,Representations:CZ,Contexts:XZ};t.default=r}]]); +(window.webpackJsonpdash_vtk=window.webpackJsonpdash_vtk||[]).push([[0],[,,,function(e,t,n){"use strict";(function(e){var t=n(43),r=n(47),a=n(26),o=n(9);Object(o.c)("/$$rollup_base$$/node_modules/readable-stream/lib/_stream_duplex.js",(function(n,o){var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};n.exports=d;var l=t.a,s=r.a;Object(a.a)(d,l);for(var c=i(s.prototype),g=0;g0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(t);var n=[];function r(e){n[e]=null}function a(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++g),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?C("instance deleted - cannot call any method"):r&&r0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(l){var s=a?null:e["set".concat(y(l))];s&&Array.isArray(n[l])&&s.length>1?o=s.apply(void 0,Object(i.a)(n[l]))||o:s?o=s(n[l])||o:(-1!==["mtime"].indexOf(l)||r||I("Warning: Set value to model directly ".concat(l,", ").concat(n[l])),t[l]=n[l],o=!0)})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error("Cannot ShallowCopy ".concat(n.getClassName()," into ").concat(e.getClassName()));var a=n.get(),o=Object.keys(t).sort(),i=Object.keys(a).sort();i.forEach((function(e){var n=o.indexOf(e);-1===n?r&&p("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=a[e]})),o.length&&r&&p("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function B(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["get".concat(y(n.name))]=function(){return t[n.name]}:e["get".concat(y(n))]=function(){return t[n]}}))}var V={enum:function(e,t,n){return function(r){if("string"==typeof r){if(void 0!==n.enum[r])return t[n.name]!==n.enum[r]&&(t[n.name]=n.enum[r],e.modified(),!0);throw C("Set Enum with invalid argument ".concat(n,", ").concat(r)),new RangeError("Set Enum with invalid string argument")}if("number"==typeof r){if(t[n.name]!==r){if(-1!==Object.keys(n.enum).map((function(e){return n.enum[e]})).indexOf(r))return t[n.name]=r,e.modified(),!0;throw C("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw C("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function R(e){if("object"===Object(a.a)(e)){var t=V[e.type];if(t)return function(n,r){return t(n,r,e)};throw C("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(C("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function w(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["set".concat(y(n.name))]=R(n)(e,t):e["set".concat(y(n))]=R(n)(e,t)}))}function k(e,t,n){B(e,t,n),w(e,t,n)}function W(e,t,n){n.forEach((function(n){e["get".concat(y(n))]=function(){return[].concat(t[n])},e["get".concat(y(n),"ByReference")]=function(){return t[n]}}))}function x(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(y(n))]=function(){if(t.deleted)return C("instance deleted - cannot call any method"),!1;for(var o=arguments.length,i=new Array(o),l=0;l4&&void 0!==arguments[4]?arguments[4]:void 0;W(e,t,n),x(e,t,n,r,a)}var J=Symbol("Event abort");function X(e,t,n){var a=[],o=e.delete,i=1;function l(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return C("instance deleted - cannot call any method"),null;var o=i++;return a.push([o,e,r]),a.sort((function(e,t){return t[2]-e[2]})),s(o)},e.delete=function(){o(),a.forEach((function(e){return l(Object(r.a)(e,1)[0])}))}}function O(e,t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return e(r,n,t),Object.freeze(r)};return t&&l.a.register(t,n),n}function N(e){return e&&e.isA&&e.isA("vtkObject")}function H(e,t,n){var r,a=this;return function(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=function(e,n){t.keystore[e]=n},e.getKey=function(e){return t.keystore[e]},e.getAllKeys=function(){return Object.keys(t.keystore)},e.deleteKey=function(e){return delete t.keystore[e]},e.clearKeystore=function(){return e.getAllKeys().forEach((function(e){return delete t.keystore[e]}))}}var F=1;var P={algo:function(e,t,n,r){function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?C("instance deleted - cannot call any method"):r>=t.numberOfInputs?C("algorithm ".concat(e.getClassName()," only has ").concat(t.numberOfInputs," input ports. To add more input ports, use addInputData()")):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)C("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var a="algorithm ".concat(e.getClassName()," only has ");return a+="".concat(t.numberOfInputs),void C(a+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(C("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(l.a):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(l.a):t.inputConnection=[],t.output?t.output=t.output.map(l.a):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(l.a):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),a=r,o=1/0;a--;){if(!t.output[a])return!0;var i=t.output[a].getMTime();if(io)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=o,e.addInputData=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,a(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,o(e,t.numberOfInputs-1))},e.getInputData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=i,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return i(t)};return n.filter=e,n}),e.update=function(){var n=[];if(t.numberOfInputs)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:"Scalars";t.inputArrayToProcess.length1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],a=Number(e),o="B";a>n;)a/=n,o=r.pop();return"".concat(a.toFixed(t)," ").concat(o)},formatNumbersWithThousandSeparator:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=[],r=e;r>1e3;)n.push("000".concat(r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)},get:B,getArray:W,getCurrentGlobalMTime:function(){return g},getStateArrayMapFunc:A,isVtkObject:N,keystore:Y,newInstance:O,normalizeWheel:function(e){var t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}},obj:S,proxy:function(e,t){Y(e,t);var n=e.delete;t.proxyId="".concat(F++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),B(e,t,["proxyId","proxyGroup","proxyName"]),k(e,t,["proxyManager"]);var r={},a={};function i(e,t){a[t]||(a[t]=[]);for(var n=a[t],o=0;o0&&void 0!==arguments[0]?arguments[0]:"__root__";return a[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__root__",r=[],a=t.proxyId,o=l(n)||[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,a=[],i=0,l=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l)return null;var c=[],g=null;for(i=a.length;i--;){var u=a[i];u.instance===n?g=u:c.push(u)}if(!g)return null;var d=g.instance["get".concat(y(g.propertyName))]();if(!Z(d,r)||s){for(r=d,l=!0;c.length;){var m=c.pop();m.instance.set(Object(o.a)({},m.propertyName,r))}l=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function c(e,t){var n=[];for(i=a.length;i--;){var r=a[i];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(i))}for(;n.length;)a.splice(n.pop(),1)}function g(n,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.onModified(s),g=a[0];return a.push({instance:n,propertyName:r,subscription:l}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(Object(o.a)({},r,t.propertyLinkMap[e].value)):g&&s(g.instance,!0)),{unsubscribe:function(){return c(n,r)}}}function u(){for(;a.length;)a.pop().subscription.unsubscribe()}var d={bind:g,unbind:c,unsubscribe:u,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=function(){return s().map((function(e){return e.name}))},e.getPropertyByName=function(e){return s().find((function(t){return t.name===e}))},e.getPropertyDomainByName=function(e){return(r[e]||{}).domain},e.getProxySection=function(){return{id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}},e.delete=function(){for(var r=Object.keys(t.propertyLinkMap),a=r.length;a--;)t.propertyLinkMap[r[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},G((function(){if(t.links)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function a(e){for(var n=Object.keys(e),r=n.length;r--;){var a=n[r];t[a].set(e[a])}}t.this=e;for(var o=Object.keys(r),i=o.length,l=function(){var l=o[i];t[l]=r[l];var s=n[l];e["set".concat(y(l))]=function(n){n!==t[l]&&(t[l]=n,a(s[n]),e.modified())}};i--;)l();o.length&&B(e,t,o)},safeArrays:v,set:w,setArray:x,setGet:k,setGetArray:T,setImmediate:G,setLoggerFunction:function(e,t){f[e]&&(f[e]=t||m)},throttle:function(e,t){var n=!1,r=null;function a(){n=!1,null!==r&&(o.apply(void 0,Object(i.a)(r)),r=null)}function o(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(N(t)){if(a.indexOf(t)>=0)return r;a.push(t);var o=n(t);void 0!==o&&r.push(o);var i=t.get();Object.keys(i).forEach((function(t){var o=i[t];Array.isArray(o)?o.forEach((function(t){e(t,n,r,a)})):e(o,n,r,a)}))}return r},TYPED_ARRAYS:b,uncapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},VOID:u,vtkDebugMacro:p,vtkErrorMacro:C,vtkInfoMacro:function(){f.info.apply(f,arguments)},vtkLogMacro:function(){f.log.apply(f,arguments)},vtkOnceErrorMacro:function(e){h[e]||(f.error(e),h[e]=!0)},vtkWarningMacro:I};t.c=P}).call(this,n(20))},function(e,t,n){"use strict";t.a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return Y})),n.d(t,"k",(function(){return Z})),n.d(t,"l",(function(){return T})),n.d(t,"m",(function(){return u})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return J})),n.d(t,"q",(function(){return p})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return b})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return h})),n.d(t,"z",(function(){return v})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return i})),n.d(t,"C",(function(){return V})),n.d(t,"D",(function(){return x})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return l}));var r=n(14),a=(n(3),n(53),n(4).c.vtkWarningMacro);function o(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[];t.length1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,a=-1/0,o=t,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t-e;return e+n*Math.random()}function m(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function f(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){var r=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=a,n[2]=o,n}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:for(var n=0,r=0;r2&&void 0!==arguments[2]?arguments[2]:1e-6;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!"".concat(e).includes("e"))return+"".concat(Math.round("".concat(e,"e+").concat(t)),"e-").concat(t);var n="".concat(e).split("e"),r="";return+n[1]+t>0&&(r="+"),+"".concat(Math.round("".concat(+n[0],"e").concat(r).concat(+n[1]+t)),"e-").concat(t)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=G(e[0],n),t[1]=G(e[1],n),t[2]=G(e[2],n),t}function B(e,t,n){var r,i,l,s,c,g,u,d=0,m=o(n);for(r=0;rs&&(s=u);if(0===s)return a("Unable to factor linear system"),0;m[r]=1/s}for(i=0;i=s&&(s=g,d=r)}if(i!==d){for(l=0;l=0)for(o=i;o<=a-1;o++)s-=e[a][o]*n[o];else 0!==s&&(i=a);n[a]=s}for(a=r-1;a>=0;a--){for(s=n[a],o=a+1;oc?c=l:lc?c=s:s0?(c-g)/c:0)>0?(n=i===c?1/6*(l-s)/(c-g):l===c?1/3+1/6*(s-i)/(c-g):2/3+1/6*(i-l)/(c-g))<0&&(n+=1):n=0,t[0]=n,t[1]=a,t[2]=u}function w(e,t){var n,a,o,i=Object(r.a)(e,3),l=i[0],s=i[1],c=i[2],g=1/3,u=1/6,d=2/3;l>u&&l<=g?(a=1,n=(g-l)/u,o=0):l>g&&l<=.5?(a=1,o=(l-g)/u,n=0):l>.5&&l<=d?(o=1,a=(d-l)/u,n=0):l>d&&l<=5/6?(o=1,n=(l-d)/u,a=0):l>5/6&&l<=1?(n=1,o=(1-l)/u,a=0):(n=1,a=l/u,o=0),n=s*n+(1-s),a=s*a+(1-s),o=s*o+(1-s),n*=c,a*=c,o*=c,t[0]=n,t[1]=a,t[2]=o}function k(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2];a>.04045?a=Math.pow((a+.055)/1.055,2.4):a/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,t[0]=.4124*a+.3576*o+.1805*i,t[1]=.2126*a+.7152*o+.0722*i,t[2]=.0193*a+.1192*o+.9505*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0]/.9505,o=n[1]/1,i=n[2]/1.089;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t[0]=116*o-16,t[1]=500*(a-o),t[2]=200*(o-i)}(n,t)}function W(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=(n[0]+16)/116,o=n[1]/500+a,i=a-n[2]/200;a=Math.pow(a,3)>.008856?Math.pow(a,3):(a-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,t[0]=.9505*o,t[1]=1*a,t[2]=1.089*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2],l=3.2406*a+-1.5372*o+-.4986*i,s=-.9689*a+1.8758*o+.0415*i,c=.0557*a+-.204*o+1.057*i;l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,c>.0031308?c=1.055*Math.pow(c,1/2.4)-.055:c*=12.92;var g=l;g1&&(l/=g,s/=g,c/=g),l<0&&(l=0),s<0&&(s=0),c<0&&(c=0),t[0]=l,t[1]=s,t[2]=c}(n,t)}function x(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function T(e){return!(e[1]-e[0]<0)}function J(e,t,n){n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2])}function X(e,t,n){return en?n:e}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=X(e[0],t[0],n[0]),r[1]=X(e[1],t[1],n[1]),r[2]=X(e[2],t[2],n[2]),r}var N=function(e){return!Number.isFinite(e)},H=Number.isNaN;function Y(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(15)),o=n(4),i=n(6);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ta&&(e=a),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=u(),a=e.length,o=0;if(t<0&&n>1){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}var p={computeRange:d,createRangeHelper:u,getDataType:f,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=a)}return n}};function C(e,t){function n(){t.ranges=null,e.modified()}t.classHierarchy.push("vtkDataArray"),e.getElementComponentSize=function(){return t.values.BYTES_PER_ELEMENT},e.getComponent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=function(e,r,a){a!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=a,n())},e.getData=function(){return t.values},e.getRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=e<0?t.numberOfComponents:e,r=null;return t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=d(t.values,e,t.numberOfComponents),t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple)},e.setRange=function(e,n){t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents));var r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=function(e,n){for(var r=e*t.numberOfComponents,a=0;a1&&void 0!==arguments[1]?arguments[1]:g,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var a=e*r;if(1===r)n[0]=t.values[a];else if(2===r)n[0]=t.values[a],n[1]=t.values[a+1];else if(3===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2];else if(4===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2],n[3]=t.values[a+3];else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=function(){return t.numberOfComponents},e.getNumberOfValues=function(){return t.values.length},e.getNumberOfTuples=function(){return t.values.length/t.numberOfComponents},e.getDataType=function(){return t.dataType},e.newClone=function(){return b({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkDataArray".concat(e.getMTime())),t.name},e.setData=function(e,r){t.values=e,t.size=e.length,t.dataType=f(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=s(s({},t),{},{vtkClass:e.getClassName()});n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((function(e){n[e]||delete n[e]}));var r={};return Object.keys(n).sort().forEach((function(e){r[e]=n[e]})),r.mtime&&delete r.mtime,r}}var I={name:"",numberOfComponents:1,size:0,dataType:c,rangeTuple:[0,0]};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,I,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=window[t.dataType].from(t.values)):t.values=new window[t.dataType](t.size),t.values&&(t.size=t.values.length,t.dataType=f(t.values)),Object(o.h)(e,t),Object(o.i)(e,t,["name","numberOfComponents"]),C(e,t)}var b=Object(o.g)(h,"vtkDataArray"),y=s(s({newInstance:b,extend:h},p),a.c);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return Z})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return u})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return c}));var r=n(24);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],o=t[6],i=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],s=t[6],c=t[7],g=t[8],u=t[9],d=t[10],m=t[11],f=t[12],p=t[13],C=t[14],I=t[15],h=n*l-r*i,b=n*s-a*i,y=n*c-o*i,v=r*s-a*l,Z=r*c-o*l,A=a*c-o*s,G=g*p-u*f,S=g*C-d*f,B=g*I-m*f,V=u*C-d*p,R=u*I-m*p,w=d*I-m*C,k=h*w-b*R+y*V+v*B-Z*S+A*G;return k?(k=1/k,e[0]=(l*w-s*R+c*V)*k,e[1]=(a*R-r*w-o*V)*k,e[2]=(p*A-C*Z+I*v)*k,e[3]=(d*Z-u*A-m*v)*k,e[4]=(s*B-i*w-c*S)*k,e[5]=(n*w-a*B+o*S)*k,e[6]=(C*y-f*A-I*b)*k,e[7]=(g*A-d*y+m*b)*k,e[8]=(i*R-l*B+c*G)*k,e[9]=(r*B-n*R-o*G)*k,e[10]=(f*Z-p*y+I*h)*k,e[11]=(u*y-g*Z-m*h)*k,e[12]=(l*S-i*V-s*G)*k,e[13]=(n*V-r*S+a*G)*k,e[14]=(p*b-f*v-C*h)*k,e[15]=(g*v-u*b+d*h)*k,e):null}function s(e,t,n){var r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],p=t[12],C=t[13],I=t[14],h=t[15],b=n[0],y=n[1],v=n[2],Z=n[3];return e[0]=b*r+y*l+v*u+Z*p,e[1]=b*a+y*s+v*d+Z*C,e[2]=b*o+y*c+v*m+Z*I,e[3]=b*i+y*g+v*f+Z*h,b=n[4],y=n[5],v=n[6],Z=n[7],e[4]=b*r+y*l+v*u+Z*p,e[5]=b*a+y*s+v*d+Z*C,e[6]=b*o+y*c+v*m+Z*I,e[7]=b*i+y*g+v*f+Z*h,b=n[8],y=n[9],v=n[10],Z=n[11],e[8]=b*r+y*l+v*u+Z*p,e[9]=b*a+y*s+v*d+Z*C,e[10]=b*o+y*c+v*m+Z*I,e[11]=b*i+y*g+v*f+Z*h,b=n[12],y=n[13],v=n[14],Z=n[15],e[12]=b*r+y*l+v*u+Z*p,e[13]=b*a+y*s+v*d+Z*C,e[14]=b*o+y*c+v*m+Z*I,e[15]=b*i+y*g+v*f+Z*h,e}function c(e,t,n){var r,a,o,i,l,s,c,g,u,d,m,f,p=n[0],C=n[1],I=n[2];return t===e?(e[12]=t[0]*p+t[4]*C+t[8]*I+t[12],e[13]=t[1]*p+t[5]*C+t[9]*I+t[13],e[14]=t[2]*p+t[6]*C+t[10]*I+t[14],e[15]=t[3]*p+t[7]*C+t[11]*I+t[15]):(r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=s,e[6]=c,e[7]=g,e[8]=u,e[9]=d,e[10]=m,e[11]=f,e[12]=r*p+l*C+u*I+t[12],e[13]=a*p+s*C+d*I+t[13],e[14]=o*p+c*C+m*I+t[14],e[15]=i*p+g*C+f*I+t[15]),e}function g(e,t,n){var r=n[0],a=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u(e,t,n,a){var o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B,V,R,w=a[0],k=a[1],W=a[2],x=Math.hypot(w,k,W);return x0?(I=2*Math.sqrt(C+1),e[3]=.25*I,e[0]=(d-f)/I,e[1]=(m-c)/I,e[2]=(s-g)/I):l>u&&l>p?(I=2*Math.sqrt(1+l-u-p),e[3]=(d-f)/I,e[0]=.25*I,e[1]=(s+g)/I,e[2]=(m+c)/I):u>p?(I=2*Math.sqrt(1+u-l-p),e[3]=(m-c)/I,e[0]=(s+g)/I,e[1]=.25*I,e[2]=(d+f)/I):(I=2*Math.sqrt(1+p-l-u),e[3]=(s-g)/I,e[0]=(m+c)/I,e[1]=(d+f)/I,e[2]=.25*I),e}function y(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=t[3],s=a+a,c=o+o,g=i+i,u=a*s,d=a*c,m=a*g,f=o*c,p=o*g,C=i*g,I=l*s,h=l*c,b=l*g,y=r[0],v=r[1],Z=r[2];return e[0]=(1-(f+C))*y,e[1]=(d+b)*y,e[2]=(m-h)*y,e[3]=0,e[4]=(d-b)*v,e[5]=(1-(u+C))*v,e[6]=(p+I)*v,e[7]=0,e[8]=(m+h)*Z,e[9]=(p-I)*Z,e[10]=(1-(u+f))*Z,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function v(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=n+n,l=r+r,s=a+a,c=n*i,g=r*i,u=r*l,d=a*i,m=a*l,f=a*s,p=o*i,C=o*l,I=o*s;return e[0]=1-u-f,e[1]=g+I,e[2]=d-C,e[3]=0,e[4]=g-I,e[5]=1-c-f,e[6]=m+p,e[7]=0,e[8]=d+C,e[9]=m-p,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Z(e,t,n,r,a,o,i){var l=1/(t-n),s=1/(r-a),c=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(i+o)*c,e[15]=1,e}function A(e,t,n,a){var i,l,s,c,g,u,d,m,f,p,C=t[0],I=t[1],h=t[2],b=a[0],y=a[1],v=a[2],Z=n[0],A=n[1],G=n[2];return Math.abs(C-Z)0?(n[0]=2*(s*l+u*a+c*i-g*o)/d,n[1]=2*(c*l+u*o+g*a-s*i)/d,n[2]=2*(g*l+u*i+s*o-c*a)/d):(n[0]=2*(s*l+u*a+c*i-g*o),n[1]=2*(c*l+u*o+g*a-s*i),n[2]=2*(g*l+u*i+s*o-c*a)),I(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:h,getRotation:b,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(e,t,n,r,a){var o=t[0],i=t[1],l=t[2],s=t[3],c=o+o,g=i+i,u=l+l,d=o*c,m=o*g,f=o*u,p=i*g,C=i*u,I=l*u,h=s*c,b=s*g,y=s*u,v=r[0],Z=r[1],A=r[2],G=a[0],S=a[1],B=a[2],V=(1-(p+I))*v,R=(m+y)*v,w=(f-b)*v,k=(m-y)*Z,W=(1-(d+I))*Z,x=(C+h)*Z,T=(f+b)*A,J=(C-h)*A,X=(1-(d+p))*A;return e[0]=V,e[1]=R,e[2]=w,e[3]=0,e[4]=k,e[5]=W,e[6]=x,e[7]=0,e[8]=T,e[9]=J,e[10]=X,e[11]=0,e[12]=n[0]+G-(V*G+k*S+T*B),e[13]=n[1]+S-(R*G+W*S+J*B),e[14]=n[2]+B-(w*G+x*S+X*B),e[15]=1,e},fromQuat:v,frustum:function(e,t,n,r,a,o,i){var l=1/(n-t),s=1/(a-r),c=1/(o-i);return e[0]=2*o*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(i+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*c,e[15]=0,e},perspective:function(e,t,n,r,a){var o,i=1/Math.tan(t/2);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(o=1/(r-a),e[10]=(a+r)*o,e[14]=2*a*r*o):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(i+l),c=2/(a+o);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(i-l)*s*.5,e[9]=(a-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:Z,lookAt:A,targetTo:function(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=r[0],s=r[1],c=r[2],g=a-n[0],u=o-n[1],d=i-n[2],m=g*g+u*u+d*d;m>0&&(g*=m=1/Math.sqrt(m),u*=m,d*=m);var f=s*d-c*u,p=c*g-l*d,C=l*u-s*g;return(m=f*f+p*p+C*C)>0&&(f*=m=1/Math.sqrt(m),p*=m,C*=m),e[0]=f,e[1]=p,e[2]=C,e[3]=0,e[4]=u*C-d*p,e[5]=d*f-g*C,e[6]=g*p-u*f,e[7]=0,e[8]=g,e[9]=u,e[10]=d,e[11]=0,e[12]=a,e[13]=o,e[14]=i,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:G,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var n=e[0],a=e[1],o=e[2],i=e[3],l=e[4],s=e[5],c=e[6],g=e[7],u=e[8],d=e[9],m=e[10],f=e[11],p=e[12],C=e[13],I=e[14],h=e[15],b=t[0],y=t[1],v=t[2],Z=t[3],A=t[4],G=t[5],S=t[6],B=t[7],V=t[8],R=t[9],w=t[10],k=t[11],W=t[12],x=t[13],T=t[14],J=t[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-y)<=r.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(o-v)<=r.b*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-Z)<=r.b*Math.max(1,Math.abs(i),Math.abs(Z))&&Math.abs(l-A)<=r.b*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(s-G)<=r.b*Math.max(1,Math.abs(s),Math.abs(G))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(g-B)<=r.b*Math.max(1,Math.abs(g),Math.abs(B))&&Math.abs(u-V)<=r.b*Math.max(1,Math.abs(u),Math.abs(V))&&Math.abs(d-R)<=r.b*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(m-w)<=r.b*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(f-k)<=r.b*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-W)<=r.b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(C-x)<=r.b*Math.max(1,Math.abs(C),Math.abs(x))&&Math.abs(I-T)<=r.b*Math.max(1,Math.abs(I),Math.abs(T))&&Math.abs(h-J)<=r.b*Math.max(1,Math.abs(h),Math.abs(J))},mul:S,sub:B})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return p(e,null==t?n.path:t)}},n.exports),n.exports}function i(e,t){l[e]=t}const l=Object.create(null),s=Object.create(null),c={id:"",exports:{},parent:void 0,filename:null,loaded:!1,children:[],paths:[]},g=["",".js",".json"];function u(e){const t=(e=e.replace(/\\/g,"/")).split("/"),n=""===t[0];for(let e=1;e0&&".."!==t[e-1]&&"."!==t[e-1]&&(t.splice(--e,2),e--);return e=t.join("/"),n&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}function d(){if(0===arguments.length)return".";let e;for(let t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":e}function m(e){if(0===e.length)return".";let t=e.length-1;for(;t>0;){const n=e.charCodeAt(t);if((47===n||92===n)&&t!==e.length-1)break;t--}return t>0?e.substr(0,t):47===e.chartCodeAt(0)||92===e.chartCodeAt(0)?e.charAt(0):"."}function f(e,t,n){const r=function(e){let t=e[0];if("/"===t||"\\"===t)return!1;let n=e[1],r=e[2];return!(!("."!==t||n&&"/"!==n&&"\\"!==n)||!("."!==t||"."!==n||r&&"/"!==r&&"\\"!==r))&&(":"!==n||"/"!==r&&"\\"!==r)}(e);let a;for("/"===(e=u(e))[0]&&(t="/");a=r?u(t?t+"/node_modules/"+e:d("node_modules",e)):t?u(t+"/"+e):e,!a.endsWith("/..");){for(let e=0;e1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function u(e,t){for(var n=0;n0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[0],l=n[1],s=n[2];return e[0]=a*s-o*l,e[1]=o*i-r*s,e[2]=r*l-a*i,e}function v(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[3]*r+n[7]*a+n[11]*o+n[15];return i=i||1,e[0]=(n[0]*r+n[4]*a+n[8]*o+n[12])/i,e[1]=(n[1]*r+n[5]*a+n[9]*o+n[13])/i,e[2]=(n[2]*r+n[6]*a+n[10]*o+n[14])/i,e}function Z(e,t,n){var r=t[0],a=t[1],o=t[2];return e[0]=r*n[0]+a*n[3]+o*n[6],e[1]=r*n[1]+a*n[4]+o*n[7],e[2]=r*n[2]+a*n[5]+o*n[8],e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function G(e,t){var n=e[0],a=e[1],o=e[2],i=t[0],l=t[1],s=t[2];return Math.abs(n-i)<=r.b*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-s)<=r.b*Math.max(1,Math.abs(o),Math.abs(s))}var S,B=c,V=g,R=u,w=m,k=f,W=o,x=p,T=(S=a(),function(e,t,n,r,a,o){var i,l;for(t||(t=3),n||(n=0),l=r?Math.min(r*t+n,e.length):e.length,i=n;i1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=new(window[e.getDataType()])(3*t.pointsIds.length));var a=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=a[n],r[++o]=a[++n],r[++o]=a[++n]})),t.points.setData(r)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(var o=e.getNumberOfPoints()-1;o>=0;--o)t.pointsIds[o]=o}},e.getBounds=function(){var e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(var r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else Object(s.D)(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,a=0;a<3;a++)n+=(r=t.bounds[2*a+1]-t.bounds[2*a])*r;return n},e.getParametricDistance=function(e){for(var t,n=0,r=0;r<3;r++)(t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0)>n&&(n=t);return n},e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.deepCopy=function(e){e.initialize(t.points,t.pointsIds)},e.getCellDimension=function(){},e.intersectWithLine=function(e,t,n,r,a,o,i){},e.evaluatePosition=function(e,t,n,r,a,o){}}var u={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.c.obj(e,t),t.points||(t.points=c.a.newInstance()),a.c.get(e,t,["points","pointsIds"]),g(e,t)}var m={newInstance:a.c.newInstance(d,"vtkCell"),extend:d};function f(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),a=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((function(){return{ncells:0,cells:null}})),t.extend=n,t.maxId=-1},e.initialize=function(){t.array=null},e.getLink=function(e){return t.array[e]},e.getNcells=function(e){return t.array[e].ncells},e.getCells=function(e){return t.array[e].cells},e.insertNextPoint=function(e){t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=function(e,n){t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=function(e){t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=function(e,n){t.array[n].cells=t.array[n].cells.filter((function(t){return t!==e})),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=function(e,n){t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=function(e,n){t.array[e].cells.length=n},e.squeeze=function(){!function(e,t){var n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=function(){t.maxId=-1},e.deepCopy=function(e){t.array=Object(l.a)(e.array),t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=function(e){++t.array[e].ncells},e.allocateLinks=function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.c.obj(e,t),f(e,t)}var I={newInstance:a.c.newInstance(C,"vtkCellLinks"),extend:C},h=0,b=1,y=2,v=3,Z=4,A=5,G=6,S=7,B=9,V=21,R=41,w=42,k=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=function(e,n,r){t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=function(n,r){return e.insertCell(++t.maxId,n,r),t.maxId},e.setCellTypes=function(e,n,r){t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=function(e){return t.locationArray[e]},e.deleteCell=function(e){t.typeArray[e]=h},e.getNumberOfTypes=function(){return t.maxId+1},e.isType=function(t){for(var n=e.getNumberOfTypes(),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J,n),a.c.obj(e,t),a.c.get(e,t,["size","maxId","extend"]),a.c.getArray(e,t,["typeArray","locationArray"]),T(e,t)}var O=function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},i=[];i[0]=n[0]-t[0],i[1]=n[1]-t[1],i[2]=n[2]-t[2];var l=i[0]*(e[0]-t[0])+i[1]*(e[1]-t[1])+i[2]*(e[2]-t[2]),c=Object(s.q)(i,i),g=1e-5*l;return 0!==c&&(o.t=l/c),g<0&&(g=-g),-g1?r=n:(r=i,i[0]=t[0]+o.t*i[0],i[1]=t[1]+o.t*i[1],i[2]=t[2]+o.t*i[2]),a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2]),o.distance=Object(s.s)(r,e),o}function K(e,t,n,r,a,o){var i=[],l=[],c=[];a[0]=0,o[0]=0,i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],l[0]=r[0]-n[0],l[1]=r[1]-n[1],l[2]=r[2]-n[2],c[0]=n[0]-e[0],c[1]=n[1]-e[1],c[2]=n[2]-e[2];var g=[];g[0]=[Object(s.q)(i,i),-Object(s.q)(i,l)],g[1]=[g[0][1],Object(s.q)(l,l)];var u=[];if(u[0]=Object(s.q)(i,c),u[1]=-Object(s.q)(l,c),0===Object(s.C)(g,u,2)){for(var d,m=Number.MAX_VALUE,f=[e,t,n,r],p=[n,n,e,e],C=[r,r,t,t],I=[o[0],o[0],a[0],a[0]],h=[a[0],a[0],o[0],o[0]],b=0;b<4;b++)(d=P(f[b],p[b],C[b])).distance=0&&a[0]<=1&&o[0]>=0&&o[0]<=1?F.YES_INTERSECTION:F.NO_INTERSECTION}var M={distanceToLine:P,intersection:K};function L(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,a,o){var i={intersect:0,t:Number.MIN_VALUE,subId:0};o[1]=0,o[2]=0;var l=[],c=[],g=[];t.points.getPoint(0,c),t.points.getPoint(1,g);var u=[],d=[],m=K(e,n,c,g,u,d);if(i.t=u[0],o[0]=d[0],m===F.YES_INTERSECTION){for(var f=0;f<3;f++)a[f]=c[f]+o[0]*(g[f]-c[f]),l[f]=e[f]+i.t*(n[f]-e[f]);if(Object(s.s)(a,l)<=r*r)return i.intersect=1,i}else{var p;if(i.t<0)return i.t=0,p=P(e,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(i.t>1)return i.t=1,p=P(n,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[0]<0)return o[0]=0,p=P(c,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[1]>1)return o[1]=1,p=P(g,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i}return i},e.evaluatePosition=function(e,t,n,r,a,o){}}var D={};function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),m.extend(e,t,n),L(e,t)}var U=Y(Y({newInstance:a.c.newInstance(E,"vtkLine"),extend:E},M),N),z=n(31);function _(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=Object(o.a)(t.points):t.points=c.a.newInstance(),e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.getBounds=function(){return t.points.getBounds()},e.computeBounds=function(){e.getBounds()};var n=e.shallowCopy;e.shallowCopy=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=c.a.newInstance(),t.points.shallowCopy(e.getPoints())}}var j={};function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),z.a.extend(e,t,n),a.c.setGet(e,t,["points"]),_(e,t)}var q={newInstance:a.c.newInstance(Q,"vtkPointSet"),extend:Q},$=n(39);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n,r){var a=n[0]-t[0],o=n[1]-t[1],i=n[2]-t[2],l=e[0]-t[0],s=e[1]-t[1],c=e[2]-t[2];r[0]=o*c-i*s,r[1]=i*l-a*c,r[2]=a*s-o*l}function ne(e,t,n,r){te(e,t,n,r);var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==a&&(r[0]/=a,r[1]/=a,r[2]/=a)}var re={computeNormalDirection:te,computeNormal:ne};function ae(e,t){t.classHierarchy.push("vtkTriangle"),e.getCellDimension=function(){return 2},e.intersectWithLine=function(n,r,a,o,i){var l={subId:0,t:0,intersect:-1};i[2]=0;var c=a*a,g=[],u=[],d=[];t.points.getPoint(0,g),t.points.getPoint(1,u),t.points.getPoint(2,d);var m=[];if(ne(g,u,d,m),0!==m[0]||0!==m[1]||0!==m[2]){var f=$.a.intersectWithLine(n,r,g,m);if(l.t=f.t,o[0]=f.x[0],o[1]=f.x[1],o[2]=f.x[2],!f.intersection)return i[0]=0,i[1]=0,l.intersect=0,l;var p=e.evaluatePosition(o,[],i,[]);if(p.evaluation>=0)return p.dist2<=c?(l.intersect=1,l):(l.intersect=p.evaluation,l)}var C=Object(s.s)(g,u),I=Object(s.s)(u,d),h=Object(s.s)(d,g);if(t.line||(t.line=U.newInstance()),C>I&&C>h?(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,u)):I>h&&I>C?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,g)),t.line.intersectWithLine(n,r,a,o,i).intersect){for(var b=[],y=[],v=[],Z=0;Z<3;Z++)b[Z]=g[Z]-d[Z],y[Z]=u[Z]-d[Z],v[Z]=o[Z]-d[Z];return i[0]=Object(s.q)(v,b)/h,i[1]=Object(s.q)(v,y)/I,l.evaluation=1,l}return i[0]=0,i[1]=0,l.evaluation=0,l},e.evaluatePosition=function(e,n,r,a){var o,i,l,c,g,u,d,m={subId:0,dist2:0,evaluation:-1},f=[],p=[],C=[],I=[],h=[],b=[],y=[],v=0,Z=[],A=[],G=[],S=[],B=[];m.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,p),t.points.getPoint(0,C),te(f,p,C,I),$.a.generalizedProjectPoint(e,f,I,B);var V=0;for(o=0;o<3;o++)(l=I[o]<0?-I[o]:I[o])>V&&(V=l,v=o);for(i=0,o=0;o<3;o++)o!==v&&(Z[i++]=o);for(o=0;o<2;o++)h[o]=B[Z[o]]-C[Z[o]],b[o]=f[Z[o]]-C[Z[o]],y[o]=p[Z[o]]-C[Z[o]];if(0===(c=Object(s.z)(b,y)))return r[0]=0,r[1]=0,m.evaluation=-1,m;if(r[0]=Object(s.z)(h,y)/c,r[1]=Object(s.z)(b,h)/c,a[0]=1-(r[0]+r[1]),a[1]=r[0],a[2]=r[1],a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&a[2]>=0&&a[2]<=1)n&&(m.dist2=Object(s.s)(B,e),n[0]=B[0],n[1]=B[1],n[2]=B[2]),m.evaluation=1;else{var R;if(n)if(a[1]<0&&a[2]<0)for(g=Object(s.s)(e,C),u=U.distanceToLine(e,f,C,R,G),d=U.distanceToLine(e,C,p,R,S),g1?r[a]-1:0)>n&&(n=t);return n}}var oe={};function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oe,n),m.extend(e,t,n),ae(e,t)}var le,se=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),ce.forEach((function(n){t[n]=i.a.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),a=e.getNumberOfPolys(),o=e.getNumberOfStrips(),i=n+r+a+o,l=new Uint8Array(i),s=l,c=new Uint32Array(i),g=c;if(n){var u=0;t.verts.getCellSizes().forEach((function(e,t){g[t]=u,s[t]=e>1?y:b,u+=e+1})),g=g.subarray(n),s=s.subarray(n)}if(r){var d=0;t.lines.getCellSizes().forEach((function(e,t){g[t]=d,s[t]=e>2?Z:v,1===e&&ge("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),d+=e+1})),g=g.subarray(r),s=s.subarray(r)}if(a){var m=0;t.polys.getCellSizes().forEach((function(e,t){switch(g[t]=m,e){case 3:s[t]=A;break;case 4:s[t]=B;break;default:s[t]=S}e<3&&ge("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),m+=e+1})),g+=g.subarray(a),s+=s.subarray(a)}if(o){var f=0;s.fill(G,0,o),t.strips.getCellSizes().forEach((function(e,t){g[t]=f,f+=e+1}))}t.cells=O.newInstance(),t.cells.setCellTypes(i,l,c)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=I.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellPoints=function(e){var n=t.cells.getCellType(e),r=null;switch(n){case b:case y:r=t.verts;break;case v:case Z:r=t.lines;break;case A:case B:case S:r=t.polys;break;case G:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var a=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(a)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var a=t.links.getLink(n),o=t.links.getLink(r);return a.cells.filter((function(t){return t!==e&&-1!==o.cells.indexOf(t)}))},e.getCell=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.getCellPoints(t),a=n||ue[r.cellType].newInstance();return a.initialize(e.getPoints(),r.cellPointIds),a}}var me={};function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,me,n),q.extend(e,t,n),a.c.get(e,t,["cells","links"]),a.c.setGet(e,t,["verts","lines","polys","strips"]),de(e,t)}var pe={newInstance:a.c.newInstance(fe,"vtkPolyData"),extend:fe};t.a=pe},function(e,t,n){"use strict";var r=function(e){if(Array.isArray(e))return e};var a=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}},o=n(41);var i=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};t.a=function(e,t){return r(e)||a(e,t)||Object(o.a)(e,t)||i()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},a={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"},o={DefaultDataType:a.FLOAT,DataTypeByteSize:r,VtkDataTypes:a};t.c=o},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.d(t,"a",(function(){return a})),r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}};var a=r},function(e,t,n){"use strict";(function(e){var r=n(48),a=n(5);n(3);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i={vtkObject:function(){return null}};function l(t){if(null==t)return t;if(t.isA)return t;if(!t.vtkClass)return e.console&&e.console.error&&e.console.error("Invalid VTK object"),null;var n=i[t.vtkClass];if(!n)return e.console&&e.console.error&&e.console.error("No vtk class found for Object of type ".concat(t.vtkClass)),null;var s=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:a,registerType:o};t.a=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),a=n(54),o=Object(r.d)((function(t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!a.a.Readable}catch(t){n.nodestream=!1}}),"/$$rollup_base$$/node_modules/jszip/lib")}).call(this,n(35).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],g=!1,u=-1;function d(){g&&s&&(g=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!g){var e=l(d);g=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,a,i;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+".".length>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var i={codes:r}},function(e,t,n){"use strict";var r=n(11),a=n(51),o=n(52),i=(n(3),n(24)),l=n(8),s=n(12),c=n(6),g=function(e){return e},u=Object(l.h)(new Float64Array(16)),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(a.a)(this,e),this.matrix=Object(l.h)(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?i.d:g}return Object(o.a)(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(16);Object(s.p)(n,e[0],e[1],e[2]),Object(s.p)(r,t[0],t[1],t[2]),Object(s.l)(n,n),Object(s.l)(r,r);var o=Object(s.d)(n,r);return o>=1||(Object(s.c)(this.tmp,n,r),Object(s.j)(this.tmp)<1e-6&&(Object(s.c)(this.tmp,[1,0,0],e),Object(s.j)(this.tmp)<1e-6&&Object(s.c)(this.tmp,[0,1,0],e)),Object(l.f)(a,Math.acos(o),this.tmp),Object(l.l)(this.matrix,this.matrix,a)),this}},{key:"rotate",value:function(e,t){return s.p.apply(s.r,[this.tmp].concat(Object(r.a)(t))),Object(s.l)(this.tmp,this.tmp),Object(l.q)(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Object(l.a)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return Object(l.b)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Object(l.c)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.s)(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.r)(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Object(l.l)(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Object(l.h)(this.matrix),this}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Object(c.n)(u,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,a=t;a2&&void 0!==arguments[2]?arguments[2]:{},a=new XMLHttpRequest;return a.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return a.setRequestHeader(n,o)})),n.progressCallback&&a.addEventListener("progress",n.progressCallback),a}var m={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r&&r.compression?g():n.ref&&!n.ref.pending?new Promise((function(a,l){var g=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);g.onreadystatechange=function(t){1===g.readyState&&(n.ref.pending=!0,1==++u&&e.invokeBusy&&e.invokeBusy(!0)),4===g.readyState&&(n.ref.pending=!1,200===g.status||0===g.status?(n.buffer=g.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.a.ENDIANNESS!==n.ref.encode&&o.a.ENDIANNESS&&(c("Swap bytes of ".concat(n.name)),o.a.swapBytes(n.buffer,i.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&s("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--u&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):l({xhr:g,e:t}))},g.responseType="string"!==n.dataType?"arraybuffer":"text",g.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=d("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(l.b)("http")||Object(l.c)("http",(function(e){return m}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),a=Object(r.d)((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),"/$$rollup_base$$/node_modules/inherits")},function(e,t,n){"use strict";n(3);var r=n(4),a=n(7),o=n(15),i=r.c.vtkErrorMacro,l=[1,-1,1,-1,1,-1];function s(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=new window[t.dataType](t.size),e.setNumberOfComponents(r),e.modified())},e.setPoint=function(e){for(var n=e*t.numberOfComponents,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.a.extend(e,t,n),s(e,t)}var u={newInstance:r.c.newInstance(g,"vtkPoints"),extend:g};t.a=u},function(e,t,n){"use strict";var r,a,o=n(9),i=o.b.MutationObserver||o.b.WebKitMutationObserver;if(i){var l=0,s=new i(d),c=o.b.document.createTextNode("");s.observe(c,{characterData:!0}),r=function(){c.data=l=++l%2}}else if(o.b.setImmediate||void 0===o.b.MessageChannel)r="document"in o.b&&"onreadystatechange"in o.b.document.createElement("script")?function(){var e=o.b.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},o.b.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var g=new o.b.MessageChannel;g.port1.onmessage=d,r=function(){g.port2.postMessage(0)}}var u=[];function d(){var e,t;a=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,i=[],l=t;l>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var d=function(e){var t,n,r=g(e),a=r[0],l=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,u=l>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===l&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[c++]=255&t),1===l&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},m=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,l=0,s=n-r;ls?s:l+i));return 1===r?(t=e[n-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")},f=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},p=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p};n.d(t,"a",(function(){return C}));var C=Object(r.d)((function(e,t){const n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;const r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|C(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return o.from(r,t,n);const i=function(e){if(o.isBuffer(e)){const t=0|u(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),a(e<0?0:0|u(e))}function c(e){const t=e.length<0?0:0|u(e.length),n=a(t);for(let r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function C(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return r?-1:U(e).length;t=(""+t).toLowerCase(),a=!0}}function I(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){let o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){let r=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;ra&&(r=a):r=a;const o=t.length;let i;for(r>o/2&&(r=o/2),i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function V(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a239?4:t>223?3:t>191?2:1;if(a+i<=n){let n,r,l,s;switch(i){case 1:t<128&&(o=t);break;case 2:n=e[a+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[a+1],r=e[a+2],l=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&l)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},o.byteLength=C,o.prototype._isBuffer=!0,o.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,n,r,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0);const s=Math.min(i,l),c=this.slice(r,a),g=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return Z(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return G(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;ar)&&(n=r);let a="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function X(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function O(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function N(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,4),p(e,t,n,r,23,4),n+4}function Y(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,8),p(e,t,n,r,52,8),n+8}o.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o=a&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);let r=t,a=1,o=this[e+--r];for(;r>0&&(a*=256);)o+=this[e+--r]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||T(e,4,this.length),f(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),f(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=0,o=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=n-1,o=1,i=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/o>>0)-i&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return Y(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Y(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||D(t,e.length-(n+1))}(r,a,o)}function L(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function D(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=K(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=K(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const E=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;const r=e.length;let a=null;const o=[];for(let i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function $(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}),"/$$rollup_base$$/node_modules/buffer")},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(17),i=n(7);function l(e,t){t.classHierarchy.push("vtkFieldData");var n=e.getState;t.arrays&&(t.arrays=t.arrays.map((function(e){return{data:Object(o.a)(e.data)}}))),e.initialize=function(){e.initializeFields(),e.copyAllOn(),e.clearFieldFlags()},e.initializeFields=function(){t.arrays=[],t.copyFieldFlags={},e.modified()},e.copyStructure=function(n){e.initializeFields(),t.copyFieldFlags=n.getCopyFieldFlags().map((function(e){return e})),t.arrays=n.arrays().map((function(e){return{array:e}}))},e.getNumberOfArrays=function(){return t.arrays.length},e.getNumberOfActiveArrays=function(){return t.arrays.length},e.addArray=function(e){return t.arrays=[].concat(t.arrays,{data:e}),t.arrays.length-1},e.removeAllArrays=function(){t.arrays=[]},e.removeArray=function(e){t.arrays=t.arrays.filter((function(t){return e!==t.data.getName()}))},e.removeArrayByIndex=function(e){t.arrays=t.arrays.filter((function(t,n){return n!==e}))},e.getArrays=function(){return t.arrays.map((function(e){return e.data}))},e.getArray=function(t){return"number"==typeof t?e.getArrayByIndex(t):e.getArrayByName(t)},e.getArrayByName=function(e){return t.arrays.reduce((function(t,n,r){return n.data.getName()===e?n.data:t}),null)},e.getArrayWithIndex=function(e){return t.arrays.reduce((function(t,n,r){return n.data&&n.data.getName()===e?{array:n.data,index:r}:t}),{array:null,index:-1})},e.getArrayByIndex=function(e){return e>=0&&e=0},e.getArrayName=function(e){var n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=function(){return t.copyFieldFlags},e.getFlag=function(e){return t.copyFieldFlags[e]},e.passData=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((function(n){var o=e.getFlag(n.getName());if(!1!==o&&(!t.doCopyAllOff||!0===o)&&n){var l=e.getArrayByName(n.getName());if(l){if(n.getNumberOfComponents()===l.getNumberOfComponents())if(r>-1&&r-1?a:r;l.setTuple(s,n.getTuple(r))}else for(var c=0;cn.getNumberOfTuples())e.addArray(n);else{var g=n.getNumberOfComponents(),u=n.getNumberOfValues(),d=a>-1?a:r;ue?t.data.getMTime():e}),t.mtime)},e.getNumberOfComponents=function(){return t.arrays.reduce((function(e,t){return e+t.data.getNumberOfComponents()}),0)},e.getNumberOfTuples=function(){return t.arrays.length>0?t.arrays[0].getNumberOfTuples():0},e.getState=function(){var e=n();return e.arrays=t.arrays.map((function(e){return{data:e.data.getState()}})),e}}var s={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),a.c.obj(e,t),l(e,t)}var g={newInstance:a.c.newInstance(c,"vtkFieldData"),extend:c},u=n(37);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=u.c.AttributeTypes,f=u.c.AttributeCopyOperations,p=a.c.vtkWarningMacro;function C(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return m[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()}));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes"),e.checkNumberOfComponents=function(e){return!0},e.setAttribute=function(n,a){var o=r(a);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return p("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return p("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var i=t["active".concat(o)];if(i>=0&&i=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),g.extend(e,t,n),a.c.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),C(e,t)}var b=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Z.forEach((function(n){t[n]=b.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var G={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,G,n),a.c.obj(e,t),a.c.setGet(e,t,Z),A(e,t)}var B=function(e){for(var t=1;t0&&i.length>a&&!i.warned){i.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=i.length,l=s,console&&console.warn&&console.warn(l)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=m.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,g=I(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},l.prototype.listenerCount=C,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},s.once=function(e,t){return new Promise((function(n,r){function a(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,a),r(n)},e.once("error",o)),e.once(t,a)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22).a.codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}var o=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function I(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:h(e,t,n,r,a);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):h(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,n,r,a){var o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var g=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){for(var u=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+u<=n)switch(u){case 1:c<128&&(g=c);break;case 2:128==(192&(o=e[a+1]))&&(s=(31&c)<<6|63&o)>127&&(g=s);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(s=(15&c)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:o=e[a+1],i=e[a+2],l=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&l)&&(s=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&l)>65535&&s<1114112&&(g=s)}null===g?(g=65533,u=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),a+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,a){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),l=Math.min(o,i),c=this.slice(r,a),g=e.slice(t,n),u=0;ua)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return Z(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,a,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function J(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function X(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||X(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||X(e,0,n,8),a.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},s.prototype.readUInt8=function(e,t){return t||W(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||W(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||W(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||W(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||W(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):J(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=0,i=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=n-1,i=1,l=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/i>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):J(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(7),i=n(15);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};o.a.extend(e,t,d(n)),u(e,t)}var f=s({newInstance:a.c.newInstance(m,"vtkCellArray"),extend:m},g);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},a={DEFAULT:0,SINGLE:1,DOUBLE:2},o={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:r,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:a,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};t.c=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));n(3);var r={UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},a={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7},o={FieldDataTypes:r,FieldAssociations:a};t.c=o},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(6)),o=n(4);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){var r=n[0]*(e[0]-t[0])+n[1]*(e[1]-t[1])+n[2]*(e[2]-t[2]);return Math.abs(r)}function s(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o);r[0]=e[0]-i*n[0],r[1]=e[1]-i*n[1],r[2]=e[2]-i*n[2]}function c(e,t,n){var r=Object(a.q)(e,t),o=Object(a.q)(t,t);return 0===o&&(o=1),n[0]=e[0]-r*t[0]/o,n[1]=e[1]-r*t[1]/o,n[2]=e[2]-r*t[2]/o,n}function g(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o),l=Object(a.q)(n,n);0!==l?(r[0]=e[0]-i*n[0]/l,r[1]=e[1]-i*n[1]/l,r[2]=e[2]-i*n[2]/l):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function u(e,t,n,r){var o={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],l=[];Object(a.t)(t,e,i),Object(a.t)(n,e,l);var s=Object(a.q)(r,l),c=Object(a.q)(r,i);return(c<0?-c:c)<=(s<0?1e-6*-s:1e-6*s)||(o.t=s/c,o.x[0]=e[0]+o.t*i[0],o.x[1]=e[1]+o.t*i[1],o.x[2]=e[2]+o.t*i[2],o.intersection=!0,o.betweenPoints=o.t>=0&&o.t<=1),o}function d(e,t,n,r){var o={intersection:!1,l0:[],l1:[],error:null},i=[];Object(a.w)(t,r,i);var l,s=i.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<1e-6){var c=[];return Object(a.t)(e,n,c),0===Object(a.q)(t,c)?o.error="coincide":o.error="disjoint",o}l=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var g=[],u=-Object(a.q)(t,e),d=-Object(a.q)(r,n);switch(l){case"x":g[0]=0,g[1]=(d*t[2]-u*r[2])/i[0],g[2]=(u*r[1]-d*t[1])/i[0];break;case"y":g[0]=(u*r[2]-d*t[2])/i[1],g[1]=0,g[2]=(d*t[0]-u*r[0])/i[1];break;case"z":g[0]=(d*t[1]-u*r[1])/i[2],g[1]=(u*r[0]-d*t[0])/i[2],g[2]=0}return o.l0=g,Object(a.x)(g,i,o.l1),o.intersection=!0,o}var m={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:s,projectVector:c,generalizedProjectPoint:g,intersectWithLine:u,intersectWithPlane:d,DISJOINT:"disjoint",COINCIDE:"coincide"};function f(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return l(e,t.origin,t.normal)},e.projectPoint=function(e,n){s(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return c(e,t.normal,n)},e.push=function(e){if(0!==e)for(var n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=function(e,n){g(e,t.origin,t.normal,n)},e.evaluateFunction=function(e,n,r){return Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2])},e.evaluateGradient=function(e){return[t.normal[0],t.normal[1],t.normal[2]]},e.intersectWithLine=function(e,n){return u(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return d(e,n,t.origin,t.normal)}}var p={normal:[0,0,1],origin:[0,0,0]};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.c.obj(e,t),o.c.setGetArray(e,t,["normal","origin"],3),f(e,t)}var I=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,a=r(e),o=t.exec(a);if(!o)return{text:a};var i=o.index+o[0].length,l=a.substring(0,i),s=null,c=n?n.exec(a):null;if(c){var g=a.substr(c.index);s={text:l+g,binaryBuffer:e.slice(i,c.index)}}else s={text:l,binaryBuffer:e.slice(i)};return s}};t.a=a},function(e,t,n){"use strict";var r=n(42);t.a=function(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===b.prototype||(t=function(e){return b.from(e)}(t)),r)i.endEmitted?k(e,new w):X(e,i,t,!0);else if(i.ended)k(e,new V);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):Y(e,i)):X(e,i,t,!1)}else r||(i.reading=!1,Y(e,i));return!i.ended&&(i.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(t){var n=t._readableState;I("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(I("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(H,t))}function H(e){var t=e._readableState;I("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function Y(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(F,t,n))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){I("readable nexttick read 0"),e.read(0)}function M(e,t){I("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function E(t){var n=t._readableState;I("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(U,n,t))}function U(e,t){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):N(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&E(this),null;var r,a=t.needReadable;return I("need readable",a),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){k(this,new R("_read()"))},T.prototype.pipe=function(t,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,I("pipe count=%d opts=%j",a.pipesCount,n);var o=n&&!1===n.end||t===e.stdout||t===e.stderr?m:i;function i(){I("onend"),t.end()}a.endEmitted?e.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){I("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,I("cleanup"),t.removeListener("close",u),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),s=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(e,"data")&&(t.flowing=!0,L(e))}}(r);t.on("drain",l);var s=!1;function c(e){I("ondata");var n=t.write(e);I("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==z(a.pipes,t))&&!s&&(I("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function g(e){I("onerror",e),m(),t.removeListener("error",g),0===h(t,"error")&&k(t,e)}function u(){t.removeListener("finish",d),m()}function d(){I("onfinish"),t.removeListener("close",u),m()}function m(){I("unpipe"),r.unpipe(t)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",u),t.once("finish",d),t.emit("pipe",r),a.flowing||(I("pipe resume"),r.resume()),t},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==a.flowing&&this.resume()):"readable"===t&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,I("on readable",a.length,a.reading),a.length?N(this):a.reading||e.nextTick(K,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,n){var r=o.a.prototype.removeListener.call(this,t,n);return"readable"===t&&e.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var n=o.a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||e.nextTick(P,this),n},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!t.readableListening,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(M,t,n))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(I("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){I("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new V(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),W.prototype._write=function(e,t,n){n(new v("_write()"))},W.prototype._writev=null,W.prototype.end=function(t,n,r){var a=this._writableState;return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),a.corked&&(a.corked=1,this.uncork()),a.ending||function(t,n,r){n.ending=!0,N(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,a,r),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),W.prototype.destroy=s.a.destroy,W.prototype._undestroy=s.a.undestroy,W.prototype._destroy=function(e,t){t(e)}}).call(this,n(21))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),a=n(19),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){for(var t,n,a,i,l,s,c,g=[],u=0,d=e.length,m=d,f="string"!==r.a.getTypeOf(e);u>2,l=(3&t)<<4|n>>4,s=m>1?(15&n)<<2|a>>6:64,c=m>2?63&a:64,g.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(c));return g.join("")},decode:function(e){var t,n,r,i,l,s,c=0,g=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,m=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&m--,e.charAt(e.length-2)===o.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.a.uint8array?new Uint8Array(0|m):new Array(0|m);c>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(c++)))>>2,r=(3&l)<<6|(s=o.indexOf(e.charAt(c++))),d[g++]=t,64!==l&&(d[g++]=n),64!==s&&(d[g++]=r);return d}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(67),o=n(16),i=n(49),l=n(19),s=n(28),c=n(68),g=null;if(l.a.nodestream)try{g=c.a}catch(e){}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,r.a.checkSupport(i),this._worker=e.pipe(new a.a(i)),e.lock()}catch(e){this._worker=new o.a("error"),this._worker.error(e)}}u.prototype={accumulate:function(t){return n=this,a=t,new s.a.Promise((function(t,o){var l=[],s=n._internalType,c=n._outputType,g=n._mimeType;n.on("data",(function(e,t){l.push(e),a&&a(t)})).on("error",(function(e){l=[],o(e)})).on("end",(function(){try{var n=function(e,t,n){switch(e){case"blob":return r.a.newBlob(r.a.transformTo("arraybuffer",t),n);case"base64":return i.a.encode(t);default:return r.a.transformTo(e,t)}}(c,function(t,n){var r,a=0,o=null,i=0;for(r=0;r>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new r(e),o=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.alea=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),o=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor128=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),i=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorwow=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),l=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,a=t.i;return e=r[a],n=(e^=e>>>7)^e<<24,n^=(e=r[a+1&7])^e>>>10,n^=(e=r[a+3&7])^e>>>3,n^=(e=r[a+4&7])^e<<7,e=r[a+7&7],n^=(e^=e<<13)^e<<9,r[a]=n,t.i=a+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.x&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorshift7=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),s=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,a=t.X,o=t.i;return t.w=r=r+1640531527|0,n=a[o+34&127],e=a[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=a[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,a,o,i,l=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),a=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(i=i+1640531527|0,a=0==(n=l[127&o]^=r+i)?a+1:0);for(a>=128&&(l[127&(t&&t.length||0)]=-1),a=127,o=512;o>0;--o)r=l[a+34&127],n=l[a=a+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,l[a]=r^n;e.w=i,e.X=l,e.i=a}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.X&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor4096=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),c=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,a=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^a,a=a-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^a,t.a=a-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.tychei=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),g=Object.freeze({__proto__:null,default:{}}),u=Object(r.e)(g),d=Object(r.d)((function(e){!function(t,n,r){var a,o=256,i=r.pow(o,6),l=r.pow(2,52),s=2*l,c=255;function g(e,c,g){var u=[],C=f(function e(t,n){var r,a=[],o=typeof t;if(n&&"object"==o)for(r in t)try{a.push(e(t[r],n-1))}catch(t){}return a.length?a:"string"==o?t:t+"\0"}((c=1==c?{entropy:!0}:c||{}).entropy?[e,p(n)]:null==e?function(){try{var e;return a&&(e=a.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),p(e)}catch(e){var r=t.navigator,i=r&&r.plugins;return[+new Date,t,i,t.screen,p(n)]}}():e,3),u),I=new d(u),h=function(){for(var e=I.g(6),t=i,n=0;e=s;)e/=2,t/=2,n>>>=1;return(e+n)/t};return h.int32=function(){return 0|I.g(4)},h.quick=function(){return I.g(4)/4294967296},h.double=h,f(p(I.S),n),(c.pass||g||function(e,t,n,a){return a&&(a.S&&m(a,I),e.state=function(){return m(I,{})}),n?(r.random=e,t):e})(h,C,"global"in c?c.global:this==r,c.state)}function d(e){var t,n=e.length,r=this,a=0,i=r.i=r.j=0,l=r.S=[];for(n||(e=[n++]);a0,(function(e){r||(r=e),e&&o.forEach(k),i||(o.forEach(k),a(r))}))}));return t.reduce(W)},X.Stream=X,X.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",i),n.on("close",l));var o=!1;function i(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===J.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e},n.d(t,"a",(function(){return O}));var O=T},function(e,t,n){"use strict";var r=Object.freeze({__proto__:null,default:{}}),a=n(9);n.d(t,"a",(function(){return o}));var o=Object(a.e)(r)},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=56},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(30),a=n(55);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=r.a.Buffer,s=a.a.inspect,c=s&&s.custom||"inspect",g=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,a=l.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,n=a,r=i,l.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return a},t.consume=function(e,t){var n;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++r}return this.length-=r,t},t[c]=function(e,t){return s(this,function(e){for(var t=1;t0?i-4:i;for(n=0;n>16&255,s[g++]=t>>8&255,s[g++]=255&t;2===l&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,s[g++]=255&t);1===l&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,s[g++]=t>>8&255,s[g++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,l=n-a;il?l:i+16383));1===a?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],a=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=i.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var a,o,i=[],l=t;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},t.write=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,n(65).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,l,s=1,c={},g=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=a.compression,o=a.progressCallback;return t.binary?a.dataAccessHelper.fetchBinary(e,{compression:r,progressCallback:o}):a.dataAccessHelper.fetchText(n,e,{compression:r,progressCallback:o})}a.classHierarchy.push("vtkSTLReader"),a.dataAccessHelper||(a.dataAccessHelper=r.a.get("http")),n.setUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};a.url=e;var r=e.split("/");return r.pop(),a.baseURL=r.join("/"),a.compression=t.compression,n.loadData({progressCallback:t.progressCallback,binary:!!t.binary})},n.loadData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(a.url,e);return t.then(n.parse),t},n.parse=function(e){"string"==typeof e?n.parseAsText(e):n.parseAsArrayBuffer(e)},n.parseAsArrayBuffer=function(r){if(r&&r!==a.parseData)if(n.modified(),a.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var c=r.slice(0,80),g=function(e){for(var t=e.split(" ").filter((function(e){return e.indexOf("=")>-1})),n={},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.c.obj(e,t),a.c.get(e,t,["url","baseURL"]),a.c.setGet(e,t,["dataAccessHelper"]),a.c.algo(e,t,0,1),u(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkSTLReader")}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9),a=n(30),o=Object(r.d)((function(e,t){var n=a.a.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a.a:(r(a.a,t),t.Buffer=o),r(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof r?a.fill(t,r):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.a.SlowBuffer(e)}}),"/$$rollup_base$$/node_modules/safe-buffer");n.d(t,"a",(function(){return h}));var i=o.Buffer,l=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=c;function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===l||!l(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=C,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function g(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C(e){return e.toString(this.encoding)}function I(e){return e&&e.length?this.write(e):""}c.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(e.lastNeed=a-1),a):--r=0?(a>0&&(e.lastNeed=a-2),a):--r=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var h={StringDecoder:s}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return OZ})),n.d(r,"Algorithm",(function(){return kZ})),n.d(r,"Calculator",(function(){return WZ})),n.d(r,"CellData",(function(){return xZ})),n.d(r,"Contexts",(function(){return XZ})),n.d(r,"DataArray",(function(){return RZ})),n.d(r,"FieldData",(function(){return wZ})),n.d(r,"GeometryRepresentation",(function(){return SZ})),n.d(r,"GlyphRepresentation",(function(){return BZ})),n.d(r,"ImageData",(function(){return VZ})),n.d(r,"PointCloudRepresentation",(function(){return TZ})),n.d(r,"PointData",(function(){return yZ})),n.d(r,"PolyData",(function(){return vZ})),n.d(r,"Reader",(function(){return ZZ})),n.d(r,"ShareDataSet",(function(){return AZ})),n.d(r,"SliceRepresentation",(function(){return hZ})),n.d(r,"View",(function(){return GZ})),n.d(r,"VolumeController",(function(){return bZ})),n.d(r,"VolumeDataRepresentation",(function(){return JZ})),n.d(r,"VolumeRepresentation",(function(){return IZ}));var a=n(14);n(3);function o(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);o(g);const u=new Array(60);o(u);const d=new Array(512);o(d);const m=new Array(256);o(m);const f=new Array(29);o(f);const p=new Array(30);function C(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let I,h,b;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}o(p);const v=e=>e<256?d[e]:d[256+(e>>>7)],Z=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},A=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{A(e,n[2*t],n[2*t+1])},S=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},B=(e,t,n)=>{const r=new Array(16);let a,o,i=0;for(a=1;a<=15;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=S(r[t]++,t))}},V=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},R=e=>{e.bi_valid>8?Z(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},w=(e,t,n,r)=>{const a=2*t,o=2*n;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],a=e.pending_buf[e.l_buf+c],c++,0===r?G(e,a,t):(o=m[a],G(e,o+256+1,t),s=i[o],0!==s&&(a-=f[o],A(e,a,s)),r--,o=v(r),G(e,o,n),s=l[o],0!==s&&(r-=p[o],A(e,r,s)))}while(c{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)k(e,n,i);s=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,n[2*s]=n[2*i]+n[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,n[2*i+1]=n[2*l+1]=s,e.heap[1]=s++,k(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,g,u,d,m,f,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)g=e.heap[c],d=n[2*n[2*g+1]+1]+1,d>s&&(d=s,p++),n[2*g+1]=d,g>r||(e.bl_count[d]++,m=0,g>=l&&(m=i[g-l]),f=n[2*g],e.opt_len+=f*(d+m),o&&(e.static_len+=f*(a[2*g+1]+m)));if(0!==p){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;0!==d;d--)for(g=e.bl_count[d];0!==g;)u=e.heap[--c],u>r||(n[2*u+1]!==d&&(e.opt_len+=(d-n[2*u+1])*n[2*u],n[2*u+1]=d),g--)}})(e,t),B(n,c,e.bl_count)},T=(e,t,n)=>{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),r=0;r<=n;r++)if(a=i,i=t[2*(r+1)+1],!(++l{A(e,0+(r?1:0),3),((e,t,n,r)=>{R(e),Z(e,n),Z(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var N={_tr_init:e=>{X||((()=>{let e,t,n,r,a;const o=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<>=7;r<30;r++)for(p[r]=a<<7,e=0;e<1<{let a,o,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),x(e,e.l_desc),x(e,e.d_desc),i=(e=>{let t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?O(e,t,n,r):4===e.strategy||o===a?(A(e,2+(r?1:0),3),W(e,g,u)):(A(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),a=0;a(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{A(e,2,3),G(e,256,g),(e=>{16===e.bi_valid?(Z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},H=(e,t,n,r)=>{let a=65535&e|0,o=e>>>16&65535|0,i=0;for(;0!==n;){i=n>2e3?2e3:n,n-=i;do{a=a+t[r++]|0,o=o+a|0}while(--i);a%=65521,o%=65521}return a|o<<16|0};const Y=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var F=(e,t,n,r)=>{const a=Y,o=r+n;e^=-1;for(let n=r;n>>8^a[255&(e^t[n])];return-1^e},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:M,_tr_stored_block:L,_tr_flush_block:D,_tr_tally:E,_tr_align:U}=N,{Z_NO_FLUSH:z,Z_PARTIAL_FLUSH:_,Z_FULL_FLUSH:j,Z_FINISH:Q,Z_BLOCK:q,Z_OK:$,Z_STREAM_END:ee,Z_STREAM_ERROR:te,Z_DATA_ERROR:ne,Z_BUF_ERROR:re,Z_DEFAULT_COMPRESSION:ae,Z_FILTERED:oe,Z_HUFFMAN_ONLY:ie,Z_RLE:le,Z_FIXED:se,Z_DEFAULT_STRATEGY:ce,Z_UNKNOWN:ge,Z_DEFLATED:ue}=K,de=(e,t)=>(e.msg=P[t],t),me=e=>(e<<1)-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let pe=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ie=(e,t)=>{D(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ce(e.strm)},he=(e,t)=>{e.pending_buf[e.pending++]=t},be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ye=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=H(e.adler,t,a,n):2===e.state.wrap&&(e.adler=F(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},ve=(e,t)=>{let n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258;let m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(n=t,c[n+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead},Ze=e=>{const t=e.w_size;let n,r,a,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{a=e.head[--n],e.head[n]=a>=t?a-t:0}while(--r);r=t,n=r;do{a=e.prev[--n],e.prev[n]=a>=t?a-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=ye(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pe(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Ae=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=ve(e,n)),e.match_length>=3)if(r=E(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=pe(e,e.ins_h,e.window[e.strstart+1]);else r=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2},Ge=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=E(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ie(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=E(e,0,e.window[e.strstart-1]),r&&Ie(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=E(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2};function Se(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Be=[new Se(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ze(e),0===e.lookahead&&t===z)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ie(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Ie(e,!1),e.strm.avail_out),1)}),new Se(4,4,8,4,Ae),new Se(4,5,16,8,Ae),new Se(4,6,32,32,Ae),new Se(4,4,16,16,Ge),new Se(8,16,32,32,Ge),new Se(8,16,128,128,Ge),new Se(8,32,128,256,Ge),new Se(32,128,258,1024,Ge),new Se(32,258,258,4096,Ge)];function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Re=e=>{if(!e||!e.state)return de(e,te);e.total_in=e.total_out=0,e.data_type=ge;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=z,M(t),$},we=e=>{const t=Re(e);var n;return t===$&&((n=e.state).window_size=2*n.w_size,fe(n.head),n.max_lazy_match=Be[n.level].max_lazy,n.good_match=Be[n.level].good_length,n.nice_match=Be[n.level].nice_length,n.max_chain_length=Be[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ke=(e,t,n,r,a,o)=>{if(!e)return te;let i=1;if(t===ae&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>se)return de(e,te);8===r&&(r=9);const l=new Ve;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e&&e.state?2!==e.state.wrap?te:(e.state.gzhead=t,$):te,Te=(e,t)=>{let n,r;if(!e||!e.state||t>q||t<0)return e?de(e,te):te;const a=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===a.status&&t!==Q)return de(e,0===e.avail_out?re:te);a.strm=e;const o=a.last_flush;if(a.last_flush=t,42===a.status)if(2===a.wrap)e.adler=0,he(a,31),he(a,139),he(a,8),a.gzhead?(he(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),he(a,255&a.gzhead.time),he(a,a.gzhead.time>>8&255),he(a,a.gzhead.time>>16&255),he(a,a.gzhead.time>>24&255),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(he(a,255&a.gzhead.extra.length),he(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=F(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(he(a,0),he(a,0),he(a,0),he(a,0),he(a,0),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,3),a.status=113);else{let t=ue+(a.w_bits-8<<4)<<8,n=-1;n=a.strategy>=ie||a.level<2?0:a.level<6?1:6===a.level?2:3,t|=n<<6,0!==a.strstart&&(t|=32),t+=31-t%31,a.status=113,be(a,t),0!==a.strstart&&(be(a,e.adler>>>16),be(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending!==a.pending_buf_size));)he(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Ce(e),a.pending+2<=a.pending_buf_size&&(he(a,255&e.adler),he(a,e.adler>>8&255),e.adler=0,a.status=113)):a.status=113),0!==a.pending){if(Ce(e),0===e.avail_out)return a.last_flush=-1,$}else if(0===e.avail_in&&me(t)<=me(o)&&t!==Q)return de(e,re);if(666===a.status&&0!==e.avail_in)return de(e,re);if(0!==e.avail_in||0!==a.lookahead||t!==z&&666!==a.status){let n=a.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ze(e),0===e.lookahead)){if(t===z)return 1;break}if(e.match_length=0,n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):a.strategy===le?((e,t)=>{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=258){if(Ze(e),e.lookahead<=258&&t===z)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=E(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):Be[a.level].func(a,t);if(3!==n&&4!==n||(a.status=666),1===n||3===n)return 0===e.avail_out&&(a.last_flush=-1),$;if(2===n&&(t===_?U(a):t!==q&&(L(a,0,0,!1),t===j&&(fe(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Ce(e),0===e.avail_out))return a.last_flush=-1,$}return t!==Q?$:a.wrap<=0?ee:(2===a.wrap?(he(a,255&e.adler),he(a,e.adler>>8&255),he(a,e.adler>>16&255),he(a,e.adler>>24&255),he(a,255&e.total_in),he(a,e.total_in>>8&255),he(a,e.total_in>>16&255),he(a,e.total_in>>24&255)):(be(a,e.adler>>>16),be(a,65535&e.adler)),Ce(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$:ee)},Je=e=>{if(!e||!e.state)return te;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?de(e,te):(e.state=null,113===t?de(e,ne):$)},Xe=(e,t)=>{let n=t.length;if(!e||!e.state)return te;const r=e.state,a=r.wrap;if(2===a||1===a&&42!==r.status||r.lookahead)return te;if(1===a&&(e.adler=H(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(fe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ze(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=pe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ze(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=i,e.input=l,e.avail_in=o,r.wrap=a,$};const Oe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ne=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Oe(n,t)&&(e[t]=n[t])}}return e},He=e=>{let t=0;for(let n=0,r=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Pe=e=>{let t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Ke=(e,t)=>{let n,r;const a=t||e.length,o=new Array(2*a);for(r=0,n=0;n4)o[r++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fe[e[n]]>t?n:t},Le=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const De=Object.prototype.toString,{Z_NO_FLUSH:Ee,Z_SYNC_FLUSH:Ue,Z_FULL_FLUSH:ze,Z_FINISH:_e,Z_OK:je,Z_STREAM_END:Qe,Z_DEFAULT_COMPRESSION:qe,Z_DEFAULT_STRATEGY:$e,Z_DEFLATED:et}=K;function tt(e){this.options=Ne({level:qe,method:et,chunkSize:16384,windowBits:15,memLevel:8,strategy:$e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=We(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==je)throw new Error(P[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Pe(t.dictionary):"[object ArrayBuffer]"===De.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Xe(this.strm,e),n!==je)throw new Error(P[n]);this._dict_set=!0}}function nt(e,t){const n=new tt(t);if(n.push(e,!0),n.err)throw n.msg||P[n.err];return n.result}tt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?_e:Ee,"string"==typeof e?n.input=Pe(e):"[object ArrayBuffer]"===De.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Ue||o===ze)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Te(n,o),a===Qe)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Je(this.strm),this.onEnd(a),this.ended=!0,a===je;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},tt.prototype.onData=function(e){this.chunks.push(e)},tt.prototype.onEnd=function(e){e===je&&(this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:tt,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:K},at=function(e,t){let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S;const B=e.state;n=e.next_in,G=e.input,r=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),i=a+(e.avail_out-257),l=B.dmax,s=B.wsize,c=B.whave,g=B.wnext,u=B.window,d=B.hold,m=B.bits,f=B.lencode,p=B.distcode,C=(1<>>24,d>>>=b,m-=b,b=h>>>16&255,0===b)S[a++]=65535&h;else{if(!(16&b)){if(0==(64&b)){h=f[(65535&h)+(d&(1<>>=b,m-=b),m<15&&(d+=G[n++]<>>24,d>>>=b,m-=b,b=h>>>16&255,!(16&b)){if(0==(64&b)){h=p[(65535&h)+(d&(1<l){e.msg="invalid distance too far back",B.mode=30;break e}if(d>>>=b,m-=b,b=a-o,v>b){if(b=v-b,b>c&&B.sane){e.msg="invalid distance too far back",B.mode=30;break e}if(Z=0,A=u,0===g){if(Z+=s-b,b2;)S[a++]=A[Z++],S[a++]=A[Z++],S[a++]=A[Z++],y-=3;y&&(S[a++]=A[Z++],y>1&&(S[a++]=A[Z++]))}else{Z=a-v;do{S[a++]=S[Z++],S[a++]=S[Z++],S[a++]=S[Z++],y-=3}while(y>2);y&&(S[a++]=S[Z++],y>1&&(S[a++]=S[Z++]))}break}}break}}while(n>3,n-=y,m-=y<<3,d&=(1<{const s=l.bits;let c,g,u,d,m,f,p=0,C=0,I=0,h=0,b=0,y=0,v=0,Z=0,A=0,G=0,S=null,B=0;const V=new Uint16Array(16),R=new Uint16Array(16);let w,k,W,x=null,T=0;for(p=0;p<=15;p++)V[p]=0;for(C=0;C=1&&0===V[h];h--);if(b>h&&(b=h),0===h)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==h))return-1;for(R[1]=0,p=1;p<15;p++)R[p+1]=R[p]+V[p];for(C=0;C852||2===e&&A>592)return 1;for(;;){w=p-v,i[C]f?(k=x[T+i[C]],W=S[B+i[C]]):(k=96,W=0),c=1<>v)+g]=w<<24|k<<16|W|0}while(0!==g);for(c=1<>=1;if(0!==c?(G&=c-1,G+=c):G=0,C++,0==--V[p]){if(p===h)break;p=t[n+i[C]]}if(p>b&&(G&d)!==u){for(0===v&&(v=b),m+=I,y=p-v,Z=1<852||2===e&&A>592)return 1;u=G&d,a[u]=b<<24|y<<16|m-o|0}}return 0!==G&&(a[m+G]=p-v<<24|64<<16|0),l.bits=b,0};const{Z_FINISH:gt,Z_BLOCK:ut,Z_TREES:dt,Z_OK:mt,Z_STREAM_END:ft,Z_NEED_DICT:pt,Z_STREAM_ERROR:Ct,Z_DATA_ERROR:It,Z_MEM_ERROR:ht,Z_BUF_ERROR:bt,Z_DEFLATED:yt}=K,vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Zt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const At=e=>{if(!e||!e.state)return Ct;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,mt},Gt=e=>{if(!e||!e.state)return Ct;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,At(e)},St=(e,t)=>{let n;if(!e||!e.state)return Ct;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ct:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gt(e))},Bt=(e,t)=>{if(!e)return Ct;const n=new Zt;e.state=n,n.window=null;const r=St(e,t);return r!==mt&&(e.state=null),r};let Vt,Rt,wt=!0;const kt=e=>{if(wt){Vt=new Int32Array(512),Rt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ct(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ct(2,e.lens,0,32,Rt,0,e.work,{bits:5}),wt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=Rt,e.distbits=5},Wt=(e,t,n,r)=>{let a;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),(r-=a)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G=0;const S=new Uint8Array(4);let B,V;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ct;n=e.state,12===n.mode&&(n.mode=13),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,u=l,d=s,A=mt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&c)!==yt){e.msg="unknown compression method",n.mode=30;break}if(c>>>=4,g-=4,Z=8+(15&c),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=F(n.check,S,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m=n.length,m>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+m),Z)),512&n.flags&&(n.check=F(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1,g-=1,3&c){case 0:n.mode=14;break;case 1:if(kt(n),n.mode=20,t===dt){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,t===dt)break e;case 15:n.mode=16;case 16:if(m=n.length,m){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;a.set(r.subarray(o,o+m),i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},A=ct(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(V=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(V=C+3;g>>=C,g-=C,Z=0,m=3+(7&c),c>>>=3,g-=3}else{for(V=C+7;g>>=C,g-=C,Z=0,m=11+(127&c),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},A=ct(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},A=ct(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===dt)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,at(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;G=n.lencode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=n.distcode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<{if(!e||!e.state)return Ct;let t=e.state;return t.window&&(t.window=null),e.state=null,mt},Ot=(e,t)=>{if(!e||!e.state)return Ct;const n=e.state;return 0==(2&n.wrap)?Ct:(n.head=t,t.done=!1,mt)},Nt=(e,t)=>{const n=t.length;let r,a,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?Ct:11===r.mode&&(a=1,a=H(a,t,n,0),a!==r.check)?It:(o=Wt(e,t,n,n),o?(r.mode=31,ht):(r.havedict=1,mt))):Ct},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Yt=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_FINISH:Pt,Z_OK:Kt,Z_STREAM_END:Mt,Z_NEED_DICT:Lt,Z_STREAM_ERROR:Dt,Z_DATA_ERROR:Et,Z_MEM_ERROR:Ut}=K;function zt(e){this.options=Ne({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=Tt(this.strm,t.windowBits);if(n!==Kt)throw new Error(P[n]);if(this.header=new Ht,Ot(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Pe(t.dictionary):"[object ArrayBuffer]"===Yt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Nt(this.strm,t.dictionary),n!==Kt)))throw new Error(P[n])}function _t(e,t){const n=new zt(t);if(n.push(e),n.err)throw n.msg||P[n.err];return n.result}zt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Pt:Ft,"[object ArrayBuffer]"===Yt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Jt(n,i),o===Lt&&a&&(o=Nt(n,a),o===Kt?o=Jt(n,i):o===Et&&(o=Lt));n.avail_in>0&&o===Mt&&n.state.wrap>0&&0!==e[n.next_in];)xt(n),o=Jt(n,i);switch(o){case Dt:case Et:case Lt:case Ut:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(0===n.avail_out||o===Mt))if("string"===this.options.to){let e=Me(n.output,n.next_out),t=n.next_out-e,a=Ke(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Kt||0!==l){if(o===Mt)return o=Xt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},zt.prototype.onData=function(e){this.chunks.push(e)},zt.prototype.onEnd=function(e){e===Kt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jt={Inflate:zt,inflate:_t,inflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},ungzip:_t,constants:K};const{Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en}=rt,{Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an}=jt;var on={Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en,Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an,constants:K},ln=n(4),sn=n(34),cn=n(15),gn=n(18),un=ln.c.vtkErrorMacro,dn=ln.c.vtkDebugMacro,mn=0;function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(a.a)(e,2),n=t[0],o=t[1];return r.setRequestHeader(n,o)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var pn={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise((function(a,o){var i=fn("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);i.onreadystatechange=function(t){1===i.readyState&&(n.ref.pending=!0,1==++mn&&e.invokeBusy&&e.invokeBusy(!0)),4===i.readyState&&(n.ref.pending=!1,200===i.status||0===i.status?(n.buffer=i.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=on.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=on.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sn.a.ENDIANNESS!==n.ref.encode&&sn.a.ENDIANNESS&&(dn("Swap bytes of ".concat(n.name)),sn.a.swapBytes(n.buffer,cn.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&un("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--mn&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):o({xhr:i,e:t}))},i.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",i.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(on.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(un("Supported algorithms are: [gz]"),un("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(on.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=fn("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(gn.c)("http",(function(e){return pn}));var Cn=n(9),In=n(10),hn=n(19),bn=n(29),yn=n(16),vn=Object(Cn.d)((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;function a(){yn.a.call(this,"utf-8 decode"),this.leftOver=null}function o(){yn.a.call(this,"utf-8 encode")}n[254]=n[254]=1,t.utf8encode=function(e){return hn.a.nodebuffer?bn.a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},t.utf8decode=function(e){return hn.a.nodebuffer?In.a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,a,o,i=e.length,l=new Array(2*i);for(r=0,t=0;t4)l[r++]=65533,t+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),In.a.applyFromCharCode(l)}(e=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e))},In.a.inherits(a,yn.a),a.prototype.processChunk=function(e){var r=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(hn.a.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),i=r;o!==r.length&&(hn.a.uint8array?(i=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(i=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=a,In.a.inherits(o,yn.a),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o}),"/$$rollup_base$$/node_modules/jszip/lib"),Zn=n(50),An={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},Gn=n(28);function Sn(e){yn.a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=In.a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}In.a.inherits(Sn,yn.a),Sn.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this.data=null},Sn.prototype.resume=function(){return!!yn.a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,In.a.delay(this._tickAndRepeat,[],this)),!0)},Sn.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(In.a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sn.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Bn=Sn;function Vn(e){yn.a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}In.a.inherits(Vn,yn.a),Vn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}yn.a.prototype.processChunk.call(this,e)};var Rn=Vn,wn=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),kn=function(e,t){return void 0!==e&&e.length?"string"!==In.a.getTypeOf(e)?function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t[i])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t.charCodeAt(i))];return-1^e}(0|t,e,e.length):0};function Wn(){yn.a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}In.a.inherits(Wn,yn.a),Wn.prototype.processChunk=function(e){this.streamInfo.crc32=kn(e.data,this.streamInfo.crc32||0),this.push(e)};var xn=Wn;function Tn(e,t,n,r,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=a}Tn.prototype={getContentWorker:function(){var e=new Bn(Gn.a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Rn("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Bn(Gn.a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Tn.createWorkerFrom=function(e,t,n){return e.pipe(new xn).pipe(new Rn("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Rn("compressedSize")).withStreamInfo("compression",t)};var Jn=Tn,Xn=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Xn.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new vn.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new vn.Utf8DecodeWorker))}catch(e){(t=new yn.a("error")).error(e)}return new Zn.a(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Jn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new vn.Utf8EncodeWorker)),Jn.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Jn?this._data.getContentWorker():this._data instanceof yn.a?this._data:new Bn(this._data)}};for(var On=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Nn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Hn=0;Hn=0;)e[t]=0}var Kn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ln=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Dn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=new Array(576);Pn(En);var Un=new Array(60);Pn(Un);var zn=new Array(512);Pn(zn);var _n=new Array(256);Pn(_n);var jn=new Array(29);Pn(jn);var Qn,qn,$n,er=new Array(30);function tr(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function nr(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function rr(e){return e<256?zn[e]:zn[256+(e>>>7)]}function ar(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function or(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function sr(e,t,n){var r,a,o=new Array(16),i=0;for(r=1;r<=15;r++)o[r]=i=i+n[r-1]<<1;for(a=0;a<=t;a++){var l=e[2*a+1];0!==l&&(e[2*a]=lr(o[l]++,l))}}function cr(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function gr(e){e.bi_valid>8?ar(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ur(e,t,n,r){var a=2*t,o=2*n;return e[a]>1;n>=1;n--)dr(e,o,n);a=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],dr(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*a]=o[2*n]+o[2*r],e.depth[a]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=a,e.heap[1]=a++,dr(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,o,i,l,s=t.dyn_tree,c=t.max_code,g=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,p=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,p++),s[2*r+1]=o,r>c||(e.bl_count[o]++,i=0,r>=m&&(i=d[r-m]),l=s[2*r],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(g[2*r+1]+i)));if(0!==p){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,p-=2}while(p>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(a=e.heap[--n])>c||(s[2*a+1]!==o&&(e.opt_len+=(o-s[2*a+1])*s[2*a],s[2*a+1]=o),r--)}}(e,t),sr(o,c,e.bl_count)}function pr(e,t,n){var r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l>=7;r<30;r++)for(er[r]=a<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),fr(e,e.l_desc),fr(e,e.d_desc),i=function(e){var t;for(pr(e,e.dyn_ltree,e.l_desc.max_code),pr(e,e.dyn_dtree,e.d_desc.max_code),fr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Dn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?hr(e,t,n,r):4===e.strategy||o===a?(or(e,2+(r?1:0),3),mr(e,En,Un)):(or(e,4+(r?1:0),3),function(e,t,n,r){var a;for(or(e,t-257,5),or(e,n-1,5),or(e,r-4,4),a=0;a>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(_n[n]+256+1)]++,e.dyn_dtree[2*rr(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){or(e,2,3),ir(e,256,En),function(e){16===e.bi_valid?(ar(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},vr=function(e,t,n,r){for(var a=65535&e|0,o=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{o=o+(a=a+t[r++]|0)|0}while(--i);a%=65521,o%=65521}return a|o<<16|0},Zr=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),Ar=function(e,t,n,r){var a=Zr,o=r+n;e^=-1;for(var i=r;i>>8^a[255&(e^t[i])];return-1^e},Gr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Sr(e,t){return e.msg=Gr[t],t}function Br(e){return(e<<1)-(e>4?9:0)}function Vr(e){for(var t=e.length;--t>=0;)e[t]=0}function Rr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Fn.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function wr(e,t){yr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rr(e.strm)}function kr(e,t){e.pending_buf[e.pending++]=t}function Wr(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function xr(e,t){var n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258,m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(c[(n=t)+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead}function Tr(e){var t,n,r,a,o,i,l,s,c,g,u=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){Fn.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);a+=u}if(0===e.strm.avail_in)break;if(i=e.strm,l=e.window,s=e.strstart+e.lookahead,c=a,g=void 0,(g=i.avail_in)>c&&(g=c),n=0===g?0:(i.avail_in-=g,Fn.arraySet(l,i.input,i.next_in,g,s),1===i.state.wrap?i.adler=vr(i.adler,l,g,s):2===i.state.wrap&&(i.adler=Ar(i.adler,l,g,s)),i.next_in+=g,i.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=yr._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=yr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<15&&(i=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return Sr(e,-2);8===r&&(r=9);var l=new Nr;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tr(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wr(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wr(e,!1),e.strm.avail_out),1)})),new Or(4,4,8,4,Jr),new Or(4,5,16,8,Jr),new Or(4,6,32,32,Jr),new Or(4,4,16,16,Xr),new Or(8,16,32,32,Xr),new Or(8,16,128,128,Xr),new Or(8,32,128,256,Xr),new Or(32,128,258,1024,Xr),new Or(32,258,258,4096,Xr)];var Pr={deflateInit:function(e,t){return Fr(e,t,8,15,8,0)},deflateInit2:Fr,deflateReset:Yr,deflateResetKeep:Hr,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,a,o;if(!e||!e.state||t>5||t<0)return e?Sr(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Sr(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kr(r,31),kr(r,139),kr(r,8),r.gzhead?(kr(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kr(r,255&r.gzhead.time),kr(r,r.gzhead.time>>8&255),kr(r,r.gzhead.time>>16&255),kr(r,r.gzhead.time>>24&255),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kr(r,255&r.gzhead.extra.length),kr(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ar(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,3),r.status=113);else{var i=8+(r.w_bits-8<<4)<<8;i|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),i+=31-i%31,r.status=113,Wr(r,i),0!==r.strstart&&(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending!==r.pending_buf_size));)kr(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rr(e),r.pending+2<=r.pending_buf_size&&(kr(r,255&e.adler),kr(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rr(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Br(t)<=Br(n)&&4!==t)return Sr(e,-5);if(666===r.status&&0!==e.avail_in)return Sr(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var l=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Tr(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,a,o,i=e.window;;){if(e.lookahead<=258){if(Tr(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=i[a=e.strstart-1])===i[++a]&&r===i[++a]&&r===i[++a]){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=yr._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):br[r.level].func(r,t);if(3!==l&&4!==l||(r.status=666),1===l||3===l)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===t?yr._tr_align(r):5!==t&&(yr._tr_stored_block(r,0,0,!1),3===t&&(Vr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rr(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(kr(r,255&e.adler),kr(r,e.adler>>8&255),kr(r,e.adler>>16&255),kr(r,e.adler>>24&255),kr(r,255&e.total_in),kr(r,e.total_in>>8&255),kr(r,e.total_in>>16&255),kr(r,e.total_in>>24&255)):(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),Rr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Sr(e,-2):(e.state=null,113===t?Sr(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,a,o,i,l,s,c,g=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=vr(e.adler,t,g,0)),n.wrap=0,g>=n.w_size&&(0===o&&(Vr(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new Fn.Buf8(n.w_size),Fn.arraySet(c,t,g-n.w_size,n.w_size,0),t=c,g=n.w_size),i=e.avail_in,l=e.next_in,s=e.input,e.avail_in=g,e.next_in=0,e.input=t,Tr(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<=252?6:Dr>=248?5:Dr>=240?4:Dr>=224?3:Dr>=192?2:1;function Er(e,t){if(t<65534&&(e.subarray&&Mr||!e.subarray&&Kr))return String.fromCharCode.apply(null,Fn.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},zr=function(e){return Er(e,e.length)},_r=function(e){for(var t=new Fn.Buf8(e.length),n=0,r=t.length;n4)l[r++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return Er(l,r)},Qr=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Lr[e[n]]>t?n:t},qr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$r=Object.prototype.toString;function ea(e){if(!(this instanceof ea))return new ea(e);this.options=Fn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=Pr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(Gr[n]);if(t.header&&Pr.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ur(t.dictionary):"[object ArrayBuffer]"===$r.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Pr.deflateSetDictionary(this.strm,r)))throw new Error(Gr[n]);this._dict_set=!0}}function ta(e,t){var n=new ea(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}ea.prototype.push=function(e,t){var n,r,a=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=Ur(e):"[object ArrayBuffer]"===$r.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new Fn.Buf8(o),a.next_out=0,a.avail_out=o),1!==(n=Pr.deflate(a,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(zr(Fn.shrinkBuf(a.output,a.next_out))):this.onData(Fn.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===r?(n=Pr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),a.avail_out=0,!0)},ea.prototype.onData=function(e){this.chunks.push(e)},ea.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var na={Deflate:ea,deflate:ta,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ta(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ta(e,t)}},ra=function(e,t){var n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B;n=e.state,r=e.next_in,S=e.input,a=r+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,c=n.wsize,g=n.whave,u=n.wnext,d=n.window,m=n.hold,f=n.bits,p=n.lencode,C=n.distcode,I=(1<>>=y=b>>>24,f-=y,0==(y=b>>>16&255))B[o++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<>>=y,f-=y),f<15&&(m+=S[r++]<>>=y=b>>>24,f-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=C[(65535&b)+(m&(1<s){e.msg="invalid distance too far back",n.mode=30;break e}if(m>>>=y,f-=y,Z>(y=o-i)){if((y=Z-y)>g&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,G=d,0===u){if(A+=c-y,y2;)B[o++]=G[A++],B[o++]=G[A++],B[o++]=G[A++],v-=3;v&&(B[o++]=G[A++],v>1&&(B[o++]=G[A++]))}else{A=o-Z;do{B[o++]=B[A++],B[o++]=B[A++],B[o++]=B[A++],v-=3}while(v>2);v&&(B[o++]=B[A++],v>1&&(B[o++]=B[A++]))}break}}break}}while(r>3,m&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===k[v];v--);if(Z>v&&(Z=v),0===v)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(y=1;y0&&(0===e||1!==v))return-1;for(W[1]=0,h=1;h<15;h++)W[h+1]=W[h]+k[h];for(b=0;b852||2===e&&B>592)return 1;for(;;){f=h-G,i[b]m?(p=x[T+i[b]],C=R[w+i[b]]):(p=96,C=0),s=1<>G)+(c-=s)]=f<<24|p<<16|C|0}while(0!==c);for(s=1<>=1;if(0!==s?(V&=s-1,V+=s):V=0,b++,0==--k[h]){if(h===v)break;h=t[n+i[b]]}if(h>Z&&(V&u)!==g){for(0===G&&(G=Z),d+=y,S=1<<(A=h-G);A+G852||2===e&&B>592)return 1;a[g=V&u]=Z<<24|A<<16|d-o|0}}return 0!==V&&(a[d+V]=h-G<<24|64<<16|0),l.bits=Z,0};function ca(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fn.Buf16(320),this.work=new Fn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ua(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fn.Buf32(852),t.distcode=t.distdyn=new Fn.Buf32(592),t.sane=1,t.back=-1,0):-2}function da(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ua(e)):-2}function ma(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,da(e))):-2}function fa(e,t){var n,r;return e?(r=new ga,e.state=r,r.window=null,0!==(n=ma(e,t))&&(e.state=null),n):-2}var pa,Ca,Ia=!0;function ha(e){if(Ia){var t;for(pa=new Fn.Buf32(512),Ca=new Fn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sa(1,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sa(2,e.lens,0,32,Ca,0,e.work,{bits:5}),Ia=!1}e.lencode=pa,e.lenbits=9,e.distcode=Ca,e.distbits=5}function ba(e,t,n,r){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(Fn.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>r&&(a=r),Fn.arraySet(o.window,t,n-r,a,o.wnext),(r-=a)?(Fn.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ar(n.check,V,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,Z=8+(15&(c>>>=4)),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=Ar(n.check,V,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((m=n.length)>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Fn.arraySet(n.head.extra,r,o,m,Z)),512&n.flags&&(n.check=Ar(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(ha(n),n.mode=20,6===t){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(m=n.length){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;Fn.arraySet(a,r,o,m,i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},A=sa(0,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(S=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(S=C+3;g>>=C)),c>>>=3,g-=3}else{for(S=C+7;g>>=C)),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,G={bits:n.lenbits},A=sa(1,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},A=sa(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,ra(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=ya.inflateInit2(this.strm,t.windowBits);if(n!==va.Z_OK)throw new Error(Gr[n]);if(this.header=new Za,ya.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ur(t.dictionary):"[object ArrayBuffer]"===Aa.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ya.inflateSetDictionary(this.strm,t.dictionary))!==va.Z_OK))throw new Error(Gr[n])}function Sa(e,t){var n=new Ga(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}Ga.prototype.push=function(e,t){var n,r,a,o,i,l=this.strm,s=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?va.Z_FINISH:va.Z_NO_FLUSH,"string"==typeof e?l.input=_r(e):"[object ArrayBuffer]"===Aa.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new Fn.Buf8(s),l.next_out=0,l.avail_out=s),(n=ya.inflate(l,va.Z_NO_FLUSH))===va.Z_NEED_DICT&&c&&(n=ya.inflateSetDictionary(this.strm,c)),n===va.Z_BUF_ERROR&&!0===g&&(n=va.Z_OK,g=!1),n!==va.Z_STREAM_END&&n!==va.Z_OK)return this.onEnd(n),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&n!==va.Z_STREAM_END&&(0!==l.avail_in||r!==va.Z_FINISH&&r!==va.Z_SYNC_FLUSH)||("string"===this.options.to?(a=Qr(l.output,l.next_out),o=l.next_out-a,i=jr(l.output,a),l.next_out=o,l.avail_out=s-o,o&&Fn.arraySet(l.output,l.output,a,o,0),this.onData(i)):this.onData(Fn.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(g=!0)}while((l.avail_in>0||0===l.avail_out)&&n!==va.Z_STREAM_END);return n===va.Z_STREAM_END&&(r=va.Z_FINISH),r===va.Z_FINISH?(n=ya.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===va.Z_OK):r!==va.Z_SYNC_FLUSH||(this.onEnd(va.Z_OK),l.avail_out=0,!0)},Ga.prototype.onData=function(e){this.chunks.push(e)},Ga.prototype.onEnd=function(e){e===va.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ba={Inflate:Ga,inflate:Sa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Sa(e,t)},ungzip:Sa},Va={};(0,Fn.assign)(Va,na,Ba,va);var Ra=Va,wa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function ka(e,t){yn.a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}In.a.inherits(ka,yn.a),ka.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(In.a.transformTo(wa,e.data),!1)},ka.prototype.flush=function(){yn.a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},ka.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this._pako=null},ka.prototype._createPako=function(){this._pako=new Ra[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Wa={STORE:{magic:"\0\0",compressWorker:function(e){return new yn.a("STORE compression")},uncompressWorker:function(){return new yn.a("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new ka("Deflate",e)},uncompressWorker:function(){return new ka("Inflate",{})}}},xa="PK",Ta="PK",Ja="PK",Xa="PK",Oa="PK",Na="PK\b",Ha=function(e,t){var n,r="";for(n=0;n>>=8;return r},Ya=function(e,t,n,r,a,o){var i,l,s=e.file,c=e.compression,g=o!==vn.utf8encode,u=In.a.transformTo("string",o(s.name)),d=In.a.transformTo("string",vn.utf8encode(s.name)),m=s.comment,f=In.a.transformTo("string",o(m)),p=In.a.transformTo("string",vn.utf8encode(m)),C=d.length!==s.name.length,I=p.length!==m.length,h="",b="",y="",v=s.dir,Z=s.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var G=0;t&&(G|=8),g||!C&&!I||(G|=2048);var S,B,V=0,R=0;v&&(V|=16),"UNIX"===a?(R=798,V|=(B=S=s.unixPermissions,S||(B=v?16893:33204),(65535&B)<<16)):(R=20,V|=63&(s.dosPermissions||0)),i=Z.getUTCHours(),i<<=6,i|=Z.getUTCMinutes(),i<<=5,i|=Z.getUTCSeconds()/2,l=Z.getUTCFullYear()-1980,l<<=4,l|=Z.getUTCMonth()+1,l<<=5,l|=Z.getUTCDate(),C&&(b=Ha(1,1)+Ha(kn(u),4)+d,h+="up"+Ha(b.length,2)+b),I&&(y=Ha(1,1)+Ha(kn(f),4)+p,h+="uc"+Ha(y.length,2)+y);var w="";return w+="\n\0",w+=Ha(G,2),w+=c.magic,w+=Ha(i,2),w+=Ha(l,2),w+=Ha(A.crc32,4),w+=Ha(A.compressedSize,4),w+=Ha(A.uncompressedSize,4),w+=Ha(u.length,2),w+=Ha(h.length,2),{fileRecord:xa+w+u+h,dirRecord:Ta+Ha(R,2)+w+Ha(f.length,2)+"\0\0\0\0"+Ha(V,4)+Ha(r,4)+u+h+f}},Fa=function(e){return Na+Ha(e.crc32,4)+Ha(e.compressedSize,4)+Ha(e.uncompressedSize,4)};function Pa(e,t,n,r){yn.a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}In.a.inherits(Pa,yn.a),Pa.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,yn.a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Pa.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ya(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Pa.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ya(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Fa(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Pa.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},za=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_a=function(e,t){return t=void 0!==t?t:An.createFolders,e=za(e),this.files[e]||Ea.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function ja(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Qa={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(ja(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,Ea.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(ja(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=_a.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return In.a.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var $a=qa;function eo(e){$a.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===a)return o-this.zero;return-1},eo.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),a=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&a===o[3]},eo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var to=eo;function no(e){$a.call(this,e)}In.a.inherits(no,$a),no.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},no.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},no.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},no.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ro=no;function ao(e){to.call(this,e)}In.a.inherits(ao,to),ao.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var oo=ao;function io(e){oo.call(this,e)}In.a.inherits(io,oo),io.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var lo=io,so=function(e){var t=In.a.getTypeOf(e);return In.a.checkSupport(t),"string"!==t||hn.a.uint8array?"nodebuffer"===t?new lo(e):hn.a.uint8array?new oo(In.a.transformTo("uint8array",e)):new to(In.a.transformTo("array",e)):new ro(e)};function co(e,t){this.options=e,this.loadOptions=t}co.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Wa)if(Wa.hasOwnProperty(t)&&Wa[t].magic===e)return Wa[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+In.a.pretty(this.compressionMethod)+" unknown (inner file : "+In.a.transformTo("string",this.fileName)+")");this.decompressed=new Jn(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=so(this.extraFields[1].value);this.uncompressedSize===In.a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===In.a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===In.a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===In.a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,a=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,Ta)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=so(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var mo=uo;function fo(e){return new Gn.a.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new xn);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function po(){if(!(this instanceof po))return new po;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new po;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}po.prototype=Qa,po.prototype.loadAsync=function(e,t){var n=this;return t=In.a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:vn.utf8decode}),bn.a.isNode&&bn.a.isStream(e)?Gn.a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):In.a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new mo(t);return n.load(e),n})).then((function(e){var n=[Gn.a.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a1;){var i=o.shift();a=a.folder(i)}e.callback&&e.callback(r)})),{fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(l,s){t||Io("ERROR!!! zip not ready...");var c=vo([r,o.ref.basepath,i.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var g="string"!==o.dataType||i.compression?"uint8array":"string",u=yo[g](o,i.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),l(o)}));a.file(c).async(g).then(u)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(JSON.parse(e))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=vo(e);return t||Io("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,a.file(n).async("base64").then((function(e){r.src="data:image/".concat(bo(n),";base64,").concat(e)}))}))},fetchBinary:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).then((function(e){var t=on.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};Object(gn.c)("zip",(function(e){return Zo.create(e)}));var Ao=n(11),Go=n(13),So=n(23),Bo=n(7);function Vo(e,t){function n(){for(;t.cellFields.length0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=function(n,r){t.radius[n]=r,e.modified()},e.setCellField=function(n,r){t.cellFields[n]=r,e.modified()},e.removeMask=function(){t.mask=null,e.modified()},e.setMaskLayer=function(n,r){var a=!1;!t.mask&&r&&(a=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(a=!0),t.mask[n]=r),a&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var a;if(!t.deleted&&t.radius.length){n();var o=r[0],i=t.radius.length,l=t.height/2,s=0,c=0,g=t.startThetat.startTheta?t.endTheta:t.startTheta;u*=Math.PI/180;var d=t.resolution,m=!1;u>=g+2*Math.PI?u=g+2*Math.PI:(++d,m=!0);var f=(u-g)/t.resolution,p=d*i*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(s+=2*(d+1)+5*d+(m?10:0),c+=2+d+(m?2:0));for(var C=1;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.getArray(e,t,["cellFields"]),ln.c.algo(e,t,0,1),Vo(e,t)}),"vtkConcentricCylinderSource");function wo(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var a=n[0],o=2*Math.PI/t.resolution,i=-t.height/2,l=t.resolution+1,s=4*t.resolution+1+t.resolution,c=0,g=new window[t.pointType](3*l),u=0,d=new Uint32Array(s);g[0]=t.height/2,g[1]=0,g[2]=0,t.capping&&(d[u++]=t.resolution);for(var m=0;mt.resolution?1:f+2;(r=So.a.buildFromRadian()).translate.apply(r,Object(Ao.a)(t.center)).rotateFromDirections([1,0,0],t.direction).apply(g),(a=Go.a.newInstance()).getPoints().setData(g,3),a.getPolys().setData(d,1),n[0]=a}}}var ko={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ko,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),wo(e,t)}),"vtkConeSource");function Wo(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){var e=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))e=arguments.length<=0?void 0:arguments[0];else for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),ln.c.setGetArray(e,t,["center","rotations"],3),ln.c.algo(e,t,0,1),Wo(e,t)}),"vtkCubeSource");function To(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,a;if(!t.deleted){var o=n[0],i=2*Math.PI/t.resolution,l=2*t.resolution,s=5*t.resolution;t.capping&&(l=4*t.resolution,s=7*t.resolution+2);for(var c=new window[t.pointType](3*l),g=0,u=new Uint32Array(s),d=new Float32Array(3*l),m=Bo.a.newInstance({numberOfComponents:3,values:d,name:"Normals"}),f=new Float32Array(2*l),p=Bo.a.newInstance({numberOfComponents:2,values:f,name:"TCoords"}),C=[0,0,0],I=[0,0,0],h=[0,0,0],b=[0,0,0],y=[0,0],v=[0,0],Z=0;Z2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),To(e,t)}),"vtkCylinderSource");var Xo=n(6),Oo=ln.c.vtkWarningMacro;function No(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=new Float32Array(3);if(Object(Xo.t)(t.point2,t.point1,i),Object(Xo.A)(i)<=0)Oo("Zero-length line definition");else{var l=t.resolution,s=l+1,c=new window[a](3*s);o.getPoints().setData(c,3);var g=new Uint32Array(s+1);o.getLines().setData(g,1);for(var u=0,d=0,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),ln.c.obj(e,t),ln.c.setGet(e,t,["resolution"]),ln.c.setGetArray(e,t,["point1","point2"],3),ln.c.algo(e,t,0,1),No(e,t)}),"vtkLineSource");var Yo=n(8),Fo=n(12),Po=ln.c.vtkWarningMacro;function Ko(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var a=r[0],o=a?a.getPoints().getDataType():"Float32Array",i=Go.a.newInstance(),l=new Float32Array(3),s=new Float32Array(3);if(Object(Xo.t)(t.point1,t.origin,l),Object(Xo.t)(t.point2,t.origin,s),e.updatePlane(l,s)){var c=t.xResolution,g=t.yResolution,u=(c+1)*(g+1),d=c*g,m=new window[o](3*u);i.getPoints().setData(m,3);var f=new Uint32Array(5*d);i.getPolys().setData(f,1);var p=new Float32Array(3*u),C=Bo.a.newInstance({numberOfComponents:3,values:p,name:"Normals"});i.getPointData().setNormals(C);var I=new Float32Array(2*u),h=Bo.a.newInstance({numberOfComponents:2,values:I,name:"TextureCoordinates"});i.getPointData().setTCoords(h);for(var b=new Float32Array(2),y=0,v=0;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mo,n),t.normal=[0,0,1],t.center=[0,0,0],ln.c.obj(e,t),ln.c.setGet(e,t,["xResolution","yResolution"]),ln.c.setGetArray(e,t,["origin"],3),ln.c.getArray(e,t,["point1","point2","normal","center"],3),ln.c.algo(e,t,0,1),Ko(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}),"vtkPlaneSource");function Lo(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=t.numberOfPoints,l=new window[a](3*i);o.getPoints().setData(l,3);var s,c,g,u,d,m=new Uint32Array(i+1);o.getVerts().setData(m,1);for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Do,n),ln.c.obj(e,t),ln.c.setGet(e,t,["numberOfPoints","radius"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Lo(e,t)}),"vtkPointSource");function Eo(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array";r=Go.a.newInstance();var o=0,i=t.thetaResolution,l=t.startThetat.startTheta?t.endTheta:t.startTheta;s*=Math.PI/180;var c=t.startPhit.startPhi?t.endPhi:t.startPhi;g*=Math.PI/180,Math.abs(l-s)<2*Math.PI&&++i;var u=(s-l)/t.thetaResolution,d=t.startPhi<=0?1:0,m=t.phiResolution+(t.endPhi>=180?-1:0),f=t.phiResolution*i+2,p=2*t.phiResolution*t.thetaResolution,C=0,I=new window[a](3*f),h=new Float32Array(3*f),b=0,y=new Uint32Array(5*p);t.startPhi<=0&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]+t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=1,C++,o++),t.endPhi>=180&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]-t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=-1,C++,o++);for(var v=t.phiResolution-o,Z=(g-c)/(t.phiResolution-1),A=0;A=180)for(var W=v-1+o,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Eo(e,t)}),"vtkSphereSource");var zo=n(17),_o=n(27),jo=ln.c.vtkDebugMacro,Qo=ln.c.vtkErrorMacro;function qo(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var a=n[0];if(!a)return Qo("Invalid or missing input"),1;var o=a.getPoints(),i=a.getPointData().getNormals(),l=e.getInputArrayToProcess(0);if(!o||!l)return jo("No data to warp",!!o,!!l),r[0]=n[0],1;var s=o.getNumberOfPoints(),c=null,g=[0,0,1];i&&!t.useNormal?(c=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},jo("Using data normals")):e.getXyPlane()?(c=function(e,t){return g},jo("Using x-y plane normal")):(c=function(e,n){return t.normal},jo("Using Normal instance variable"));for(var u=new Float32Array(3*s),d=o.getData(),m=0,f=[0,0,1],p=1,C=l.getData(),I=l.getNumberOfComponents(),h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$o,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),ln.c.setGetArray(e,t,["normal"],3),qo(e,t)}),"vtkWarpScalar");var ei=n(36),ti=n(37),ni={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}},ri=ni.VaryRadius,ai=ni.GenerateTCoords,oi=ln.c.vtkDebugMacro,ii=ln.c.vtkErrorMacro,li=ln.c.vtkWarningMacro;function si(e,t){function n(e,n){var r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){for(var r=t[n],a=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],i=t,l=i[0],s=0;s1){var c=0,g=[0,0,0],u=[0,0,0],d=i.slice(s+1,s+1+l);if((c=r(e,d,0))!==l)!function(){var t=d[c],i=e.slice(3*t,3*(t+1)),s=d[c+1],m=e.slice(3*s,3*(s+1));if(g=m.map((function(e,t){return e-i[t]})),Object(Xo.y)(g),a)o=a;else{for(;++c.001){o=p,g=u;break}}if(c>=l)for(var C=0;C<3;++C)if(0!==g[C]){o[(C+2)%3]=0,o[(C+1)%3]=1,o[C]=-g[(C+1)%3]/g[C];break}}Object(Xo.y)(o);for(var I=0;++c0?Math.sqrt(Z):0;for(var A=[0,0,0],G=0;G<3;++G)A[G]=u[G]+g[G];Object(Xo.y)(A),Object(Xo.w)(A,y,b),Object(Xo.w)(g,y,A),Object(Xo.q)(o,A)*Object(Xo.q)(b,A)<0&&(Z*=-1);for(var S=I;St.radiusFactor&&(B=t.radiusFactor);else if(c&&t.varyRadius===ri.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(B=c.getComponent(r[R],0))<0)return li("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var X=0;X1&&k){var q=Z.slice(j,j+A+1);a(u.getData(),q,R)}o(z,A,Q,u.getData(),I.getData(),g.getPointData(),L,b,H,F,P,K,w,U)?(V=i(z,A,_,V,g.getCellData(),M,B),D&&l(z,A,Q,u.getData(),H,D.getData())):li("Could not generate points"),z=n(z,A),_++}c.setPoints(I),c.setStrips(B),c.setPointData(L),L.setNormals(y),s[0]=c}}}}}else ii("Invalid or missing input")}}var ci={outputPointsPrecision:ti.b.DEFAULT,radius:.5,varyRadius:ri.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:ai.TCOORDS_OFF,textureLength:1};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),ln.c.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),ln.c.obj(e,t),ln.c.algo(e,t,1,1),si(e,t)}),"vtkTubeFilter");var gi=n(40),ui=(n(25),{diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"}),di={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function mi(e){var t="",n=0,r=di.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var a,o,i,l={comments:[],elements:[],headerLength:n},s=t.split("\n"),c=0;c0,u=e.uvs.length>0,d=e.normals.length>0,m=e.faceVertexUvs.length>0,f=0;f0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(a)}}function hi(e,t,n,r){var a;switch(n){case"int8":case"char":a=[e.getInt8(t),1];break;case"uint8":case"uchar":a=[e.getUint8(t),1];break;case"int16":case"short":a=[e.getInt16(t,r),2];break;case"uint16":case"ushort":a=[e.getUint16(t,r),2];break;case"int32":case"int":a=[e.getInt32(t,r),4];break;case"uint32":case"uint":a=[e.getUint32(t,r),4];break;case"float32":case"float":a=[e.getFloat32(t,r),4];break;case"float64":case"double":a=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return a}function bi(e,t,n,r){for(var a,o={},i=0,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},a=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:a,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:a,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n(t.url,r);return a.then(e.parse),a},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified();var r=mi(gi.a.arrayBufferToString(n));if("ascii"!==r.format){t.parseData=n;for(var a,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},i="binary_little_endian"===r.format,l=n instanceof ArrayBuffer?n:n.buffer,s=new DataView(l,r.headerLength),c=0,g=0;g=a.elements[c].count&&(c++,g=0);var m=Ci(a.elements[c].properties,d);Ii(o,a.elements[c].name,m),g++}}var f=fi(o,a.elements);t.output[0]=f}}},e.requestData=function(n,r){e.parse(t.parseData)}}var vi={};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),yi(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkPLYReader"),n(69);function Zi(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){return t.url=n,e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then((function(t){return e.parseAsText(t),!0}))},e.parseAsText=function(n){t.csv=n,t.elevation=[],t.csv.split("\n").forEach((function(e,n){t.elevation.push(e.split(",").map((function(e){return Number(e)})))})),e.modified()},e.requestData=function(e,n){var r=Go.a.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var a=t.elevation.length,o=t.elevation[0].length,i=r.getPoints();i.setNumberOfPoints(o*a,3);var l=i.getData(),s=ei.a.newInstance({size:5*(o-1)*(a-1)});r.setPolys(s);var c=s.getData(),g=0,u=new Float32Array(o*a*2),d=Bo.a.newInstance({numberOfComponents:2,values:u,name:"TextureCoordinates"});r.getPointData().setTCoords(d);for(var m=0;m0&&m>0&&(c[g++]=4,c[g++]=p,c[g++]=p-1,c[g++]=p-1-o,c[g++]=p-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Ai={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ai,n),ln.c.obj(e,t),ln.c.get(e,t,["url"]),ln.c.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Zi(e,t)}),"vtkElevationReader");var Gi={};function Si(e,t,n,r){for(var a=0;a0&&"\r"!==e})),i=o.length;a.push(i);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.obj");return e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=function(n){return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,Gi.splitOn=r,Gi.pieces=[],Gi.v=[],Gi.vt=[],Gi.vn=[],Gi.f=[[]],Gi.size=0,n.split("\n").forEach(Bi),function(e){var t=!!Gi.vt.length,n=!!Gi.vn.length;if(e.splitMode){e.numberOfOutputs=Gi.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper","splitMode"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Vi(e,t)}),"vtkOBJReader");var wi=["chemical json","name","inchi","formula","atoms","bonds","properties"];function ki(e,t){t.classHierarchy.push("vtkMolecule")}var Wi={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function xi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),ln.c.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),ln.c.setGet(e,t,wi),ki(0,t)}var Ti={newInstance:ln.c.newInstance(xi,"vtkMolecule"),extend:xi},Ji={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};function Xi(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}return e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText)},e.parseAsText=function(n){return t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0},e.requestData=function(e,n){var r=Ti.newInstance();if(t.molecule){var o=t.molecule.length,i=[],l=[];t.numberOfAtoms=0;for(var s=0;s=78&&(C=g.substr(76,2).replace(/\s+/g,"")),""===C&&(C=d.substr(0,2).replace(/\d/g,"")),i.push(m),i.push(f),i.push(p);var I=Object(a.a)(Ji[C],1)[0];l.push(I),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(l),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(i)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Oi={numberOfAtoms:0,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Xi(e,t)}),"vtkPDBReader");var Ni=[];Ni["-".charCodeAt(0)]=62,Ni["_".charCodeAt(0)]=63;for(var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yi=0;Yi>16&255,r[g++]=c>>8&255,r[g++]=255&c}switch(i){case 3:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<10;!Fi(e[s]);)s++;for(c|=Ni[e.charCodeAt(s++)]<<4;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>2,r[g++]=c>>8&255,r[g++]=255&c;break;case 2:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<2;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>4,r[g++]=255&c;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return g}var Ki={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();var r=function(e){return gi.a.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),a=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var i=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(a).firstChild,l=i.getAttribute("type"),s=i.getAttribute("compressor"),c=i.getAttribute("byte_order"),g=i.getAttribute("header_type")||"UInt32";if(s&&"vtkZLibDataCompressor"!==s)return console.error("Invalid compressor",s),!1;if(c&&"LittleEndian"!==c)return console.error("Only LittleEndian encoding is supported"),!1;if(l!==t.dataType)return console.error("Invalid data type",l,"expecting",t.dataType),!1;if(i.querySelector("AppendedData")){var u=i.querySelector("AppendedData"),d=u.getAttribute("encoding"),m=i.querySelectorAll("DataArray"),f=t.binaryBuffer;"base64"===d&&(f=u.textContent.trim().substr(1));for(var p=[],C=0;C0?0===Z[3]?new ArrayBuffer(Z[2]*A):new ArrayBuffer(Z[2]*(A-1)+Z[3]):new ArrayBuffer(0);for(var S=new Uint8Array(y),B={offset:0,uint8:S},V=0;V2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ji,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),_i(e,t)},processDataArray:zi,processFieldData:function(e,t,n,r,a,o,i){if(t){var l={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(l[r]=n["set".concat(e)])}));for(var s=t.getElementsByTagName("DataArray"),c=s.length,g=0;g(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=o<(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[3]=i>(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[4]=l<(arguments.length<=3?void 0:arguments[3])?l:arguments.length<=3?void 0:arguments[3],e[5]=s>(arguments.length<=3?void 0:arguments[3])?s:arguments.length<=3?void 0:arguments[3]}function cl(e,t,n,r,o,i,l){var s=Object(a.a)(e,6),c=s[0],g=s[1],u=s[2],d=s[3],m=s[4],f=s[5];void 0===l?(e[0]=Math.min(t[0],c),e[1]=Math.max(t[1],g),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],m),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,c),e[1]=Math.max(n,g),e[2]=Math.min(r,u),e[3]=Math.max(o,d),e[4]=Math.min(i,m),e[5]=Math.max(l,f))}function gl(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t,e[1]=t>l?t:l,e[2]=n,e[3]=n>c?n:c,e[4]=r,e[5]=r>u?r:u,i!==t||s!==n||g!==r}function ul(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function fl(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function pl(e,t){return e[2*t+1]-e[2*t]}function Cl(e){return[pl(e,0),pl(e,1),pl(e,2)]}function Il(e){return e.slice(0,2)}function hl(e){return e.slice(2,4)}function bl(e){return e.slice(4,6)}function yl(e){var t=Cl(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function vl(e){if(ol(e)){var t=Cl(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Zl(e){return[e[0],e[2],e[4]]}function Al(e){return[e[1],e[3],e[5]]}function Gl(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Sl(e,t){for(var n=0,r=0;r<2;r++)for(var a=2;a<4;a++)for(var o=4;o<6;o++)t[n]=[e[r],e[a],e[o]],n++}function Bl(e,t,n){t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5]}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=fl(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Rl(e,t,n,r){for(var a=[].concat(rl),o=e.getData(),i=0;ie[2*g+1]?(i[g]=0,c[g]=e[2*g+1],o=!1):i[g]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],a[0]=0,1;for(var u=0;u<3;u++)2!==i[u]&&0!==n[u]?s[u]=(c[u]-t[u])/n[u]:s[u]=-1;for(var d=0;d<3;d++)s[l]1||s[l]<0)return 0;a[0]=s[l];for(var m=0;m<3;m++)if(l!==m){if(r[m]=t[m]+s[l]*n[m],r[m]e[2*m+1])return 0}else r[m]=c[m];return 1}function kl(e,t,n){for(var r=[],a=0,o=1,i=1,l=4;l<=5;++l){r[2]=e[l];for(var s=2;s<=3;++s){r[1]=e[s];for(var c=0;c<=1;++c)if(r[0]=e[c],a=tl.a.evaluate(n,t,r),i&&(o=a>=0?1:-1,i=0),0===a||o>0&&a<0||o<0&&a>0)return 1}}return 0}function Wl(e,t){if(!ol(e)||!ol(t))return!1;for(var n,r=[0,0,0,0,0,0],a=0;a<3;a++)if(n=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(n=!0,r[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(n=!0,r[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(n=!0,r[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(n=!0,r[2*a+1]=e[2*a+1]),!n)return!1;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],!0}function xl(e,t){if(!ol(e)||!ol(t))return!1;for(var n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function Tl(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Jl(e,t,n){for(var r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],o=0,i=0;i<2;i++)for(var l=2;l<4;l++)for(var s=4;s<6;s++){var c=[e[i],e[l],e[s]];a[o++]=tl.a.evaluate(n,t,c)}for(var g=2;g--&&!(Gl(a[r[g][0]],a[r[g][4]])&&Gl(a[r[g][1]],a[r[g][5]])&&Gl(a[r[g][2]],a[r[g][6]])&&Gl(a[r[g][3]],a[r[g][7]])););if(g<0)return!1;for(var u=Math.sign(n[g]),d=Math.abs((e[2*g+1]-e[2*g])*n[g]),m=u>0?1:0,f=0;f<4;f++)if(0!==d){var p=Math.abs(a[r[g][f]])/d;u>0&&pm&&(m=p)}var C=(1-m)*e[2*g]+m*e[2*g+1];return u>0?e[2*g]=C:e[2*g+1]=C,!0}var Xl=function(){function e(t){Object($i.a)(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),il(this.bounds,rl))}return Object(el.a)(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return al(this.bounds,e)}},{key:"isValid",value:function(){return ol(this.bounds)}},{key:"setBounds",value:function(e){return il(this.bounds,e)}},{key:"reset",value:function(){return ll(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne[1]||e[2]>e[3]||e[4]>e[5]?Pl.EMPTY:3===t?Pl.XYZ_GRID:2===t?e[0]===e[1]?Pl.YZ_PLANE:e[2]===e[3]?Pl.XZ_PLANE:Pl.XY_PLANE:1===t?e[0]1&&(n*=t[r]-1)}return n},e.getNumberOfPoints=function(){var t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=function(n){var r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return es("Requesting a point from an empty image."),null;var a=new Float64Array(3);switch(t.dataDescription){case Hl.EMPTY:return null;case Hl.SINGLE_POINT:break;case Hl.X_LINE:a[0]=n;break;case Hl.Y_LINE:a[1]=n;break;case Hl.Z_LINE:a[2]=n;break;case Hl.XY_PLANE:a[0]=n%r[0],a[1]=n/r[0];break;case Hl.YZ_PLANE:a[1]=n%r[1],a[2]=n/r[1];break;case Hl.XZ_PLANE:a[0]=n%r[0],a[2]=n/r[0];break;case Hl.XYZ_GRID:a[0]=n%r[0],a[1]=n/r[0]%r[1],a[2]=n/(r[0]*r[1]);break;default:es("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(a,o),o},e.getBounds=function(){return e.extentToBounds(t.extent)},e.extentToBounds=function(t){var n=[t[0],t[2],t[4],t[1],t[2],t[4],t[0],t[3],t[4],t[1],t[3],t[4],t[0],t[2],t[5],t[1],t[2],t[5],t[0],t[3],t[5],t[1],t[3],t[5]],r=new Float64Array([n[0],n[1],n[2]]),a=new Float64Array(3);e.indexToWorld(r,a);for(var o=[a[0],a[0],a[1],a[1],a[2],a[2]],i=3;i<24;i+=3)Object(Fo.p)(r,n[i],n[i+1],n[i+2]),e.indexToWorld(r,a),a[0]o[1]&&(o[1]=a[0]),a[1]>o[3]&&(o[3]=a[1]),a[2]>o[5]&&(o[5]=a[2]);return o},e.computeTransforms=function(){Object(Yo.e)(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],Object(Yo.r)(t.indexToWorld,t.indexToWorld,t.spacing),Object(Yo.g)(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return es("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.indexToWorld),Object(Fo.q)(i,a,t.indexToWorld),Object(Xo.p)(o,i,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.worldToIndex),Object(Fo.q)(i,a,t.worldToIndex),Object(Xo.p)(o,i,n),n},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=function(){for(var t=e.getBounds(),n=[],r=0;r<3;r++)n[r]=(t[2*r+1]+t[2*r])/2;return n},e.computeHistogram=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);var a=[0,0,0],o=[0,0,0];Ol.computeCornerPoints(r,a,o),Object(Xo.o)(a,a),Object(Xo.o)(o,o);var i=e.getDimensions();Object(Xo.r)(a,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],a),Object(Xo.r)(o,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],o);for(var l=i[0],s=i[0]*i[1],c=e.getPointData().getScalars().getData(),g=-1/0,u=1/0,d=0,m=0,f=0,p=a[2];p<=o[2];p++)for(var C=a[1];C<=o[1];C++)for(var I=a[0]+C*l+p*s,h=a[0];h<=o[0];h++){if(!n||n([h,C,p],r)){var b=c[I];b>g&&(g=b),b0?m/f:0,v=d-y*y,Z=Math.sqrt(v);return{minimum:u,maximum:g,average:y,variance:v,sigma:Z}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,a=0;a<3;++a)n[a]=r,r*=e[2*a+1]-e[2*a]+1;return n},e.computeOffsetIndex=function(t){var n=Object(a.a)(t,3),r=n[0],o=n[1],i=n[2],l=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),c=e.computeIncrements(l,s);return Math.floor((Math.round(r)-l[0])*c[0]+(Math.round(o)-l[2])*c[1]+(Math.round(i)-l[4])*c[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),a=0;a<3;++a)if(r[a]n[2*a+1])return es("GetScalarPointer: Pixel ".concat(r," is not in memory. Current extent = ").concat(n)),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return es("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,n)}}var ns={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:Hl.EMPTY};function rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ns,n),Nl.a.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=El(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),ln.c.get(e,t,["direction","indexToWorld","worldToIndex"]),ln.c.setGetArray(e,t,["origin","spacing"],3),ln.c.getArray(e,t,["extent"],6),ts(e,t)}var as={newInstance:ln.c.newInstance(rs,"vtkImageData"),extend:rs};function os(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=function(e,n,r,a,o){for(var i=e.getElementsByTagName(t.dataType)[0],l=i.getAttribute("Origin").split(" ").map((function(e){return Number(e)})),s=i.getAttribute("Spacing").split(" ").map((function(e){return Number(e)})),c=i.getElementsByTagName("Piece"),g=c.length,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,is,n),Qi.extend(e,t,n),os(e,t)}),"vtkXMLImageDataReader");function ls(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,a,o){var i=e.getElementsByTagName(t.dataType)[0],l=i.getElementsByTagName("FieldData")[0],s=i.getElementsByTagName("Piece"),c=s.length,g=[];l&&(g=Object(Ao.a)(l.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,a){var o=Number(e.getAttribute("NumberOfTuples"));return Bo.a.newInstance(Qi.processDataArray(o,e,t,n,r,a))}(e,r,a,o,t.binaryBuffer)})));for(var u=function(e){var n=Go.a.newInstance(),i=s[e],l=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],c=Qi.processDataArray(l,s,r,a,o,i),g=c.values,u=c.numberOfComponents;e["get".concat(t)]().setData(g,u)}return l}(n,"Points",i,r,a,o,t.binaryBuffer),c=0;["Verts","Lines","Strips","Polys"].forEach((function(e){c+=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=Qi.processCells(l,n.getElementsByTagName(t)[0],r,a,o,i);e["get".concat(t)]().setData(s)}return l}(n,e,i,r,a,o,t.binaryBuffer)})),Qi.processFieldData(l,i.getElementsByTagName("PointData")[0],n.getPointData(),r,a,o,t.binaryBuffer),Qi.processFieldData(c,i.getElementsByTagName("CellData")[0],n.getCellData(),r,a,o,t.binaryBuffer);for(var u=n.getFieldData(),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ss,n),Qi.extend(e,t,n),ls(e,t)}),"vtkXMLPolyDataReader");var cs=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return Xs[e]&&Xs[e](t)}function Hs(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=function(n){e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=function(n){t.renderers=t.renderers.filter((function(e){return e!==n})),e.modified()},e.hasRenderer=function(e){return-1!==t.renderers.indexOf(e)},e.newAPISpecificView=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ns(e||t.defaultViewAPI,n)},e.addView=function(n){e.hasView(n)||(n.setRenderable(e),t.views.push(n),e.modified())},e.removeView=function(n){t.views=t.views.filter((function(e){return e!==n})),e.modified()},e.hasView=function(e){return-1!==t.views.indexOf(e)},e.render=function(){t.interactor?t.interactor.render():t.views.forEach((function(e){return e.traverseAllPasses()}))},e.getStatistics=function(){var e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((function(t){t.getViewProps().forEach((function(t){if(t.getVisibility()){e.propCount+=1;var n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){var r=n.getPrimitiveCount();Object.keys(r).forEach((function(t){e[t]||(e[t]=0),e[t]+=r[t]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n"),e},e.captureImages=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return ln.c.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n):void 0})).filter((function(e){return!!e}))}}var Ys={defaultViewAPI:Js,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function Fs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),ln.c.obj(e,t),ln.c.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),ln.c.get(e,t,["neverRendered"]),ln.c.getArray(e,t,["renderers"]),ln.c.event(e,t,"completion"),Hs(e,t)}var Ps={newInstance:ln.c.newInstance(Fs,"vtkRenderWindow"),extend:Fs,registerViewConstructor:Os,listViewAPIs:function(){return Object.keys(Xs)},newAPISpecificView:Ns},Ks={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},Ms={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},Ls={Wrap:Ks,Filter:Ms},Ds=ln.c.vtkErrorMacro;function Es(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),a=e[r];if(a)a(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Us,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),t.renderableChildMap=new Map,ln.c.get(e,t,["visited"]),ln.c.setGet(e,t,["parent","renderable","myFactory"]),ln.c.getArray(e,t,["children"]),Es(e,t)}var _s={newInstance:ln.c.newInstance(zs,"vtkViewNode"),extend:zs,PASS_TYPES:["Build","Render"]};function js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qs=Ls.Wrap,qs=Ls.Filter,$s=Bo.a.VtkDataTypes,ec=ln.c.vtkDebugMacro,tc=ln.c.vtkErrorMacro,nc=ln.c.vtkWarningMacro;function rc(e,t){var n=this;function r(e,n){var r=[];if(e!==$s.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=t.width*t.height*t.components,o=0;o=a&&(I=a-1);var h=p-C,b=1-h;C=C*r*o,I=I*r*o;for(var y=0;y=r&&(G=r-1);var S=Z-A;A*=o,G*=o;for(var B=0;Ba[s]&&(a[s]=n[i]),i++;for(var c=[],g=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null;if(n?t.openGLRenderWindow=n:(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent()),t.context=t.openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qs.LINEAR),e.setMagnificationFilter(qs.LINEAR)):(e.setMinificationFilter(qs.NEAREST),e.setMagnificationFilter(qs.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(Qs.REPEAT),e.setWrapS(Qs.REPEAT),e.setWrapT(Qs.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified()));var r=t.renderable.getInputData(0);if(r&&r.getPointData().getScalars()){for(var a=r.getExtent(),o=r.getPointData().getScalars(),i=[],l=0;lt.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;switch(t.target){case t.context.TEXTURE_2D:n=t.context.TEXTURE_BINDING_2D;break;default:nc("impossible case")}e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=function(){t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t.openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=function(n,r){return t.internalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||ec("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var a=0;return(a=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(a=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(ec("Unsupported internal texture type!"),ec("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),a},e.setInternalFormat=function(n){n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=function(n,r){return t.format=e.getDefaultFormat(n,r),t.format},e.getDefaultFormat=function(e,n){if(t.openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}},e.resetFormatAndType=function(){t.format=0,t.internalFormat=0,t.openGLDataType=0},e.getDefaultDataType=function(e){if(t.openGLRenderWindow.getWebgl2())switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.FLOAT}switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear")?t.context.FLOAT:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){return t.openGLDataType=e.getDefaultDataType(n),t.openGLDataType},e.getShiftAndScale=function(){var e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:e=(n=127.5)-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:e=(n=32767.5)-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:e=(n=2147483647.5)-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;break;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case qs.NEAREST:return t.context.NEAREST;case qs.LINEAR:return t.context.LINEAR;case qs.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qs.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qs.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qs.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case Qs.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case Qs.REPEAT:return t.context.REPEAT;case Qs.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=a(r(l,[s]));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=s.length/6-1,e.createTexture(),e.bind();for(var c=a(r(l,s)),g=[],u=t.width,d=t.height,m=0;m=1&&y>=1;){var v=null;h<=t.maxLevel&&(v=g[6*h+I]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+I,h,t.internalFormat,b,y,0,t.format,t.openGLDataType,v),h++,b/=2,y/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,a,o){return e.getOpenGLDataType(a),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?a===$s.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType($s.UNSIGNED_CHAR),e.getInternalFormat($s.UNSIGNED_CHAR,4),e.getFormat($s.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.width=n.width,t.height=n.height,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);var r=!Object(Xo.m)(n.width)||!Object(Xo.m)(n.height),a=document.createElement("canvas");a.width=r?Object(Xo.h)(n.width):n.width,a.height=r?Object(Xo.h)(n.height):n.height;var o=a.getContext("2d");o.translate(0,a.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,a.width,a.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var i=a;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,i),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,a,o,i,l){return e.getOpenGLDataType(i),e.getInternalFormat(i,o),e.getFormat(i,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,l),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,a,i,l,s){for(var c=n*r*a,g=[],u=[],d=0;d4096&&(G===$s.FLOAT||i>=3)&&(B=4096);var V=1,R=1;c>B*B&&(R=V=Math.ceil(Math.sqrt(c/(B*B))));var w=Math.sqrt(c)/V;w=Object(Xo.h)(w);var k,W=Math.floor(w*V/n),x=Math.ceil(a/W),T=Object(Xo.h)(r*x/R);t.width=w,t.height=T,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=W,t.volumeInfo.yreps=x,t.volumeInfo.xstride=V,t.volumeInfo.ystride=R,t.volumeInfo.offset=Z.offset,t.volumeInfo.scale=Z.scale;var J=w*T*i;k=G===$s.FLOAT?new Float32Array(J):new Uint8Array(J);for(var X=0,O=Math.floor(n/V),N=Math.floor(r/R),H=0;H2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ac,n),_s.extend(e,t,n),t.sendParametersTime={},ln.c.obj(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},ln.c.obj(t.textureBuildTime,{mtime:0}),ln.c.set(e,t,["format","openGLDataType"]),ln.c.setGet(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ln.c.get(e,t,["width","height","volumeInfo","components","handle","target"]),rc(e,t)}var ic=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,a=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");a+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,a,r.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.context,r=n.COLOR_ATTACHMENT0;if(e>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");r+=e}n.framebufferTexture2D(n.FRAMEBUFFER,r,n.TEXTURE_2D,null,0)},e.setDepthBuffer=function(e){if(t.openGLRenderWindow.getWebgl2()){var n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else Object(ln.m)("Attaching depth buffer textures to fbo requires WebGL 2")},e.removeDepthBuffer=function(){if(t.openGLRenderWindow.getWebgl2()){var e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else Object(ln.m)("Attaching depth buffer textures to framebuffers requires WebGL 2")},e.getGLFramebuffer=function(){return t.glFramebuffer},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))},e.releaseGraphicsResources=function(){t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer),t.colorTexture&&t.colorTexture.releaseGraphicsResources()},e.getSize=function(){var e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=function(){e.bind();var n=t.context,r=ic.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(Ms.LINEAR),r.setMagnificationFilter(Ms.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,cn.b.UNSIGNED_CHAR,null),e.setColorBuffer(r),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)}}var sc={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function cc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Object(ln.h)(e,t),Object(ln.j)(e,t,["colorTexture"]),lc(e,t)}var gc={newInstance:Object(ln.g)(cc,"vtkFramebuffer"),extend:cc};function uc(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(ln.c.capitalize(t.currentOperation))},e.getTraverseOperation=function(){return t.currentTraverseOperation},e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t.currentParent=r,t.preDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((function(t){t.traverse(n,e)})),t.postDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})))}}var dc={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dc,n),ln.c.obj(e,t),ln.c.get(e,t,["currentOperation"]),ln.c.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),uc(e,t)}var fc={newInstance:ln.c.newInstance(mc,"vtkRenderPass"),extend:mc};function pc(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.deleted){t.currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);for(var a=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),i=0;i0&&t.volumeCount>0||t.depthRequested){var g=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=gc.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var u=t.framebuffer.getSize();null!==u&&u[0]===g[0]&&u[1]===g[1]||(t.framebuffer.create(g[0],g[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),s.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),s.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),s.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),s.traverse(e))}}}},e.getZBufferTexture=function(){return t.framebuffer?t.framebuffer.getColorTexture():null},e.requestDepth=function(){t.depthRequested=!0},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.incrementVolumeCount=function(){return t.volumeCount++}}var Cc={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cc,n),fc.extend(e,t,n),ln.c.get(e,t,["framebuffer"]),pc(e,t)}var hc={newInstance:ln.c.newInstance(Ic,"vtkForwardPass"),extend:Ic};function bc(e,t){t.classHierarchy.push("vtkGenericWidgetRepresentation")}var yc={};function vc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yc,n),_s.extend(e,t,n),bc(0,t)}var Zc={newInstance:ln.c.newInstance(vc),extend:vc};function Ac(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=function(n){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(var r=0;rt.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?El(t.keyMatrices.normalMatrix):(Dl(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Ul(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var Gc={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gc,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Ac(e,t)}var Bc={newInstance:ln.c.newInstance(Sc),extend:Sc};function Vc(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.activateTextures=function(){t.activeTextures=[],t.children.forEach((function(e){e.isA("vtkOpenGLTexture")&&(e.render(),e.getHandle()&&t.activeTextures.push(e))}))},e.opaquePass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}var Rc={context:null,activeTextures:[]};function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rc,n),_s.extend(e,t,n),Object(ln.j)(e,t,["context"]),Object(ln.e)(e,t,["activeTextures"]),Vc(e,t)}var kc={newInstance:Object(ln.g)(wc),extend:wc};function Wc(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=function(n){n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext())},e.opaquePass=function(e){if(e){var n=t.openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize),t.context.scissor(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)}},e.translucentPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=function(n){if(n!==t.lastRenderer||t.openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){Object(Yo.d)(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),Dl(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Object(Yo.i)(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Object(Yo.d)(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Object(Yo.i)(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Object(Yo.l)(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var xc={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function Tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),_s.extend(e,t,n),t.keyMatrixTime={},Object(ln.h)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Object(ln.j)(e,t,["context","keyMatrixTime"]),Wc(e,t)}var Jc={newInstance:Object(ln.g)(Tc),extend:Tc},Xc={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Oc={ObjectType:Xc};function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pc,n),ln.c.obj(e,t),ln.c.get(e,t,["openGLRenderWindow"]),Fc(e,t)}var Mc=Hc(Hc({newInstance:ln.c.newInstance(Kc),extend:Kc},{}),Oc),Lc={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}},Dc={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zc,n),ln.c.obj(e,t),t.properties={},ln.c.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Uc(e,t)}var jc=function(e){for(var t=1;t0&&(--o in t.hitProps||(t.hitProps[o]=!0))}},e.renderProp=function(n){t.currentPass===qc.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+t.idOffset),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===qc.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+t.idOffset)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.getPropFromID=function(e){return e>=0&&et.area[2]||n[1]t.area[3])return null;var i=[n[0]-t.area[0],n[1]-t.area[1]],l=e.convert(i[0],i[1],t.pixBuffer[qc.ACTOR_PASS]);if(l<=0)return null;var s={valid:!0};s.propID=l-t.idOffset,s.prop=e.getPropFromID(s.propID);var c=e.convert(i[0],i[1],t.pixBuffer[qc.COMPOSITE_INDEX_PASS]);if((c<0||c>16777215)&&(c=0),s.compositeID=c-t.idOffset,t.captureZValues){var g=4*(i[1]*(t.area[2]-t.area[0]+1)+i[0]);s.zValue=(256*t.zBuffer[g]+t.zBuffer[g+1])/65535,s.displayPosition=n}return s}var u=[n[0],n[1]],d=[0,0],m=e.getPixelInformation(n,0,a);if(m&&m.valid)return m;for(var f=1;ff?u[1]-f:0;p<=u[1]+f;++p){if(d[1]=p,u[0]>=f&&(d[0]=u[0]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[0]=u[0]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}for(var C=u[0]>=f?u[0]-(f-1):0;C<=u[0]+(f-1);++C){if(d[0]=C,u[1]>=f&&(d[1]=u[1]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[1]=u[1]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}}return a[0]=n[0],a[1]=n[1],null},e.convertSelection=function(e,n){var r=[],a=0;return n.forEach((function(n,o){var i=jc.newInstance();switch(i.setContentType($c.INDICES),e){case tg.FIELD_ASSOCIATION_CELLS:i.setFieldType(eg.CELL);break;case tg.FIELD_ASSOCIATION_POINTS:i.setFieldType(eg.POINT);break;default:ng("Unknown field association")}i.getProperties().propID=n.info.propID,i.getProperties().prop=n.info.prop,i.getProperties().compositeID=n.info.compositeID,i.getProperties().pixelCount=n.pixelCount,t.captureZValues&&(i.getProperties().displayPosition=[n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue],i.getProperties().worldPosition=t.openGLRenderWindow.displayToWorld(n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue,t.renderer)),i.setSelectionList(n.attributeIDs),r[a]=i,a++})),r},e.getInfoHash=function(e){return"".concat(e.propID," ").concat(e.compositeID)},e.generateSelection=function(n,r,a,o){for(var i=Math.floor(n),l=Math.floor(r),s=Math.floor(a),c=Math.floor(o),g=new Map,u=[0,0],d=l;d<=c;d++)for(var m=i;m<=s;m++){var f=[m,d],p=e.getPixelInformation(f,0,u);if(p&&p.valid){var C=e.getInfoHash(p);if(g.has(C)){var I=g.get(C);I.pixelCount++,t.captureZValues&&p.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ag,n),ln.c.obj(e,t),t.area=[0,0,0,0],t.propColorValue=[0,0,0],t.props=[],ln.c.setGet(e,t,["fieldAssociation","renderer","currentPass","captureZValues"]),ln.c.setGetArray(e,t,["area"],4),ln.c.setGetArray(e,t,["propColorValue"],3),ln.c.event(e,t,"event"),rg(e,t)}var ig=function(e){for(var t=1;t0&&(e=1/(t.ambient+t.diffuse+t.specular));for(var n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.addShaderVariable=mg("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(dg.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(dg.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(dg.PHONG)},e.getInterpolationAsString=function(){return ln.c.enumToString(dg,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ug.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ug.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ug.POINTS)},e.getRepresentationAsString=function(){return ln.c.enumToString(ug,t.representation)}}var pg={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,specular:0,specularPower:1,opacity:1,interpolation:dg.GOURAUD,representation:ug.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),ln.c.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),fg(e,t)}var Ig,hg=function(e){for(var t=1;t2)for(var r=0;r2){for(var r=0;r1?2*(e-1):0},polysToWireframe:function(e,t){return e>2?2*e:0},stripsToWireframe:function(e,t){return e>2?4*e-6:0},polysToSurface:function(e,t){return e>2?3*(e-2):0},stripsToSurface:function(e,t,n){return e>2?3*(e-2):0}},v=null,Z=null;a===sg.POINTS||"verts"===r?(v=b.anythingToPoints,Z=y.anythingToPoints):a===sg.WIREFRAME||"lines"===r?(v=b["".concat(r,"ToWireframe")],Z=y["".concat(r,"ToWireframe")]):(v=b["".concat(r,"ToSurface")],Z=y["".concat(r,"ToSurface")]);for(var A=n.getData(),G=A.length,S=0,B=0;B0&&(Math.abs(x)/W>1e6||Math.abs(Math.log10(W))>3||0===W&&x>1e6)){for(var N=new Float64Array(3),H=new Float64Array(3),Y=0;Y<3;++Y){var F=o.points.getRange(Y),P=F[1]-F[0];N[Y]=.5*(F[1]+F[0]),H[Y]=P>0?1/P:1}e.setCoordShiftAndScale(N,H)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);d=function(e){if(m=3*e,t.coordShiftAndScaleEnabled?(R[w++]=(i[m++]-t.coordShift[0])*t.coordScale[0],R[w++]=(i[m++]-t.coordShift[1])*t.coordScale[1],R[w++]=(i[m++]-t.coordShift[2])*t.coordScale[2]):(R[w++]=i[m++],R[w++]=i[m++],R[w++]=i[m++]),null!==l&&(f=o.haveCellNormals?3*(h+o.cellOffset):3*e,R[w++]=l[f++],R[w++]=l[f++],R[w++]=l[f++]),t.customData.forEach((function(t){I=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bg,n),Mc.extend(e,t,n),ln.c.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),ln.c.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),Sg(e,t)}var Rg={newInstance:ln.c.newInstance(Vg),extend:Vg},wg=ln.c.vtkErrorMacro;function kg(e,t){t.classHierarchy.push("vtkShader"),e.compile=function(){var e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;switch(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),t.shaderType){case"Fragment":e=t.context.FRAGMENT_SHADER;break;case"Vertex":default:e=t.context.VERTEX_SHADER}if(t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle),!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){var n=t.context.getShaderInfoLog(t.handle);return wg("Error compiling shader '".concat(t.source,"': ").concat(n)),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}var Wg={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["shaderType","source","error","handle","context"]),kg(e,t)}var Tg={newInstance:ln.c.newInstance(xg,"vtkShader"),extend:xg},Jg=ln.c.vtkErrorMacro;function Xg(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=function(){return t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(Jg("Links failed: ".concat(t.error)),0):(Jg(t.error),0):(Jg(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.fragmentShader.getError()),0):(Jg(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.vertexShader.getError()),0)},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=function(){return!(!t.linked&&!e.link()||(t.context.useProgram(t.handle),e.setBound(!0),0))},e.isBound=function(){return!!t.bound},e.release=function(){t.context.useProgram(null),e.setBound(!1)},e.setContext=function(e){t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=function(){if(t.inked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;if(t.uniformLocs={},t.context.linkProgram(t.handle),!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){var n=t.context.getProgramInfoLog(t.handle);return Jg("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(a,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(a,!1,o),!0},e.setUniformf=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(a,r),!0)},e.setUniformfv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(a,r),!0)},e.setUniformi=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(a,r),!0)},e.setUniformiv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(a,r),!0)},e.setUniform2f=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,a),!0},e.setUniform2fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(a,r),!0)},e.setUniform2i=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,a),!0},e.setUniform2iv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(a,r),!0)},e.setUniform3f=function(n,r,a,o){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r,a,o),!0},e.setUniform3fArray=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(a,r),!0)},e.setUniform3i=function(n){var r=e.findUniform(n);if(-1===r)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i1?a-1:0),i=1;i1?a-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=Tg.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=Tg.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=Tg.newInstance(),t.geometryShader.setShaderType("Geometry"),ln.c.obj(e,t),ln.c.get(e,t,["lastCameraMTime"]),ln.c.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),Xg(e,t)}var Hg={newInstance:ln.c.newInstance(Ng,"vtkShaderProgram"),extend:Ng,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var i="";r&&(i="g");var l=new RegExp(t,i),s=e.replace(l,a);return{replace:o,result:s}}};function Yg(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=function(){},e.initialize=function(){t.instancingExtension=null,t.openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t.openGLRenderWindow&&t.openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=function(){return 0!==t.handleVAO||!1===t.supported},e.bind=function(){if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,1):n.vertexAttribDivisor(i.index+s,1))}},e.release=function(){if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,0):n.vertexAttribDivisor(i.index+s,0)),n.disableVertexAttribArray(i.index+s)}},e.shaderProgramChanged=function(){e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=function(){e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=function(t,n,r,a,o,i,l,s){return e.addAttributeArrayWithDivisor(t,n,r,a,o,i,l,s,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,a,o,i,l,s,c,g,u){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Xc.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;var d=t.context,m={};if(m.name=a,m.index=d.getAttribLocation(t.handleProgram,a),m.offset=o,m.stride=i,m.type=l,m.size=s,m.normalize=c,m.isMatrix=u,m.divisor=g,-1===m.Index)return!1;if(r.bind(),d.enableVertexAttribArray(m.index),d.vertexAttribPointer(m.index,m.size,m.type,m.normalize,m.stride,m.offset),g>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m.index,1):d.vertexAttribDivisor(m.index,1)),m.buffer=r.getHandle(),!t.supported){for(var f=!1,p=0;p0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m+f,1):d.vertexAttribDivisor(m+f,1));return!0},e.removeAttributeArray=function(n){if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fg,n),t.buffers=[],ln.c.obj(e,t),ln.c.get(e,t,["supported"]),ln.c.setGet(e,t,["forceEmulation"]),Yg(e,t)}var Kg={newInstance:ln.c.newInstance(Pg,"vtkOpenGLVertexArrayObject"),extend:Pg};function Mg(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=function(e){t.program.setContext(e.getContext()),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=function(e){t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)}}var Lg={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lg,n),ln.c.obj(e,t),t.shaderSourceTime={},ln.c.obj(t.shaderSourceTime),t.attributeUpdateTime={},ln.c.obj(t.attributeUpdateTime),ln.c.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=Hg.newInstance(),t.VAO=Kg.newInstance(),t.CABO=Rg.newInstance(),Mg(e,t)}var Eg={newInstance:ln.c.newInstance(Dg),extend:Dg};function Ug(e,t){e.update=function(){e.getInputData()},e.addClippingPlane=function(e){"vtkPlane"===e.getClassName()&&t.clippingPlanes.push(e)},e.getNumberOfClippingPlanes=function(){return t.clippingPlanes.length},e.removeAllClippingPlanes=function(){t.clippingPlanes.length=0},e.removeClippingPlane=function(e){e<0||e>=6||t.clippingPlanes.splice(e,1)},e.getClippingPlanes=function(){return t.clippingPlanes},e.setClippingPlanes=function(t){if(t)if(Array.isArray(t))for(var n=t.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Ug(e,t)}};function jg(e,t){e.getBounds=function(){return 0},e.getBounds=function(n){e.getBounds();for(var r=0;r<6;r++)n[r]=t.bounds[r]},e.getCenter=function(){e.getBounds();for(var n=0;n<3;n++)t.center[n]=(t.bounds[2*n+1]+t.bounds[2*n])/2;return t.center.slice()},e.getLength=function(){var n=0,r=0;e.getBounds();for(var a=0;a<3;a++)r+=(n=t.bounds[2*a+1]-t.bounds[2*a])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var a=t.clippingPlanes,o=e;if(a){var i=a.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qg,n),_g.extend(e,t,n),t.bounds||Object(Xo.D)(t.bounds),t.center||(t.center=[0,0,0]),jg(e,t)}},$g={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},eu={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:$g},tu={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ru=eu.ScalarMappingTarget,au=eu.VectorMode,ou=Bo.a.VtkDataTypes,iu=tu.ColorMode,lu=ln.c.vtkErrorMacro;function su(e){return e}function cu(e){return Math.floor(255*e+.5)}function gu(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(au.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(au.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(au.RGBCOLORS)},e.build=function(){},e.isOpaque=function(){return!0},e.setAnnotations=function(n,r){if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)lu("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var a=r.length,o=0;o=0?t.annotationArray[a].annotation!==r&&(t.annotationArray[a].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),a=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=function(){return t.annotationArray.length},e.getAnnotatedValue=function(e){return e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value},e.getAnnotation=function(e){return void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation},e.getAnnotatedValueIndex=function(n){return t.annotationArray.length?e.checkForAnnotatedValue(n):-1},e.removeAnnotation=function(n){var r=e.checkForAnnotatedValue(n),a=r>=0;return a&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var a=e.getAnnotatedValueIndex(n);e.getIndexedColor(a,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=function(t){return e.getAnnotatedValueIndexInternal(t)},e.getAnnotatedValueIndexInternal=function(e){if(void 0!==t.annotatedValueMap[e]){var n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=function(e,t){t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=function(){t.annotatedValueMap=[];for(var e=t.annotationArray.length,n=0;n1?e.mapVectorsThroughTable(t,o,ru.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,o,ru.RGBA,s))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),a=e.getNumberOfComponents(),o=t.getData(),i=e.getData(),l=0;l=c&&(s=c-1)):(-1===l&&(l=e.getVectorSize()),l<=0?(s=0,l=c):(s<0&&(s=0),s>=c&&(s=c-1),s+l>c&&(l=c-s)),i!==au.MAGNITUDE||1!==c&&1!==l||(i=au.COMPONENT));var g=0;switch(s>0&&(g=s),i){case au.COMPONENT:e.mapScalarsThroughTable(t,n,r,g);break;default:case au.MAGNITUDE:var u=Bo.a.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,u,l),e.mapScalarsThroughTable(u,n,r,0);break;case au.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var a=r(n),o=t.getData(),i=e.getData(),l=o.length,s=0,c=0;c=1&&n.getDataType()===ou.UNSIGNED_CHAR)return n;var i=Bo.a.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:ou.UNSIGNED_CHAR});if(a<=0)return i;o=(o=o>0?o:0)<1?o:1;var l=su;switch(n.getDataType()!==ou.FLOAT&&n.getDataType()!==ou.DOUBLE||(l=cu),r){case 1:e.luminanceToRGBA(i,n,o,l);break;case 2:e.luminanceAlphaToRGBA(i,n,l);break;case 3:e.rGBToRGBA(i,n,o,l);break;case 4:e.rGBAToRGBA(i,n,o,l);break;default:return lu("Cannot convert colors"),null}return i},e.usingLogScale=function(){return!1},e.getNumberOfAvailableColors=function(){return 16777216},e.setRange=function(t,n){return e.setMappingRange(t,n)},e.getRange=function(t,n){return e.getMappingRange()}}var uu={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:au.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uu,n),ln.c.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],ln.c.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),ln.c.setArray(e,t,["mappingRange"],2),ln.c.getArray(e,t,["mappingRange"]),gu(e,t)}var mu=function(e){for(var t=1;tt.range[1]?t.maxIndex+1+1.5:(n=(e+t.shift)*t.scale)e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=function(n,r,a,o){var i=e.linearLookup;t.indexedLookup&&(i=e.indexedLookupFunction);var l=e.getMappingRange(),s={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,s);var c=e.getAlpha(),g=n.getNumberOfTuples(),u=n.getNumberOfComponents(),d=r.getData(),m=n.getData();if(c>=1){if(a===$g.RGBA)for(var f=0;ft.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Cu={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),mu.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},ln.c.obj(t.buildTime),t.opaqueFlagBuildTime={},ln.c.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},ln.c.obj(t.insertTime,{mtime:0}),ln.c.get(e,t,["buildTime"]),ln.c.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),ln.c.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),pu(e,t)}var hu={newInstance:ln.c.newInstance(Iu,"vtkLookupTable"),extend:Iu},bu=1,yu=0,vu=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Zu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;yu=e}var Au={getResolveCoincidentTopologyAsString:function(){return vu[yu]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bu},getResolveCoincidentTopology:function(){return yu},setResolveCoincidentTopology:Zu,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bu=e},setResolveCoincidentTopologyToDefault:function(){Zu(0)},setResolveCoincidentTopologyToOff:function(){Zu(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Zu(1)}};function Gu(e,t,n){n.forEach((function(n){e["get".concat(n.method)]=function(){return t[n.key]},e["set".concat(n.method)]=function(e,r){t[n.key]={factor:e,offset:r}}}))}var Su=["Polygon","Line","Point"],Bu={};Gu(Bu,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Su.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Vu={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),ln.c.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Au).forEach((function(t){e[t]=Au[t]})),Object.keys(Bu).forEach((function(t){e[t]=Bu[t]})),Gu(e,t.topologyOffset,Su.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Bu.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Bu,otherStaticMethods:Au,CATEGORIES:Su};function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:a}},e.createColorTextureCoordinates=function(t,n,r,a,o,i,l,s,c){var g=(i[1]-i[0])/s,u=[];u[0]=i[0]-g,u[1]=i[1]+g;var d=1/(u[1]-u[0]),m=n.getData(),f=t.getData(),p=0,C=0;if(o<0||o>=a)for(var I=0;It.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var l=t.lookupTable.getNumberOfAvailableColors();l>4094&&(l=4094),l+=2;for(var s=(a[1]-a[0])/(l-1-2),c=new Float64Array(2*l),g=0;gt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var m=n.getNumberOfComponents(),f=n.getNumberOfTuples();t.colorCoordinates=Bo.a.newInstance({numberOfComponents:2,values:new Float32Array(2*f)});var p=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Xu.MAGNITUDE&&n.getNumberOfComponents()>1&&(p=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,f,m,p,a,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,o)}},e.getIsOpaque=function(){var t=e.getLookupTable();return!t||(t.build(),t.isOpaque())},e.canUseTextureMapForColoring=function(n){if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;var r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),a=r.scalars;return!(!a||r.cellFlag||t.colorMode===xu.DEFAULT&&a.getDataType()===Ou.UNSIGNED_CHAR||t.colorMode===xu.DIRECT_SCALARS)},e.clearColorArrays=function(){t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=function(){return t.lookupTable||e.createDefaultLookupTable(),t.lookupTable},e.getMTime=function(){var e=t.mtime;if(null!==t.lookupTable){var n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=function(){var t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells()}},e.acquireInvertibleLookupTable=Nu("AcquireInvertibleLookupTable"),e.valueToColor=Nu("ValueToColor"),e.colorToValue=Nu("ColorToValue"),e.useInvertibleColorFor=Nu("UseInvertibleColorFor"),e.clearInvertibleColor=Nu("ClearInvertibleColor")}var Yu={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,viewSpecificProperties:null,customShaderAttributes:[]};function Fu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),qg.extend(e,t,n),ln.c.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),ln.c.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),ln.c.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Vu.implementCoincidentTopologyMethods(e,t),Hu(e,t)}var Pu=wu(wu(wu({newInstance:ln.c.newInstance(Fu,"vtkMapper"),extend:Fu},ku),Wu),tu),Ku="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",Mu="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n",Lu={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,a){var o=e.getCoincidentParameters(r,a);if(o&&(0!==o.factor||0!==o.offset)){var i=n.Fragment;i=Hg.substitute(i,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=i}}}},Du={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Eu=hg.Representation,Uu=hg.Shading,zu=Pu.ScalarMode,_u=ic.Filter,ju=ic.Wrap,Qu=ln.c.vtkErrorMacro,qu={type:"StartEvent"},$u={type:"EndEvent"};function ed(e,t){function n(e,t,n){return t.identity(n),e.reduce((function(e,n,r){return 0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e}),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=function(n){n&&(t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t.openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.openGLCamera=t.openGLRenderer.getViewNodeFor(t.openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.render=function(){var n=t.openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(var r=Du.Start;r= cos(radians(lightConeAngle".concat(u,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(u,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(u,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(u,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(u,");")," }"]);l=l.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),a=Hg.substitute(a,"//VTK::Light::Impl",l,!1).result;break;default:Qu("bad light complexity")}e.Fragment=a},e.replaceShaderNormal=function(n,r,a){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,i=n.Geometry,l=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Hg.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,l=Hg.substitute(l,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(a.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));"," vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," fdx = normalize(fdx);"," fdy = normalize(fdy);"," if (abs(fdx.x) > 0.0)"," { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),n.Vertex=o,n.Geometry=i,n.Fragment=l}},e.replaceShaderPositionVC=function(e,n,r){var a=e.Vertex,o=e.Geometry,i=e.Fragment;r.getProperty().getRepresentation()!==Eu.POINTS&&t.lastBoundBO.getPrimitiveType()!==Du.Points||(a=Hg.substitute(a,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(a=Hg.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=a,e.Geometry=o,e.Fragment=i},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var a=e.Vertex,o=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;a=Hg.substitute(a,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var l=t.openGLActor.getActiveTextures(),s=2,c=2;if(l&&l.length>0&&(s=l[0].getComponents(),l[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(c=3)),t.renderable.getColorTextureMap()&&(s=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),c=2),2===c){if(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,l&&l.length>=1)switch(s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=a,e.Geometry=o,e.Fragment=i}},e.replaceShaderClip=function(e,n,r){var a=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6),a=Hg.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,a=Hg.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Hg.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=Hg.substitute(o,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=a,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,a=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||a.getEdgeVisibility()&&a.getRepresentation()===Eu.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Du.Points||a.getRepresentation()===Eu.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Du.Lines||a.getRepresentation()===Eu.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Du.Tris&&o!==Du.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Du.TrisEdges&&o!==Du.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=Hg.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Hg.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderValues=function(n,r,a){if(e.replaceShaderColor(n,r,a),e.replaceShaderNormal(n,r,a),e.replaceShaderLight(n,r,a),e.replaceShaderTCoord(n,r,a),e.replaceShaderPicking(n,r,a),e.replaceShaderClip(n,r,a),e.replaceShaderCoincidentOffset(n,r,a),e.replaceShaderPositionVC(n,r,a),t.haveSeenDepthRequest){var o=n.Fragment;o=Hg.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=Hg.substitute(o,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=o}},e.getNeedToRebuildShaders=function(n,r,a){var o=0,i=0,l=n.getPrimitiveType(),s=t.currentInput,c=!1,g=s.getPointData().getNormals(),u=s.getCellData().getNormals(),d=a.getProperty().getInterpolation()===Uu.FLAT,m=a.getProperty().getRepresentation(),f=e.getOpenGLMode(m,l);if(f===t.context.TRIANGLES||u&&!g||!d&&g?c=!0:d||f!==t.context.LINES||(c=!0),a.getProperty().getLighting()&&c){o=0;for(var p=r.getLightsByReference(),C=0;C0&&(i++,0===o&&(o=1)),1===o&&(i>1||1!==I.getIntensity()||!I.lightTypeIsHeadLight())&&(o=2),o<3&&I.getPositional()&&(o=3)}}var h=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),y=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&y===i||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:i},!0),h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===n.getProgram()||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){var o=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&o>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach((function(e,r){n.getProgram().isAttributeUsed("".concat(e,"MC"))&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"".concat(e,"MC"),n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||Qu("Error setting ".concat(e,"MC in shader VAO.")))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||Qu("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||Qu("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6);for(var l=[],s=0;s0){var g=c.getColorByReference(),u=c.getIntensity();t.lightColor[0]=g[0]*u,t.lightColor[1]=g[1]*u,t.lightColor[2]=g[2]*u;var d=c.getDirection(),m=n.getActiveCamera().getViewMatrix(),f=Object(Ao.a)(d);c.lightTypeIsSceneLight()&&(f[0]=m[0]*d[0]+m[1]*d[1]+m[2]*d[2],f[1]=m[4]*d[0]+m[5]*d[1]+m[6]*d[2],f[2]=m[8]*d[0]+m[9]*d[1]+m[10]*d[2],Object(Xo.y)(f)),t.lightDirection[0]=f[0],t.lightDirection[1]=f[1],t.lightDirection[2]=f[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],Object(Xo.y)(t.lightDirection),o.setUniform3fArray("lightColor".concat(i),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(i),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(i),t.lightHalfAngle),i++}}if(!(a<3)){var p=n.getActiveCamera().getViewMatrix();Object(Yo.i)(p,p),i=0;for(var C=0;C0){var h=I.getTransformedPosition(),b=new Float64Array(3);Object(Fo.q)(b,h,p),o.setUniform3fArray("lightAttenuation".concat(i),I.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(i),I.getPositional()),o.setUniformf("lightExponent".concat(i),I.getExponent()),o.setUniformf("lightConeAngle".concat(i),I.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(i),[b[0],b[1],b[2]]),i++}}}}},e.setCameraShaderParameters=function(e,r,a){var o=e.getProgram(),i=t.openGLCamera.getKeyMatrices(r),l=r.getActiveCamera(),s=t.openGLCamera.getKeyMatrixTime().getMTime(),c=o.getLastCameraMTime(),g=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,u=a.getIsIdentity(),d=u?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();o.setUniformMatrix("MCPCMatrix",n([i.wcpc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("MCVCMatrix")&&o.setUniformMatrix("MCVCMatrix",n([i.wcvc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("normalMatrix")&&o.setUniformMatrix3x3("normalMatrix",n([i.normalMatrix,d.normalMatrix],$l,t.tmpMat3)),c!==s&&(o.isUniformUsed("cameraParallel")&&o.setUniformi("cameraParallel",l.getParallelProjection()),o.setLastCameraMTime(s)),u||o.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram(),o=r.getProperty(),i=o.getOpacity(),l=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),s=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),c=t.drawingEdges?1:o.getAmbient(),g=t.drawingEdges?0:o.getDiffuse(),u=t.drawingEdges?0:o.getSpecular(),d=o.getSpecularPower();a.setUniformf("opacityUniform",i),a.setUniform3fArray("ambientColorUniform",l),a.setUniform3fArray("diffuseColorUniform",s),a.setUniformf("ambient",c),a.setUniformf("diffuse",g);var m=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(m<1)){var f=o.getSpecularColorByReference();if(a.setUniform3fArray("specularColorUniform",f),a.setUniformf("specularPowerUniform",d),a.isUniformUsed("ambientIntensityBF")){if(i=(o=r.getBackfaceProperty()).getOpacity(),l=o.getAmbientColor(),c=o.getAmbient(),s=o.getDiffuseColor(),g=o.getDiffuse(),f=o.getSpecularColor(),u=o.getSpecular(),a.setUniformf("ambientIntensityBF",c),a.setUniformf("diffuseIntensityBF",g),a.setUniformf("opacityUniformBF",i),a.setUniform3fArray("ambientColorUniformBF",l),a.setUniform3fArray("diffuseColorUniformBF",s),m<1)return;a.setUniformf("specularIntensityBF",u),a.setUniform3fArray("specularColorUniformBF",f),a.setUniformf("specularPowerUniformBF",d)}}},e.renderPieceStart=function(n,r){t.primitiveIDOffset=0,t.openGLRenderer.getSelector()&&(t.openGLRenderer.getSelector().getCurrentPass(),t.openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===Eu.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var l=Du.Start;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,td,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=Du,t.tmpMat3=El(new Float64Array(9)),t.tmpMat4=Object(Yo.h)(new Float64Array(16));for(var r=Du.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,a)},e.replaceShaderColor=function(e,r,a){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,i=e.Geometry,l=e.Fragment,s=t.lastBoundBO.getReferenceByName("lastLightComplexity"),c=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];s&&(c=c.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var g=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(g=g.concat([" vec3 specularColor;"," float specularPower;"])),g=g.concat([" opacity = opacityUniform;"]),s&&(g=g.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(c=c.concat(["varying vec4 vertexColorVSOutput;"]),o=Hg.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,i=Hg.substitute(i,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,g=g.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),l=Hg.substitute(l,"//VTK::Color::Impl",g).result,l=Hg.substitute(l,"//VTK::Color::Dec",c).result,e.Vertex=o,e.Geometry=i,e.Fragment=l}n.replaceShaderColor(e,r,a)},e.replaceShaderPositionVC=function(e,r,a){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,a)},e.replaceShaderPicking=function(e,r,a){if(t.hardwareSupport){var o=e.Fragment,i=e.Vertex;i=Hg.substitute(i,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,i=Hg.substitute(i,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=i,o=Hg.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=Hg.substitute(o,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=o}else n.replaceShaderPicking(e,r,a)},e.updateGlyphShaderParameters=function(n,r,a,o,i,l,s,c){var g=a.getProgram();if(n){var u=t.normalMatrix,d=l,m=9*s,f=t.tmpMat3,p=u[0],C=u[1],I=u[2],h=u[3],b=u[4],y=u[5],v=u[6],Z=u[7],A=u[8],G=d[m],S=d[m+1],B=d[m+2],V=d[m+3],R=d[m+4],w=d[m+5],k=d[m+6],W=d[m+7],x=d[m+8];f[0]=G*p+S*h+B*v,f[1]=G*C+S*b+B*Z,f[2]=G*I+S*y+B*A,f[3]=V*p+R*h+w*v,f[4]=V*C+R*b+w*Z,f[5]=V*I+R*y+w*A,f[6]=k*p+W*h+x*v,f[7]=k*C+W*b+x*Z,f[8]=k*I+W*y+x*A,g.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,i,16*s),g.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,i,16*s),g.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var T=o.getData();t.tmpColor[0]=T[4*s]/255,t.tmpColor[1]=T[4*s+1]/255,t.tmpColor[2]=T[4*s+2]/255,g.setUniform3fArray("ambientColorUniform",t.tmpColor),g.setUniform3fArray("diffuseColorUniform",t.tmpColor)}c&&g.setUniform3fArray("mapperIndex",c.getPropColorValue())},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===id.SURFACE,l=t.openGLCamera.getKeyMatrices(n),s=t.openGLActor.getKeyMatrices();_l(t.normalMatrix,l.normalMatrix,s.normalMatrix),Object(Yo.l)(t.mcpcMatrix,l.wcpc,s.mcwc),Object(Yo.l)(t.mcvcMatrix,l.wcvc,s.mcwc);var c=t.renderable.getMatrixArray(),g=t.renderable.getNormalArray(),u=t.renderable.getColorArray(),d=c.length/16,m=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===sd.COMPOSITE_INDEX_PASS&&(m=!0);for(var f=t.primTypes.Start;fe.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||od("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||od("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,a),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,a)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(a,ld.ARRAY_BUFFER),t.normalBuffer.upload(o,ld.ARRAY_BUFFER),i?t.colorBuffer.upload(i.getData(),ld.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var l=a.length/16,s=new Uint8Array(4*l),c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),rd.extend(e,t,n),t.tmpMat3=El(new Float64Array(9)),t.normalMatrix=El(new Float64Array(9)),t.mcpcMatrix=Object(Yo.h)(new Float64Array(16)),t.mcvcMatrix=Object(Yo.h)(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},ln.c.obj(t.glyphBOBuildTime,{mtime:0}),ud(e,t)}var fd={newInstance:ln.c.newInstance(md,"vtkOpenGLGlyph3DMapper"),extend:md},pd={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}},Cd={NEAREST:0,LINEAR:1},Id={InterpolationType:Cd},hd=ln.c.vtkErrorMacro,bd=pd.SlicingMode;function yd(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function vd(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=function(n){if(n){t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera()),t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(r.getActiveCamera())}},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.getCoincidentParameters=function(e,n){return t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null},e.render=function(){var n=t.openGLImageSlice.getRenderable(),r=t.openGLRenderer.getRenderable();e.renderPiece(r,n)},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=Ku,e.Fragment=Mu,e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Vertex,i=n.Fragment;o=Hg.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var l=t.openGLTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(s){for(var g=1;gn.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||hd("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||hd("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var i=t.openGLTexture.getComponents(),l=a.getProperty().getIndependentComponents();if(l)for(var s=0;s1?1:0;var M=o.getData(),L=null;if(T===bd.I){L=new M.constructor(H[2]*H[1]*s);for(var D=0,E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zd,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=Eg.newInstance(),t.openGLTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.pwfTexture=ic.newInstance(),t.imagemat=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,[]),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime),vd(e,t)}var Gd={newInstance:ln.c.newInstance(Ad,"vtkOpenGLImageMapper"),extend:Ad};function Sd(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.opaqueZBufferPass=function(t,n){return e.opaquePass(t,n)},e.opaquePass=function(n,r){n&&(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}var Bd={context:null,keyMatrixTime:null,keyMatrices:null};function Vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bd,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),Sd(e,t)}var Rd={newInstance:ln.c.newInstance(Vd,"vtkOpenGLImageSlice"),extend:Vd},wd=ln.c.vtkDebugMacro;function kd(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var a=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,i=t.openGLRenderer.getTiledSizeAndOrigin(),l=null;if(t.renderable.getUseZValues()){var s=r.getZBufferTexture(),c=Math.floor(s.getWidth()),g=Math.floor(s.getHeight()),u=t.openGLRenderWindow.getContext();s.bind();var d=r.getFramebuffer();d?d.saveCurrentBindingsAndBuffers():wd("No framebuffer to save/restore");var m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.getHandle(),0),u.checkFramebufferStatus(u.FRAMEBUFFER)===u.FRAMEBUFFER_COMPLETE&&(l=new Uint8Array(c*g*4),u.viewport(0,0,c,g),u.readPixels(0,0,c,g,u.RGBA,u.UNSIGNED_BYTE,l)),d&&d.restorePreviousBindingsAndBuffers(),u.deleteFramebuffer(m)}t.renderable.invokeCallback(t.renderable.getInputData(),o,a,i,l)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var Wd={};function xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),_s.extend(e,t,n),kd(e,t)}var Td={newInstance:ln.c.newInstance(xd,"vtkOpenGLPixelSpaceCallbackMapper"),extend:xd},Jd=ln.c.vtkDebugMacro;function Xd(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.renderable.isActiveCameraCreated()||t.renderable.resetCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=function(){for(var e=0,n=t.renderable.getLightsByReference(),r=0;r0&&e++;return e||(Jd("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,a=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=a.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(a.clearDepth(1),r|=a.DEPTH_BUFFER_BIT,a.depthMask(!0));var o=e.getTiledSizeAndOrigin();a.enable(a.SCISSOR_TEST),a.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.colorMask(!0,!0,!0,!0),a.clear(r),a.enable(a.DEPTH_TEST)}},e.cameraPass=function(t){t&&e.clear()},e.getAspectRatio=function(){var e=t.parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=function(){var e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=Object(Xo.a)(e[0]-n[0],0,1),a=Object(Xo.a)(e[1]-n[1],0,1),o=t.parent.normalizedDisplayToDisplay(r,a),i=Math.round(o[0]),l=Math.round(o[1]),s=Object(Xo.a)(e[2]-n[0],0,1),c=Object(Xo.a)(e[3]-n[1],0,1);s>n[2]-n[0]&&(s=n[2]-n[0]),c>n[3]-n[1]&&(c=n[3]-n[1]);var g=t.parent.normalizedDisplayToDisplay(s,c),u=Math.round(g[0])-i,d=Math.round(g[1])-l;return u<0&&(u=0),d<0&&(d=0),{usize:u,vsize:d,lowerLeftU:i,lowerLeftV:l}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var a=t.renderable.getBackgroundByReference();t.context.clearColor(a[0],a[1],a[2],a[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,r.depthMask(!0)),r.colorMask(!0,!0,!0,!0);var o=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=function(){null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))}}var Od={context:null,openGLRenderWindow:null,selector:null};function Nd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),_s.extend(e,t,n),ln.c.get(e,t,["shaderCache"]),ln.c.setGet(e,t,["selector"]),Xd(e,t)}var Hd={newInstance:ln.c.newInstance(Nd,"vtkOpenGLRenderer"),extend:Nd},Yd=ln.c.vtkErrorMacro;function Fd(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=function(n){if(n){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera())}},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=function(n,r){if(n&&!t.openGLRenderer.getSelector()){e.updateBufferObjects(),t.openGLRenderWindow.enableDepthMask(),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var a=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",a);var o=t.openGLRenderer.getRenderable(),i=t.openGLCamera.getKeyMatrices(o),l=new Float64Array(16);if(Object(Yo.g)(l,i.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",l),"box"===t.lastFormat){var s=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",s[0],s[1],s[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=function(){if(!t.tris.getCABO().getElementCount()){for(var e=new Float32Array(12),n=0;n<4;n++)e[3*n]=n%2*2-1,e[3*n+1]=n>1?1:-1,e[3*n+2]=1;var r=Bo.a.newInstance({numberOfComponents:3,values:e});r.setName("points");var a=new Uint16Array(8);a[0]=3,a[1]=0,a[2]=1,a[3]=3,a[4]=3,a[5]=0,a[6]=3,a[7]=2;var o=Bo.a.newInstance({numberOfComponents:1,values:a});t.tris.getCABO().createVBO(o,"polys",sg.SURFACE,{points:r,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Yd("Error setting vertexMC in shader VAO."));var i=t.renderable.getTextures();i.length||Yd("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==i[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(i[0]))}}var Pd={context:null};function Kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),_s.extend(e,t,n),t.openGLTexture=ic.newInstance(),t.tris=Eg.newInstance(),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Fd(e,t)}var Md={newInstance:ln.c.newInstance(Kd),extend:Kd};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dd=ln.c.vtkErrorMacro;function Ed(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||Dd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),a.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())a.setUniformMatrix("MCVCMatrix",i.wcvc);else{var l=t.openGLActor.getKeyMatrices(),s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(g=i.getArray(t.renderable.getScaleArray()).getData());var u=null,d=0,m=null;a?(d=a.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),u=a.getData(),m=new Uint8Array(3*s*4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(d);var f=new Float32Array(5*s*3);o.setStride(20);for(var p=Math.cos(Object(Xo.B)(30)),C=0,I=0,h=0,b=0,y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ud,n),rd.extend(e,t,n),Ed(e,t)}var _d={newInstance:ln.c.newInstance(zd,"vtkOpenGLSphereMapper"),extend:zd};function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qd=ln.m;function qd(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||Qd("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||Qd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||Qd("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),r.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",i.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",i.normalMatrix);else{var l=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){var s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}if(a.isUniformUsed("normalMatrix")){var c=new Float64Array(9);_l(c,i.normalMatrix,l.normalMatrix),a.setUniformMatrix3x3("normalMatrix",c)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null,u=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),a&&(u=a.getNumberOfComponents(),o.setColorOffset(4),g=a.getData(),o.setColorBOStride(8)),o.setColorComponents(u),o.setStride(28);var d=new Float32Array(7*s*12),m=new Uint8Array(12*s*(g?8:4)),f=null,p=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(f=i.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&i.hasArray(t.renderable.getOrientationArray())?p=i.getArray(t.renderable.getOrientationArray()).getData():Qd(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var C=[0,1,3,0,3,2,2,3,5,2,5,4],I=0,h=0,b=0,y=0,v=0;v=4?255:0,m[y++]=C[G]>=2?255:0,m[y++]=255,h=v*u,g&&(m[y++]=g[h],m[y++]=g[h+1],m[y++]=g[h+2],m[y++]=g[h+3])}o.setElementCount(b/7),o.upload(d,Xc.ARRAY_BUFFER),o.getColorBO().upload(m,Xc.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var $d={};function em(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),rd.extend(e,t,n),qd(e,t)}var tm={newInstance:Object(ln.g)(em,"vtkOpenGLStickMapper"),extend:em},nm="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n",rm=hg.Representation;function am(e,t,n,r){var o=Object(a.a)(t,2),i=o[0],l=o[1],s=e.getContext(),c=ic.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:s.FLOAT,baseLevel:0,maxLevel:0});return c.setOpenGLRenderWindow(e),c.setInternalFormat(s.RGBA32F),c.create2DFromRaw(i,l,4,"Float32Array",null),c.activate(),c.sendParameters(),c.deactivate(),c}function om(e,t){return am(e,t,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE)}function im(e,t){t.classHierarchy.push("vtkLICPingPongBufferManager"),t.openGLRenderWindow?(t.quad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",rm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow),t.context=t.openGLRenderWindow.getContext(),t.licTexture0=om(t.openGLRenderWindow,t.size),t.seedTexture0=om(t.openGLRenderWindow,t.size),t.licTexture1=om(t.openGLRenderWindow,t.size),t.seedTexture1=om(t.openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?am(t.openGLRenderWindow,t.size,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE):null,t.imageVectorTexture=t.doVTPass?function(e,t){return am(e,t,ic.Filter.LINEAR,ic.Wrap.CLAMP_TO_EDGE)}(t.openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=function(){t.readIndex=1-t.readIndex},e.renderQuad=function(e,n){var r=t.quad,a=t.context,o=t.quadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=function(){return 0===t.readIndex?t.licTexture0:t.licTexture1},e.getLastSeedBuffer=function(){return 0===t.readIndex?t.seedTexture0:t.seedTexture1},e.getLICBuffer=function(){return 1-t.readIndex==0?t.licTexture0:t.licTexture1},e.getSeedBuffer=function(){return 1-t.readIndex==0?t.seedTexture0:t.seedTexture1},e.getLICTextureUnit=function(){var e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=function(){var e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=function(){return t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()},e.getImageVectorTextureUnit=function(){return t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit()},e.getMaskVectorTextureUnit=function(){return t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit()},e.clearBuffers=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);var a=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),a.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(a),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=function(e){var n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,a=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1])},e.detachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=function(){var e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=function(){var e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=function(){t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);var e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=function(){var e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]),t.textures[t.readIndex][0].deactivate()},e.detachBuffers=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);var r=t.textures[t.readIndex],a=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),a[0]&&a[0].deactivate(),a[1]&&a[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=function(){return 1-t.readIndex},e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}var lm={openGLRenderWindow:null,vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lm,n),ln.c.obj(e,t),ln.c.get(e,t,["readIndex"]),ln.c.setGet(e,t,["doEEPass","doVTPass","openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),im(e,t)}var cm={newInstance:ln.c.newInstance(sm,"vtkLICPingPongBufferManager"),extend:sm},gm=0,um=1,dm=2,mm=3,fm=0,pm=1;function Cm(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.dumpTextureValues=function(e,n){var r=Object(a.a)(n,2),o=r[0],i=r[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,g=gc.newInstance(),u=l,d=null;return g.setOpenGLRenderWindow(s),g.saveCurrentBindingsAndBuffers(),g.create(o,i),g.populateFramebuffer(),g.setColorBuffer(e),d=new Float32Array(o*i*c),u.readPixels(0,0,o,i,4===c?u.RGBA:u.RGB,u.FLOAT,d),g.restorePreviousBindingsAndBuffers(),d},e.getTextureMinMax=function(n,r){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,i=e.dumpTextureValues(n,r,a,o,4),l=Number.MAX_VALUE,s=Number.MIN_VALUE,c=0;cs&&(s=g)}return{min:l,max:s}},e.getComponentSelectionProgram=function(e){var t="xyzw";return".".concat(t[e[0]]).concat(t[e[1]])},e.buildShaders=function(){t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");var n=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl","vec2 V = texture2D(texVectors, tcoordVC.st)".concat(e.getComponentSelectionProgram(t.componentIds),";")).result;t.VTProgram=e.buildAShader(n);var r=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){var e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=function(a,o,i,l,s,c){if(t.openGLRenderWindow=s,t.context=s.getContext(),Object.assign(t,c),a[0]<=0||a[1]<=0)return null;var g=[1/a[0],1/a[1]],u=t.stepSize*Math.sqrt(g[0]*g[0]+g[1]*g[1]);u<=0&&(u=1e-10);var d,m=t.context,f=t.framebuffer;f&&a[0]===f.getSize()[0]&&a[1]===f.getSize()[1]||((f=gc.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),(d=f).create.apply(d,Object(Ao.a)(a)),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),m.viewport.apply(m,[0,0].concat(Object(Ao.a)(a))),m.scissor.apply(m,[0,0].concat(Object(Ao.a)(a))),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(i),t.bufs.setNoiseTexture(l)):t.bufs=cm.newInstance({openGLRenderWindow:s,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:i,noiseTexture:l,framebuffer:f,size:a});var p=[(l.getWidth()+1)/a[0],(l.getHeight()+1)/a[1]],C=1/a[0],I=1/a[1],h=t.openGLRenderWindow.getShaderCache();if(t.transformVectors){var b=t.VTProgram;h.readyShaderProgram(b),t.bufs.attachImageVectorBuffer(),b.setUniform2f.apply(b,["uTexSize"].concat(Object(Ao.a)(a))),b.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),t.bufs.renderQuad(a,b),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);var y=t.LIC0ShaderProgram;h.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f.apply(y,["uNoiseBoundsPt1"].concat(p)),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,a,y);var v=t.LICIShaderProgram;h.readyShaderProgram(v),v.setUniformi("uPassNo",0),v.setUniformf("uStepSize",-u),v.setUniform2f.apply(v,["uNoiseBoundsPt1"].concat(p)),v.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),v.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(var Z=0;Z1||l<0)&&(console.error("Invalid color range: ",l,s),l=0,s=1);var c=s-l;n&&(l+=c*t.lowLICContrastEnhancementFactor,c=(s-=c*t.highLICContrastEnhancementFactor)-l);var g=t.CEProgram;o.readyShaderProgram(g),g.setUniformi("texLIC",t.bufs.getLICTextureUnit()),g.setUniformf("uMin",l),g.setUniformf("uMaxMinDiff",c),r(t.bufs,a,g)}}var Im={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Im,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),Cm(e,t)}var bm={newInstance:ln.c.newInstance(hm,"vtkLineIntegralConvolution2D"),extend:hm},ym=n(53);function vm(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}var Zm={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:gm,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:0,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:pm,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function Am(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),ln.c.obj(e,t),ln.c.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),vm(0,t)}var Gm={newInstance:ln.c.newInstance(Am,"vtkSurfaceLICInterface"),extend:Am},Sm=hg.Representation;function Bm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=function(e,n){var r=t.licQuad,a=t.context,o=t.licQuadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=function(e){if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Object(ym.a)(t.noiseGeneratorSeed,{global:!0});var n=[],r=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue"),o=r.noiseTextureType,i=r.noiseGrainSize,l=r.numberOfNoiseLevels,s=r.noiseImpulseProbability,c=r.noiseImpulseBackgroundValue,g=r.minNoiseValue,u=r.maxNoiseValue;switch(o){case pm:n=function(e,t,n,r,a,o){var i=Math.max(0,Math.min(1,n)),l=Float32Array.from({length:e*e},(function(){var e=0;if(1===i||Math.random()>1-i)for(var t=0;t<2048;++t)e+=Math.random();return e})),s=0,c=2049;l.forEach((function(e){c=1===i?e0?e:c,s=e>s?e:s}));var g=s-c;0===g&&(c=0,g=0===s?1:s);var u=t-1,d=0!==u?1/u:0,m=o-a;return l.map((function(e){var n=e=c?1===t?o:a+(i>u?u:i)*d*m:r}))}(Math.floor(e/i),l,s,c,g,u);break;case fm:default:n=function(e,t,n,r){var o=Object(a.a)(e,2),i=o[0],l=o[1],s=r-n;return Float32Array.from({length:i*l},(function(){var e=Math.random();return(e=(e=Math.floor(e*t)/t)*s+n)>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],l,g,u)}var d=1/i,m=Float32Array.from({length:e*e*4},(function(t,r){var a=r/4;if(r%4==0){var o=Math.floor(a%e*d),l=Math.floor(a/e*d);return n[l*(e/i)+o]}return r%4==1||r%4==3?1:0})),f=ic.newInstance({wrapS:ic.Wrap.REPEAT,wrapT:ic.Wrap.REPEAT,minificationFilter:ic.Filter.NEAREST,magnificationFilter:ic.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});f.setOpenGLRenderWindow(t.openGLRenderWindow),f.create2DFromRaw(e,e,4,"Float32Array",m),f.activate(),f.sendParameters(),f.deactivate(),t.noiseTexture=f}},e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.allocateTextures=function(){var n=ic.Filter.NEAREST,r=ic.Filter.LINEAR,a=t.openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(a,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(a,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(a,r)),t.LICImage||(t.LICImage=e.allocateTexture(a,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(a,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(a,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(a))},e.allocateTexture=function(e,n){var r=t.context,a=ic.newInstance({wrapS:ic.Wrap.CLAMP_TO_EDGE,wrapT:ic.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return a.setOpenGLRenderWindow(e),a.setInternalFormat(r.RGBA32F),a.create2DFromRaw.apply(a,Object(Ao.a)(t.size).concat([4,"Float32Array",null])),a.activate(),a.sendParameters(),a.deactivate(),a},e.allocateDepthTexture=function(e){var n=t.context,r=ic.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw.apply(r,Object(Ao.a)(t.size).concat(["Float32Array",null])),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=function(){if(!t.framebuffer){t.licHelper=null;var e=gc.newInstance();e.setOpenGLRenderWindow(t.openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create.apply(e,Object(Ao.a)(t.size)),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=function(){t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=function(){e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",Sm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow)),t.licHelper||(t.licHelper=bm.newInstance())},e.prepareForGeometry=function(){var e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(1),e.removeColorBuffer(2),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,1),e.setColorBuffer(t.maskVectorImage,2),e.setDepthBuffer(t.depthTexture);var n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1,n.COLOR_ATTACHMENT2]),n.viewport.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.scissor.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=function(n){t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();var r=t.licCopyPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(r);var a=t.context;a.viewport.apply(a,[0,0].concat(Object(Ao.a)(n))),a.scissor.apply(a,[0,0].concat(Object(Ao.a)(n))),a.disable(a.BLEND),a.enable(a.DEPTH_TEST),a.disable(a.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=function(){var n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create.apply(r,Object(Ao.a)(t.size)),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();var a=t.licColorPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(a),a.setUniformi("texVectors",t.vectorImage.getTextureUnit()),a.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());var o=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor"),i=o.colorMode,l=o.LICIntensity,s=o.mapModeBias,c=o.maskIntensity,g=o.maskColor,u=o.enhanceContrast,d=o.lowColorContrastEnhancementFactor,m=o.highColorContrastEnhancementFactor;if(a.setUniformi("texLIC",t.LICImage.getTextureUnit()),a.setUniformi("uScalarColorMode",i),a.setUniformf("uLICIntensity",l),a.setUniformf("uMapBias",s),a.setUniformf("uMaskIntensity",c),a.setUniform3f.apply(a,["uMaskColor"].concat(Object(Ao.a)(g))),e.renderQuad(t.size,a),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),u===dm||u===mm){var f=0,p=1,C=p-f;C=(p-=C*m)-(f+=C*d),r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();var I=t.enhanceContrastPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(I),I.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),I.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),I.setUniformi("texLIC",t.LICImage.getTextureUnit()),I.setUniformf("uLMin",f),I.setUniformf("uLMaxMinDiff",C),e.renderQuad(t.size,I),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=function(){var e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t.openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=function(n){Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=function(){t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}var Vm={context:null,openGLRenderWindow:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vm,n),Gm.extend(e,t,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","reallocateTextures","licInterface","size"]),Bm(e,t)}var wm={newInstance:ln.c.newInstance(Rm,"vtkSurfaceLICInterface"),extend:Rm};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=ln.c.vtkErrorMacro;function xm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");var n=function(e){for(var t=1;t1&&t.renderable.setCustomShaderAttributes([a.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=function(e){var n;t.stateCache=(Object(qi.a)(n={},e.BLEND,e.isEnabled(e.BLEND)),Object(qi.a)(n,e.DEPTH_TEST,e.isEnabled(e.DEPTH_TEST)),Object(qi.a)(n,e.SCISSOR_TEST,e.isEnabled(e.SCISSOR_TEST)),n)},e.popState=function(e){var n=function(n){return t.stateCache[n]?e.enable(n):e.disable(n)};n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST)},e.renderPiece=function(r,a){var o=!0;t.openGLRenderWindow.getWebgl2()||(Wm("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(Wm("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(Wm("No input"),o=!1);var i=t.renderable.getLicInterface();i||(i=Gm.newInstance(),t.renderable.setLicInterface(i)),t.openGLLicInterface||(t.openGLLicInterface=wm.newInstance()),i!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(i);var l=t.renderable.getInputArrayToProcess(0);if(i.getEnableLIC()&&(!l||l.getNumberOfComponents()<2)&&(Wm("No vector input array"),o=!1),i.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,o&&i.getEnableLIC()){var s=t.openGLRenderWindow.getSize(),c=s.map((function(e){return Math.round(e*i.getViewPortScale())}));t.openGLLicInterface.setSize(c),t.openGLLicInterface.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,a),n.renderPieceDraw(r,a),n.renderPieceFinish(r,a),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(s),e.popState(t.context)}else n.renderPiece(r,a)}}var Tm={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tm,n),rd.extend(e,t,n),xm(e,t),ln.c.setGet(e,t,["openGLLicInterface"])}var Xm={newInstance:ln.c.newInstance(Jm,"vtkOpenGLSurfaceLICMapper"),extend:Jm};function Om(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0))},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.MCWCMatrix,t.renderable.getMatrix()),Object(Yo.i)(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?El(t.normalMatrix):(Dl(t.normalMatrix,t.MCWCMatrix),zl(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}var Nm={};function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nm,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),ln.c.setGet(e,t,["context"]),Om(e,t)}var Ym={newInstance:ln.c.newInstance(Hm,"vtkOpenGLVolume"),extend:Hm},Fm={NEAREST:0,LINEAR:1,FAST_LINEAR:2},Pm={FRACTIONAL:0,PROPORTIONAL:1},Km={InterpolationType:Fm,OpacityMode:Pm},Mm={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3},Lm={BlendMode:Mm};function Dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Em=ln.c.vtkWarningMacro,Um=ln.c.vtkErrorMacro;function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n// Lighting values\n//VTK::Light::Dec\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing triliear values from multiple z slices\n#ifdef vtkTriliearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)).a - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)).a - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)).a - scalar;\n\n // divide by spacing\n result.xyz /= vSpacing;\n\n result.w = length(result.xyz);\n\n // rotate to View Coords\n result.xyz =\n result.x * vPlaneNormal0 +\n result.y * vPlaneNormal2 +\n result.z * vPlaneNormal4;\n\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - 0.5) * 2.0,\n (fragCoord.y / vpHeight - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n return (vWCtoIDX * vertex).xyz / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\n//\nfloat computeGradientOpacityFactor(\n vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n#if vtkLightComplexity > 0\nvoid applyLighting(inout vec3 tColor, vec4 normal)\n{\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n //VTK::Light::Impl\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n}\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = 1.0;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normal0 = computeNormal(posIS, tValue.a, tstep);\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n applyLighting(tColor.rgb, normal0);\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n#endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\n\n\n\n\n\n\n\nreturn tColor;\n}\n\n\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, float sampleDistanceIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 //AVERAGE_INTENSITY_BLEND\n vec4 averageIPScalarRangeMin = vec4 (\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n 1.0);\n vec4 averageIPScalarRangeMax = vec4(\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n 1.0);\n\n vec4 sum = vec4(0.);\n\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n // - We are setting the alpha channel for averageIPScalarRangeMin and\n // averageIPScalarRangeMax so that we do not trigger this 'continue'\n // based on the alpha channel comparison.\n // - There might be a better way to do this. I'm not sure if there is an\n // equivalent of 'any' which only operates on RGB, though I suppose\n // we could write an 'anyRGB' function and see if that is faster.\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n if (any(lessThan(tValue, averageIPScalarRangeMin)) ||\n any(greaterThan(tValue, averageIPScalarRangeMax))) {\n continue;\n }\n\n // Sum the values across each step in the path\n sum += tValue;\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (result == 0.0)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*(tdims - 1.0);\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, out float sampleDistanceIS, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n}\n\nvoid main()\n{\n\n vec3 rayDirVC;\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n float sampleDistanceIS;\n computeIndexSpaceValues(posIS, endIS, sampleDistanceIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, sampleDistanceIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Fragment;a.getProperty().getInterpolationType()===Fm.LINEAR&&(o=Hg.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===a.getProperty().getUseLabelOutline()&&(o=Hg.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var i=t.scalarTexture.getComponents();o=Hg.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(i)).result;var l=a.getProperty().getIndependentComponents();if(l){o=Hg.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var s=[],c=0;c0&&(o=Hg.substitute(o,"//VTK::vtkProportionalComponents",s.join("\n")).result)}var g=t.currentInput.getExtent(),u=t.currentInput.getSpacing(),d=new Float64Array(3);Object(Fo.p)(d,(g[1]-g[0])*u[0],(g[3]-g[2])*u[1],(g[5]-g[4])*u[2]);var m=Object(Fo.j)(d)/t.renderable.getSampleDistance();o=Hg.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(m))).result,o=Hg.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=a.getProperty().getUseGradientOpacity(0);for(var f=1;l&&!t.gopacity&&f0&&(a=Hg.substitute(a,"//VTK::Light::Dec",["uniform vec3 lightColor".concat(o,";"),"uniform vec3 lightDirectionVC".concat(o,"; // normalized"),"uniform vec3 lightHalfAngleVC".concat(o,"; // normalized"),"//VTK::Light::Dec"],!1).result,a=Hg.substitute(a,"//VTK::Light::Impl",[" float df = abs(dot(normal.rgb, -lightDirectionVC".concat(o,"));")," diffuse += ((df".concat("",") * lightColor").concat(o,");")," float sf = pow( abs(dot(lightHalfAngleVC".concat(o,",normal.rgb)), vSpecularPower);")," specular += ((sf".concat("",") * lightColor").concat(o,");")," //VTK::Light::Impl"],!1).result,o++)}))}e.Fragment=a},e.replaceShaderClippingPlane=function(e,n,r){var a=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;a=Hg.substitute(a,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,a=Hg.substitute(a,"//VTK::ClipPlane::Impl",["for(int i = 0; i < ".concat(o,"; i++) {")," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=a},e.getNeedToRebuildShaders=function(n,r,a){var o=0;a.getProperty().getShade()&&t.renderable.getBlendMode()===Mm.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((function(e){e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));var i=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,i=!0);var l=t.scalarTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=!1,g=[];if(s){for(var u=0;u0&&(c=!0)}var d=t.currentInput.getExtent(),m=t.currentInput.getSpacing(),f=new Float64Array(3);Object(Fo.p)(f,(d[1]-d[0])*m[0],(d[3]-d[2])*m[1],(d[5]-d[4])*m[2]);var p=Object(Fo.j)(f)/t.renderable.getSampleDistance(),C={interpolationType:a.getProperty().getInterpolationType(),useLabelOutline:a.getProperty().getUseLabelOutline(),numComp:l,usesProportionalComponents:c,iComps:s,maxSamples:p,useGradientOpacity:a.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),averageIPScalarMode:t.renderable.getAverageIPScalarRange(),proportionalComponents:g};return t.previousState&&t.previousState.interpolationType===C.interpolationType&&t.previousState.useLabelOutline===C.useLabelOutline&&t.previousState.numComp===C.numComp&&t.previousState.usesProportionalComponents===C.usesProportionalComponents&&t.previousState.iComps===C.iComps&&t.previousState.maxSamples===C.maxSamples&&t.previousState.useGradientOpacity===C.useGradientOpacity&&t.previousState.blendMode===C.blendMode&&zm(t.previousState.averageIPScalarMode,C.averageIPScalarMode)&&zm(t.previousState.proportionalComponents,C.proportionalComponents)?!!(0===n.getProgram()||i||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||!!t.lastZBufferTexture!=!!t.zBufferTexture||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance()),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var i=e.getRenderTargetSize();o.setUniformf("vpWidth",i[0]),o.setUniformf("vpHeight",i[1])}},e.setCameraShaderParameters=function(n,r,a){var o=t.openGLCamera.getKeyMatrices(r),i=t.openGLVolume.getKeyMatrices();Object(Yo.l)(t.modelToView,o.wcvc,i.mcwc);var l=n.getProgram(),s=t.openGLCamera.getRenderable(),c=s.getClippingRange();l.setUniformf("camThick",c[1]-c[0]),l.setUniformf("camNear",c[0]),l.setUniformf("camFar",c[1]);for(var g=t.currentInput.getBounds(),u=t.currentInput.getDimensions(),d=new Float64Array(3),m=new Float64Array(3),f=1,p=-1,C=1,I=-1,h=0;h<8;++h){if(Object(Fo.p)(d,g[h%2],g[2+Math.floor(h/2)%2],g[4+Math.floor(h/4)]),Object(Fo.q)(d,d,t.modelToView),!s.getParallelProjection()){Object(Fo.l)(m,d);var b=-c[0]/d[2];Object(Fo.b)(d,m,b)}Object(Fo.q)(d,d,o.vcpc),f=Math.min(d[0],f),p=Math.max(d[0],p),C=Math.min(d[1],C),I=Math.max(d[1],I)}l.setUniformf("dcxmin",f),l.setUniformf("dcxmax",p),l.setUniformf("dcymin",C),l.setUniformf("dcymax",I),l.isUniformUsed("cameraParallel")&&l.setUniformi("cameraParallel",s.getParallelProjection());var y=t.currentInput.getExtent(),v=t.currentInput.getSpacing(),Z=new Float64Array(3);Object(Fo.p)(Z,(y[1]-y[0]+1)*v[0],(y[3]-y[2]+1)*v[1],(y[5]-y[4]+1)*v[2]),l.setUniform3f("vSpacing",v[0],v[1],v[2]),Object(Fo.p)(d,y[0],y[2],y[4]),t.currentInput.indexToWorldVec3(d,d),Object(Fo.q)(d,d,t.modelToView),l.setUniform3f("vOriginVC",d[0],d[1],d[2]);var A=t.currentInput.getIndexToWorld();Object(Yo.l)(t.idxToView,t.modelToView,A),_l(t.idxNormalMatrix,o.normalMatrix,i.normalMatrix),_l(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var G=Object(Fo.j)(Z)/t.renderable.getSampleDistance();G>t.renderable.getMaximumSamplesPerRay()&&Em("The number of steps required ".concat(Math.ceil(G)," is larger than the\n specified maximum number of steps ").concat(t.renderable.getMaximumSamplesPerRay(),".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));var S=new Float64Array(3);if(Object(Fo.p)(S,1,1,1),Object(Fo.k)(S,S,Z),l.setUniform3f("vVCToIJK",S[0],S[1],S[2]),l.setUniform3i("volumeDimensions",u[0],u[1],u[2]),!t.openGLRenderWindow.getWebgl2()){var B=t.scalarTexture.getVolumeInfo();l.setUniformf("texWidth",t.scalarTexture.getWidth()),l.setUniformf("texHeight",t.scalarTexture.getHeight()),l.setUniformi("xreps",B.xreps),l.setUniformi("xstride",B.xstride),l.setUniformi("ystride",B.ystride)}for(var V=new Float64Array(3),R=new Float64Array(3),w=0;w<6;++w){switch(w){default:case 0:Object(Fo.p)(V,1,0,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 1:Object(Fo.p)(V,-1,0,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 2:Object(Fo.p)(V,0,1,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 3:Object(Fo.p)(V,0,-1,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 4:Object(Fo.p)(V,0,0,1),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 5:Object(Fo.p)(V,0,0,-1),Object(Fo.p)(R,y[0],y[2],y[4])}Object(Fo.m)(V,V,t.idxNormalMatrix),Object(Fo.q)(R,R,t.idxToView);var k=-1*Object(Fo.d)(R,V);if(l.setUniform3f("vPlaneNormal".concat(w),V[0],V[1],V[2]),l.setUniformf("vPlaneDistance".concat(w),k),a.getProperty().getUseLabelOutline()){var W=t.currentInput.getWorldToIndex();l.setUniformMatrix("vWCtoIDX",W),Object(Yo.g)(t.projectionToWorld,o.wcpc),l.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var x=e.getRenderTargetSize();l.setUniformf("vpWidth",x[0]),l.setUniformf("vpHeight",x[1])}}switch(Object(Yo.g)(t.projectionToView,o.vcpc),l.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var T=0,J=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();J[0]=t[0]*n,J[1]=t[1]*n,J[2]=t[2]*n,l.setUniform3fArray("lightColor".concat(T),J);var r=e.getDirection();Object(Fo.p)(V,r[0],r[1],r[2]),Object(Fo.m)(V,V,o.normalMatrix),l.setUniform3f("lightDirectionVC".concat(T),V[0],V[1],V[2]);var a=[-.5*V[0],-.5*V[1],-.5*(V[2]-1)];l.setUniform3fArray("lightHalfAngleVC".concat(T),a),T++}}))}},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram();a.setUniformi("ctexture",t.colorTexture.getTextureUnit()),a.setUniformi("otexture",t.opacityTexture.getTextureUnit()),a.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),i=r.getProperty(),l=t.scalarTexture.getComponents(),s=r.getProperty().getIndependentComponents();if(s&&l>=2)for(var c=0;c0&&(a.setUniformf("vAmbient",i.getAmbient()),a.setUniformf("vDiffuse",i.getDiffuse()),a.setUniformf("vSpecular",i.getSpecular()),a.setUniformf("vSpecularPower",i.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var a=t.openGLCamera.getKeyMatrices(n),o=[],i=[],l=t.renderable.getClippingPlanes(),s=l.length,c=0;c1.43){var e=t.framebuffer.getSize();return[t.fvp[0]*e[0],t.fvp[1]*e[1]]}return t.openGLRenderWindow.getFramebufferSize()},e.renderPieceStart=function(n,r){if(t.renderable.getAutoAdjustSampleDistances()){var a=n.getVTKWindow().getInteractor(),o=a.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var i=Math.sqrt(t.avgFrameTime*a.getDesiredUpdateRate()/t.avgWindowArea);i>10&&(i=10),t.targetXYF=i}else t.targetXYF=Math.sqrt(t.avgFrameTime*a.getStillUpdateRate()/t.avgWindowArea);t.targetXYF<1.53&&t.targetXYF>1.33&&(t.targetXYF=t.lastXYF),Math.abs(1-t.targetXYF/t.lastXYF)<.1&&(t.targetXYF=t.lastXYF),t.lastXYF=t.targetXYF}else t.lastXYF=t.renderable.getImageSampleDistance();t.lastXYF<=1.43&&(t.lastXYF=1);var l=t.lastXYF,s=t.openGLRenderWindow.getFramebufferSize();if(l>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer();else{var c=t.framebuffer.getSize();c[0]===Math.floor(.7*s[0])&&c[1]===Math.floor(.7*s[1])||(t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var g=t.context;g.clearColor(0,0,0,0),g.colorMask(!0,!0,!0,!0),g.clear(g.COLOR_BUFFER_BIT),g.viewport(0,0,s[0]/l,s[1]/l),t.fvp=[Math.floor(s[0]/l)/Math.floor(.7*s[0]),Math.floor(s[1]/l)/Math.floor(.7*s[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===Fm.NEAREST?(t.scalarTexture.setMinificationFilter(Ms.NEAREST),t.scalarTexture.setMagnificationFilter(Ms.NEAREST)):(t.scalarTexture.setMinificationFilter(Ms.LINEAR),t.scalarTexture.setMagnificationFilter(Ms.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var a=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),a.drawArrays(a.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=function(e,n){if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t.lastXYF>1.43){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");var r=t.copyShader;t.copyVAO=Kg.newInstance(),t.copyVAO.setOpenGLRenderWindow(t.openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(r,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var a=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,a[0],a[1]);var o=t.framebuffer.getColorTexture();o.activate(),t.copyShader.setUniformi("texture",o.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);var i=t.context;i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=function(n,r){e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Um("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():Object(Xo.D)(t.Bounds)},e.updateBufferObjects=function(t,n){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=function(n,r){return t.VBOBuildTime.getMTime()1?1:-1,k[3*W+2]=-1;var x=new Uint16Array(8);x[0]=3,x[1]=0,x[2]=1,x[3]=3,x[4]=3,x[5]=0,x[6]=3,x[7]=2;var T=Bo.a.newInstance({numberOfComponents:3,values:k});T.setName("points");var J=Bo.a.newInstance({numberOfComponents:1,values:x});t.tris.getCABO().createVBO(J,"polys",sg.SURFACE,{points:T,cellOffset:0})}t.VBOBuildTime.modified()}}}}var jm={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function Qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jm,n),_s.extend(e,t,n),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime,{mtime:0}),t.tris=Eg.newInstance(),t.scalarTexture=ic.newInstance(),t.opacityTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.jitterTexture=ic.newInstance(),t.jitterTexture.setWrapS(Ks.REPEAT),t.jitterTexture.setWrapT(Ks.REPEAT),t.framebuffer=gc.newInstance(),t.idxToView=Object(Yo.h)(new Float64Array(16)),t.idxNormalMatrix=El(new Float64Array(9)),t.modelToView=Object(Yo.h)(new Float64Array(16)),t.projectionToView=Object(Yo.h)(new Float64Array(16)),t.projectionToWorld=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,["context"]),_m(e,t)}var qm={newInstance:ln.c.newInstance(Qm,"vtkOpenGLVolumeMapper"),extend:Qm};function $m(e,t){t.overrides={},t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,a=n.getClassName(r++),o=!1,i=Object.keys(t.overrides);a&&!o;)-1!==i.indexOf(a)?o=!0:a=n.getClassName(r++);if(!o)return null;var l=t.overrides[a]();return l.setMyFactory(e),l},e.registerOverride=function(e,n){t.overrides[e]=n}}var ef={};function tf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ef,n),ln.c.obj(e,t),$m(e,t)}var nf={newInstance:ln.c.newInstance(tf,"vtkViewNodeFactory"),extend:tf};function rf(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var af={};function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,af,n),nf.extend(e,t,n),rf(0,t),e.registerOverride("vtkActor",Bc.newInstance),e.registerOverride("vtkActor2D",kc.newInstance),e.registerOverride("vtkCamera",Jc.newInstance),e.registerOverride("vtkGlyph3DMapper",fd.newInstance),e.registerOverride("vtkImageMapper",Gd.newInstance),e.registerOverride("vtkImageSlice",Rd.newInstance),e.registerOverride("vtkMapper",rd.newInstance),e.registerOverride("vtkPixelSpaceCallbackMapper",Td.newInstance),e.registerOverride("vtkRenderer",Hd.newInstance),e.registerOverride("vtkSkybox",Md.newInstance),e.registerOverride("vtkSphereMapper",_d.newInstance),e.registerOverride("vtkStickMapper",tm.newInstance),e.registerOverride("vtkTexture",ic.newInstance),e.registerOverride("vtkSurfaceLICMapper",Xm.newInstance),e.registerOverride("vtkVolume",Ym.newInstance),e.registerOverride("vtkVolumeMapper",qm.newInstance),e.registerOverride("vtkWidgetRepresentation",Zc.newInstance)}var lf={newInstance:ln.c.newInstance(of,"vtkOpenGLViewNodeFactory"),extend:of},sf=Object(Cn.d)((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,a,o,i){return n((l=n(n(t,e),n(a,i)))<<(s=o)|l>>>32-s,r);var l,s}function a(e,t,n,a,o,i,l){return r(t&n|~t&a,e,t,o,i,l)}function o(e,t,n,a,o,i,l){return r(t&a|n&~a,e,t,o,i,l)}function i(e,t,n,a,o,i,l){return r(t^n^a,e,t,o,i,l)}function l(e,t,n,a,o,i,l){return r(n^(t|~a),e,t,o,i,l)}function s(e,t){var r,s,c,g,u;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,m=-271733879,f=-1732584194,p=271733878;for(r=0;r>5]>>>t%32&255);return n}function g(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function d(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return c(s(g(e),8*e.length))}(d(e))}function f(e,t){return function(e,t){var n,r,a=g(e),o=[],i=[];for(o[15]=i[15]=void 0,a.length>16&&(a=s(a,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^a[n],i[n]=1549556828^a[n];return r=s(o.concat(g(t)),512+8*t.length),c(s(i.concat(r),640))}(d(e),d(t))}function p(e,t,n){return t?n?f(t,e):u(f(t,e)):n?m(e):u(m(e))}e.exports?e.exports=p:t.md5=p}(Cn.b)}),"/$$rollup_base$$/node_modules/blueimp-md5/js"),cf=["lastShaderBound","context","openGLRenderWindow"];function gf(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var a=n;r.length>0&&(a=Hg.substitute(a,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),i="\n",l="#version 100\n";o?l="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(i="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),a=Hg.substitute(a,"//VTK::System::Dec",["".concat(l,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",i,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var s=Hg.substitute(e,"//VTK::System::Dec",["".concat(l,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(s=Hg.substitute(s,"varying","out").result,a=Hg.substitute(a,"varying","in").result,a=Hg.substitute(a,"gl_FragData\\[0\\]","fragOutput0").result,a=Hg.substitute(a,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:s,FSSource:a,GSSource:Hg.substitute(r,"//VTK::System::Dec",l).result}},e.readyShaderProgramArray=function(t,n,r){var a=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(a.VSSource,a.FSSource,a.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=function(t){return t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null},e.getShaderProgram=function(e,n,r){var a="".concat(e).concat(n).concat(r),o=sf(a);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var i=Hg.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=function(n){e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((function(e){return t.shaderPrograms[e]})).forEach((function(e){return e.releaseGraphicsResources(n)}))},e.releaseGraphicsResources=function(){t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=function(e){return t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1}}var uf={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign(t,uf,n),t.shaderPrograms={},ln.c.obj(e,t),ln.c.setGet(e,t,cf),gf(e,t),Object.freeze(e)}var mf={newInstance:ln.c.newInstance(df,"vtkShaderCache"),extend:df},ff=ln.c.vtkErrorMacro;function pf(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),ln.c.obj(e,t),t.textureUnits=[],ln.c.get(e,t,["numberOfTextureUnits"]),ln.c.setGet(e,t,["context"]),pf(e,t)}var hf={newInstance:ln.c.newInstance(If,"vtkOpenGLTextureUnitManager"),extend:If},bf=ln.c.vtkDebugMacro,yf=ln.c.vtkErrorMacro,vf=-1!==navigator.userAgent.indexOf("Chrome");function Zf(e,t,n){var r=e.createFramebuffer(),a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}var Af=0,Gf=[];function Sf(){Af++,Gf.forEach((function(e){return e(Af)}))}function Bf(){Af--,Gf.forEach((function(e){return e(Af)}))}function Vf(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");var n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=function(n){if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((function(t){t.setOpenGLRenderWindow(e)}))}},e.initialize=function(){if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=hf.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);var n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=function(){t.context.makeCurrent()},e.setContainer=function(n){t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&yf("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=function(){return t.el},e.getContainerSize=function(){if(!t.containerSize&&t.el){var e=t.el.getBoundingClientRect(),n=e.width,r=e.height;t.containerSize=[n,r]}return t.containerSize||t.size},e.getFramebufferSize=function(){return t.activeFramebuffer?t.activeFramebuffer.getSize():t.size},e.isInViewport=function(t,n,r){var a=r.getViewportByReference(),o=e.getFramebufferSize();return a[0]*o[0]<=t&&a[2]*o[0]>=t&&a[1]*o[1]<=n&&a[3]*o[1]>=n},e.getViewportSize=function(t){var n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=function(t){var n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t/a[0],n/a[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t*a[0],n*a[1],r]},e.worldToView=function(e,t,n,r){return r.worldToView(e,t,n)},e.viewToWorld=function(e,t,n,r){return r.viewToWorld(e,t,n)},e.worldToDisplay=function(t,n,r,a){var o=a.worldToView(t,n,r),i=e.getViewportSize(a),l=a.viewToProjection(o[0],o[1],o[2],i[0]/i[1]),s=a.projectionToNormalizedDisplay(l[0],l[1],l[2]);return e.normalizedDisplayToDisplay(s[0],s[1],s[2])},e.displayToWorld=function(t,n,r,a){var o=e.displayToNormalizedDisplay(t,n,r),i=a.normalizedDisplayToProjection(o[0],o[1],o[2]),l=e.getViewportSize(a),s=a.projectionToView(i[0],i[1],i[2],l[0]/l[1]);return a.viewToWorld(s[0],s[1],s[2])},e.normalizedDisplayToViewport=function(t,n,r,a){var o=a.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var i=e.normalizedDisplayToDisplay(t,n,r);return[i[0]-o[0]-.5,i[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,a){var o=e.getViewportSize(a);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=function(t,n,r){var a=e.getFramebufferSize();return[t*(a[0]-1),n*(a[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,a){var o=a.getViewportByReference(),i=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,l=n+o[1]+.5;return e.displayToNormalizedDisplay(i,l,r)},e.getPixelData=function(e,n,r,a){var o=new Uint8Array((r-e+1)*(a-n+1)*4);return t.context.readPixels(e,n,r-e+1,a-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,a="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&a&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bf("using webgl2")),r||(bf("using webgl1"),r=t.canvas.getContext("webgl",n)||t.canvas.getContext("experimental-webgl",n)),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(n){n.length>0&&(t.vrDisplay=n[0],t.vrDisplay.depthNear=.01,t.vrDisplay.depthFar=100,e.invokeHaveVRDisplay())})),t.canvas.addEventListener("webglcontextlost",(function(e){e.preventDefault()}),!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1),r},e.startVR=function(){t.oldCanvasSize=t.size.slice(),t.vrDisplay.capabilities.canPresent?t.vrDisplay.requestPresent([{source:t.canvas}]).then((function(){if(t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&t.hideCanvasInVR&&(t.el.style.display="none"),t.queryVRSize){var n=t.vrDisplay.getEyeParameters("left"),r=t.vrDisplay.getEyeParameters("right"),a=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(a,o)}else e.setSize(t.vrResolution);t.renderable.getRenderers()[0].resetCamera(),t.vrFrameData=new VRFrameData,t.renderable.getInteractor().switchToVRAnimation(),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),vf&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):yf("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,Object(Ao.a)(t.oldCanvasSize)),t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&(t.el.style.display="block");var n=t.renderable.getRenderers()[0];n.getActiveCamera().setProjectionMatrix(null),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.vrRender=function(){if(t.vrDisplay.isPresenting){t.renderable.getInteractor().updateGamepads(t.vrDisplay.displayId),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),t.vrDisplay.getFrameData(t.vrFrameData);var n=t.renderable.getRenderers()[0];n.setViewport(0,0,.5,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.leftViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.leftProjectionMatrix),e.traverseAllPasses(),n.setViewport(.5,0,1,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.rightViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.rightProjectionMatrix),e.traverseAllPasses(),t.vrDisplay.submitFrame()}},e.restoreContext=function(){var t=fc.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t.textureResourceIds.get(n);if(void 0===r){var a=e.getTextureUnitManager().allocate();a<0?yf("Hardware does not support the number of textures defined."):(t.textureResourceIds.set(n,a),t.context.activeTexture(t.context.TEXTURE0+a))}else t.context.activeTexture(t.context.TEXTURE0+r)},e.deactivateTexture=function(n){var r=t.textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t.textureResourceIds.delete(n))},e.getTextureUnitForTexture=function(e){var n=t.textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n,r){if(t.webgl2)switch(e){case cn.b.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;case 4:default:return t.context.RGBA8}default:case cn.b.FLOAT:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;case 4:default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:default:return t.context.RGBA}},e.setBackgroundImage=function(e){t.bgImage.src=e.src},e.setUseBackgroundImage=function(e){t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(t.deleted)return null;t.imageFormat=n;var r=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,new Promise((function(n,a){var o=e.onImageReady((function(e){t.notifyStartCaptureImage=r,o.unsubscribe(),n(e)}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),o=n.getExtension("OES_texture_half_float"),i=n.getExtension("WEBGL_debug_renderer_info"),l=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),c=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&Zf(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[o&&Zf(n,n.RGBA,o.HALF_FLOAT_OES)?"RGBA":"",o&&Zf(n,n.RGB,o.HALF_FLOAT_OES)?"RGB":"",o&&Zf(n,n.LUMINANCE,o.HALF_FLOAT_OES)?"LUMINANCE":"",o&&Zf(n,n.ALPHA,o.HALF_FLOAT_OES)?"ALPHA":"",o&&Zf(n,n.LUMINANCE_ALPHA,o.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&Zf(n,n.RGB,n.FLOAT)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",l?n.getParameter(l.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",i&&n.getParameter(i.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",i&&n.getParameter(i.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],g={};c.length;){var u=c.pop(),d=Object(a.a)(u,3),m=d[0],f=d[1],p=d[2];f&&(g[f]={label:m,value:p})}return g},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,a.drawImage(t.canvas,0,0);var o=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rf,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",Sf(),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t.textureResourceIds=new Map,_s.extend(e,t,n),t.myFactory=lf.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",kf),t.shaderCache=mf.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hc.newInstance(),ln.c.event(e,t,"imageReady"),ln.c.event(e,t,"haveVRDisplay"),ln.c.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),ln.c.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),ln.c.setGetArray(e,t,["size","vrResolution"],2),Vf(e,t)}var kf=ln.c.newInstance(wf,"vtkOpenGLRenderWindow");Os("WebGL",kf);var Wf={newInstance:kf,extend:wf,pushMonitorGLContextCount:function(e){Gf.push(e)},popMonitorGLContextCount:function(e){return Gf.pop()}},xf={Device:{Unknown:0,LeftController:1,RightController:2},Input:{Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4}};function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,i=n?"addEventListener":"removeEventListener",l=n?"removeEventListener":"addEventListener";!a&&!n&&r>0&&--r,r&&!a||(r=0,t.container&&t.container[l]("mousemove",e.handleMouseMove),o[i]("mouseup",e.handleMouseUp),o[i]("mousemove",e.handleMouseMove),o[i]("touchend",e.handleTouchEnd,!1),o[i]("touchcancel",e.handleTouchEnd,!1),o[i]("touchmove",e.handleTouchMove,!1)),!a&&n&&++r}function g(){t.view&&t.enabled&&t.enableRender&&(t.inRender=!0,t.view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.start=function(){(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=function(e){Hf("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=function(n){t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=function(){t.initialized=!0,e.enable(),e.render()},e.enable=function(){return e.setEnabled(!0)},e.disable=function(){return e.setEnabled(!1)},e.startEventLoop=function(){return Nf("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||a(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Mf),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("mouseenter",e.handleMouseEnter),n.addEventListener("mouseleave",e.handleMouseLeave),n.addEventListener("mousemove",e.handleMouseMove),n.addEventListener("mousedown",e.handleMouseDown),document.querySelector("body").addEventListener("keypress",e.handleKeyPress),document.querySelector("body").addEventListener("keydown",e.handleKeyDown),document.querySelector("body").addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){c(!1,!0),t.container.removeEventListener("contextmenu",Mf),t.container.removeEventListener("wheel",e.handleWheel),t.container.removeEventListener("DOMMouseScroll",e.handleWheel),t.container.removeEventListener("mouseenter",e.handleMouseEnter),t.container.removeEventListener("mouseleave",e.handleMouseLeave),t.container.removeEventListener("mousemove",e.handleMouseMove),t.container.removeEventListener("mousedown",e.handleMouseDown),document.querySelector("body").removeEventListener("keypress",e.handleKeyPress),document.querySelector("body").removeEventListener("keydown",e.handleKeyDown),document.querySelector("body").removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=s(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=s(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=s(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){c(!0),t.stopPropagation(),t.preventDefault();var n=Jf(Jf({},l(t)),{},{position:o(t)});switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:Hf("Unknown mouse button pressed: ".concat(t.button))}}},e.requestPointerLock=function(){e.getView().getCanvas().requestPointerLock()},e.exitPointerLock=function(){return document.exitPointerLock()},e.isPointerLocked=function(){return!!document.pointerLockElement},e.handlePointerLockChange=function(){e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=function(r){void 0!==r?n.has(r)?Nf("requester is already registered for animating"):(n.add(r),1===n.size&&(t.lastFrameTime=.1,t.lastFrameStart=Date.now(),t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):Hf("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!a){var o=r&&r.getClassName?r.getClassName():r;Nf("".concat(o," did not request an animation"))}},e.switchToVRAnimation=function(){t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.vrAnimation=!0},e.returnFromVRAnimation=function(){t.vrAnimation=!1,0!==n.size&&(t.FrameTime=-1,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateGamepads=function(n){for(var r=navigator.getGamepads(),a=0;a1){var r=i(n.touches);if(2===n.touches.length){var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(a)}e.recognizeGesture("TouchStart",r)}else{var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}},e.handleTouchMove=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures&&n.touches.length>1){var r=i(n.touches);e.recognizeGesture("TouchMove",r)}else{var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(a)}},e.handleTouchEnd=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures)if(0===n.touches.length)if(1===n.changedTouches.length){var r={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(r),c(!1)}else{var a=i(n.changedTouches);e.recognizeGesture("TouchEnd",a),c(!1)}else if(1===n.touches.length){var l=i(n.changedTouches);e.recognizeGesture("TouchEnd",l);var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}else{var g=i(n.touches);e.recognizeGesture("TouchMove",g)}else{var u={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(u),c(!1)}},e.setView=function(n){t.view!==n&&(t.view=n,t.view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=function(){return t.view.getRenderable().getRenderersByReference()[0]},e.findPokedRenderer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.view)return null;var r=t.view.getRenderable().getRenderers();r.sort((function(e,t){return e.getLayer()-t.getLayer()}));for(var a=null,o=null,i=null,l=r.length;l--;){var s=r[l];if(t.view.isInViewport(e,n,s)&&s.getInteractive()){i=s;break}null===a&&s.getInteractive()&&(a=s),null===o&&t.view.isInViewport(e,n,s)&&(o=s)}return null===i&&(i=a),null===i&&(i=o),null==i&&(i=r[0]),i},e.render=function(){null!==t.animationRequest||t.inRender||g()},Kf.forEach((function(n){var r=n.charAt(0).toLowerCase()+n.slice(1);e["".concat(r,"Event")]=function(r){if(t.enabled)if(e.getCurrentRenderer()){var a=Jf({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](a)}else Ff("\n Can not forward events without a current renderer on the interactor.\n ")}})),e.recognizeGesture=function(n,r){if(!(Object.keys(r).length>2)){if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((function(e){t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});var a=0,o=[],i=[];Object.keys(r).forEach((function(e){o[a]=r[e],i[a]=t.startingEventPositions[e],a++}));var l=Math.sqrt((i[0].x-i[1].x)*(i[0].x-i[1].x)+(i[0].y-i[1].y)*(i[0].y-i[1].y)),s=Math.sqrt((o[0].x-o[1].x)*(o[0].x-o[1].x)+(o[0].y-o[1].y)*(o[0].y-o[1].y)),c=Object(Xo.F)(Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)),g=Object(Xo.F)(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),u=g-c;g=g+180>=360?g-180:g+180,c=c+180>=360?c-180:c+180,Math.abs(g-c)m&&f>p&&f>C){t.currentGesture="Pinch";var I={scale:1,touches:r};e.startPinchEvent(I)}else if(p>m&&p>C){t.currentGesture="Rotate";var h={rotation:0,touches:r};e.startRotateEvent(h)}else if(C>m){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var y={rotation:u,touches:r};e.rotateEvent(y)}if("Pinch"===t.currentGesture){var v={scale:s/l,touches:r};e.pinchEvent(v)}if("Pan"===t.currentGesture){var Z={translation:d,touches:r};e.panEvent(Z)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()};var u=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),u()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Df={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,view:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{}};function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Df,n),ln.c.obj(e,t),ln.c.event(e,t,"RenderEvent"),Kf.forEach((function(n){return ln.c.event(e,t,n)})),ln.c.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),ln.c.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Lf(e,t)}var Uf=Jf({newInstance:ln.c.newInstance(Ef,"vtkRenderWindowInteractor"),extend:Ef,handledEvents:Kf},xf),zf=ln.c.vtkDebugMacro;function _f(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),o=Object(Yo.h)(new Float64Array(16)),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3),c=Object(Yo.h)(new Float64Array(16)),g=Object(Yo.h)(new Float64Array(16)),u=new Float64Array(3),d=new Float64Array(3);function m(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=function(){var n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=function(n,r,a){n===t.position[0]&&r===t.position[1]&&a===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,a){n===t.focalPoint[0]&&r===t.focalPoint[1]&&a===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,zf("Distance is set to minimum."));var r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()}},e.computeDistance=function(){var e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,zf("Distance is set to minimum.");var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,m()},e.dolly=function(n){if(!(n<=0)){var r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])}},e.roll=function(n){var r=t.position,a=t.focalPoint,o=t.viewUp,i=new Float64Array([o[0],o[1],o[2],0]);Object(Yo.h)(c);var l=new Float64Array([a[0]-r[0],a[1]-r[1],a[2]-r[2]]);Object(Yo.q)(c,c,Object(Xo.B)(n),l),bg(i,i,c),t.viewUp[0]=i[0],t.viewUp[1]=i[1],t.viewUp[2]=i[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.yaw=function(n){var r=t.position;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint(d[0],d[1],d[2])},e.elevation=function(n){var r=t.focalPoint,a=e.getViewMatrix(),o=[-a[0],-a[1],-a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.pitch=function(n){var r=t.position,a=e.getViewMatrix(),o=[a[0],a[1],a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint.apply(e,Object(Ao.a)(d))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,a){var o=[n,r,a];Object(Xo.x)(t.position,o,t.position),Object(Xo.x)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(Object(Ao.a)(t.viewUp),[1]),a=[],o=[],i=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],bg(a,[].concat(Object(Ao.a)(t.position),[1]),n),bg(o,[].concat(Object(Ao.a)(t.focalPoint),[1]),n),bg(i,r,n),i[0]-=a[0],i[1]-=a[1],i[2]-=a[2],e.setPosition.apply(e,Object(Ao.a)(a.slice(0,3))),e.setFocalPoint.apply(e,Object(Ao.a)(o.slice(0,3))),e.setViewUp.apply(e,Object(Ao.a)(i.slice(0,3)))},e.getThickness=function(){return t.clippingRange[1]-t.clippingRange[0]},e.setThickness=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=function(e){},e.getRoll=function(){},e.setObliqueAngles=function(e,t){},e.getOrientation=function(){},e.getOrientationWXYZ=function(){},e.getFrustumPlanes=function(e){},e.getCameraLightTransformMatrix=function(){},e.deepCopy=function(e){},e.physicalOrientationToWorldDirection=function(e){var t,n,r=Ag(e[0],e[1],e[2],e[3]),a=yg(),o=Ag(0,0,1,0);return n=r,(t=a)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Zg(o,r,o),Zg(o,o,a),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Object(Yo.g)(t,t)},e.getWorldToPhysicalMatrix=function(e){Object(Yo.h)(e);var n=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Object(Yo.i)(e,e),Object(Fo.p)(i,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Object(Yo.r)(e,e,i),Object(Yo.s)(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(c){Object(Yo.g)(o,c),Object(Fo.q)(i,n,o),e.computeDistance();var g=t.distance;e.setPosition(i[0],i[1],i[2]),Object(Fo.q)(l,r,o),Object(Fo.a)(l,l,i),Object(Fo.l)(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),Object(Fo.q)(s,a,o),Object(Fo.a)(s,s,i),Object(Fo.l)(s,s),e.setViewUp(s[0],s[1],s[2]),e.setDistance(g)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Object(Yo.l)(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Object(Yo.d)(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Object(Yo.i)(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;Object(Yo.k)(o,t.position,t.focalPoint,t.viewUp),Object(Yo.i)(o,o);var e=new Float64Array(16);return Object(Yo.d)(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var a=new Float64Array(16);if(Object(Yo.h)(a),t.projectionMatrix){var l=1/t.physicalScale;return Object(Fo.p)(i,l,l,l),Object(Yo.d)(a,t.projectionMatrix),Object(Yo.r)(a,a,i),Object(Yo.i)(a,a),a}Object(Yo.h)(o);var s=t.clippingRange[1]-t.clippingRange[0],c=[t.clippingRange[0]+(n+1)*s/2,t.clippingRange[0]+(r+1)*s/2];if(t.parallelProjection){var g=t.parallelScale*e,u=t.parallelScale,d=(t.windowCenter[0]-1)*g,m=(t.windowCenter[0]+1)*g,f=(t.windowCenter[1]-1)*u,p=(t.windowCenter[1]+1)*u;Object(Yo.n)(o,d,m,f,p,c[0],c[1]),Object(Yo.i)(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var C,I,h=Math.tan(Object(Xo.B)(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(C=t.clippingRange[0]*h,I=t.clippingRange[0]*h/e):(C=t.clippingRange[0]*h*e,I=t.clippingRange[0]*h);var b=(t.windowCenter[0]-1)*C,y=(t.windowCenter[0]+1)*C,v=(t.windowCenter[1]-1)*I,Z=(t.windowCenter[1]+1)*I,A=c[0],G=c[1];o[0]=2*A/(y-b),o[5]=2*A/(Z-v),o[2]=(b+y)/(y-b),o[6]=(v+Z)/(Z-v),o[10]=-(A+G)/(G-A),o[14]=-1,o[11]=-2*A*G/(G-A),o[15]=0}return Object(Yo.d)(a,o),a},e.getCompositeProjectionMatrix=function(t,n,r){var a=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Object(Yo.l)(o,a,o),o},e.setDirectionOfProjection=function(e,n,r){if(t.directionOfProjection[0]!==e||t.directionOfProjection[1]!==n||t.directionOfProjection[2]!==r){t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,m()}},e.setDeviceAngles=function(n,r,a,o){var i=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,i);var l=Object(Yo.h)(new Float64Array(16));Object(Yo.q)(l,l,Object(Xo.B)(n),t.physicalViewUp),Object(Yo.q)(l,l,Object(Xo.B)(r),i),Object(Yo.q)(l,l,Object(Xo.B)(a),t.physicalViewNorth),Object(Yo.q)(l,l,Object(Xo.B)(-o),t.physicalViewUp);var s=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),c=new Float64Array(t.physicalViewNorth);Object(Fo.q)(s,s,l),Object(Fo.q)(c,c,l),e.setDirectionOfProjection(s[0],s[1],s[2]),e.setViewUp(c[0],c[1],c[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,a){var o=Object(Yo.h)(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==a)){var i=Object(Xo.B)(t),l=yg();vg(l,[n,r,a],i),Object(Yo.j)(o,l)}var s=new Float64Array(3);Object(Fo.q)(s,[0,0,-1],o);var c=new Float64Array(3);Object(Fo.q)(c,[0,1,0],o),e.setDirectionOfProjection.apply(e,Object(Ao.a)(s)),e.setViewUp.apply(e,Object(Ao.a)(c)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var a=-n[0],o=-n[1],i=-n[2],l=-(a*r[0]+o*r[1]+i*r[2]),s=[a*e[0]+o*e[2]+i*e[4]+l,1e-18],c=0;c<2;c++)for(var g=0;g<2;g++)for(var u=0;u<2;u++){var d=a*e[u]+o*e[2+g]+i*e[4+c]+l;s[0]=ds[1]?d:s[1]}return s}}var jf={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function Qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jf,n),ln.c.obj(e,t),ln.c.get(e,t,["distance"]),ln.c.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),ln.c.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),ln.c.setGetArray(e,t,["clippingRange","windowCenter"],2),ln.c.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),_f(e,t)}var qf={newInstance:ln.c.newInstance(Qf,"vtkCamera"),extend:Qf};function $f(e,t){t.classHierarchy.push("vtkLight"),e.getTransformedPosition=function(){return t.transformMatrix?[]:[].concat(t.position)},e.getTransformedFocalPoint=function(){return t.transformMatrix?[]:[].concat(t.focalPoint)},e.getDirection=function(){return t.directionMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ep,n),ln.c.obj(e,t),ln.c.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),ln.c.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),$f(e,t)}var np={newInstance:ln.c.newInstance(tp,"vtkLight"),extend:tp,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},rp=ln.c.vtkErrorMacro;function ap(e,t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);var r=e.getNestedProps();if(r&&r.length)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,op,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),ln.c.setGetArray(e,t,["viewport"],4),ln.c.setGetArray(e,t,["background","background2"],3),ap(e,t)}var lp={newInstance:ln.c.newInstance(ip,"vtkViewport"),extend:ip},sp=ln.l,cp=ln.m,gp=ln.n;function up(e){return function(){return cp("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function dp(e,t){for(t.classHierarchy.push("vtkRenderer"),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1);var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},a={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(sp("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0},e.updateLightsGeometryToFollowCamera=function(){var n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((function(e){e.lightTypeIsSceneLight()||e.lightTypeIsCameraLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):cp("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=up("allocateTime"),e.updateGeometry=up("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){sp(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=function(n){return t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0)},e.makeCamera=function(){var t=qf.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=function(){return t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera},e.getActiveCameraAndResetIfCreated=function(){return t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera},e.getActors=function(){return t.actors=[],t.props.forEach((function(e){t.actors=t.actors.concat(e.getActors())})),t.actors},e.addActor=e.addViewProp,e.removeActor=function(n){t.actors=t.actors.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllActors=function(){e.getActors().forEach((function(t){e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=function(){return t.volumes=[],t.props.forEach((function(e){t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes},e.addVolume=e.addViewProp,e.removeVolume=function(n){t.volumes=t.volumes.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllVolumes=function(){e.getVolumes().forEach((function(t){e.removeViewProp(t)})),t.volumes=[],e.modified()},e.addLight=function(n){t.lights=[].concat(t.lights,n),e.modified()},e.removeLight=function(n){t.lights=t.lights.filter((function(e){return e!==n})),e.modified()},e.removeAllLights=function(){t.lights=[],e.modified()},e.setLightCollection=function(n){t.lights=n,e.modified()},e.makeLight=np.newInstance,e.createLight=function(){t.automaticLightCreation&&(t.createdLight&&(e.removeLight(t.createdLight),t.createdLight.delete(),t.createdLight=null),t.createdLight=e.makeLight(),e.addLight(t.createdLight),t.createdLight.setLightTypeToHeadLight(),t.createdLight.setPosition(e.getActiveCamera().getPosition()),t.createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=function(t,n,r,a){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],a),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,a){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],a),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return cp("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.g)(a,a),Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.projectionToView=function(e,n,r,a){if(null===t.activeCamera)return cp("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.g)(o,o),Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.worldToView=function(e,n,r){if(null===t.activeCamera)return cp("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.viewToProjection=function(e,n,r,a){if(null===t.activeCamera)return cp("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.computeVisiblePropBounds=function(){t.allBounds[0]=Ol.INIT_BOUNDS[0],t.allBounds[1]=Ol.INIT_BOUNDS[1],t.allBounds[2]=Ol.INIT_BOUNDS[2],t.allBounds[3]=Ol.INIT_BOUNDS[3],t.allBounds[4]=Ol.INIT_BOUNDS[4],t.allBounds[5]=Ol.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var a=0;at.allBounds[1]&&(t.allBounds[1]=i[1]),i[2]t.allBounds[3]&&(t.allBounds[3]=i[3]),i[4]t.allBounds[5]&&(t.allBounds[5]=i[5]))}}return r&&(Object(Xo.D)(t.allBounds),sp("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!Object(Xo.l)(r))return sp("Cannot reset camera!"),!1;var i=null;if(!e.getActiveCamera())return cp("Trying to reset non-existent camera"),!1;i=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;var l=r[1]-r[0],s=r[3]-r[2],c=r[5]-r[4],g=(l*=l)+(s*=s)+(c*=c);g=0===g?1:g,g=.5*Math.sqrt(g);var u=Object(Xo.B)(t.activeCamera.getViewAngle()),d=g,m=g/Math.sin(.5*u),f=t.activeCamera.getViewUp();return Math.abs(Object(Xo.q)(f,i))>.999&&(gp("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-f[2],f[0],f[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+m*i[0],o[1]+m*i[1],o[2]+m*i[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(d),t.activeCamera.setPhysicalScale(g),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(a),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=n||e.computeVisiblePropBounds();if(!Object(Xo.l)(a))return sp("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return cp("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(a),i=0;if(t.activeCamera.getParallelProjection())i=.1*t.activeCamera.getParallelScale();else{var l=Object(Xo.B)(t.activeCamera.getViewAngle());i=.2*Math.tan(l/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]e&&(e=n);var r=t.createdLight?t.createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=function(){return!!t.preserveColorBuffer},e.isActiveCameraCreated=function(){return!!t.activeCamera}}var mp={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,createdLight:null,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:Object(Xo.j)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,pass:0};function fp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mp,n),lp.extend(e,t,n),Object(ln.e)(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Object(ln.j)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Object(ln.f)(e,t,["actors","volumes","lights"]),Object(ln.k)(e,t,["background"],4,1),dp(e,t)}var pp={newInstance:Object(ln.g)(fp,"vtkRenderer"),extend:fp};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),ln.c.obj(e,t),ln.c.event(e,t,"InteractionEvent"),ln.c.event(e,t,"StartInteractionEvent"),ln.c.event(e,t,"EndInteractionEvent"),ln.c.get(e,t,["interactor","enabled"]),ln.c.setGet(e,t,["priority","processEvents"]),yp(e,t)}var Ap=Ip({newInstance:ln.c.newInstance(Zp,"vtkInteractorObserver"),extend:Zp},{computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}}),Gp={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}};function Sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bp=Gp.States,Vp={Rotate:Bp.IS_ROTATE,Pan:Bp.IS_PAN,Spin:Bp.IS_SPIN,Dolly:Bp.IS_DOLLY,CameraPose:Bp.IS_CAMERA_POSE,WindowLevel:Bp.IS_WINDOW_LEVEL,Slice:Bp.IS_SLICE};function Rp(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Vp).forEach((function(n){ln.c.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===Bp.IS_NONE&&(t.state=Vp[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},ln.c.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Vp[n]&&(t.state=Bp.IS_NONE,t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e["invokeEnd".concat(n,"Event")]({type:"End".concat(n,"Event")}),t.interactor.render())}})),e.handleKeyPress=function(e){var n=t.interactor;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}var wp={state:Bp.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function kp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wp,n),Ap.extend(e,t,n),Rp(e,t)}var Wp=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pp,n),Wp.extend(e,t,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),ln.c.setGetArray(e,t,["centerOfRotation"],3),Fp(e,t)}var Mp=function(e){for(var t=1;te&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Lp("pick"),e.hasKey=Lp("hasKey"),e.getRedrawMTime=function(){return t.mtime},e.setEstimatedRenderTime=function(e){t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=function(){t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=function(e){t.estimatedRenderTime+=e},e.setAllocatedRenderTime=function(e){t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=function(){return!1},e.getTextures=function(){return t.textures},e.hasTexture=function(e){return-1!==t.textures.indexOf(e)},e.addTexture=function(n){n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=function(n){var r=t.textures.filter((function(e){return e!==n}));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=function(){t.textures=[],e.modified()}}var Ep={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ep,n),ln.c.obj(e,t),ln.c.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),ln.c.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Dp(e,t)}var zp={newInstance:ln.c.newInstance(Up,"vtkProp"),extend:Up};function _p(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=function(n){t.position=t.position.map((function(e,t){return e+n[t]})),e.modified()},e.getOrientationWXYZ=function(){var e=yg();Object(Yo.m)(e,t.rotation);var n=new Float64Array(3),r=function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ml.b?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}(n,e);return[Object(Xo.F)(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Object(Yo.a)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateY=function(n){0!==n&&(Object(Yo.b)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Object(Yo.c)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateWXYZ=function(n,r,a,o){if(0!==n&&(0!==r||0!==a||0!==o)){var i=Object(Xo.B)(n),l=yg();vg(l,[r,a,o],i);var s=new Float64Array(16);Object(Yo.j)(s,l),Object(Yo.l)(t.rotation,t.rotation,s),e.modified()}},e.setOrientation=function(n,r,a){return(n!==t.orientation[0]||r!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[n,r,a],Object(Yo.h)(t.rotation),e.rotateZ(a),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Object(Yo.d)(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Object(Yo.h)(t.matrix),t.userMatrix&&Object(Yo.l)(t.matrix,t.matrix,t.userMatrix),Object(Yo.s)(t.matrix,t.matrix,t.origin),Object(Yo.s)(t.matrix,t.matrix,t.position),Object(Yo.l)(t.matrix,t.matrix,t.rotation),Object(Yo.r)(t.matrix,t.matrix,t.scale),Object(Yo.s)(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Object(Yo.i)(t.matrix,t.matrix),t.isIdentity=!0;for(var n=0;n<4;++n)for(var r=0;r<4;++r)(n===r?1:0)!==t.matrix[n+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=function(){return Ol.getCenter(t.bounds)},e.getLength=function(){return Ol.getLength(t.bounds)},e.getXRange=function(){return Ol.getXRange(t.bounds)},e.getYRange=function(){return Ol.getYRange(t.bounds)},e.getZRange=function(){return Ol.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var jp={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Qp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jp,n),zp.extend(e,t,n),t.matrixMTime={},ln.c.obj(t.matrixMTime),ln.c.get(e,t,["bounds","isIdentity"]),ln.c.getArray(e,t,["orientation"]),ln.c.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Object(Yo.h)(new Float64Array(16)),t.rotation=Object(Yo.h)(new Float64Array(16)),t.userMatrix=Object(Yo.h)(new Float64Array(16)),t.transform=null,_p(e,t)}var qp={newInstance:ln.c.newInstance(Qp,"vtkProp3D"),extend:Qp};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var eC=ln.c.vtkDebugMacro;function tC(e,t){t.classHierarchy.push("vtkActor");var n=function(e){for(var t=1;t=1;return(n=n&&(!t.texture||!t.texture.isTranslucent()))&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque())},e.makeProperty=hg.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){eC("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Ol.getCorners(n,r),e.computeMatrix();var a=new Float64Array(16);Object(Yo.i)(a,t.matrix),r.forEach((function(e){return Object(Fo.q)(e,e,a)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?r.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):r.reduce((function(e,n){return ee?r:e}if(null!==t.backfaceProperty){var a=t.backfaceProperty.getMTime();e=a>e?a:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var nC={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nC,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),tC(e,t)}var aC={newInstance:ln.c.newInstance(rC,"vtkActor"),extend:rC};function oC(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,a,o){if(t.callback){var i=n.getCompositeProjectionMatrix(r,-1,1);Object(Yo.i)(i,i);for(var l=e.getPoints(),s=new Float64Array(3),c=a.usize,g=a.vsize,u=c/2,d=g/2,m=[],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iC,n),Pu.extend(e,t,n),ln.c.setGet(e,t,["callback","useZValues"]),oC(e,t)}var sC={newInstance:ln.c.newInstance(lC,"vtkPixelSpaceCallbackMapper"),extend:lC};function cC(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=function(){t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setImage=function(n){t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null)),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())}}var gC={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function uC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gC,n),ln.c.obj(e,t),ln.c.algo(e,t,6,0),ln.c.get(e,t,["imageLoaded"]),ln.c.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),cC(e,t)}var dC={newInstance:ln.c.newInstance(uC,"vtkTexture"),extend:uC};function mC(e){return+e}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var CC=e=>()=>e;function IC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):CC(isNaN(e)?t:e)}function hC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yC(){}var vC="\\s*([+-]?\\d+)\\s*",ZC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GC=/^#([0-9a-f]{3,8})$/,SC=new RegExp("^rgb\\("+[vC,vC,vC]+"\\)$"),BC=new RegExp("^rgb\\("+[AC,AC,AC]+"\\)$"),VC=new RegExp("^rgba\\("+[vC,vC,vC,ZC]+"\\)$"),RC=new RegExp("^rgba\\("+[AC,AC,AC,ZC]+"\\)$"),wC=new RegExp("^hsl\\("+[ZC,AC,AC]+"\\)$"),kC=new RegExp("^hsla\\("+[ZC,AC,AC,ZC]+"\\)$"),WC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xC(){return this.rgb().formatHex()}function TC(){return this.rgb().formatRgb()}function JC(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XC(t):3===n?new YC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?OC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?OC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SC.exec(e))?new YC(t[1],t[2],t[3],1):(t=BC.exec(e))?new YC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VC.exec(e))?OC(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?OC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wC.exec(e))?MC(t[1],t[2]/100,t[3]/100,1):(t=kC.exec(e))?MC(t[1],t[2]/100,t[3]/100,t[4]):WC.hasOwnProperty(e)?XC(WC[e]):"transparent"===e?new YC(NaN,NaN,NaN,0):null}function XC(e){return new YC(e>>16&255,e>>8&255,255&e,1)}function OC(e,t,n,r){return r<=0&&(e=t=n=NaN),new YC(e,t,n,r)}function NC(e){return e instanceof yC||(e=JC(e)),e?new YC((e=e.rgb()).r,e.g,e.b,e.opacity):new YC}function HC(e,t,n,r){return 1===arguments.length?NC(e):new YC(e,t,n,null==r?1:r)}function YC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FC(){return"#"+KC(this.r)+KC(this.g)+KC(this.b)}function PC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function KC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function MC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DC(e,t,n,r)}function LC(e){if(e instanceof DC)return new DC(e.h,e.s,e.l,e.opacity);if(e instanceof yC||(e=JC(e)),!e)return new DC;if(e instanceof DC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-a,s=(o+a)/2;return l?(i=t===o?(n-r)/l+6*(n0&&s<1?0:i,new DC(i,l,s,e.opacity)}function DC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function EC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hC(yC,JC,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xC,formatHex:xC,formatHsl:function(){return LC(this).formatHsl()},formatRgb:TC,toString:TC}),hC(YC,HC,bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FC,formatHex:FC,formatRgb:PC,toString:PC})),hC(DC,(function(e,t,n,r){return 1===arguments.length?LC(e):new DC(e,t,n,null==r?1:r)}),bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new YC(EC(e>=240?e-240:e+120,a,r),EC(e,a,r),EC(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var UC=function e(t){var n=function(e){return 1==(e=+e)?IC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):CC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=HC(e)).r,(t=HC(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=IC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function zC(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;ni&&(a=t.slice(i,a),s[l]?s[l]+=a:s[++l]=a),(n=n[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,c.push({i:l,x:fC(n,r)})),i=qC.lastIndex;return it?1:e>=t?0:NaN}function rI(e){let t=e,n=e;function r(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)<0?r=o+1:a=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>nI(e(t),n)}(e)),{left:r,center:function(e,n,a,o){null==a&&(a=0),null==o&&(o=e.length);const i=r(e,n,a,o-1);return i>a&&t(e[i-1],n)>-t(e[i],n)?i-1:i},right:function(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)>0?a=o:r=o+1}return r}}}const aI=rI(nI).right;rI((function(e){return null===e?NaN:+e})).center;var oI=[0,1];function iI(e){return e}function lI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function sI(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return at&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=s>2?cI:sI,a=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),l,s)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(l,i.map(e),fC)))(n)))},u.domain=function(e){return arguments.length?(i=Array.from(e,mC),g()):i.slice()},u.range=function(e){return arguments.length?(l=Array.from(e),g()):l.slice()},u.rangeRound=function(e){return l=Array.from(e),s=pC,g()},u.clamp=function(e){return arguments.length?(c=!!e||iI,g()):c!==iI},u.interpolate=function(e){return arguments.length?(s=e,g()):s},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,g()}}()(iI,iI)}function dI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mI,fI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pI(e){if(!(t=fI.exec(e)))throw new Error("invalid format: "+e);var t;return new CI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CI(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hI(e){return(e=II(Math.abs(e)))?e[1]:NaN}function bI(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}pI.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bI(100*e,t),r:bI,s:function(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(mI=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+II(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vI(e){return e}var ZI,AI,GI,SI=Array.prototype.map,BI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ZI=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?vI:(t=SI.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?vI:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(SI.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=pI(e)).fill,n=e.align,u=e.sign,d=e.symbol,m=e.zero,f=e.width,p=e.comma,C=e.precision,I=e.trim,h=e.type;"n"===h?(p=!0,h="g"):yI[h]||(void 0===C&&(C=12),I=!0,h="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===d?o:/[%p]/.test(h)?s:"",v=yI[h],Z=/[defgprs%]/.test(h);function A(e){var a,o,s,d=b,A=y;if("c"===h)A=v(e)+A,e="";else{var G=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:v(Math.abs(e),C),I&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),G&&0==+e&&"+"!==u&&(G=!1),d=(G?"("===u?u:c:"-"===u||"("===u?"":u)+d,A=("s"===h?BI[8+mI/3]:"")+A+(G&&"("===u?")":""),Z)for(a=-1,o=e.length;++a(s=e.charCodeAt(a))||s>57){A=(46===s?i+e.slice(a+1):e.slice(a))+A,e=e.slice(0,a);break}}p&&!m&&(e=r(e,1/0));var S=d.length+e.length+A.length,B=S>1)+d+e+A+B.slice(S);break;default:e=B+d+e+A}return l(e)}return C=void 0===C?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=u(((e=pI(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hI(t)/3))),a=Math.pow(10,-r),o=BI[8+r/3];return function(e){return n(a*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),AI=ZI.format,GI=ZI.formatPrefix;var VI=Math.sqrt(50),RI=Math.sqrt(10),wI=Math.sqrt(2);function kI(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=VI?10:o>=RI?5:o>=wI?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=VI?10:o>=RI?5:o>=wI?2:1)}function WI(e,t,n,r){var a,o,i,l,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=VI?a*=10:o>=RI?a*=5:o>=wI&&(a*=2),t0)return[e];if((r=t0){let n=Math.round(e/i),r=Math.round(t/i);for(n*it&&--r,o=new Array(a=r-n+1);++lt&&--r,o=new Array(a=r-n+1);++l0;){if((a=kI(s,c,n))===r)return o[i]=s,o[l]=c,t(o);if(a>0)s=Math.floor(s/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function TI(){var e=uI();return e.copy=function(){return gI(e,TI())},dI.apply(e,arguments),xI(e)}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XI(e){for(var t=1;ta,t.camera.getParallelProjection()||(Object(Fo.l)(LI,LI),i=Object(Fo.d)(LI,MI)>a)),i!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=i,n=!0)}return n},e.updatePolyData=function(e,n,r){var a=0,o=0;a+=8;for(var i=0,l=0;l<12;l++)n[l]>0&&i++;if(o+=i,t.gridLines)for(var s=0;s<6;s++)e[s]&&(a+=2*r[FI[s][0]].length+2*r[FI[s][1]].length,o+=r[FI[s][0]].length+r[FI[s][1]].length);for(var c=new Float64Array(3*a),g=new Uint32Array(3*o),u=0,d=0,m=0;m<2;m++)for(var f=0;f<2;f++)for(var p=0;p<2;p++)c[3*u]=t.dataBounds[p],c[3*u+1]=t.dataBounds[2+f],c[3*u+2]=t.dataBounds[4+m],u++;for(var C=0;C<12;C++)n[C]>0&&(g[3*d]=2,g[3*d+1]=HI[C][0],g[3*d+2]=HI[C][1],d++);if(t.gridLines)for(var I=0;I<6;I++)if(e[I]){for(var h=Math.floor(I/2),b=r[FI[I][0]],y=0;y.5?Object(Fo.b)(MI,DI,i[0]*l):Object(Fo.b)(MI,DI,i[0]*l-c.width/2),Object(Fo.g)(PI,PI,MI),Object(Fo.b)(MI,EI,i[1]*l-c.height/2),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[0],s.tcoords[2*m+1]=c.tcoords[1],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[2],s.tcoords[2*m+1]=c.tcoords[3],m++,Object(Fo.b)(MI,EI,c.height),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[4],s.tcoords[2*m+1]=c.tcoords[5],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.a)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[6],s.tcoords[2*m+1]=c.tcoords[7],m++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-3,s.polys[4*f+3]=m-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-2,s.polys[4*f+3]=m-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n);var r=t.textValues.length,a=4*r,o=2*r,i=new Float64Array(3*a),l=new Uint16Array(4*o),s=new Float32Array(2*a);Object(Yo.g)(UI,n);for(var c={ptIdx:0,cellIdx:0,polys:l,points:i,tcoords:s},g=0,u=0,d=0,m=t.textPolyData.getPoints().getData();g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jI(n)),aC.extend(e,t,n),t.lastSize=[800,800],t.lastAspectRatio=1,t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.mapper=Pu.newInstance(),t.polyData=Go.a.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,a,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=aC.newInstance(),t.pixelActor.setMapper(t.pixelMapper),ln.c.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),ln.c.setGetArray(e,t,["dataBounds"],6),ln.c.setGetArray(e,t,["axisLabels"],3),ln.c.get(e,t,["axisTextStyle","tickTextStyle","camera"]),_I(e,t)}var qI={newInstance:ln.c.newInstance(QI,"vtkCubeAxesActor"),extend:QI};function $I(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=function(e,n){var r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}var eh={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var th={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eh,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.setGetArray(e,t,["displayCenter"],2),ln.c.setGetArray(e,t,["center"],3),$I(e,t)}};function nh(e,t){t.classHierarchy.push("vtkCompositeMouseManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onButtonDown=function(e,t,n){},e.onButtonUp=function(e){},e.onMouseMove=function(e,t,n){},e.onStartScroll=function(e,t,n){},e.onScroll=function(e,t,n){},e.onEndScroll=function(e){},e.isDragEnabled=function(){return t.dragEnabled},e.isScrollEnabled=function(){return t.scrollEnabled}}var rh={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var ah={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rh,n),ln.c.setGet(e,t,["button","shift","control","alt"]),ln.c.set(e,t,["dragEnabled","scrollEnabled"]),nh(e,t)}};function oh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,c,g){if(g){var u=c.getActiveCamera(),d=u.getPosition(),m=u.getFocalPoint();Object(Yo.h)(o);var f=t.center,p=t.rotationFactor;Object(Yo.s)(o,o,f);var C=t.previousPosition.x-g.x,I=t.previousPosition.y-g.y,h=e.getView().getSize(),b=u.getViewUp();Object(Yo.q)(o,o,Object(Xo.B)(360*C/h[0]*p),b),Object(Xo.w)(u.getDirectionOfProjection(),b,i),Object(Yo.q)(o,o,Object(Xo.B)(-360*I/h[1]*p),i),l[0]=-f[0],l[1]=-f[1],l[2]=-f[2],Object(Yo.s)(o,o,l),Object(Fo.q)(n,d,o),Object(Fo.q)(r,m,o),s[0]=b[0]+d[0],s[1]=b[1]+d[1],s[2]=b[2]+d[2],Object(Fo.q)(a,s,o),u.setPosition(n[0],n[1],n[2]),u.setFocalPoint(r[0],r[1],r[2]),u.setViewUp(a[0]-n[0],a[1]-n[1],a[2]-n[2]),u.orthogonalizeViewUp(),c.resetCameraClippingRange(),e.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=g}}}var ih={};function lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ih,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),oh(e,t)}var sh={newInstance:ln.c.newInstance(lh,"vtkMouseCameraTrackballRotateManipulator"),extend:lh};function ch(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(c,g,u){if(u){var d=g.getActiveCamera(),m=d.getPosition(),f=d.getFocalPoint(),p=d.getViewUp();n[0]=f[0]-m[0],n[1]=f[1]-m[1],n[2]=f[2]-m[2],e.computeDisplayCenter(c.getInteractorStyle(),g);var C=t.previousPosition.x-t.displayCenter[0],I=u.x-t.displayCenter[0],h=t.previousPosition.y-t.displayCenter[1],b=u.y-t.displayCenter[1];if(!(0===I&&0===b||0===C&&0===h)){var y=Object(Xo.F)((C*b-h*I)/(Math.sqrt(C*C+h*h)*Math.sqrt(I*I+b*b))),v=t.center;Object(Yo.h)(o),a[0]=-v[0],a[1]=-v[1],a[2]=-v[2],Object(Yo.s)(o,o,v),Object(Yo.q)(o,o,Object(Xo.B)(y),n),Object(Yo.s)(o,o,a),Object(Fo.q)(i,m,o),Object(Fo.q)(l,f,o),r[0]=p[0]+m[0],r[1]=p[1]+m[1],r[2]=p[2]+m[2],Object(Fo.q)(s,r,o),d.setPosition(i[0],i[1],i[2]),d.setFocalPoint(l[0],l[1],l[2]),d.setViewUp(s[0]-i[0],s[1]-i[1],s[2]-i[2]),d.orthogonalizeViewUp(),g.resetCameraClippingRange(),c.getLightFollowCamera()&&g.updateLightsGeometryToFollowCamera(),t.previousPosition=u}}}}var gh={};function uh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),ch(e,t)}var dh={newInstance:ln.c.newInstance(uh,"vtkMouseCameraTrackballRollManipulator"),extend:uh};function mh(e){return e*e}function fh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=sh.newInstance(),r=dh.newInstance(),a=null;e.onButtonDown=function(t,o,i){var l,s,c=t.getView().getSize(),g=[.5*c[0],.5*c[1]],u=.9*((l=g[0])<(s=g[1])?s:l),d=mh(g[0]-i.x)+mh(g[1]-i.y);(a=u*u>d?n:r).setButton(e.getButton()),a.setShift(e.getShift()),a.setControl(e.getControl()),a.setCenter(e.getCenter()),a.onButtonDown(t,i)},e.onButtonUp=function(e){a&&a.onButtonUp(e)},e.onMouseMove=function(e,t,n){a&&a.onMouseMove(e,t,n)}}var ph={};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ph,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),fh(e,t)}var Ih={newInstance:ln.c.newInstance(Ch,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ch};function hh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var a=r,o=t.previousPosition;t.previousPosition=r;var i=n.getActiveCamera(),l=i.getPosition(),s=i.getFocalPoint();if(i.getParallelProjection()){i.orthogonalizeViewUp();var c=i.getViewUp(),g=i.getViewPlaneNormal(),u=[0,0,0];Object(Xo.w)(g,c,u);var d=e.getView().getSize()[1],m=(a.x-o.x)/d,f=(o.y-a.y)/d,p=i.getParallelScale();f*=2*p;var C=u[0]*(m*=2*p)+c[0]*f;l[0]+=C,s[0]+=C,C=u[1]*m+c[1]*f,l[1]+=C,s[1]+=C,C=u[2]*m+c[2]*f,l[2]+=C,s[2]+=C,i.setPosition(l[0],l[1],l[2]),i.setFocalPoint(s[0],s[1],s[2])}else{var I=t.center,h=e.getInteractorStyle(),b=h.computeWorldToDisplay(n,I[0],I[1],I[2])[2],y=h.computeDisplayToWorld(n,a.x,a.y,b),v=h.computeDisplayToWorld(n,o.x,o.y,b),Z=[l[0]+(v[0]-y[0]),l[1]+(v[1]-y[1]),l[2]+(v[2]-y[2])],A=[s[0]+(v[0]-y[0]),s[1]+(v[1]-y[1]),s[2]+(v[2]-y[2])];i.setPosition(Z[0],Z[1],Z[2]),i.setFocalPoint(A[0],A[1],A[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var bh={};function yh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),hh(e,t)}var vh={newInstance:ln.c.newInstance(yh,"vtkMouseCameraTrackballPanManipulator"),extend:yh};function Zh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var a=e.getView().getSize(),o=n.getActiveCamera(),i=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/a[1]*i;else{var l=o.getClippingRange();t.zoomScale=l[1]/a[1]*1.5*i}},e.onMouseMove=function(e,n,r){if(r){var a=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var i=a*t.zoomScale;o.setParallelScale((1-i)*o.getParallelScale())}else{var l=o.getPosition(),s=o.getFocalPoint(),c=o.getDirectionOfProjection(),g=a*t.zoomScale,u=g*c[0];l[0]+=u,s[0]+=u,u=g*c[1],l[1]+=u,s[1]+=u,u=g*c[2],l[2]+=u,s[2]+=u,o.getFreezeFocalPoint()||o.setFocalPoint(s[0],s[1],s[2]),o.setPosition(l[0],l[1],l[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),a=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/a):(r.dolly(a),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Ah={zoomScale:0,flipDirection:!1};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ah,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),ln.c.setGet(e,t,["flipDirection"]),Zh(e,t)}var Sh={newInstance:ln.c.newInstance(Gh,"vtkMouseCameraTrackballZoomManipulator"),extend:Gh};function Bh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,a){n(e,r,a),t.zoomPosition=a},e.onMouseMove=function(e,n,r){if(r){var a=(t.previousPosition.y-r.y)*t.zoomScale;Mp.dollyToPosition(1-a,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var a=1-.1*n;Mp.dollyToPosition(a,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Vh={zoomPosition:null};function Rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vh,n),Sh.extend(e,t,n),Bh(e,t)}var wh={newInstance:ln.c.newInstance(Rh,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Rh};function kh(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onStartPinch=function(e,t){},e.onStartRotate=function(e,t){},e.onStartPan=function(e,t){},e.onPinch=function(e,t,n){},e.onRotate=function(e,t,n){},e.onPan=function(e,t,n){},e.onEndPinch=function(e){},e.onEndRotate=function(e){},e.onEndPan=function(e){},e.isPinchEnabled=function(){return t.pinchEnabled},e.isPanEnabled=function(){return t.panEnabled},e.isRotateEnabled=function(){return t.rotateEnabled}}var Wh={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var xh={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wh,n),ln.c.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),ln.c.setGet(e,t,["interactorStyle"]),kh(e,t)}};function Th(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=function(e,n){t.previousScale=n},e.onStartRotate=function(e,n){t.previousRotation=n},e.onStartPan=function(e,n){t.previousTranslation=n},e.onPinch=function(e,n,r){Mp.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=function(e,n,r){var a=n.getActiveCamera(),o=e.getInteractorStyle(),i=a.getFocalPoint(),l=(i=o.computeWorldToDisplay(n,i[0],i[1],i[2]))[2],s=r,c=t.previousTranslation,g=o.computeDisplayToWorld(n,i[0]+s[0]-c[0],i[1]+s[1]-c[1],l),u=o.computeDisplayToWorld(n,i[0],i[1],l),d=[];d[0]=u[0]-g[0],d[1]=u[1]-g[1],d[2]=u[2]-g[2],i=a.getFocalPoint();var m=a.getPosition();a.setFocalPoint(d[0]+i[0],d[1]+i[1],d[2]+i[2]),a.setPosition(d[0]+m[0],d[1]+m[1],d[2]+m[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=function(e,n,r){var a=n.getActiveCamera();a.roll(r-t.previousRotation),a.orthogonalizeViewUp(),t.previousRotation=r}}var Jh={};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jh,n),ln.c.obj(e,t),xh.extend(e,t,n),th.extend(e,t,n),Th(e,t)}var Oh={newInstance:ln.c.newInstance(Xh,"vtkGestureCameraManipulator"),extend:Xh};function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh(n)),Object(ln.h)(e,t),ah.extend(e,t,n),Object(ln.d)(e,t,"BoxSelectChange"),Object(ln.d)(e,t,"BoxSelectInput"),Object(ln.j)(e,t,["renderSelection","selectionStyle"]),Ph(e,t)}var Lh={newInstance:Object(ln.g)(Mh,"vtkMouseBoxSelectionManipulator"),extend:Mh},Dh=n(38);function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uh(e){for(var t=1;t.001?Math.acos(n/o):0,l=i>.001?Math.atan2(a,r):0;t[0]=o,t[1]=i,t[2]=l}function db(e,t){if(e[0]>=t-.1)return e[2];var n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function mb(e,t,n,r){var a=[],o=[];Object(Xo.e)(t,a),Object(Xo.e)(n,o);var i=[],l=[];ub(a,i),ub(o,l);var s=e;if(i[1]>.05&&l[1]>.05&&function(e,t){var n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(i[2],l[2])>.33*Math.PI){var c=Math.max(i[0],l[0]);c=Math.max(88,c),e<.5?(l[0]=c,l[1]=0,l[2]=0,s*=2):(i[0]=c,i[1]=0,i[2]=0,s=2*s-1)}i[1]<.05&&l[1]>.05?i[2]=db(l,i[0]):l[1]<.05&&i[1]>.05&&(l[2]=db(i,l[0]));var g=[];g[0]=(1-s)*i[0]+s*l[0],g[1]=(1-s)*i[1]+s*l[1],g[2]=(1-s)*i[2]+s*l[2];var u=[];!function(e,t){var n=e[0],r=e[1],a=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(a),t[2]=n*Math.sin(r)*Math.sin(a)}(g,u),Object(Xo.f)(u,r)}function fb(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,a){return e.addRGBPointLong(t,n,r,a,.5,0)},e.addRGBPointLong=function(n,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i<0||i>1)return cb("Midpoint outside range [0.0, 1.0]"),-1;if(l<0||l>1)return cb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var s={x:n,r:r,g:a,b:o,midpoint:i,sharpness:l};t.nodes.push(s),e.sortAndUpdateRange();for(var c=0;c4&&void 0!==arguments[4]?arguments[4]:.5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=[],s=[n,r,a];return Object(Xo.u)(s,l),e.addRGBPoint(t,l[0],l[1],l[2],o,i)},e.setNodes=function(n){t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=function(){t.nodes.sort((function(e,t){return e.x-t.x})),e.updateRange()||e.modified()},e.updateRange=function(){var n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];var r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=function(n){for(var r=0;r=t.nodes.length)return-1;var o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var a=0;a=n&&t.nodes[g].x<=i?t.nodes.splice(g,1):g++;e.addRGBPointLong(n,r,a,o,.5,0),e.addRGBPointLong(i,l,s,c,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,a,o,i,l,s){var c=[i,l,s],g=[],u=[];Object(Xo.u)([n,r,a],g),Object(Xo.u)(c,u),e.addRGBSegment(t,g[0],g[1],g[2],o,u[0],u[1],u[2])},e.mapValue=function(t){var n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=function(n,r){if(t.indexedLookup){var a=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===a)e.getNanColor(r);else{var i=[];e.getNodeValue(o%a,i),r[0]=i.r,r[1]=i.g,r[2]=i.b}}else e.getTable(n,n,1,r)},e.getRedValue=function(t){var n=[];return e.getColor(t,n),n[0]},e.getGreenValue=function(t){var n=[];return e.getColor(t,n),n[1]},e.getBlueValue=function(t){var n=[];return e.getColor(t,n),n[2]},e.getTable=function(n,r,a,o){if(Object(Xo.v)(n)||Object(Xo.v)(r))for(var i=0;i0);var v=0,Z=0,A=0;y&&(v=Math.log10(n),Z=Math.log10(r));for(var G=0;G1?y?(A=v+G/(a-1)*(Z-v),d=Math.pow(10,A)):d=n+G/(a-1)*(r-n):y?(A=.5*(v+Z),d=Math.pow(10,A)):d=.5*(n+r),t.discretize){var B=t.mappingRange;if(d>=B[0]&&d<=B[1]){var V=t.numberOfValues,R=B[1]-B[0];if(V<=1)d=B[0]+R/2;else{var w=(d-B[0])/R,k=Object(Xo.g)(V*w);d=B[0]+k/(V-1)*R}}}for(;lt.nodes[l].x;)++l.99999&&(I=.99999));if(d>t.mappingRange[1])o[S]=0,o[S+1]=0,o[S+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[S]=t.aboveRangeColor[0],o[S+1]=t.aboveRangeColor[1],o[S+2]=t.aboveRangeColor[2]):(o[S]=c,o[S+1]=g,o[S+2]=u));else if(d0&&(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b));else if(0===l&&(Math.abs(d-n)<1e-6||t.discretize))s>0?(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b):(o[S]=0,o[S+1]=0,o[S+2]=0);else{var W=0;if(W=(W=y?(A-m)/(f-m):(d-m)/(f-m)).99){if(W<.5){o[S]=p[0],o[S+1]=p[1],o[S+2]=p[2];continue}o[S]=C[0],o[S+1]=C[1],o[S+2]=C[2];continue}if(h<.01){if(t.colorSpace===ob.RGB)o[S]=(1-W)*p[0]+W*C[0],o[S+1]=(1-W)*p[1]+W*C[1],o[S+2]=(1-W)*p[2]+W*C[2];else if(t.colorSpace===ob.HSV){var x=[],T=[];Object(Xo.d)(p,x),Object(Xo.d)(C,T),t.hSVWrap&&(x[0]-T[0]>.5||T[0]-x[0]>.5)&&(x[0]>T[0]?x[0]-=1:T[0]-=1);var J=[];J[0]=(1-W)*x[0]+W*T[0],J[0]<0&&(J[0]+=1),J[1]=(1-W)*x[1]+W*T[1],J[2]=(1-W)*x[2]+W*T[2],Object(Xo.u)(J,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var X=[],O=[];Object(Xo.e)(p,X),Object(Xo.e)(C,O);var N=[];N[0]=(1-W)*X[0]+W*O[0],N[1]=(1-W)*X[1]+W*O[1],N[2]=(1-W)*X[2]+W*O[2],Object(Xo.f)(N,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.",t.colorSpace);continue}W<.5?W=.5*Math.pow(2*W,1+10*h):W>.5&&(W=1-.5*Math.pow(2*(1-W),1+10*h));var H=W*W,Y=H*W,F=2*Y-3*H+1,P=-2*Y+3*H,K=Y-2*H+W,M=Y-H,L=void 0;if(t.colorSpace===ob.RGB)for(var D=0;D<3;D++)L=(1-h)*(C[D]-p[D]),o[S+D]=F*p[D]+P*C[D]+K*L+M*L;else if(t.colorSpace===ob.HSV){var E=[],U=[];Object(Xo.d)(p,E),Object(Xo.d)(C,U),t.hSVWrap&&(E[0]-U[0]>.5||U[0]-E[0]>.5)&&(E[0]>U[0]?E[0]-=1:U[0]-=1);for(var z=[],_=0;_<3;_++)L=(1-h)*(U[_]-E[_]),z[_]=F*E[_]+P*U[_]+K*L+M*L,0===_&&z[_]<0&&(z[_]+=1);Object(Xo.u)(z,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var j=[],Q=[];Object(Xo.e)(p,j),Object(Xo.e)(C,Q);for(var q=[],$=0;$<3;$++)L=(1-h)*(Q[$]-j[$]),q[$]=F*j[$]+P*Q[$]+K*L+M*L;Object(Xo.f)(q,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[S+ee]=o[S+ee]<0?0:o[S+ee],o[S+ee]=o[S+ee]>1?1:o[S+ee]}}}},e.getUint8Table=function(n,r,a){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return cb("Attempting to lookup a value with no points in the function"),t.table;var i=o?4:3;t.tableSize===a&&t.tableWithAlpha===o||(t.table=new Uint8Array(a*i),t.tableSize=a,t.tableWithAlpha=o);var l=[];e.getTable(n,r,a,l);for(var s=0;s1&&(i=(r-n)/(a-1));for(var l=0;l=t.nodes.length?(cb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){if(n<0||n>=t.nodes.length)return cb("Index out of range!"),-1;var a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=function(){return t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216},e.getIndexedColor=function(t,n){var r=e.getSize();if(r>0&&t>=0){var a=[];e.getNodeValue(t%r,a);for(var o=0;o<3;++o)n[o]=a[o+1];n[3]=1}else e.getNanColor(n),n[3]=1},e.fillFromDataPointer=function(t,n){if(!(t<=0)&&n){e.removeAllPoints();for(var r=0;rn[1]?(e.getColor(n[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])):(e.getColor(r[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])),e.sortAndUpdateRange();for(var o=0;o=n[0]&&t.nodes[o].x<=n[1]?t.nodes.splice(o,1):++o;return 1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){if(t.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pb,n),mu.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},ln.c.obj(t.buildTime),ln.c.get(e,t,["buildTime","mappingRange"]),ln.c.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),fb(e,t)}var Ib=function(e){for(var t=1;t0&&(n=t.nodes[0].y);for(var a=1;an)switch(r){case 0:case 1:r=1;break;default:case 2:r=3}else switch(r){case 0:case 2:r=2;break;default:case 1:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:case 3:return"Varied"}},e.getDataPointer=function(){var e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(var n=0;n0?t.nodes[n-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=function(e,n){var r=t.nodes.length;return e<0||e>=r?(hb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){var a=t.nodes.length;if(n<0||n>=a)return hb("Index out of range!"),-1;var o=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],o!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=function(t,n){return e.addPointLong(t,n,.5,0)},e.addPointLong=function(n,r,a,o){if(a<0||a>1)return hb("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return hb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var i,l={x:n,y:r,midpoint:a,sharpness:o};for(t.nodes.push(l),e.sortAndUpdateRange(),i=0;i=t.nodes.length)return-1;var a=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,a,o){e.sortAndUpdateRange();for(var i=0;i=n&&t.nodes[i].x<=a?t.nodes.splice(i,1):i++;e.addPoint(n,r,.5,0),e.addPoint(a,o,.5,0)},e.getValue=function(t){var n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=function(n){if(n.length<2)return 0;var r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(var a=0;a=n[0]&&t.nodes[a].x<=n[1]?t.nodes.splice(a,1):++a;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){var e=t.nodes.length;if(e<2)return-1;for(var n=t.nodes[1].x-t.nodes[0].x,r=0;r4&&void 0!==arguments[4]?arguments[4]:1,l=0,s=t.nodes.length,c=0;0!==s&&(c=t.nodes[s-1].y);var g=0,u=0,d=0,m=0,f=0,p=0,C=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);lt.nodes[l].x;)++l.99999&&(p=.99999));if(l>=s)a[I]=t.clamping?c:0;else if(0===l)a[I]=t.clamping?t.nodes[0].y:0;else{var h=(g-u)/(d-u);if(h=h.99){if(h<.5){a[I]=m;continue}a[I]=f;continue}if(C<.01){a[I]=(1-h)*m+h*f;continue}h<.5?h=.5*Math.pow(2*h,1+10*C):h>.5&&(h=1-.5*Math.pow(2*(1-h),1+10*C));var b=h*h,y=b*h,v=2*y-3*b+1,Z=-2*y+3*b,A=y-2*b+h,G=y-b,S=f-m,B=(1-C)*S;a[I]=v*m+Z*f+A*B+G*B;var V=mf?m:f;a[I]=a[I]R?R:a[I]}}}}var yb={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yb,n),ln.c.obj(e,t),t.nodes=[],ln.c.setGet(e,t,["allowDuplicateScalars","clamping"]),ln.c.setArray(e,t,["range"],2),ln.c.getArray(e,t,["range"]),bb(e,t)}var Zb={newInstance:ln.c.newInstance(vb,"vtkPiecewiseFunction"),extend:vb};function Ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Gb=Km.InterpolationType,Sb=Km.OpacityMode,Bb=ln.c.vtkErrorMacro;function Vb(e,t){t.classHierarchy.push("vtkVolumeProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(n=n>(e=t.componentData[r].grayTransferFunction.getMTime())?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].scalarOpacity&&(n=n>(e=t.componentData[r].scalarOpacity.getMTime())?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(n=n>(e=t.componentData[r].gradientOpacity.getMTime())?n:e));return n},e.getColorChannels=function(e){return e<0||e>3?(Bb("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var a=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,a=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,a=!0),a&&e.modified(),a},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Zb.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction},e.setRGBTransferFunction=function(n,r){var a=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,a=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,a=!0),a&&e.modified(),a},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=Ib.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction},e.setScalarOpacity=function(n,r){return t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0)},e.getScalarOpacity=function(n){return null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=Zb.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Bb("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Bb("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Gb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Gb.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(Gb.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Gb,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["set".concat(r)]=function(r,a){return t.componentData[r]["".concat(n)]!==a&&(t.componentData[r]["".concat(n)]=a,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var Rb={independentComponents:!0,interpolationType:Gb.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function wb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rb,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;++r)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:Sb.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),Vb(e,t)}var kb=function(e){for(var t=1;tr[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){Wb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e}}var Tb={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function Jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tb,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),xb(e,t)}var Xb={newInstance:ln.c.newInstance(Jb,"vtkVolume"),extend:Jb},Ob=Lm.BlendMode;function Nb(e,t){t.classHierarchy.push("vtkVolumeMapper"),e.getBounds=function(){var n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=Object(Xo.j)(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(Ob.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(Ob.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(Ob.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(Ob.AVERAGE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return ln.c.enumToString(Ob,t.blendMode)}}var Hb={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:Ob.COMPOSITE_BLEND,averageIPScalarRange:[-1e6,1e6]};function Yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),_g.extend(e,t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),ln.c.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),ln.c.setGetArray(e,t,["averageIPScalarRange"],2),ln.c.event(e,t,"lightingActivated"),Nb(e,t)}var Fb={newInstance:ln.c.newInstance(Yb,"vtkVolumeMapper"),extend:Yb},Pb=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Pb[e.Name]=e}));var Kb=Object.keys(Pb);Kb.sort();var Mb={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Pb[e.Name]||(Kb.push(e.Name),Kb.sort()),Pb[e.Name]=e)},removePresetByName:function(e){var t=Kb.indexOf(e);t>-1&&Kb.splice(t,1),delete Pb[e]},getPresetByName:function(e){return Pb[e]},rgbPresetNames:Kb};var Lb=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.volume=Xb.newInstance({visibility:!1}),t.mapper=Fb.newInstance(),t.volume.setMapper(t.mapper),t.volume.getProperty().setRGBTransferFunction(0,t.lookupTable),t.volume.getProperty().setScalarOpacity(0,t.piecewiseFunction),t.volume.getProperty().setInterpolationTypeToLinear(),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addVolume(e.volume),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&(this.view.renderer.removeVolume(this.volume),this.view=null),this.volume.delete(),this.volume=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.volume,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange;if(!r||t&&r===t.volume||this.volume.set(r),!a||t&&a===t.property||this.volume.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var s,c=Mb.getPresetByName(i);this.lookupTable.applyColorMap(c),(s=this.lookupTable).setMappingRange.apply(s,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?(console.log("from update"),this.dataChanged()):(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.volume.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.volume.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();Lb.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},Lb.propTypes={id:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Db=Lb,Eb=Id.InterpolationType,Ub=ln.c.vtkErrorMacro;function zb(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].piecewiseFunction&&(n=n>(e=t.componentData[r].piecewiseFunction.getMTime())?n:e);return n},e.setRGBTransferFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].rGBTransferFunction!==o&&(t.componentData[a].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].piecewiseFunction!==o&&(t.componentData[a].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=function(t,n){var r=t,a=n;return Number.isInteger(t)||(a=t,r=0),e.setPiecewiseFunction(r,a)},e.getScalarOpacity=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Ub("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Ub("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Eb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Eb.LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Eb,t.interpolationType)}}var _b={independentComponents:!1,interpolationType:Eb.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,_b,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),zb(e,t)}var Qb={newInstance:ln.c.newInstance(jb,"vtkImageProperty"),extend:jb},qb=ln.c.vtkDebugMacro;function $b(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=function(){return e},e.getImages=function(){return e},e.getIsOpaque=function(){if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=Qb.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n,r=t.mapper.getBounds();if(!r||6!==r.length)return r;if(r[0]>r[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){qb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,a=t.mapper.getBoundsForSlice(n,r);if(!a||6!==a.length)return a;if(a[0]>a[1])return a;var o=[];Ol.getCorners(a,o),e.computeMatrix();var i=new Float64Array(16);Object(Yo.i)(i,t.matrix),o.forEach((function(e){return Object(Fo.q)(e,e,i)}));var l=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return l.map((function(e,t){return t%2==0?o.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):o.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}if(null!==t.property){var r=t.property.getMTime();e=r>e?r:e,null!==t.property.getRGBTransferFunction()&&(e=(r=t.property.getRGBTransferFunction().getMTime())>e?r:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var ey={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ey,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),$b(e,t)}var ny={newInstance:ln.c.newInstance(ty,"vtkImageSlice"),extend:ty};function ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ay(e){for(var t=1;ti&&(i=g,s=r[c]<0,l=c)}if(1!==i){var u="IJKXYZ"[t.slicingMode],d="IJKXYZ"[l];ly("Unaccurate slicing along ".concat(u," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(i,"% aligned). ")+"Necessitates slice reformat that is not yet implemented. You can switch the slicing mode on your mapper to do IJK slicing instead.")}t.closestIJKAxis={ijkMode:l,flip:s}}function r(n,r){var a=e.getInputData(),o=a.getExtent(),i=[o[0],o[2],o[4]],l=e.getClosestIJKAxis().ijkMode,s=t.slice;l!==t.slicingMode&&(s=e.getSliceAtPosition(s)),i[l]+=s;var c=[0,0,0];a.indexToWorld(i,c),i[l]+=1;var g=[0,0,0];a.indexToWorld(i,g),g[0]-=c[0],g[1]-=c[1],g[2]-=c[2],Object(Fo.l)(g,g);var u=tl.a.intersectWithLine(n,r,c,g);if(u.intersection){var d=u.x,m=[0,0,0];return a.worldToIndex(d,m),{t:u.t,absoluteIJK:m}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,a=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=a.getBounds();switch(t.slicingMode){case sy.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case sy.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case sy.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var i=[0,0,0];a.worldToIndex(r,i);var l=a.getExtent(),s=0;switch(e.getClosestIJKAxis().ijkMode){case sy.I:s=Object(Xo.a)(i[0],l[0],l[1]),s=Math.round(s);break;case sy.J:s=Object(Xo.a)(i[1],l[2],l[3]),s=Math.round(s);break;case sy.K:s=Object(Xo.a)(i[2],l[4],l[5]),s=Math.round(s);break;default:return 0}return s},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case sy.I:case sy.J:case sy.K:var a=e.getSliceAtPosition(r);e.setSlice(a);break;case sy.X:e.setSlice(r[0]);break;case sy.Y:e.setSlice(r[1]);break;case sy.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(sy.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(sy.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(sy.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(sy.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(sy.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(sy.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),a=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case sy.X:n[0]=1;break;case sy.Y:n[1]=1;break;case sy.Z:n[2]=1;break;case sy.I:Object(Xo.k)(a,[1,0,0],n);break;case sy.J:Object(Xo.k)(a,[0,1,0],n);break;case sy.K:Object(Xo.k)(a,[0,0,1],n)}return n},e.setSlicingMode=function(r){t.slicingMode!==r&&(t.slicingMode=r,e.getInputData()&&n(),e.modified())},e.getClosestIJKAxis=function(){return void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==sy.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return Object(Xo.j)();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),a=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(a!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),a){case sy.I:r[0]=o,r[1]=o;break;case sy.J:r[2]=o,r[3]=o;break;case sy.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getInputData();if(!a)return Object(Xo.j)();var o=a.getExtent(),i=e.getClosestIJKAxis(),l=i.ijkMode,s=n;switch(l!==t.slicingMode&&(s=e.getSliceAtPosition(n)),l){case sy.I:o[0]=s-r,o[1]=s+r;break;case sy.J:o[2]=s-r,o[3]=s+r;break;case sy.K:o[4]=s-r,o[5]=s+r}return a.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=[Math.round(a.absoluteIJK[0]),Math.round(a.absoluteIJK[1]),Math.round(a.absoluteIJK[2])];return i[0]o[1]||i[1]o[3]||i[2]o[5]?null:{t:a.t,ijk:i}}return null},e.intersectWithLineForCellPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=a.absoluteIJK,l=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])];if(l[0]o[1]-1||l[1]o[3]-1||l[2]o[5]-1)return null;var s=[i[0]-l[0],i[1]-l[1],i[2]-l[2]];return{t:a.t,ijk:l,pCoords:s}}return null}}var gy={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:sy.NONE,closestIJKAxis:{ijkMode:sy.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gy,n),_g.extend(e,t,n),ln.c.get(e,t,["slicingMode"]),ln.c.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),ln.c.setGetArray(e,t,["customDisplayExtent"],4),Vu.implementCoincidentTopologyMethods(e,t),cy(e,t)}var dy=ay(ay(ay({newInstance:ln.c.newInstance(uy,"vtkImageMapper"),extend:uy},oy),iy),pd);var my=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.actor=ny.newInstance({visibility:!1}),t.mapper=dy.newInstance(),t.actor.setMapper(t.mapper),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addActor(e.actor),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&this.view.renderer.removeActor(this.actor),this.actor.delete(),this.actor=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.actor,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange,s=e.iSlice,c=e.jSlice,g=e.kSlice,u=e.xSlice,d=e.ySlice,m=e.zSlice;if(!r||t&&r===t.actor||this.actor.set(r),!a||t&&a===t.property||this.actor.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var f,p=Mb.getPresetByName(i);this.lookupTable.applyColorMap(p),(f=this.lookupTable).setMappingRange.apply(f,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?this.dataChanged():(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),!s||t&&s===t.iSlice||this.mapper.setISlice(s),!c||t&&c===t.jSlice||this.mapper.setJSlice(c),!g||t&&g===t.kSlice||this.mapper.setKSlice(g),!u||t&&u===t.xSlice||this.mapper.setXSlice(u),!d||t&&d===t.ySlice||this.mapper.setYSlice(d),!m||t&&m===t.zSlice||this.mapper.setZSlice(m),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.actor.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.actor.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();my.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},my.propTypes={id:Rs.a.string,mapper:Rs.a.object,actor:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),iSlice:Rs.a.number,jSlice:Rs.a.number,kSlice:Rs.a.number,xSlice:Rs.a.number,ySlice:Rs.a.number,zSlice:Rs.a.number,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var fy=my,py=Object.create(null);[{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){py[e.Name]=e}));var Cy=Object.keys(py);Cy.sort();var Iy={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(py[e.Name]||(Cy.push(e.Name),Cy.sort()),py[e.Name]=e)},removePresetByName:function(e){var t=Cy.indexOf(e);t>-1&&Cy.splice(t,1),delete py[e]},getPresetByName:function(e){return py[e]},rgbPresetNames:Cy},hy=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments[3];return new Promise((function(o,i){var l=n._messageId++;n._messages.set(l,[o,i,a]),n._worker.postMessage([l,t,e],r||[])}))}},{key:"postMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return new Promise((function(a,o){var i=t._messageId++;t._messages.set(i,[a,o,r]),t._worker.postMessage([i,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+l||uo+s?d===s?o:o+d/(d-s)*(u-o-s):-d===s?o:o-d/(d+s)*(u-o-s))-o)/d,f=Math.exp(-4*m*m),p=1-m*m,C=1,I=i*(c<1?c*p+(1-c)*f:(2-c)*p+(c-1)*C);I>n[g]&&(n[g]=I)}}return n}function Xy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},a=t[3],o=t[2]/(n.length-1),i=!!r.fillStyle,l=a+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var s=0;s3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function Ny(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,Object(Ao.a)(n));return n.indexOf(r)}function Hy(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,a=n.offsetY;t&&n.preventDefault(),e(r,a)}}function Yy(){xy.filter((function(e){return e.ready})).forEach((function(e){e.callbacks.forEach((function(t){t.touches===e.touches&&t.clicks===e.count&&t.action.apply(t,Object(Ao.a)(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(a){var o=a.target.getBoundingClientRect(),i=Array.prototype.map.call(a.touches,(function(e){return[e.pageX-o.left,e.pageY-o.top]})).reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]).map((function(e){return e/a.touches.length}));"touchstart"===a.type?(clearTimeout(xy[e].timeout),xy[e].ts=a.timeStamp,xy[e].singleTouche=i,xy[e].touches=a.touches.length):"touchmove"===a.type?(xy[e].ts=0,xy[e].count=0,xy[e].ready=!1):"touchend"===a.type&&(a.timeStamp-xy[e].ts1&&void 0!==arguments[1]?arguments[1]:{},o=r.numberOfBinToConsiders,i=void 0===o?1:o,l=r.numberOfBinsToSkip,s=void 0===l?1:l,c=r.numberOfComponents,g=void 0===c?1:c,u=r.component,d=void 0===u?0:u;t.histogram=null,t.histogramArray=n,t.dataRange=Object(Xo.b)(n,d,g);var m=Object(a.a)(t.dataRange,2),f=m[0],p=m[1],C=4,I=Math.floor(n.length/C)||1;I+=I%g;for(var h=0,b=[],y=[];hr;)a.shift();for(var l=a.reduce((function(e,t){return e+t}),0)/r,c=0,g=t.histogram.length;c1){for(var c=t.style.iconSize+t.style.padding,g=c,u=0;r>g;)u+=1,g+=c;switch(u){case 0:var d=e.addGaussian(0,1,.1,0,0),m=t.gaussians[d],f=ky({},m),p=Ty.adjustPosition;t.activeGaussian=d,t.selectedGaussian=d,ln.c.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:p,gaussian:m,originalGaussian:f}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(l<0||l>1||s<0||s>1)t.selectedGaussian=-1,t.dragAction=null;else{var C=Ny(l,t.gaussians);C!==t.selectedGaussian&&(t.selectedGaussian=C,e.modified())}return!0},e.onHover=function(n,r){var o=20/t.canvas.height,i=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),l=Object(a.a)(i,2),s=l[0],c=l[1],g=Oy(n,r,t.graphArea),u=Object(a.a)(g,1)[0],d=s<0?t.selectedGaussian:Ny(s,t.gaussians);t.canvas.style.cursor="default";var m=t.gaussians[d];if(t.enableRangeZoom&&u>=0&&rt.rangeZoom[1]-f?t.canvas.style.cursor=Wy.adjustZoom:t.canvas.style.cursor=Wy.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:Ty.adjustZoom}}else if(m&&u>=0){var p,C=1-c;p=C>m.height+o?"adjustPosition":C>m.height-o?Math.abs(s-m.position).5*m.height+o?"adjustPosition":C>.5*m.height-o?Math.abs(s-m.position)o?"adjustPosition":"adjustWidth",t.canvas.style.cursor=Wy[p];var I=Ty[p],h=ky({},m);t.dragAction={originalXY:[s,c],action:I,gaussian:m,originalGaussian:h}}return d!==t.activeGaussian&&(t.activeGaussian=d,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);t.gaussianSide=0;var i=t.gaussians[o];return i&&(t.gaussianSide=i.position-a),o!==t.selectedGaussian&&a>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];(0,t.dragAction.action)(l,s,ky({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=Jy(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=function(n,r){return t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0},e.onLeave=function(n,r){return e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0},e.onAddGaussian=function(n,r){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];return l>=0&&e.addGaussian(l,1-s,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);return a>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=xy.length,t=arguments.length,n=new Array(t),r=0;r1){var c=Math.round(t.style.iconSize/2-t.style.strokeWidth),g=Math.round(c+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(g-i/2,g,c,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g),e.stroke(),e.moveTo(g-i/2,g-c+t.style.strokeWidth+2),e.lineTo(g-i/2,g+c-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(g-i/2,g+i/2+t.style.iconSize,c,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g+i/2+t.style.iconSize),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&Xy(e,l,Ky(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),Xy(e,l,Ky(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var u=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){var a=r||document.createElement("canvas");a.setAttribute("width",t),a.setAttribute("height",256);for(var o=a.getContext("2d"),i=e.getUint8Table(n[0],n[1],t,4),l=o.getImageData(0,0,t,256),s=0;s<256;s++)l.data.set(i,4*s*t);for(var c=256*t*4,g=4*t,u=3;u0&&(a=Math.min(a,i)),t.opacities[i]>0&&(o=Math.max(o,i));return[n[0]+a*r,n[0]+o*r]};var n=e.setEnableRangeZoom;e.setEnableRangeZoom=function(e){var r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};var r=e.setRangeZoom;e.setRangeZoom=function(){var e=r.apply(void 0,arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((function(){return e.render()})),e.setSize.apply(e,Object(Ao.a)(t.size))}var Dy={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),ln.c.obj(e,t),ln.c.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),ln.c.setGetArray(e,t,["rangeZoom"],2),ln.c.get(e,t,["size","canvas","gaussians"]),ln.c.event(e,t,"opacityChange"),ln.c.event(e,t,"animation"),ln.c.event(e,t,"zoomChange"),Ly(e,t)}var Uy=ky({newInstance:ln.c.newInstance(Ey,"vtkPiecewiseGaussianWidget"),extend:Ey},My),zy='',_y='',jy='';var Qy={container:"VolumeController-module_container__2HNSO",line:"VolumeController-module_line__3rtqL",button:"VolumeController-module_button__2T-xL",sliderEntry:"VolumeController-module_sliderEntry__27XSC",sliderIcon:"VolumeController-module_sliderIcon__U8YAZ VolumeController-module_button__2T-xL",slider:"VolumeController-module_slider__3PS68",piecewiseEditor:"VolumeController-module_piecewiseEditor__2_jav",select:"VolumeController-module_select__7mbfS",presets:"VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadow:"VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonDarkBG:"VolumeController-module_buttonDarkBG__3W1zO VolumeController-module_button__2T-xL",presetsDarkBG:"VolumeController-module_presetsDarkBG__2ZI2W VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowDarkBG:"VolumeController-module_shadowDarkBG__WHYZ- VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonBrightBG:"VolumeController-module_buttonBrightBG__2dstz VolumeController-module_button__2T-xL",presetsBrightBG:"VolumeController-module_presetsBrightBG__3_VRC VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowBrightBG:"VolumeController-module_shadowBrightBG__YCHpe VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".VolumeController-module_container__2HNSO {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n justify-content: space-between;\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(128, 128, 128, 0.5);\n border-radius: 5px;\n padding: 2px;\n border: 0.5px solid black;\n box-sizing: border-box;\n}\n\n.VolumeController-module_line__3rtqL {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.VolumeController-module_button__2T-xL {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module_button__2T-xL svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module_sliderEntry__27XSC {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module_sliderIcon__U8YAZ {\n height: 1rem;\n}\n\n.VolumeController-module_slider__3PS68 {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module_piecewiseEditor__2_jav {\n flex: 1;\n}\n\n.VolumeController-module_select__7mbfS {\n flex: 1;\n border: none;\n background: transparent;\n color: white;\n border: none;\n -moz-appearance: none;\n width: 5px;\n}\n\n.VolumeController-module_select__7mbfS select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module_presets__1h4j5 {\n}\n\n.VolumeController-module_shadow__29K9t {\n}\n\n.VolumeController-module_buttonDarkBG__3W1zO {\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W {\n color: white;\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W option {\n color: black;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- {\n color: white;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- option {\n color: black;\n}\n\n.VolumeController-module_buttonBrightBG__2dstz {\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC {\n color: black;\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC option {\n color: white;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe {\n color: black;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe option {\n color: white;\n}\n");var qy=Iy.rgbPresetNames.map((function(e){return'")}));function $y(e,t){function n(){var e=!!Number(t.el.querySelector(".js-shadow").value);t.actor.getProperty().setShade(e),t.renderWindow.render()}function r(){var e=t.actor.getMapper().getInputData();if(e){var n=e.getPointData().getScalars()||e.getPointData().getArrays()[0],r=t.rescaleColorMap?t.colorDataRange:n.getRange(),a=Iy.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(a),o.setMappingRange.apply(o,Object(Ao.a)(r)),o.updateRange(),t.renderWindow.render()}}function a(){var e=Number(t.el.querySelector(".js-spacing").value),n=t.actor.getMapper().getInputData(),r=.7*Math.sqrt(n.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.actor.getMapper().setSampleDistance(r*Math.pow(2,3*e-1.5)),t.renderWindow.render()}function o(){var e=Number(t.el.querySelector(".js-edge").value);if(0===e)t.actor.getProperty().setUseGradientOpacity(0,!1);else{var n=t.actor.getMapper().getInputData(),r=(n.getPointData().getScalars()||n.getPointData().getArrays()[0]).getRange();t.actor.getProperty().setUseGradientOpacity(0,!0);var a=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*a*a),t.actor.getProperty().setGradientOpacityMaximumValue(0,1*(r[1]-r[0])*e*e)}t.renderWindow.render()}t.classHierarchy.push("vtkVolumeController"),t.el=document.createElement("div"),t.el.setAttribute("class",Qy.container),t.widget=Uy.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(i,l,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(l),e.setRenderWindow(i);var u=t.actor.getMapper().getInputData(),d=u.getPointData().getScalars()||u.getPointData().getArrays()[0],m=t.actor.getProperty().getRGBTransferFunction(0),f=t.actor.getProperty().getScalarOpacity(0),p=s?"DarkBG":"BrightBG",C={};["button","presets","shadow"].forEach((function(e){C[e]=Qy["".concat(e).concat(p)]})),t.el.innerHTML='\n
\n
').concat(zy,'
\n \n \n
\n
\n
\n
').concat(jy,'
\n \n
\n
\n
').concat(_y,'
\n \n
\n
\n
\n ');var I=t.el.querySelector(".js-button"),h=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),y=t.el.querySelector(".js-spacing"),v=t.el.querySelector(".js-edge"),Z=t.el.querySelector(".js-pwf");t.widget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),t.widget.addGaussian(.5,1,.5,.5,.4),t.widget.setDataArray(d.getData()),t.widget.setColorTransferFunction(m),t.widget.applyOpacity(f),t.widget.setContainer(Z),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),I.addEventListener("click",e.toggleVisibility),h.addEventListener("change",n),b.addEventListener("change",r),y.addEventListener("input",a),v.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(f),t.colorDataRange=t.widget.getOpacityRange(),t.rescaleColorMap&&r(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),t.widget.onAnimation((function(e){e?t.renderWindow.getInteractor().requestAnimation(t.widget):(t.renderWindow.getInteractor().cancelAnimation(t.widget),t.renderWindow.render())})),m.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),h.value=Number(c)?"1":"0",b.value=g,n(),r(),a(),o()},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.el),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.el),e.modified())};var i=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!i(e)&&(r(),!0)},e.toggleVisibility=function(){e.setExpanded(!e.getExpanded())},e.setExpanded=function(e){var n=t.el.querySelectorAll(".js-toggle"),r=n.length;if(t.expanded=e,t.expanded)for(;r--;)n[r].style.display="flex";else for(;r--;)n[r].style.display="none"},e.getExpanded=function(){return t.expanded},e.setSize=t.widget.setSize,e.render=t.widget.render,e.onAnimation=t.widget.onAnimation,e.onModified(e.render),e.setSize.apply(e,Object(Ao.a)(t.size))}var ev={size:[600,300],expanded:!0,rescaleColorMap:!1};function tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ev,n),ln.c.obj(e,t),ln.c.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),ln.c.get(e,t,["widget"]),$y(e,t)}var nv={newInstance:ln.c.newInstance(tv,"vtkVolumeController"),extend:tv};var rv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;ps(this,n),(r=t.call(this,e)).subscriptions=[],r.containerRef=Bs.a.createRef();var a=e.size,o=e.rescaleColorMap;return r.controller=nv.newInstance({size:a,rescaleColorMap:o}),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return Bs.a.createElement(_h.Consumer,null,(function(n){return e.view=t,e.representation=n,Bs.a.createElement("div",{ref:e.containerRef})}))}))}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t,n){var r;(r=this.controller).setSize.apply(r,fs(this.props.size)),this.controller.render()}},{key:"componentWillUnmount",value:function(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.controller.setContainer(null),this.controller.delete(),this.controller=null}},{key:"init",value:function(){var e=this,t=this.containerRef.current,n=this.view,r=n.renderWindow,a=n.props,o=this.representation.volume,i=a.background[0]+a.background[1]+a.background[2]<1.5;if(o&&o.getMapper()&&o.getMapper().getInputData()){var l=o.getMapper().getInputData();this.controller.setContainer(t),this.controller.setupContent(r,o,i),this.controller.render(),this.view.resetCamera(),this.view.renderView(),this.subscriptions.push(l.onModified((function(){return e.onDataChange()}),-1))}else setTimeout((function(){return e.init()}),100)}},{key:"onDataChange",value:function(){var e=this.controller.getWidget();if(this.representation&&this.representation.volume){var t=this.representation.volume.getMapper().getInputData(),n=t.getPointData().getScalars()||t.getPointData().getArrays()[0];e.setDataArray(n.getData())}}}]),n}();rv.defaultProps={size:[400,150],rescaleColorMap:!0},rv.propTypes={id:Rs.a.string,size:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool};var av=rv;function ov(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getPointData()},e.children)}))}ov.defaultProps={},ov.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var iv=ov,lv={int32:Int32Array,int16:Int16Array,int8:Int8Array,uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array,float32:Float32Array,float64:Float64Array};function sv(e,t){if(!e)return null;if(Array.isArray(e))return t.from(e);if(e.dtype){var n=e.bvals,r=e.dtype,a=Ki.toArrayBuffer(n);return new lv[r](a)}return e}var cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).polydata=Go.a.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(jh.Provider,{value:e},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.polydata.delete(),this.polydata=null}},{key:"update",value:function(e,t){var n=e.connectivity,r=e.points,a=e.verts,o=e.lines,i=e.polys,l=e.strips,s=!1,c=Uint32Array;if(r&&(!t||r!==t.points)){var g=sv(r,Float64Array);this.polydata.getPoints().setData(g,3),s=!0,c=g.length>196608?Uint32Array:Uint16Array}if(!a||t&&a===t.verts||(this.polydata.getVerts().setData(sv(a,c)),s=!0),!o||t&&o===t.lines||(this.polydata.getLines().setData(sv(o,c)),s=!0),!i||t&&i===t.polys||(this.polydata.getPolys().setData(sv(i,c)),s=!0),!l||t&&l===t.strips||(this.polydata.getStrips().setData(sv(l,c)),s=!0),n&&(n||!t||n!==t.connectivity)){var u=r.length/3;switch(n){case"points":var d=new Uint32Array(u+1);d[0]=u;for(var m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.event(e,t,"DataAvailable"),mv(e,t)}),"vtkTrivialProducer"),pv={},Cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(){return ps(this,n),t.apply(this,arguments)}return Is(n,[{key:"getTrivialProducer",value:function(){var e=pv[this.props.name];return e||(e=fv(),pv[this.props.name]=e),e}},{key:"render",value:function(){var e=this;return this.update(),Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.getTrivialProducer()},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}))}},{key:"update",value:function(){var e=this;this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.subscription=this.getTrivialProducer().onDataAvailable((function(){e.dataAvailable()}))}},{key:"dataAvailable",value:function(){this.downstream&&this.downstream.setInputConnection(this.getTrivialProducer().getOutputPort(),this.props.port),this.validData||(this.validData=!0,this.getTrivialProducer().invokeDataAvailable()),this.representation&&this.representation.dataAvailable()}},{key:"dataChanged",value:function(){this.representation&&this.representation.dataChanged()}}]),n}();Cv.defaultProps={port:0,name:"shared"},Cv.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Iv=Cv;function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*a,10):t.tickTextStyle.fontSize=Math.max(16*a,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var i=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var l=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];i+.4*l>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=i+.4*l,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=i+1.4*l,t.boxPosition=[.99-t.boxSize[0],-.92]),t.boxSize[1]=Math.max(1.2,Math.min(1.84/r,1.84))}else{t.axisTitlePixelOffset=2*t.tickTextStyle.fontSize,t.tickLabelPixelOffset=.5*t.tickTextStyle.fontSize;var s=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],c=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],g=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*g*(t.ticks.length+3))),t.boxSize[1]=s+c,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)},e.update=function(){if(t.scalarsToColors&&t.visibility){if(t.barMapper.setLookupTable(t.scalarsToColors),t.forceUpdate||Math.max(t.scalarsToColors.getMTime(),e.getMTime())>t.lastRebuildTime.getMTime()){var n=t.scalarsToColors.getMappingRange();t.lastTickBounds=Object(Ao.a)(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=TI().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var a=r.tickFormat(5);if(t.tickStrings=t.ticks.map(a),t.automated)e.computeAndApplyAutomatedSettings();else{var o=e.updateTextureAtlas();e.recomputeBarSegments(o)}t.forceViewUpdate=!0,t.lastRebuildTime.modified(),t.forceUpdate=!1}(t.forceViewUpdate||t.camera.getMTime()>t.lastRedrawTime.getMTime())&&(e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRedrawTime.modified(),t.forceViewUpdate=!1)}},e.completedImage=function(r){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,n=t.nextAtlas,t.nextAtlas=null,r&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,a=0,o=1;Rv(t.tmContext,t.axisTextStyle);var i=t.tmContext.measureText(t.axisLabel),l={height:i.actualBoundingBoxAscent+2,startingHeight:o,width:i.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,l),o+=l.height,a=l.width,n.titleWidth=l.width,n.titleHeight=l.height,n.tickWidth=0,n.tickHeight=0,Rv(t.tmContext,t.tickTextStyle);for(var s=[].concat(Object(Ao.a)(t.tickStrings),["NaN","Below","Above"]),c=0;ct.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var a=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){var o=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-a,t.barSize[1]=t.boxSize[1]-o}else{var i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-i-a,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+a,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var l=(2*e.tickWidth-8)/t.lastSize[0],s=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-s-n,t.barPosition[1]=t.boxPosition[1],r[0]=l}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var a=[0,0],o=t.vertical?1:0,i=t.vertical?.01:.02;function l(e,n){t.barSegments.push({corners:[[].concat(a),[a[0]+r[0],a[1]],[a[0]+r[0],a[1]+r[1]],[a[0],a[1]+r[1]]],scalars:n,title:e}),a[o]+=r[o]+i}"function"==typeof t.scalarsToColors.getNanColor&&l("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&l("Below",[-.1,-.1,-.1,-.1]);var s="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();a[o]+=i;var c=r[o];r[o]=s?1-2*i-r[o]-a[o]:1-i-a[o],l("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),s&&(r[o]=c,a[o]+=i,l("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,t,r,a,o,i,l){var s=n.get(e);if(s){var c=l.ptIdx,g=l.cellIdx;vv[0]=t[0],vv[1]=t[1],vv[2]=t[2],o[0]<-.5?Object(Fo.b)(Av,r,o[0]*i-s.width):o[0]>.5?Object(Fo.b)(Av,r,o[0]*i):Object(Fo.b)(Av,r,o[0]*i-s.width/2),Object(Fo.g)(vv,vv,Av),Object(Fo.b)(Av,a,o[1]*i-s.height/2),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[0],l.tcoords[2*c+1]=s.tcoords[1],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[2],l.tcoords[2*c+1]=s.tcoords[3],c++,Object(Fo.b)(Av,a,s.height),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[4],l.tcoords[2*c+1]=s.tcoords[5],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.a)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[6],l.tcoords[2*c+1]=s.tcoords[7],c++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-3,l.polys[4*g+3]=c-2,g++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-2,l.polys[4*g+3]=c-1,l.ptIdx+=4,l.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n),Object(Yo.g)(Vv,n);var r=t.lastSize;Av[0]=0,Av[1]=0,Av[2]=-.99,Object(Fo.q)(vv,Av,Vv),Av[0]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Sv,Zv,vv),Av[0]-=.1,Av[1]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Bv,Zv,vv);for(var a=0;a<3;a++)Sv[a]/=.05*r[0],Bv[a]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,i=4*o,l=2*o,s=new Float64Array(3*i),c=new Uint16Array(4*l),g=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:c,points:s,tcoords:g},d=t.vertical?0:1,m=t.vertical?1:0,f=[0,1];t.vertical?(t.topTitle?(Av[0]=t.boxPosition[0]+.5*t.boxSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,[0,1],t.axisTitlePixelOffset,u)):(Av[0]=t.barPosition[0]+t.barSize[0],Av[1]=t.barPosition[1]+.5*t.barSize[1],Object(Fo.q)(vv,Av,Vv),Object(Fo.b)(Sv,Sv,-1),e.createPolyDataForOneLabel(t.axisLabel,vv,Bv,Sv,[0,-1],t.axisTitlePixelOffset,u),Object(Fo.b)(Sv,Sv,-1)),f=[-1,0]):(Av[0]=t.barPosition[0]+.5*t.barSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,f,t.axisTitlePixelOffset,u)),Gv[2]=-.99,Gv[d]=t.barPosition[d]+(.5*f[d]+.5)*t.barSize[d],Gv[m]=t.barPosition[m]+.5*t.barSize[m];for(var p=null,C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kv(n)),aC.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=Pu.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=Go.a.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=aC.newInstance(),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},ln.c.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},ln.c.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmActor.setProperty(e.getProperty()),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.mapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,a,o,i){t.camera=r,t.lastSize[0]===i[0]&&t.lastSize[1]===i[1]||(t.lastSize[0]=i[0],t.lastSize[1]=i[1],t.lastAspectRatio=i[0]/i[1],t.forceUpdate=!0),e.update()})),ln.c.setGet(e,t,["automated","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),ln.c.get(e,t,["axisTextStyle","tickTextStyle"]),ln.c.getArray(e,t,["boxPosition","boxSize"]),ln.c.setArray(e,t,["boxPosition","boxSize"],2),wv(e,t)}var xv={newInstance:ln.c.newInstance(Wv,"vtkScalarBarActor"),extend:Wv};var Tv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).validData=!1,r.currentVisibility=!0,r.actor=aC.newInstance({visibility:!1,representationId:e.id}),r.lookupTable=Ib.newInstance(),r.mapper=Pu.newInstance({lookupTable:r.lookupTable,useLookupTableScalarRange:!0}),r.actor.setMapper(r.mapper),r.cubeAxes=qI.newInstance({visibility:!1,dataBounds:[-1,1,-1,1,-1,1]}),r.cubeAxes.getActors().forEach((function(e){return(0,e.setVisibility)(!1)})),r.scalarBar=xv.newInstance(),r.scalarBar.setScalarsToColors(r.lookupTable),r.scalarBar.setVisibility(!1),r.subscriptions=[],r.subscriptions.push(r.mapper.onModified((function e(){if(r.mapper.getInputData()){1===r.subscriptions.length&&r.subscriptions.push(r.mapper.getInputData().onModified(e));var t=r.mapper.getInputData().getBounds();t[0]t.bounds[1]&&(t.bounds[1]=g[0]),g[1]>t.bounds[3]&&(t.bounds[3]=g[1]),g[2]>t.bounds[5]&&(t.bounds[5]=g[2]);var R=new Float32Array(I,36*b,9);Dl(R,y),zl(R,R),Ul(R,R)}var w=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),t.colorArray=null;var k=e.getLookupTable();k&&w&&(k.build(),t.colorArray=k.mapScalars(w,t.colorMode,0)),t.buildTime.modified()}},e.getPrimitiveCount=function(){var t=e.getInputData(1),n=e.getInputData().getPoints().getNumberOfValues()/3;return{points:n*t.getPoints().getNumberOfValues()/3,verts:n*(t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells()),lines:n*(t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells()),triangles:n*(t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells())}}}var Pv={orient:!0,orientationMode:Nv.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:Hv.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function Kv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pv,n),Pu.extend(e,t,n),ln.c.algo(e,t,2,0),t.buildTime={},ln.c.obj(t.buildTime,{mtime:0}),t.boundsTime={},ln.c.obj(t.boundsTime,{mtime:0}),ln.c.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),ln.c.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),Fv(e,t)}var Mv=function(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};return{getArrays:function(){return{input:e.augmentInputArrays(t,n.map((function(e){return{location:t,name:e}}))),output:[{location:t,name:r,attribute:"outputAttributeType"in o?o.outputAttributeType:ti.a.SCALARS,numberOfComponents:"numberOfOutputComponents"in o?o.numberOfOutputComponents:1}]}},evaluate:function(e,t){var n=new Array(e.length),r=e.map((function(e,t){var r=e.getNumberOfComponents(),a=e.getData();return 1===r?function(e){return a[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],i=o.getData(),l=o.getNumberOfComponents(),s=new Array(l);if(1===l)i.forEach((function(e,t){i[t]=a.apply(void 0,Object(Ao.a)(r.map((function(e){return e(t)}))).concat([t,s]))}));else for(var c=o.getNumberOfTuples(),g=function(e){s=a.apply(void 0,Object(Ao.a)(r.map((function(t){return t(e)}))).concat([e,s])),o.setTuple(e,s)},u=0;u4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,a,o))},e.prepareArrays=function(e,t,n){var r=[],a=[];return e.input.forEach((function(e){if(e.location===Dh.b.COORDINATE)r.push(t.getPoints());else{var n=[[Dh.b.UNIFORM,function(e){return e.getFieldData()}],[Dh.b.POINT,function(e){return e.getPointData()}],[Dh.b.CELL,function(e){return e.getCellData()}],[Dh.b.VERTEX,function(e){return e.getVertexData()}],[Dh.b.EDGE,function(e){return e.getEdgeData()}],[Dh.b.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),a="location"in e&&e.location in n?n[e.location](t):null;a?e.name?r.push(a.getArrayByName(e.name)):"index"in e?r.push(a.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Dh.b.UNIFORM?r.push(a.getActiveAttribute(e.attribute)):(rZ('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rZ('Specifier "'.concat(JSON.stringify(e),'" did not provide a usable location.')),r.push(null))}})),e.output.forEach((function(e){var r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),aZ(e,t)}var lZ={newInstance:ln.c.newInstance(iZ,"vtkCalculator"),extend:iZ};var sZ=Nl.a.FieldDataTypes,cZ=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).calculator=lZ.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.arrays,a=t.location,o=t.formula;return this.calculator.setFormulaSimple(sZ[a],r,n,o),Bs.a.createElement(qh.Consumer,null,(function(t){return e.downstream||(t.setInputConnection(e.calculator.getOutputPort(),e.props.port),e.downstream=t),Bs.a.createElement(qh.Provider,{value:e.calculator},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}},{key:"componentWillUnmount",value:function(){this.calculator.delete(),this.calculator=null}}]),n}();cZ.defaultProps={port:0,name:"scalars",location:"POINT",arrays:[],formula:function(e){return e[0]}},cZ.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,location:Rs.a.string,arrays:Rs.a.arrayOf(Rs.a.string),formula:Rs.a.func,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var gZ=cZ;function uZ(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getCellData()},e.children)}))}uZ.defaultProps={},uZ.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var dZ={VolumeRepresentation:Db,SliceRepresentation:fy,VolumeController:av,PointData:iv,PolyData:gv,Reader:dv,ShareDataSet:Iv,View:nb,GeometryRepresentation:Jv,GlyphRepresentation:Dv,ImageData:Uv,DataArray:_v,FieldData:Qv,Algorithm:tZ,Calculator:gZ,CellData:uZ};function mZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r="Float32Array"),console.log("nbComponents",t),Bs.a.createElement(Jv,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,showCubeAxes:e.showCubeAxes,cubeAxesStyle:e.cubeAxesStyle,showScalarBar:e.showScalarBar,scalarBarTitle:e.scalarBarTitle,scalarBarStyle:e.scalarBarStyle},Bs.a.createElement(gv,{points:e.xyz,connectivity:"points"},t&&Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}mZ.defaultProps={xyz:[0,0,0],colorMapPreset:"erdc_rainbow_bright",colorDataRange:[0,1],showCubeAxes:!1,showScalarBar:!1,scalarBarTitle:""},mZ.propTypes={id:Rs.a.string,xyz:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),colorMapPreset:Rs.a.string,colorDataRange:Rs.a.arrayOf(Rs.a.number),property:Rs.a.object,showCubeAxes:Rs.a.bool,cubeAxesStyle:Rs.a.object,showScalarBar:Rs.a.bool,scalarBarTitle:Rs.a.string,scalarBarStyle:Rs.a.object};var fZ=mZ;function pZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r=e.scalarsType),Bs.a.createElement(Db,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,mapper:e.mapper,volume:e.volume},e.volumeController&&Bs.a.createElement(av,{rescaleColorMap:e.rescaleColorMap,size:e.controllerSize}),Bs.a.createElement(Uv,{dimensions:e.dimensions,origin:e.origin,spacing:e.spacing},Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}pZ.defaultProps={scalarsType:"Float32Array",colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto",volumeController:!0,rescaleColorMap:!0,controllerSize:[400,150]},pZ.propTypes={id:Rs.a.string,dimensions:Rs.a.arrayOf(Rs.a.number),spacing:Rs.a.arrayOf(Rs.a.number),origin:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),scalarsType:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,volumeController:Rs.a.bool,controllerSize:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string])};var CZ={PointCloudRepresentation:fZ,VolumeDataRepresentation:pZ},IZ=dZ.VolumeRepresentation,hZ=dZ.SliceRepresentation,bZ=dZ.VolumeController,yZ=dZ.PointData,vZ=dZ.PolyData,ZZ=dZ.Reader,AZ=dZ.ShareDataSet,GZ=dZ.View,SZ=dZ.GeometryRepresentation,BZ=dZ.GlyphRepresentation,VZ=dZ.ImageData,RZ=dZ.DataArray,wZ=dZ.FieldData,kZ=dZ.Algorithm,WZ=dZ.Calculator,xZ=dZ.CellData,TZ=CZ.PointCloudRepresentation,JZ=CZ.VolumeDataRepresentation,XZ={ViewContext:zh,RepresentationContext:_h,DataSetContext:jh,FieldsContext:Qh,DownstreamContext:qh},OZ={Core:dZ,Representations:CZ,Contexts:XZ};t.default=r}]]); //# sourceMappingURL=async-ReactVTK.js.map //# sourceMappingURL=async-ReactVTK.js.map \ No newline at end of file diff --git a/dash_vtk/dash_vtk.min.js b/dash_vtk/dash_vtk.min.js index 4fb614a..d7cb529 100644 --- a/dash_vtk/dash_vtk.min.js +++ b/dash_vtk/dash_vtk.min.js @@ -1,3 +1,3 @@ -window.dash_vtk=function(e){function a(a){for(var r,n,o=a[0],l=a[1],i=0,c=[];i0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(t);var n=[];function r(e){n[e]=null}function a(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++g),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?C("instance deleted - cannot call any method"):r&&r0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(l){var s=a?null:e["set".concat(y(l))];s&&Array.isArray(n[l])&&s.length>1?o=s.apply(void 0,Object(i.a)(n[l]))||o:s?o=s(n[l])||o:(-1!==["mtime"].indexOf(l)||r||I("Warning: Set value to model directly ".concat(l,", ").concat(n[l])),t[l]=n[l],o=!0)})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error("Cannot ShallowCopy ".concat(n.getClassName()," into ").concat(e.getClassName()));var a=n.get(),o=Object.keys(t).sort(),i=Object.keys(a).sort();i.forEach((function(e){var n=o.indexOf(e);-1===n?r&&p("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=a[e]})),o.length&&r&&p("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function B(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["get".concat(y(n.name))]=function(){return t[n.name]}:e["get".concat(y(n))]=function(){return t[n]}}))}var V={enum:function(e,t,n){return function(r){if("string"==typeof r){if(void 0!==n.enum[r])return t[n.name]!==n.enum[r]&&(t[n.name]=n.enum[r],e.modified(),!0);throw C("Set Enum with invalid argument ".concat(n,", ").concat(r)),new RangeError("Set Enum with invalid string argument")}if("number"==typeof r){if(t[n.name]!==r){if(-1!==Object.keys(n.enum).map((function(e){return n.enum[e]})).indexOf(r))return t[n.name]=r,e.modified(),!0;throw C("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw C("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function R(e){if("object"===Object(a.a)(e)){var t=V[e.type];if(t)return function(n,r){return t(n,r,e)};throw C("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(C("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function w(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["set".concat(y(n.name))]=R(n)(e,t):e["set".concat(y(n))]=R(n)(e,t)}))}function k(e,t,n){B(e,t,n),w(e,t,n)}function W(e,t,n){n.forEach((function(n){e["get".concat(y(n))]=function(){return[].concat(t[n])},e["get".concat(y(n),"ByReference")]=function(){return t[n]}}))}function x(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(y(n))]=function(){if(t.deleted)return C("instance deleted - cannot call any method"),!1;for(var o=arguments.length,i=new Array(o),l=0;l4&&void 0!==arguments[4]?arguments[4]:void 0;W(e,t,n),x(e,t,n,r,a)}var J=Symbol("Event abort");function X(e,t,n){var a=[],o=e.delete,i=1;function l(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return C("instance deleted - cannot call any method"),null;var o=i++;return a.push([o,e,r]),a.sort((function(e,t){return t[2]-e[2]})),s(o)},e.delete=function(){o(),a.forEach((function(e){return l(Object(r.a)(e,1)[0])}))}}function O(e,t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return e(r,n,t),Object.freeze(r)};return t&&l.a.register(t,n),n}function N(e){return e&&e.isA&&e.isA("vtkObject")}function H(e,t,n){var r,a=this;return function(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=function(e,n){t.keystore[e]=n},e.getKey=function(e){return t.keystore[e]},e.getAllKeys=function(){return Object.keys(t.keystore)},e.deleteKey=function(e){return delete t.keystore[e]},e.clearKeystore=function(){return e.getAllKeys().forEach((function(e){return delete t.keystore[e]}))}}var F=1;var P={algo:function(e,t,n,r){function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?C("instance deleted - cannot call any method"):r>=t.numberOfInputs?C("algorithm ".concat(e.getClassName()," only has ").concat(t.numberOfInputs," input ports. To add more input ports, use addInputData()")):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)C("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var a="algorithm ".concat(e.getClassName()," only has ");return a+="".concat(t.numberOfInputs),void C(a+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(C("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(l.a):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(l.a):t.inputConnection=[],t.output?t.output=t.output.map(l.a):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(l.a):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),a=r,o=1/0;a--;){if(!t.output[a])return!0;var i=t.output[a].getMTime();if(io)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=o,e.addInputData=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,a(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,o(e,t.numberOfInputs-1))},e.getInputData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=i,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return i(t)};return n.filter=e,n}),e.update=function(){var n=[];if(t.numberOfInputs)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:"Scalars";t.inputArrayToProcess.length1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],a=Number(e),o="B";a>n;)a/=n,o=r.pop();return"".concat(a.toFixed(t)," ").concat(o)},formatNumbersWithThousandSeparator:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=[],r=e;r>1e3;)n.push("000".concat(r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)},get:B,getArray:W,getCurrentGlobalMTime:function(){return g},getStateArrayMapFunc:A,isVtkObject:N,keystore:Y,newInstance:O,normalizeWheel:function(e){var t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}},obj:S,proxy:function(e,t){Y(e,t);var n=e.delete;t.proxyId="".concat(F++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),B(e,t,["proxyId","proxyGroup","proxyName"]),k(e,t,["proxyManager"]);var r={},a={};function i(e,t){a[t]||(a[t]=[]);for(var n=a[t],o=0;o0&&void 0!==arguments[0]?arguments[0]:"__root__";return a[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__root__",r=[],a=t.proxyId,o=l(n)||[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,a=[],i=0,l=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l)return null;var c=[],g=null;for(i=a.length;i--;){var u=a[i];u.instance===n?g=u:c.push(u)}if(!g)return null;var d=g.instance["get".concat(y(g.propertyName))]();if(!Z(d,r)||s){for(r=d,l=!0;c.length;){var m=c.pop();m.instance.set(Object(o.a)({},m.propertyName,r))}l=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function c(e,t){var n=[];for(i=a.length;i--;){var r=a[i];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(i))}for(;n.length;)a.splice(n.pop(),1)}function g(n,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.onModified(s),g=a[0];return a.push({instance:n,propertyName:r,subscription:l}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(Object(o.a)({},r,t.propertyLinkMap[e].value)):g&&s(g.instance,!0)),{unsubscribe:function(){return c(n,r)}}}function u(){for(;a.length;)a.pop().subscription.unsubscribe()}var d={bind:g,unbind:c,unsubscribe:u,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=function(){return s().map((function(e){return e.name}))},e.getPropertyByName=function(e){return s().find((function(t){return t.name===e}))},e.getPropertyDomainByName=function(e){return(r[e]||{}).domain},e.getProxySection=function(){return{id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}},e.delete=function(){for(var r=Object.keys(t.propertyLinkMap),a=r.length;a--;)t.propertyLinkMap[r[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},G((function(){if(t.links)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function a(e){for(var n=Object.keys(e),r=n.length;r--;){var a=n[r];t[a].set(e[a])}}t.this=e;for(var o=Object.keys(r),i=o.length,l=function(){var l=o[i];t[l]=r[l];var s=n[l];e["set".concat(y(l))]=function(n){n!==t[l]&&(t[l]=n,a(s[n]),e.modified())}};i--;)l();o.length&&B(e,t,o)},safeArrays:v,set:w,setArray:x,setGet:k,setGetArray:T,setImmediate:G,setLoggerFunction:function(e,t){f[e]&&(f[e]=t||m)},throttle:function(e,t){var n=!1,r=null;function a(){n=!1,null!==r&&(o.apply(void 0,Object(i.a)(r)),r=null)}function o(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(N(t)){if(a.indexOf(t)>=0)return r;a.push(t);var o=n(t);void 0!==o&&r.push(o);var i=t.get();Object.keys(i).forEach((function(t){var o=i[t];Array.isArray(o)?o.forEach((function(t){e(t,n,r,a)})):e(o,n,r,a)}))}return r},TYPED_ARRAYS:b,uncapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},VOID:u,vtkDebugMacro:p,vtkErrorMacro:C,vtkInfoMacro:function(){f.info.apply(f,arguments)},vtkLogMacro:function(){f.log.apply(f,arguments)},vtkOnceErrorMacro:function(e){h[e]||(f.error(e),h[e]=!0)},vtkWarningMacro:I};t.c=P}).call(this,n(20))},function(e,t,n){"use strict";t.a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return Y})),n.d(t,"k",(function(){return Z})),n.d(t,"l",(function(){return T})),n.d(t,"m",(function(){return u})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return J})),n.d(t,"q",(function(){return p})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return b})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return h})),n.d(t,"z",(function(){return v})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return i})),n.d(t,"C",(function(){return V})),n.d(t,"D",(function(){return x})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return l}));var r=n(14),a=(n(3),n(53),n(4).c.vtkWarningMacro);function o(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[];t.length1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,a=-1/0,o=t,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t-e;return e+n*Math.random()}function m(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function f(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){var r=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=a,n[2]=o,n}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:for(var n=0,r=0;r2&&void 0!==arguments[2]?arguments[2]:1e-6;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!"".concat(e).includes("e"))return+"".concat(Math.round("".concat(e,"e+").concat(t)),"e-").concat(t);var n="".concat(e).split("e"),r="";return+n[1]+t>0&&(r="+"),+"".concat(Math.round("".concat(+n[0],"e").concat(r).concat(+n[1]+t)),"e-").concat(t)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=G(e[0],n),t[1]=G(e[1],n),t[2]=G(e[2],n),t}function B(e,t,n){var r,i,l,s,c,g,u,d=0,m=o(n);for(r=0;rs&&(s=u);if(0===s)return a("Unable to factor linear system"),0;m[r]=1/s}for(i=0;i=s&&(s=g,d=r)}if(i!==d){for(l=0;l=0)for(o=i;o<=a-1;o++)s-=e[a][o]*n[o];else 0!==s&&(i=a);n[a]=s}for(a=r-1;a>=0;a--){for(s=n[a],o=a+1;oc?c=l:lc?c=s:s0?(c-g)/c:0)>0?(n=i===c?1/6*(l-s)/(c-g):l===c?1/3+1/6*(s-i)/(c-g):2/3+1/6*(i-l)/(c-g))<0&&(n+=1):n=0,t[0]=n,t[1]=a,t[2]=u}function w(e,t){var n,a,o,i=Object(r.a)(e,3),l=i[0],s=i[1],c=i[2],g=1/3,u=1/6,d=2/3;l>u&&l<=g?(a=1,n=(g-l)/u,o=0):l>g&&l<=.5?(a=1,o=(l-g)/u,n=0):l>.5&&l<=d?(o=1,a=(d-l)/u,n=0):l>d&&l<=5/6?(o=1,n=(l-d)/u,a=0):l>5/6&&l<=1?(n=1,o=(1-l)/u,a=0):(n=1,a=l/u,o=0),n=s*n+(1-s),a=s*a+(1-s),o=s*o+(1-s),n*=c,a*=c,o*=c,t[0]=n,t[1]=a,t[2]=o}function k(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2];a>.04045?a=Math.pow((a+.055)/1.055,2.4):a/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,t[0]=.4124*a+.3576*o+.1805*i,t[1]=.2126*a+.7152*o+.0722*i,t[2]=.0193*a+.1192*o+.9505*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0]/.9505,o=n[1]/1,i=n[2]/1.089;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t[0]=116*o-16,t[1]=500*(a-o),t[2]=200*(o-i)}(n,t)}function W(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=(n[0]+16)/116,o=n[1]/500+a,i=a-n[2]/200;a=Math.pow(a,3)>.008856?Math.pow(a,3):(a-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,t[0]=.9505*o,t[1]=1*a,t[2]=1.089*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2],l=3.2406*a+-1.5372*o+-.4986*i,s=-.9689*a+1.8758*o+.0415*i,c=.0557*a+-.204*o+1.057*i;l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,c>.0031308?c=1.055*Math.pow(c,1/2.4)-.055:c*=12.92;var g=l;g1&&(l/=g,s/=g,c/=g),l<0&&(l=0),s<0&&(s=0),c<0&&(c=0),t[0]=l,t[1]=s,t[2]=c}(n,t)}function x(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function T(e){return!(e[1]-e[0]<0)}function J(e,t,n){n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2])}function X(e,t,n){return en?n:e}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=X(e[0],t[0],n[0]),r[1]=X(e[1],t[1],n[1]),r[2]=X(e[2],t[2],n[2]),r}var N=function(e){return!Number.isFinite(e)},H=Number.isNaN;function Y(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(15)),o=n(4),i=n(6);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ta&&(e=a),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=u(),a=e.length,o=0;if(t<0&&n>1){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}var p={computeRange:d,createRangeHelper:u,getDataType:f,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=a)}return n}};function C(e,t){function n(){t.ranges=null,e.modified()}t.classHierarchy.push("vtkDataArray"),e.getElementComponentSize=function(){return t.values.BYTES_PER_ELEMENT},e.getComponent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=function(e,r,a){a!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=a,n())},e.getData=function(){return t.values},e.getRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=e<0?t.numberOfComponents:e,r=null;return t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=d(t.values,e,t.numberOfComponents),t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple)},e.setRange=function(e,n){t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents));var r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=function(e,n){for(var r=e*t.numberOfComponents,a=0;a1&&void 0!==arguments[1]?arguments[1]:g,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var a=e*r;if(1===r)n[0]=t.values[a];else if(2===r)n[0]=t.values[a],n[1]=t.values[a+1];else if(3===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2];else if(4===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2],n[3]=t.values[a+3];else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=function(){return t.numberOfComponents},e.getNumberOfValues=function(){return t.values.length},e.getNumberOfTuples=function(){return t.values.length/t.numberOfComponents},e.getDataType=function(){return t.dataType},e.newClone=function(){return b({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkDataArray".concat(e.getMTime())),t.name},e.setData=function(e,r){t.values=e,t.size=e.length,t.dataType=f(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=s(s({},t),{},{vtkClass:e.getClassName()});n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((function(e){n[e]||delete n[e]}));var r={};return Object.keys(n).sort().forEach((function(e){r[e]=n[e]})),r.mtime&&delete r.mtime,r}}var I={name:"",numberOfComponents:1,size:0,dataType:c,rangeTuple:[0,0]};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,I,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=window[t.dataType].from(t.values)):t.values=new window[t.dataType](t.size),t.values&&(t.size=t.values.length,t.dataType=f(t.values)),Object(o.h)(e,t),Object(o.i)(e,t,["name","numberOfComponents"]),C(e,t)}var b=Object(o.g)(h,"vtkDataArray"),y=s(s({newInstance:b,extend:h},p),a.c);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return Z})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return u})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return c}));var r=n(24);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],o=t[6],i=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],s=t[6],c=t[7],g=t[8],u=t[9],d=t[10],m=t[11],f=t[12],p=t[13],C=t[14],I=t[15],h=n*l-r*i,b=n*s-a*i,y=n*c-o*i,v=r*s-a*l,Z=r*c-o*l,A=a*c-o*s,G=g*p-u*f,S=g*C-d*f,B=g*I-m*f,V=u*C-d*p,R=u*I-m*p,w=d*I-m*C,k=h*w-b*R+y*V+v*B-Z*S+A*G;return k?(k=1/k,e[0]=(l*w-s*R+c*V)*k,e[1]=(a*R-r*w-o*V)*k,e[2]=(p*A-C*Z+I*v)*k,e[3]=(d*Z-u*A-m*v)*k,e[4]=(s*B-i*w-c*S)*k,e[5]=(n*w-a*B+o*S)*k,e[6]=(C*y-f*A-I*b)*k,e[7]=(g*A-d*y+m*b)*k,e[8]=(i*R-l*B+c*G)*k,e[9]=(r*B-n*R-o*G)*k,e[10]=(f*Z-p*y+I*h)*k,e[11]=(u*y-g*Z-m*h)*k,e[12]=(l*S-i*V-s*G)*k,e[13]=(n*V-r*S+a*G)*k,e[14]=(p*b-f*v-C*h)*k,e[15]=(g*v-u*b+d*h)*k,e):null}function s(e,t,n){var r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],p=t[12],C=t[13],I=t[14],h=t[15],b=n[0],y=n[1],v=n[2],Z=n[3];return e[0]=b*r+y*l+v*u+Z*p,e[1]=b*a+y*s+v*d+Z*C,e[2]=b*o+y*c+v*m+Z*I,e[3]=b*i+y*g+v*f+Z*h,b=n[4],y=n[5],v=n[6],Z=n[7],e[4]=b*r+y*l+v*u+Z*p,e[5]=b*a+y*s+v*d+Z*C,e[6]=b*o+y*c+v*m+Z*I,e[7]=b*i+y*g+v*f+Z*h,b=n[8],y=n[9],v=n[10],Z=n[11],e[8]=b*r+y*l+v*u+Z*p,e[9]=b*a+y*s+v*d+Z*C,e[10]=b*o+y*c+v*m+Z*I,e[11]=b*i+y*g+v*f+Z*h,b=n[12],y=n[13],v=n[14],Z=n[15],e[12]=b*r+y*l+v*u+Z*p,e[13]=b*a+y*s+v*d+Z*C,e[14]=b*o+y*c+v*m+Z*I,e[15]=b*i+y*g+v*f+Z*h,e}function c(e,t,n){var r,a,o,i,l,s,c,g,u,d,m,f,p=n[0],C=n[1],I=n[2];return t===e?(e[12]=t[0]*p+t[4]*C+t[8]*I+t[12],e[13]=t[1]*p+t[5]*C+t[9]*I+t[13],e[14]=t[2]*p+t[6]*C+t[10]*I+t[14],e[15]=t[3]*p+t[7]*C+t[11]*I+t[15]):(r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=s,e[6]=c,e[7]=g,e[8]=u,e[9]=d,e[10]=m,e[11]=f,e[12]=r*p+l*C+u*I+t[12],e[13]=a*p+s*C+d*I+t[13],e[14]=o*p+c*C+m*I+t[14],e[15]=i*p+g*C+f*I+t[15]),e}function g(e,t,n){var r=n[0],a=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u(e,t,n,a){var o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B,V,R,w=a[0],k=a[1],W=a[2],x=Math.hypot(w,k,W);return x0?(I=2*Math.sqrt(C+1),e[3]=.25*I,e[0]=(d-f)/I,e[1]=(m-c)/I,e[2]=(s-g)/I):l>u&&l>p?(I=2*Math.sqrt(1+l-u-p),e[3]=(d-f)/I,e[0]=.25*I,e[1]=(s+g)/I,e[2]=(m+c)/I):u>p?(I=2*Math.sqrt(1+u-l-p),e[3]=(m-c)/I,e[0]=(s+g)/I,e[1]=.25*I,e[2]=(d+f)/I):(I=2*Math.sqrt(1+p-l-u),e[3]=(s-g)/I,e[0]=(m+c)/I,e[1]=(d+f)/I,e[2]=.25*I),e}function y(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=t[3],s=a+a,c=o+o,g=i+i,u=a*s,d=a*c,m=a*g,f=o*c,p=o*g,C=i*g,I=l*s,h=l*c,b=l*g,y=r[0],v=r[1],Z=r[2];return e[0]=(1-(f+C))*y,e[1]=(d+b)*y,e[2]=(m-h)*y,e[3]=0,e[4]=(d-b)*v,e[5]=(1-(u+C))*v,e[6]=(p+I)*v,e[7]=0,e[8]=(m+h)*Z,e[9]=(p-I)*Z,e[10]=(1-(u+f))*Z,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function v(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=n+n,l=r+r,s=a+a,c=n*i,g=r*i,u=r*l,d=a*i,m=a*l,f=a*s,p=o*i,C=o*l,I=o*s;return e[0]=1-u-f,e[1]=g+I,e[2]=d-C,e[3]=0,e[4]=g-I,e[5]=1-c-f,e[6]=m+p,e[7]=0,e[8]=d+C,e[9]=m-p,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Z(e,t,n,r,a,o,i){var l=1/(t-n),s=1/(r-a),c=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(i+o)*c,e[15]=1,e}function A(e,t,n,a){var i,l,s,c,g,u,d,m,f,p,C=t[0],I=t[1],h=t[2],b=a[0],y=a[1],v=a[2],Z=n[0],A=n[1],G=n[2];return Math.abs(C-Z)0?(n[0]=2*(s*l+u*a+c*i-g*o)/d,n[1]=2*(c*l+u*o+g*a-s*i)/d,n[2]=2*(g*l+u*i+s*o-c*a)/d):(n[0]=2*(s*l+u*a+c*i-g*o),n[1]=2*(c*l+u*o+g*a-s*i),n[2]=2*(g*l+u*i+s*o-c*a)),I(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:h,getRotation:b,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(e,t,n,r,a){var o=t[0],i=t[1],l=t[2],s=t[3],c=o+o,g=i+i,u=l+l,d=o*c,m=o*g,f=o*u,p=i*g,C=i*u,I=l*u,h=s*c,b=s*g,y=s*u,v=r[0],Z=r[1],A=r[2],G=a[0],S=a[1],B=a[2],V=(1-(p+I))*v,R=(m+y)*v,w=(f-b)*v,k=(m-y)*Z,W=(1-(d+I))*Z,x=(C+h)*Z,T=(f+b)*A,J=(C-h)*A,X=(1-(d+p))*A;return e[0]=V,e[1]=R,e[2]=w,e[3]=0,e[4]=k,e[5]=W,e[6]=x,e[7]=0,e[8]=T,e[9]=J,e[10]=X,e[11]=0,e[12]=n[0]+G-(V*G+k*S+T*B),e[13]=n[1]+S-(R*G+W*S+J*B),e[14]=n[2]+B-(w*G+x*S+X*B),e[15]=1,e},fromQuat:v,frustum:function(e,t,n,r,a,o,i){var l=1/(n-t),s=1/(a-r),c=1/(o-i);return e[0]=2*o*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(i+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*c,e[15]=0,e},perspective:function(e,t,n,r,a){var o,i=1/Math.tan(t/2);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(o=1/(r-a),e[10]=(a+r)*o,e[14]=2*a*r*o):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(i+l),c=2/(a+o);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(i-l)*s*.5,e[9]=(a-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:Z,lookAt:A,targetTo:function(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=r[0],s=r[1],c=r[2],g=a-n[0],u=o-n[1],d=i-n[2],m=g*g+u*u+d*d;m>0&&(g*=m=1/Math.sqrt(m),u*=m,d*=m);var f=s*d-c*u,p=c*g-l*d,C=l*u-s*g;return(m=f*f+p*p+C*C)>0&&(f*=m=1/Math.sqrt(m),p*=m,C*=m),e[0]=f,e[1]=p,e[2]=C,e[3]=0,e[4]=u*C-d*p,e[5]=d*f-g*C,e[6]=g*p-u*f,e[7]=0,e[8]=g,e[9]=u,e[10]=d,e[11]=0,e[12]=a,e[13]=o,e[14]=i,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:G,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var n=e[0],a=e[1],o=e[2],i=e[3],l=e[4],s=e[5],c=e[6],g=e[7],u=e[8],d=e[9],m=e[10],f=e[11],p=e[12],C=e[13],I=e[14],h=e[15],b=t[0],y=t[1],v=t[2],Z=t[3],A=t[4],G=t[5],S=t[6],B=t[7],V=t[8],R=t[9],w=t[10],k=t[11],W=t[12],x=t[13],T=t[14],J=t[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-y)<=r.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(o-v)<=r.b*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-Z)<=r.b*Math.max(1,Math.abs(i),Math.abs(Z))&&Math.abs(l-A)<=r.b*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(s-G)<=r.b*Math.max(1,Math.abs(s),Math.abs(G))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(g-B)<=r.b*Math.max(1,Math.abs(g),Math.abs(B))&&Math.abs(u-V)<=r.b*Math.max(1,Math.abs(u),Math.abs(V))&&Math.abs(d-R)<=r.b*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(m-w)<=r.b*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(f-k)<=r.b*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-W)<=r.b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(C-x)<=r.b*Math.max(1,Math.abs(C),Math.abs(x))&&Math.abs(I-T)<=r.b*Math.max(1,Math.abs(I),Math.abs(T))&&Math.abs(h-J)<=r.b*Math.max(1,Math.abs(h),Math.abs(J))},mul:S,sub:B})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return p(e,null==t?n.path:t)}},n.exports),n.exports}function i(e,t){l[e]=t}const l=Object.create(null),s=Object.create(null),c={id:"",exports:{},parent:void 0,filename:null,loaded:!1,children:[],paths:[]},g=["",".js",".json"];function u(e){const t=(e=e.replace(/\\/g,"/")).split("/"),n=""===t[0];for(let e=1;e0&&".."!==t[e-1]&&"."!==t[e-1]&&(t.splice(--e,2),e--);return e=t.join("/"),n&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}function d(){if(0===arguments.length)return".";let e;for(let t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":e}function m(e){if(0===e.length)return".";let t=e.length-1;for(;t>0;){const n=e.charCodeAt(t);if((47===n||92===n)&&t!==e.length-1)break;t--}return t>0?e.substr(0,t):47===e.chartCodeAt(0)||92===e.chartCodeAt(0)?e.charAt(0):"."}function f(e,t,n){const r=function(e){let t=e[0];if("/"===t||"\\"===t)return!1;let n=e[1],r=e[2];return!(!("."!==t||n&&"/"!==n&&"\\"!==n)||!("."!==t||"."!==n||r&&"/"!==r&&"\\"!==r))&&(":"!==n||"/"!==r&&"\\"!==r)}(e);let a;for("/"===(e=u(e))[0]&&(t="/");a=r?u(t?t+"/node_modules/"+e:d("node_modules",e)):t?u(t+"/"+e):e,!a.endsWith("/..");){for(let e=0;e1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function u(e,t){for(var n=0;n0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[0],l=n[1],s=n[2];return e[0]=a*s-o*l,e[1]=o*i-r*s,e[2]=r*l-a*i,e}function v(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[3]*r+n[7]*a+n[11]*o+n[15];return i=i||1,e[0]=(n[0]*r+n[4]*a+n[8]*o+n[12])/i,e[1]=(n[1]*r+n[5]*a+n[9]*o+n[13])/i,e[2]=(n[2]*r+n[6]*a+n[10]*o+n[14])/i,e}function Z(e,t,n){var r=t[0],a=t[1],o=t[2];return e[0]=r*n[0]+a*n[3]+o*n[6],e[1]=r*n[1]+a*n[4]+o*n[7],e[2]=r*n[2]+a*n[5]+o*n[8],e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function G(e,t){var n=e[0],a=e[1],o=e[2],i=t[0],l=t[1],s=t[2];return Math.abs(n-i)<=r.b*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-s)<=r.b*Math.max(1,Math.abs(o),Math.abs(s))}var S,B=c,V=g,R=u,w=m,k=f,W=o,x=p,T=(S=a(),function(e,t,n,r,a,o){var i,l;for(t||(t=3),n||(n=0),l=r?Math.min(r*t+n,e.length):e.length,i=n;i1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=new(window[e.getDataType()])(3*t.pointsIds.length));var a=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=a[n],r[++o]=a[++n],r[++o]=a[++n]})),t.points.setData(r)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(var o=e.getNumberOfPoints()-1;o>=0;--o)t.pointsIds[o]=o}},e.getBounds=function(){var e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(var r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else Object(s.D)(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,a=0;a<3;a++)n+=(r=t.bounds[2*a+1]-t.bounds[2*a])*r;return n},e.getParametricDistance=function(e){for(var t,n=0,r=0;r<3;r++)(t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0)>n&&(n=t);return n},e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.deepCopy=function(e){e.initialize(t.points,t.pointsIds)},e.getCellDimension=function(){},e.intersectWithLine=function(e,t,n,r,a,o,i){},e.evaluatePosition=function(e,t,n,r,a,o){}}var u={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.c.obj(e,t),t.points||(t.points=c.a.newInstance()),a.c.get(e,t,["points","pointsIds"]),g(e,t)}var m={newInstance:a.c.newInstance(d,"vtkCell"),extend:d};function f(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),a=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((function(){return{ncells:0,cells:null}})),t.extend=n,t.maxId=-1},e.initialize=function(){t.array=null},e.getLink=function(e){return t.array[e]},e.getNcells=function(e){return t.array[e].ncells},e.getCells=function(e){return t.array[e].cells},e.insertNextPoint=function(e){t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=function(e,n){t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=function(e){t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=function(e,n){t.array[n].cells=t.array[n].cells.filter((function(t){return t!==e})),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=function(e,n){t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=function(e,n){t.array[e].cells.length=n},e.squeeze=function(){!function(e,t){var n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=function(){t.maxId=-1},e.deepCopy=function(e){t.array=Object(l.a)(e.array),t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=function(e){++t.array[e].ncells},e.allocateLinks=function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.c.obj(e,t),f(e,t)}var I={newInstance:a.c.newInstance(C,"vtkCellLinks"),extend:C},h=0,b=1,y=2,v=3,Z=4,A=5,G=6,S=7,B=9,V=21,R=41,w=42,k=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=function(e,n,r){t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=function(n,r){return e.insertCell(++t.maxId,n,r),t.maxId},e.setCellTypes=function(e,n,r){t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=function(e){return t.locationArray[e]},e.deleteCell=function(e){t.typeArray[e]=h},e.getNumberOfTypes=function(){return t.maxId+1},e.isType=function(t){for(var n=e.getNumberOfTypes(),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J,n),a.c.obj(e,t),a.c.get(e,t,["size","maxId","extend"]),a.c.getArray(e,t,["typeArray","locationArray"]),T(e,t)}var O=function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},i=[];i[0]=n[0]-t[0],i[1]=n[1]-t[1],i[2]=n[2]-t[2];var l=i[0]*(e[0]-t[0])+i[1]*(e[1]-t[1])+i[2]*(e[2]-t[2]),c=Object(s.q)(i,i),g=1e-5*l;return 0!==c&&(o.t=l/c),g<0&&(g=-g),-g1?r=n:(r=i,i[0]=t[0]+o.t*i[0],i[1]=t[1]+o.t*i[1],i[2]=t[2]+o.t*i[2]),a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2]),o.distance=Object(s.s)(r,e),o}function K(e,t,n,r,a,o){var i=[],l=[],c=[];a[0]=0,o[0]=0,i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],l[0]=r[0]-n[0],l[1]=r[1]-n[1],l[2]=r[2]-n[2],c[0]=n[0]-e[0],c[1]=n[1]-e[1],c[2]=n[2]-e[2];var g=[];g[0]=[Object(s.q)(i,i),-Object(s.q)(i,l)],g[1]=[g[0][1],Object(s.q)(l,l)];var u=[];if(u[0]=Object(s.q)(i,c),u[1]=-Object(s.q)(l,c),0===Object(s.C)(g,u,2)){for(var d,m=Number.MAX_VALUE,f=[e,t,n,r],p=[n,n,e,e],C=[r,r,t,t],I=[o[0],o[0],a[0],a[0]],h=[a[0],a[0],o[0],o[0]],b=0;b<4;b++)(d=P(f[b],p[b],C[b])).distance=0&&a[0]<=1&&o[0]>=0&&o[0]<=1?F.YES_INTERSECTION:F.NO_INTERSECTION}var M={distanceToLine:P,intersection:K};function L(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,a,o){var i={intersect:0,t:Number.MIN_VALUE,subId:0};o[1]=0,o[2]=0;var l=[],c=[],g=[];t.points.getPoint(0,c),t.points.getPoint(1,g);var u=[],d=[],m=K(e,n,c,g,u,d);if(i.t=u[0],o[0]=d[0],m===F.YES_INTERSECTION){for(var f=0;f<3;f++)a[f]=c[f]+o[0]*(g[f]-c[f]),l[f]=e[f]+i.t*(n[f]-e[f]);if(Object(s.s)(a,l)<=r*r)return i.intersect=1,i}else{var p;if(i.t<0)return i.t=0,p=P(e,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(i.t>1)return i.t=1,p=P(n,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[0]<0)return o[0]=0,p=P(c,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[1]>1)return o[1]=1,p=P(g,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i}return i},e.evaluatePosition=function(e,t,n,r,a,o){}}var D={};function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),m.extend(e,t,n),L(e,t)}var U=Y(Y({newInstance:a.c.newInstance(E,"vtkLine"),extend:E},M),N),z=n(30);function _(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=Object(o.a)(t.points):t.points=c.a.newInstance(),e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.getBounds=function(){return t.points.getBounds()},e.computeBounds=function(){e.getBounds()};var n=e.shallowCopy;e.shallowCopy=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=c.a.newInstance(),t.points.shallowCopy(e.getPoints())}}var j={};function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),z.a.extend(e,t,n),a.c.setGet(e,t,["points"]),_(e,t)}var q={newInstance:a.c.newInstance(Q,"vtkPointSet"),extend:Q},$=n(39);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n,r){var a=n[0]-t[0],o=n[1]-t[1],i=n[2]-t[2],l=e[0]-t[0],s=e[1]-t[1],c=e[2]-t[2];r[0]=o*c-i*s,r[1]=i*l-a*c,r[2]=a*s-o*l}function ne(e,t,n,r){te(e,t,n,r);var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==a&&(r[0]/=a,r[1]/=a,r[2]/=a)}var re={computeNormalDirection:te,computeNormal:ne};function ae(e,t){t.classHierarchy.push("vtkTriangle"),e.getCellDimension=function(){return 2},e.intersectWithLine=function(n,r,a,o,i){var l={subId:0,t:0,intersect:-1};i[2]=0;var c=a*a,g=[],u=[],d=[];t.points.getPoint(0,g),t.points.getPoint(1,u),t.points.getPoint(2,d);var m=[];if(ne(g,u,d,m),0!==m[0]||0!==m[1]||0!==m[2]){var f=$.a.intersectWithLine(n,r,g,m);if(l.t=f.t,o[0]=f.x[0],o[1]=f.x[1],o[2]=f.x[2],!f.intersection)return i[0]=0,i[1]=0,l.intersect=0,l;var p=e.evaluatePosition(o,[],i,[]);if(p.evaluation>=0)return p.dist2<=c?(l.intersect=1,l):(l.intersect=p.evaluation,l)}var C=Object(s.s)(g,u),I=Object(s.s)(u,d),h=Object(s.s)(d,g);if(t.line||(t.line=U.newInstance()),C>I&&C>h?(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,u)):I>h&&I>C?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,g)),t.line.intersectWithLine(n,r,a,o,i).intersect){for(var b=[],y=[],v=[],Z=0;Z<3;Z++)b[Z]=g[Z]-d[Z],y[Z]=u[Z]-d[Z],v[Z]=o[Z]-d[Z];return i[0]=Object(s.q)(v,b)/h,i[1]=Object(s.q)(v,y)/I,l.evaluation=1,l}return i[0]=0,i[1]=0,l.evaluation=0,l},e.evaluatePosition=function(e,n,r,a){var o,i,l,c,g,u,d,m={subId:0,dist2:0,evaluation:-1},f=[],p=[],C=[],I=[],h=[],b=[],y=[],v=0,Z=[],A=[],G=[],S=[],B=[];m.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,p),t.points.getPoint(0,C),te(f,p,C,I),$.a.generalizedProjectPoint(e,f,I,B);var V=0;for(o=0;o<3;o++)(l=I[o]<0?-I[o]:I[o])>V&&(V=l,v=o);for(i=0,o=0;o<3;o++)o!==v&&(Z[i++]=o);for(o=0;o<2;o++)h[o]=B[Z[o]]-C[Z[o]],b[o]=f[Z[o]]-C[Z[o]],y[o]=p[Z[o]]-C[Z[o]];if(0===(c=Object(s.z)(b,y)))return r[0]=0,r[1]=0,m.evaluation=-1,m;if(r[0]=Object(s.z)(h,y)/c,r[1]=Object(s.z)(b,h)/c,a[0]=1-(r[0]+r[1]),a[1]=r[0],a[2]=r[1],a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&a[2]>=0&&a[2]<=1)n&&(m.dist2=Object(s.s)(B,e),n[0]=B[0],n[1]=B[1],n[2]=B[2]),m.evaluation=1;else{var R;if(n)if(a[1]<0&&a[2]<0)for(g=Object(s.s)(e,C),u=U.distanceToLine(e,f,C,R,G),d=U.distanceToLine(e,C,p,R,S),g1?r[a]-1:0)>n&&(n=t);return n}}var oe={};function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oe,n),m.extend(e,t,n),ae(e,t)}var le,se=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),ce.forEach((function(n){t[n]=i.a.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),a=e.getNumberOfPolys(),o=e.getNumberOfStrips(),i=n+r+a+o,l=new Uint8Array(i),s=l,c=new Uint32Array(i),g=c;if(n){var u=0;t.verts.getCellSizes().forEach((function(e,t){g[t]=u,s[t]=e>1?y:b,u+=e+1})),g=g.subarray(n),s=s.subarray(n)}if(r){var d=0;t.lines.getCellSizes().forEach((function(e,t){g[t]=d,s[t]=e>2?Z:v,1===e&&ge("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),d+=e+1})),g=g.subarray(r),s=s.subarray(r)}if(a){var m=0;t.polys.getCellSizes().forEach((function(e,t){switch(g[t]=m,e){case 3:s[t]=A;break;case 4:s[t]=B;break;default:s[t]=S}e<3&&ge("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),m+=e+1})),g+=g.subarray(a),s+=s.subarray(a)}if(o){var f=0;s.fill(G,0,o),t.strips.getCellSizes().forEach((function(e,t){g[t]=f,f+=e+1}))}t.cells=O.newInstance(),t.cells.setCellTypes(i,l,c)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=I.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellPoints=function(e){var n=t.cells.getCellType(e),r=null;switch(n){case b:case y:r=t.verts;break;case v:case Z:r=t.lines;break;case A:case B:case S:r=t.polys;break;case G:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var a=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(a)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var a=t.links.getLink(n),o=t.links.getLink(r);return a.cells.filter((function(t){return t!==e&&-1!==o.cells.indexOf(t)}))},e.getCell=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.getCellPoints(t),a=n||ue[r.cellType].newInstance();return a.initialize(e.getPoints(),r.cellPointIds),a}}var me={};function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,me,n),q.extend(e,t,n),a.c.get(e,t,["cells","links"]),a.c.setGet(e,t,["verts","lines","polys","strips"]),de(e,t)}var pe={newInstance:a.c.newInstance(fe,"vtkPolyData"),extend:fe};t.a=pe},function(e,t,n){"use strict";var r=function(e){if(Array.isArray(e))return e};var a=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}},o=n(41);var i=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};t.a=function(e,t){return r(e)||a(e,t)||Object(o.a)(e,t)||i()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},a={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"},o={DefaultDataType:a.FLOAT,DataTypeByteSize:r,VtkDataTypes:a};t.c=o},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.d(t,"a",(function(){return a})),r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}};var a=r},function(e,t,n){"use strict";(function(e){var r=n(48),a=n(5);n(3);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i={vtkObject:function(){return null}};function l(t){if(null==t)return t;if(t.isA)return t;if(!t.vtkClass)return e.console&&e.console.error&&e.console.error("Invalid VTK object"),null;var n=i[t.vtkClass];if(!n)return e.console&&e.console.error&&e.console.error("No vtk class found for Object of type ".concat(t.vtkClass)),null;var s=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:a,registerType:o};t.a=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),a=n(54),o=Object(r.d)((function(t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!a.a.Readable}catch(t){n.nodestream=!1}}),"/$$rollup_base$$/node_modules/jszip/lib")}).call(this,n(35).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],g=!1,u=-1;function d(){g&&s&&(g=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!g){var e=l(d);g=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,a,i;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+".".length>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var i={codes:r}},function(e,t,n){"use strict";var r=n(11),a=n(51),o=n(52),i=(n(3),n(24)),l=n(8),s=n(12),c=n(6),g=function(e){return e},u=Object(l.h)(new Float64Array(16)),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(a.a)(this,e),this.matrix=Object(l.h)(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?i.d:g}return Object(o.a)(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(16);Object(s.p)(n,e[0],e[1],e[2]),Object(s.p)(r,t[0],t[1],t[2]),Object(s.l)(n,n),Object(s.l)(r,r);var o=Object(s.d)(n,r);return o>=1||(Object(s.c)(this.tmp,n,r),Object(s.j)(this.tmp)<1e-6&&(Object(s.c)(this.tmp,[1,0,0],e),Object(s.j)(this.tmp)<1e-6&&Object(s.c)(this.tmp,[0,1,0],e)),Object(l.f)(a,Math.acos(o),this.tmp),Object(l.l)(this.matrix,this.matrix,a)),this}},{key:"rotate",value:function(e,t){return s.p.apply(s.r,[this.tmp].concat(Object(r.a)(t))),Object(s.l)(this.tmp,this.tmp),Object(l.q)(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Object(l.a)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return Object(l.b)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Object(l.c)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.s)(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.r)(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Object(l.l)(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Object(l.h)(this.matrix),this}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Object(c.n)(u,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,a=t;a2&&void 0!==arguments[2]?arguments[2]:{},a=new XMLHttpRequest;return a.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return a.setRequestHeader(n,o)})),n.progressCallback&&a.addEventListener("progress",n.progressCallback),a}var m={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r&&r.compression?g():n.ref&&!n.ref.pending?new Promise((function(a,l){var g=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);g.onreadystatechange=function(t){1===g.readyState&&(n.ref.pending=!0,1==++u&&e.invokeBusy&&e.invokeBusy(!0)),4===g.readyState&&(n.ref.pending=!1,200===g.status||0===g.status?(n.buffer=g.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.a.ENDIANNESS!==n.ref.encode&&o.a.ENDIANNESS&&(c("Swap bytes of ".concat(n.name)),o.a.swapBytes(n.buffer,i.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&s("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--u&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):l({xhr:g,e:t}))},g.responseType="string"!==n.dataType?"arraybuffer":"text",g.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=d("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(l.b)("http")||Object(l.c)("http",(function(e){return m}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),a=Object(r.d)((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),"/$$rollup_base$$/node_modules/inherits")},function(e,t,n){"use strict";n(3);var r=n(4),a=n(7),o=n(15),i=r.c.vtkErrorMacro,l=[1,-1,1,-1,1,-1];function s(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=new window[t.dataType](t.size),e.setNumberOfComponents(r),e.modified())},e.setPoint=function(e){for(var n=e*t.numberOfComponents,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.a.extend(e,t,n),s(e,t)}var u={newInstance:r.c.newInstance(g,"vtkPoints"),extend:g};t.a=u},function(e,t,n){"use strict";var r,a,o=n(9),i=o.b.MutationObserver||o.b.WebKitMutationObserver;if(i){var l=0,s=new i(d),c=o.b.document.createTextNode("");s.observe(c,{characterData:!0}),r=function(){c.data=l=++l%2}}else if(o.b.setImmediate||void 0===o.b.MessageChannel)r="document"in o.b&&"onreadystatechange"in o.b.document.createElement("script")?function(){var e=o.b.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},o.b.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var g=new o.b.MessageChannel;g.port1.onmessage=d,r=function(){g.port2.postMessage(0)}}var u=[];function d(){var e,t;a=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e=0&&e=0},e.getArrayName=function(e){var n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=function(){return t.copyFieldFlags},e.getFlag=function(e){return t.copyFieldFlags[e]},e.passData=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((function(n){var o=e.getFlag(n.getName());if(!1!==o&&(!t.doCopyAllOff||!0===o)&&n){var l=e.getArrayByName(n.getName());if(l){if(n.getNumberOfComponents()===l.getNumberOfComponents())if(r>-1&&r-1?a:r;l.setTuple(s,n.getTuple(r))}else for(var c=0;cn.getNumberOfTuples())e.addArray(n);else{var g=n.getNumberOfComponents(),u=n.getNumberOfValues(),d=a>-1?a:r;ue?t.data.getMTime():e}),t.mtime)},e.getNumberOfComponents=function(){return t.arrays.reduce((function(e,t){return e+t.data.getNumberOfComponents()}),0)},e.getNumberOfTuples=function(){return t.arrays.length>0?t.arrays[0].getNumberOfTuples():0},e.getState=function(){var e=n();return e.arrays=t.arrays.map((function(e){return{data:e.data.getState()}})),e}}var s={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),a.c.obj(e,t),l(e,t)}var g={newInstance:a.c.newInstance(c,"vtkFieldData"),extend:c},u=n(37);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=u.c.AttributeTypes,f=u.c.AttributeCopyOperations,p=a.c.vtkWarningMacro;function C(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return m[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()}));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes"),e.checkNumberOfComponents=function(e){return!0},e.setAttribute=function(n,a){var o=r(a);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return p("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return p("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var i=t["active".concat(o)];if(i>=0&&i=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),g.extend(e,t,n),a.c.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),C(e,t)}var b=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Z.forEach((function(n){t[n]=b.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var G={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,G,n),a.c.obj(e,t),a.c.setGet(e,t,Z),A(e,t)}var B=function(e){for(var t=1;t0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,i=[],l=t;l>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var d=function(e){var t,n,r=g(e),a=r[0],l=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,u=l>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===l&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[c++]=255&t),1===l&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},m=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,l=0,s=n-r;ls?s:l+i));return 1===r?(t=e[n-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")},f=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},p=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p};n.d(t,"a",(function(){return C}));var C=Object(r.d)((function(e,t){const n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;const r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|C(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return o.from(r,t,n);const i=function(e){if(o.isBuffer(e)){const t=0|u(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),a(e<0?0:0|u(e))}function c(e){const t=e.length<0?0:0|u(e.length),n=a(t);for(let r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function C(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return r?-1:U(e).length;t=(""+t).toLowerCase(),a=!0}}function I(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){let o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){let r=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;ra&&(r=a):r=a;const o=t.length;let i;for(r>o/2&&(r=o/2),i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function V(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a239?4:t>223?3:t>191?2:1;if(a+i<=n){let n,r,l,s;switch(i){case 1:t<128&&(o=t);break;case 2:n=e[a+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[a+1],r=e[a+2],l=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&l)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},o.byteLength=C,o.prototype._isBuffer=!0,o.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,n,r,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0);const s=Math.min(i,l),c=this.slice(r,a),g=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return Z(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return G(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;ar)&&(n=r);let a="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function X(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function O(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function N(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,4),p(e,t,n,r,23,4),n+4}function Y(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,8),p(e,t,n,r,52,8),n+8}o.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o=a&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);let r=t,a=1,o=this[e+--r];for(;r>0&&(a*=256);)o+=this[e+--r]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||T(e,4,this.length),f(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),f(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=0,o=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=n-1,o=1,i=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/o>>0)-i&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return Y(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Y(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||D(t,e.length-(n+1))}(r,a,o)}function L(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function D(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=K(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=K(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const E=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;const r=e.length;let a=null;const o=[];for(let i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function $(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}),"/$$rollup_base$$/node_modules/buffer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,a="object"==typeof Reflect?Reflect:null,o=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}var s=l;l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var c=10;function g(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var a,o,i,l;if(g(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=u(e))>0&&i.length>a&&!i.warned){i.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=i.length,l=s,console&&console.warn&&console.warn(l)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=m.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,g=I(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},l.prototype.listenerCount=C,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},s.once=function(e,t){return new Promise((function(n,r){function a(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,a),r(n)},e.once("error",o)),e.once(t,a)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22).a.codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}var o=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function I(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:h(e,t,n,r,a);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):h(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,n,r,a){var o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var g=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){for(var u=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+u<=n)switch(u){case 1:c<128&&(g=c);break;case 2:128==(192&(o=e[a+1]))&&(s=(31&c)<<6|63&o)>127&&(g=s);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(s=(15&c)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:o=e[a+1],i=e[a+2],l=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&l)&&(s=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&l)>65535&&s<1114112&&(g=s)}null===g?(g=65533,u=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),a+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,a){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),l=Math.min(o,i),c=this.slice(r,a),g=e.slice(t,n),u=0;ua)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return Z(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,a,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function J(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function X(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||X(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||X(e,0,n,8),a.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},s.prototype.readUInt8=function(e,t){return t||W(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||W(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||W(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||W(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||W(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):J(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=0,i=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=n-1,i=1,l=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/i>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):J(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(7),i=n(15);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};o.a.extend(e,t,d(n)),u(e,t)}var f=s({newInstance:a.c.newInstance(m,"vtkCellArray"),extend:m},g);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},a={DEFAULT:0,SINGLE:1,DOUBLE:2},o={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:r,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:a,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};t.c=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));n(3);var r={UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},a={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7},o={FieldDataTypes:r,FieldAssociations:a};t.c=o},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(6)),o=n(4);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){var r=n[0]*(e[0]-t[0])+n[1]*(e[1]-t[1])+n[2]*(e[2]-t[2]);return Math.abs(r)}function s(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o);r[0]=e[0]-i*n[0],r[1]=e[1]-i*n[1],r[2]=e[2]-i*n[2]}function c(e,t,n){var r=Object(a.q)(e,t),o=Object(a.q)(t,t);return 0===o&&(o=1),n[0]=e[0]-r*t[0]/o,n[1]=e[1]-r*t[1]/o,n[2]=e[2]-r*t[2]/o,n}function g(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o),l=Object(a.q)(n,n);0!==l?(r[0]=e[0]-i*n[0]/l,r[1]=e[1]-i*n[1]/l,r[2]=e[2]-i*n[2]/l):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function u(e,t,n,r){var o={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],l=[];Object(a.t)(t,e,i),Object(a.t)(n,e,l);var s=Object(a.q)(r,l),c=Object(a.q)(r,i);return(c<0?-c:c)<=(s<0?1e-6*-s:1e-6*s)||(o.t=s/c,o.x[0]=e[0]+o.t*i[0],o.x[1]=e[1]+o.t*i[1],o.x[2]=e[2]+o.t*i[2],o.intersection=!0,o.betweenPoints=o.t>=0&&o.t<=1),o}function d(e,t,n,r){var o={intersection:!1,l0:[],l1:[],error:null},i=[];Object(a.w)(t,r,i);var l,s=i.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<1e-6){var c=[];return Object(a.t)(e,n,c),0===Object(a.q)(t,c)?o.error="coincide":o.error="disjoint",o}l=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var g=[],u=-Object(a.q)(t,e),d=-Object(a.q)(r,n);switch(l){case"x":g[0]=0,g[1]=(d*t[2]-u*r[2])/i[0],g[2]=(u*r[1]-d*t[1])/i[0];break;case"y":g[0]=(u*r[2]-d*t[2])/i[1],g[1]=0,g[2]=(d*t[0]-u*r[0])/i[1];break;case"z":g[0]=(d*t[1]-u*r[1])/i[2],g[1]=(u*r[0]-d*t[0])/i[2],g[2]=0}return o.l0=g,Object(a.x)(g,i,o.l1),o.intersection=!0,o}var m={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:s,projectVector:c,generalizedProjectPoint:g,intersectWithLine:u,intersectWithPlane:d,DISJOINT:"disjoint",COINCIDE:"coincide"};function f(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return l(e,t.origin,t.normal)},e.projectPoint=function(e,n){s(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return c(e,t.normal,n)},e.push=function(e){if(0!==e)for(var n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=function(e,n){g(e,t.origin,t.normal,n)},e.evaluateFunction=function(e,n,r){return Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2])},e.evaluateGradient=function(e){return[t.normal[0],t.normal[1],t.normal[2]]},e.intersectWithLine=function(e,n){return u(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return d(e,n,t.origin,t.normal)}}var p={normal:[0,0,1],origin:[0,0,0]};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.c.obj(e,t),o.c.setGetArray(e,t,["normal","origin"],3),f(e,t)}var I=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,a=r(e),o=t.exec(a);if(!o)return{text:a};var i=o.index+o[0].length,l=a.substring(0,i),s=null,c=n?n.exec(a):null;if(c){var g=a.substr(c.index);s={text:l+g,binaryBuffer:e.slice(i,c.index)}}else s={text:l,binaryBuffer:e.slice(i)};return s}};t.a=a},function(e,t,n){"use strict";var r=n(42);t.a=function(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===b.prototype||(t=function(e){return b.from(e)}(t)),r)i.endEmitted?k(e,new w):X(e,i,t,!0);else if(i.ended)k(e,new V);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):Y(e,i)):X(e,i,t,!1)}else r||(i.reading=!1,Y(e,i));return!i.ended&&(i.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(t){var n=t._readableState;I("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(I("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(H,t))}function H(e){var t=e._readableState;I("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function Y(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(F,t,n))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){I("readable nexttick read 0"),e.read(0)}function M(e,t){I("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function E(t){var n=t._readableState;I("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(U,n,t))}function U(e,t){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):N(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&E(this),null;var r,a=t.needReadable;return I("need readable",a),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){k(this,new R("_read()"))},T.prototype.pipe=function(t,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,I("pipe count=%d opts=%j",a.pipesCount,n);var o=n&&!1===n.end||t===e.stdout||t===e.stderr?m:i;function i(){I("onend"),t.end()}a.endEmitted?e.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){I("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,I("cleanup"),t.removeListener("close",u),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),s=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(e,"data")&&(t.flowing=!0,L(e))}}(r);t.on("drain",l);var s=!1;function c(e){I("ondata");var n=t.write(e);I("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==z(a.pipes,t))&&!s&&(I("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function g(e){I("onerror",e),m(),t.removeListener("error",g),0===h(t,"error")&&k(t,e)}function u(){t.removeListener("finish",d),m()}function d(){I("onfinish"),t.removeListener("close",u),m()}function m(){I("unpipe"),r.unpipe(t)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",u),t.once("finish",d),t.emit("pipe",r),a.flowing||(I("pipe resume"),r.resume()),t},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==a.flowing&&this.resume()):"readable"===t&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,I("on readable",a.length,a.reading),a.length?N(this):a.reading||e.nextTick(K,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,n){var r=o.a.prototype.removeListener.call(this,t,n);return"readable"===t&&e.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var n=o.a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||e.nextTick(P,this),n},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!t.readableListening,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(M,t,n))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(I("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){I("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new V(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),W.prototype._write=function(e,t,n){n(new v("_write()"))},W.prototype._writev=null,W.prototype.end=function(t,n,r){var a=this._writableState;return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),a.corked&&(a.corked=1,this.uncork()),a.ending||function(t,n,r){n.ending=!0,N(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,a,r),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),W.prototype.destroy=s.a.destroy,W.prototype._undestroy=s.a.undestroy,W.prototype._destroy=function(e,t){t(e)}}).call(this,n(21))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),a=n(19),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){for(var t,n,a,i,l,s,c,g=[],u=0,d=e.length,m=d,f="string"!==r.a.getTypeOf(e);u>2,l=(3&t)<<4|n>>4,s=m>1?(15&n)<<2|a>>6:64,c=m>2?63&a:64,g.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(c));return g.join("")},decode:function(e){var t,n,r,i,l,s,c=0,g=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,m=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&m--,e.charAt(e.length-2)===o.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.a.uint8array?new Uint8Array(0|m):new Array(0|m);c>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(c++)))>>2,r=(3&l)<<6|(s=o.indexOf(e.charAt(c++))),d[g++]=t,64!==l&&(d[g++]=n),64!==s&&(d[g++]=r);return d}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(67),o=n(16),i=n(49),l=n(19),s=n(28),c=n(68),g=null;if(l.a.nodestream)try{g=c.a}catch(e){}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,r.a.checkSupport(i),this._worker=e.pipe(new a.a(i)),e.lock()}catch(e){this._worker=new o.a("error"),this._worker.error(e)}}u.prototype={accumulate:function(t){return n=this,a=t,new s.a.Promise((function(t,o){var l=[],s=n._internalType,c=n._outputType,g=n._mimeType;n.on("data",(function(e,t){l.push(e),a&&a(t)})).on("error",(function(e){l=[],o(e)})).on("end",(function(){try{var n=function(e,t,n){switch(e){case"blob":return r.a.newBlob(r.a.transformTo("arraybuffer",t),n);case"base64":return i.a.encode(t);default:return r.a.transformTo(e,t)}}(c,function(t,n){var r,a=0,o=null,i=0;for(r=0;r>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new r(e),o=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.alea=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),o=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor128=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),i=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorwow=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),l=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,a=t.i;return e=r[a],n=(e^=e>>>7)^e<<24,n^=(e=r[a+1&7])^e>>>10,n^=(e=r[a+3&7])^e>>>3,n^=(e=r[a+4&7])^e<<7,e=r[a+7&7],n^=(e^=e<<13)^e<<9,r[a]=n,t.i=a+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.x&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorshift7=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),s=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,a=t.X,o=t.i;return t.w=r=r+1640531527|0,n=a[o+34&127],e=a[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=a[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,a,o,i,l=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),a=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(i=i+1640531527|0,a=0==(n=l[127&o]^=r+i)?a+1:0);for(a>=128&&(l[127&(t&&t.length||0)]=-1),a=127,o=512;o>0;--o)r=l[a+34&127],n=l[a=a+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,l[a]=r^n;e.w=i,e.X=l,e.i=a}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.X&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor4096=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),c=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,a=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^a,a=a-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^a,t.a=a-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.tychei=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),g=Object.freeze({__proto__:null,default:{}}),u=Object(r.e)(g),d=Object(r.d)((function(e){!function(t,n,r){var a,o=256,i=r.pow(o,6),l=r.pow(2,52),s=2*l,c=255;function g(e,c,g){var u=[],C=f(function e(t,n){var r,a=[],o=typeof t;if(n&&"object"==o)for(r in t)try{a.push(e(t[r],n-1))}catch(t){}return a.length?a:"string"==o?t:t+"\0"}((c=1==c?{entropy:!0}:c||{}).entropy?[e,p(n)]:null==e?function(){try{var e;return a&&(e=a.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),p(e)}catch(e){var r=t.navigator,i=r&&r.plugins;return[+new Date,t,i,t.screen,p(n)]}}():e,3),u),I=new d(u),h=function(){for(var e=I.g(6),t=i,n=0;e=s;)e/=2,t/=2,n>>>=1;return(e+n)/t};return h.int32=function(){return 0|I.g(4)},h.quick=function(){return I.g(4)/4294967296},h.double=h,f(p(I.S),n),(c.pass||g||function(e,t,n,a){return a&&(a.S&&m(a,I),e.state=function(){return m(I,{})}),n?(r.random=e,t):e})(h,C,"global"in c?c.global:this==r,c.state)}function d(e){var t,n=e.length,r=this,a=0,i=r.i=r.j=0,l=r.S=[];for(n||(e=[n++]);a0,(function(e){r||(r=e),e&&o.forEach(k),i||(o.forEach(k),a(r))}))}));return t.reduce(W)},X.Stream=X,X.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",i),n.on("close",l));var o=!1;function i(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===J.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e},n.d(t,"a",(function(){return O}));var O=T},function(e,t,n){"use strict";var r=Object.freeze({__proto__:null,default:{}}),a=n(9);n.d(t,"a",(function(){return o}));var o=Object(a.e)(r)},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=56},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(31),a=n(55);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=r.a.Buffer,s=a.a.inspect,c=s&&s.custom||"inspect",g=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,a=l.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,n=a,r=i,l.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return a},t.consume=function(e,t){var n;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++r}return this.length-=r,t},t[c]=function(e,t){return s(this,function(e){for(var t=1;t0?i-4:i;for(n=0;n>16&255,s[g++]=t>>8&255,s[g++]=255&t;2===l&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,s[g++]=255&t);1===l&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,s[g++]=t>>8&255,s[g++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,l=n-a;il?l:i+16383));1===a?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],a=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=i.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var a,o,i=[],l=t;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},t.write=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,n(65).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,l,s=1,c={},g=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=a.compression,o=a.progressCallback;return t.binary?a.dataAccessHelper.fetchBinary(e,{compression:r,progressCallback:o}):a.dataAccessHelper.fetchText(n,e,{compression:r,progressCallback:o})}a.classHierarchy.push("vtkSTLReader"),a.dataAccessHelper||(a.dataAccessHelper=r.a.get("http")),n.setUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};a.url=e;var r=e.split("/");return r.pop(),a.baseURL=r.join("/"),a.compression=t.compression,n.loadData({progressCallback:t.progressCallback,binary:!!t.binary})},n.loadData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(a.url,e);return t.then(n.parse),t},n.parse=function(e){"string"==typeof e?n.parseAsText(e):n.parseAsArrayBuffer(e)},n.parseAsArrayBuffer=function(r){if(r&&r!==a.parseData)if(n.modified(),a.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var c=r.slice(0,80),g=function(e){for(var t=e.split(" ").filter((function(e){return e.indexOf("=")>-1})),n={},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.c.obj(e,t),a.c.get(e,t,["url","baseURL"]),a.c.setGet(e,t,["dataAccessHelper"]),a.c.algo(e,t,0,1),u(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkSTLReader")}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9),a=n(31),o=Object(r.d)((function(e,t){var n=a.a.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a.a:(r(a.a,t),t.Buffer=o),r(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof r?a.fill(t,r):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.a.SlowBuffer(e)}}),"/$$rollup_base$$/node_modules/safe-buffer");n.d(t,"a",(function(){return h}));var i=o.Buffer,l=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=c;function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===l||!l(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=C,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function g(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C(e){return e.toString(this.encoding)}function I(e){return e&&e.length?this.write(e):""}c.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(e.lastNeed=a-1),a):--r=0?(a>0&&(e.lastNeed=a-2),a):--r=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var h={StringDecoder:s}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return OZ})),n.d(r,"Algorithm",(function(){return kZ})),n.d(r,"Calculator",(function(){return WZ})),n.d(r,"CellData",(function(){return xZ})),n.d(r,"Contexts",(function(){return XZ})),n.d(r,"DataArray",(function(){return RZ})),n.d(r,"FieldData",(function(){return wZ})),n.d(r,"GeometryRepresentation",(function(){return SZ})),n.d(r,"GlyphRepresentation",(function(){return BZ})),n.d(r,"ImageData",(function(){return VZ})),n.d(r,"PointCloudRepresentation",(function(){return TZ})),n.d(r,"PointData",(function(){return yZ})),n.d(r,"PolyData",(function(){return vZ})),n.d(r,"Reader",(function(){return ZZ})),n.d(r,"ShareDataSet",(function(){return AZ})),n.d(r,"SliceRepresentation",(function(){return hZ})),n.d(r,"View",(function(){return GZ})),n.d(r,"VolumeController",(function(){return bZ})),n.d(r,"VolumeDataRepresentation",(function(){return JZ})),n.d(r,"VolumeRepresentation",(function(){return IZ}));var a=n(14);n(3);function o(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);o(g);const u=new Array(60);o(u);const d=new Array(512);o(d);const m=new Array(256);o(m);const f=new Array(29);o(f);const p=new Array(30);function C(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let I,h,b;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}o(p);const v=e=>e<256?d[e]:d[256+(e>>>7)],Z=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},A=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{A(e,n[2*t],n[2*t+1])},S=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},B=(e,t,n)=>{const r=new Array(16);let a,o,i=0;for(a=1;a<=15;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=S(r[t]++,t))}},V=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},R=e=>{e.bi_valid>8?Z(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},w=(e,t,n,r)=>{const a=2*t,o=2*n;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],a=e.pending_buf[e.l_buf+c],c++,0===r?G(e,a,t):(o=m[a],G(e,o+256+1,t),s=i[o],0!==s&&(a-=f[o],A(e,a,s)),r--,o=v(r),G(e,o,n),s=l[o],0!==s&&(r-=p[o],A(e,r,s)))}while(c{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)k(e,n,i);s=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,n[2*s]=n[2*i]+n[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,n[2*i+1]=n[2*l+1]=s,e.heap[1]=s++,k(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,g,u,d,m,f,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)g=e.heap[c],d=n[2*n[2*g+1]+1]+1,d>s&&(d=s,p++),n[2*g+1]=d,g>r||(e.bl_count[d]++,m=0,g>=l&&(m=i[g-l]),f=n[2*g],e.opt_len+=f*(d+m),o&&(e.static_len+=f*(a[2*g+1]+m)));if(0!==p){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;0!==d;d--)for(g=e.bl_count[d];0!==g;)u=e.heap[--c],u>r||(n[2*u+1]!==d&&(e.opt_len+=(d-n[2*u+1])*n[2*u],n[2*u+1]=d),g--)}})(e,t),B(n,c,e.bl_count)},T=(e,t,n)=>{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),r=0;r<=n;r++)if(a=i,i=t[2*(r+1)+1],!(++l{A(e,0+(r?1:0),3),((e,t,n,r)=>{R(e),Z(e,n),Z(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var N={_tr_init:e=>{X||((()=>{let e,t,n,r,a;const o=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<>=7;r<30;r++)for(p[r]=a<<7,e=0;e<1<{let a,o,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),x(e,e.l_desc),x(e,e.d_desc),i=(e=>{let t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?O(e,t,n,r):4===e.strategy||o===a?(A(e,2+(r?1:0),3),W(e,g,u)):(A(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),a=0;a(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{A(e,2,3),G(e,256,g),(e=>{16===e.bi_valid?(Z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},H=(e,t,n,r)=>{let a=65535&e|0,o=e>>>16&65535|0,i=0;for(;0!==n;){i=n>2e3?2e3:n,n-=i;do{a=a+t[r++]|0,o=o+a|0}while(--i);a%=65521,o%=65521}return a|o<<16|0};const Y=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var F=(e,t,n,r)=>{const a=Y,o=r+n;e^=-1;for(let n=r;n>>8^a[255&(e^t[n])];return-1^e},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:M,_tr_stored_block:L,_tr_flush_block:D,_tr_tally:E,_tr_align:U}=N,{Z_NO_FLUSH:z,Z_PARTIAL_FLUSH:_,Z_FULL_FLUSH:j,Z_FINISH:Q,Z_BLOCK:q,Z_OK:$,Z_STREAM_END:ee,Z_STREAM_ERROR:te,Z_DATA_ERROR:ne,Z_BUF_ERROR:re,Z_DEFAULT_COMPRESSION:ae,Z_FILTERED:oe,Z_HUFFMAN_ONLY:ie,Z_RLE:le,Z_FIXED:se,Z_DEFAULT_STRATEGY:ce,Z_UNKNOWN:ge,Z_DEFLATED:ue}=K,de=(e,t)=>(e.msg=P[t],t),me=e=>(e<<1)-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let pe=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ie=(e,t)=>{D(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ce(e.strm)},he=(e,t)=>{e.pending_buf[e.pending++]=t},be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ye=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=H(e.adler,t,a,n):2===e.state.wrap&&(e.adler=F(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},ve=(e,t)=>{let n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258;let m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(n=t,c[n+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead},Ze=e=>{const t=e.w_size;let n,r,a,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{a=e.head[--n],e.head[n]=a>=t?a-t:0}while(--r);r=t,n=r;do{a=e.prev[--n],e.prev[n]=a>=t?a-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=ye(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pe(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Ae=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=ve(e,n)),e.match_length>=3)if(r=E(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=pe(e,e.ins_h,e.window[e.strstart+1]);else r=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2},Ge=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=E(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ie(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=E(e,0,e.window[e.strstart-1]),r&&Ie(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=E(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2};function Se(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Be=[new Se(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ze(e),0===e.lookahead&&t===z)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ie(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Ie(e,!1),e.strm.avail_out),1)}),new Se(4,4,8,4,Ae),new Se(4,5,16,8,Ae),new Se(4,6,32,32,Ae),new Se(4,4,16,16,Ge),new Se(8,16,32,32,Ge),new Se(8,16,128,128,Ge),new Se(8,32,128,256,Ge),new Se(32,128,258,1024,Ge),new Se(32,258,258,4096,Ge)];function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Re=e=>{if(!e||!e.state)return de(e,te);e.total_in=e.total_out=0,e.data_type=ge;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=z,M(t),$},we=e=>{const t=Re(e);var n;return t===$&&((n=e.state).window_size=2*n.w_size,fe(n.head),n.max_lazy_match=Be[n.level].max_lazy,n.good_match=Be[n.level].good_length,n.nice_match=Be[n.level].nice_length,n.max_chain_length=Be[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ke=(e,t,n,r,a,o)=>{if(!e)return te;let i=1;if(t===ae&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>se)return de(e,te);8===r&&(r=9);const l=new Ve;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e&&e.state?2!==e.state.wrap?te:(e.state.gzhead=t,$):te,Te=(e,t)=>{let n,r;if(!e||!e.state||t>q||t<0)return e?de(e,te):te;const a=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===a.status&&t!==Q)return de(e,0===e.avail_out?re:te);a.strm=e;const o=a.last_flush;if(a.last_flush=t,42===a.status)if(2===a.wrap)e.adler=0,he(a,31),he(a,139),he(a,8),a.gzhead?(he(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),he(a,255&a.gzhead.time),he(a,a.gzhead.time>>8&255),he(a,a.gzhead.time>>16&255),he(a,a.gzhead.time>>24&255),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(he(a,255&a.gzhead.extra.length),he(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=F(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(he(a,0),he(a,0),he(a,0),he(a,0),he(a,0),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,3),a.status=113);else{let t=ue+(a.w_bits-8<<4)<<8,n=-1;n=a.strategy>=ie||a.level<2?0:a.level<6?1:6===a.level?2:3,t|=n<<6,0!==a.strstart&&(t|=32),t+=31-t%31,a.status=113,be(a,t),0!==a.strstart&&(be(a,e.adler>>>16),be(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending!==a.pending_buf_size));)he(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Ce(e),a.pending+2<=a.pending_buf_size&&(he(a,255&e.adler),he(a,e.adler>>8&255),e.adler=0,a.status=113)):a.status=113),0!==a.pending){if(Ce(e),0===e.avail_out)return a.last_flush=-1,$}else if(0===e.avail_in&&me(t)<=me(o)&&t!==Q)return de(e,re);if(666===a.status&&0!==e.avail_in)return de(e,re);if(0!==e.avail_in||0!==a.lookahead||t!==z&&666!==a.status){let n=a.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ze(e),0===e.lookahead)){if(t===z)return 1;break}if(e.match_length=0,n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):a.strategy===le?((e,t)=>{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=258){if(Ze(e),e.lookahead<=258&&t===z)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=E(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):Be[a.level].func(a,t);if(3!==n&&4!==n||(a.status=666),1===n||3===n)return 0===e.avail_out&&(a.last_flush=-1),$;if(2===n&&(t===_?U(a):t!==q&&(L(a,0,0,!1),t===j&&(fe(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Ce(e),0===e.avail_out))return a.last_flush=-1,$}return t!==Q?$:a.wrap<=0?ee:(2===a.wrap?(he(a,255&e.adler),he(a,e.adler>>8&255),he(a,e.adler>>16&255),he(a,e.adler>>24&255),he(a,255&e.total_in),he(a,e.total_in>>8&255),he(a,e.total_in>>16&255),he(a,e.total_in>>24&255)):(be(a,e.adler>>>16),be(a,65535&e.adler)),Ce(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$:ee)},Je=e=>{if(!e||!e.state)return te;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?de(e,te):(e.state=null,113===t?de(e,ne):$)},Xe=(e,t)=>{let n=t.length;if(!e||!e.state)return te;const r=e.state,a=r.wrap;if(2===a||1===a&&42!==r.status||r.lookahead)return te;if(1===a&&(e.adler=H(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(fe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ze(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=pe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ze(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=i,e.input=l,e.avail_in=o,r.wrap=a,$};const Oe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ne=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Oe(n,t)&&(e[t]=n[t])}}return e},He=e=>{let t=0;for(let n=0,r=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Pe=e=>{let t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Ke=(e,t)=>{let n,r;const a=t||e.length,o=new Array(2*a);for(r=0,n=0;n4)o[r++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fe[e[n]]>t?n:t},Le=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const De=Object.prototype.toString,{Z_NO_FLUSH:Ee,Z_SYNC_FLUSH:Ue,Z_FULL_FLUSH:ze,Z_FINISH:_e,Z_OK:je,Z_STREAM_END:Qe,Z_DEFAULT_COMPRESSION:qe,Z_DEFAULT_STRATEGY:$e,Z_DEFLATED:et}=K;function tt(e){this.options=Ne({level:qe,method:et,chunkSize:16384,windowBits:15,memLevel:8,strategy:$e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=We(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==je)throw new Error(P[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Pe(t.dictionary):"[object ArrayBuffer]"===De.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Xe(this.strm,e),n!==je)throw new Error(P[n]);this._dict_set=!0}}function nt(e,t){const n=new tt(t);if(n.push(e,!0),n.err)throw n.msg||P[n.err];return n.result}tt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?_e:Ee,"string"==typeof e?n.input=Pe(e):"[object ArrayBuffer]"===De.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Ue||o===ze)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Te(n,o),a===Qe)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Je(this.strm),this.onEnd(a),this.ended=!0,a===je;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},tt.prototype.onData=function(e){this.chunks.push(e)},tt.prototype.onEnd=function(e){e===je&&(this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:tt,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:K},at=function(e,t){let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S;const B=e.state;n=e.next_in,G=e.input,r=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),i=a+(e.avail_out-257),l=B.dmax,s=B.wsize,c=B.whave,g=B.wnext,u=B.window,d=B.hold,m=B.bits,f=B.lencode,p=B.distcode,C=(1<>>24,d>>>=b,m-=b,b=h>>>16&255,0===b)S[a++]=65535&h;else{if(!(16&b)){if(0==(64&b)){h=f[(65535&h)+(d&(1<>>=b,m-=b),m<15&&(d+=G[n++]<>>24,d>>>=b,m-=b,b=h>>>16&255,!(16&b)){if(0==(64&b)){h=p[(65535&h)+(d&(1<l){e.msg="invalid distance too far back",B.mode=30;break e}if(d>>>=b,m-=b,b=a-o,v>b){if(b=v-b,b>c&&B.sane){e.msg="invalid distance too far back",B.mode=30;break e}if(Z=0,A=u,0===g){if(Z+=s-b,b2;)S[a++]=A[Z++],S[a++]=A[Z++],S[a++]=A[Z++],y-=3;y&&(S[a++]=A[Z++],y>1&&(S[a++]=A[Z++]))}else{Z=a-v;do{S[a++]=S[Z++],S[a++]=S[Z++],S[a++]=S[Z++],y-=3}while(y>2);y&&(S[a++]=S[Z++],y>1&&(S[a++]=S[Z++]))}break}}break}}while(n>3,n-=y,m-=y<<3,d&=(1<{const s=l.bits;let c,g,u,d,m,f,p=0,C=0,I=0,h=0,b=0,y=0,v=0,Z=0,A=0,G=0,S=null,B=0;const V=new Uint16Array(16),R=new Uint16Array(16);let w,k,W,x=null,T=0;for(p=0;p<=15;p++)V[p]=0;for(C=0;C=1&&0===V[h];h--);if(b>h&&(b=h),0===h)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==h))return-1;for(R[1]=0,p=1;p<15;p++)R[p+1]=R[p]+V[p];for(C=0;C852||2===e&&A>592)return 1;for(;;){w=p-v,i[C]f?(k=x[T+i[C]],W=S[B+i[C]]):(k=96,W=0),c=1<>v)+g]=w<<24|k<<16|W|0}while(0!==g);for(c=1<>=1;if(0!==c?(G&=c-1,G+=c):G=0,C++,0==--V[p]){if(p===h)break;p=t[n+i[C]]}if(p>b&&(G&d)!==u){for(0===v&&(v=b),m+=I,y=p-v,Z=1<852||2===e&&A>592)return 1;u=G&d,a[u]=b<<24|y<<16|m-o|0}}return 0!==G&&(a[m+G]=p-v<<24|64<<16|0),l.bits=b,0};const{Z_FINISH:gt,Z_BLOCK:ut,Z_TREES:dt,Z_OK:mt,Z_STREAM_END:ft,Z_NEED_DICT:pt,Z_STREAM_ERROR:Ct,Z_DATA_ERROR:It,Z_MEM_ERROR:ht,Z_BUF_ERROR:bt,Z_DEFLATED:yt}=K,vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Zt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const At=e=>{if(!e||!e.state)return Ct;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,mt},Gt=e=>{if(!e||!e.state)return Ct;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,At(e)},St=(e,t)=>{let n;if(!e||!e.state)return Ct;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ct:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gt(e))},Bt=(e,t)=>{if(!e)return Ct;const n=new Zt;e.state=n,n.window=null;const r=St(e,t);return r!==mt&&(e.state=null),r};let Vt,Rt,wt=!0;const kt=e=>{if(wt){Vt=new Int32Array(512),Rt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ct(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ct(2,e.lens,0,32,Rt,0,e.work,{bits:5}),wt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=Rt,e.distbits=5},Wt=(e,t,n,r)=>{let a;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),(r-=a)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G=0;const S=new Uint8Array(4);let B,V;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ct;n=e.state,12===n.mode&&(n.mode=13),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,u=l,d=s,A=mt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&c)!==yt){e.msg="unknown compression method",n.mode=30;break}if(c>>>=4,g-=4,Z=8+(15&c),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=F(n.check,S,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m=n.length,m>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+m),Z)),512&n.flags&&(n.check=F(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1,g-=1,3&c){case 0:n.mode=14;break;case 1:if(kt(n),n.mode=20,t===dt){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,t===dt)break e;case 15:n.mode=16;case 16:if(m=n.length,m){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;a.set(r.subarray(o,o+m),i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},A=ct(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(V=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(V=C+3;g>>=C,g-=C,Z=0,m=3+(7&c),c>>>=3,g-=3}else{for(V=C+7;g>>=C,g-=C,Z=0,m=11+(127&c),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},A=ct(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},A=ct(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===dt)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,at(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;G=n.lencode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=n.distcode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<{if(!e||!e.state)return Ct;let t=e.state;return t.window&&(t.window=null),e.state=null,mt},Ot=(e,t)=>{if(!e||!e.state)return Ct;const n=e.state;return 0==(2&n.wrap)?Ct:(n.head=t,t.done=!1,mt)},Nt=(e,t)=>{const n=t.length;let r,a,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?Ct:11===r.mode&&(a=1,a=H(a,t,n,0),a!==r.check)?It:(o=Wt(e,t,n,n),o?(r.mode=31,ht):(r.havedict=1,mt))):Ct},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Yt=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_FINISH:Pt,Z_OK:Kt,Z_STREAM_END:Mt,Z_NEED_DICT:Lt,Z_STREAM_ERROR:Dt,Z_DATA_ERROR:Et,Z_MEM_ERROR:Ut}=K;function zt(e){this.options=Ne({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=Tt(this.strm,t.windowBits);if(n!==Kt)throw new Error(P[n]);if(this.header=new Ht,Ot(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Pe(t.dictionary):"[object ArrayBuffer]"===Yt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Nt(this.strm,t.dictionary),n!==Kt)))throw new Error(P[n])}function _t(e,t){const n=new zt(t);if(n.push(e),n.err)throw n.msg||P[n.err];return n.result}zt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Pt:Ft,"[object ArrayBuffer]"===Yt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Jt(n,i),o===Lt&&a&&(o=Nt(n,a),o===Kt?o=Jt(n,i):o===Et&&(o=Lt));n.avail_in>0&&o===Mt&&n.state.wrap>0&&0!==e[n.next_in];)xt(n),o=Jt(n,i);switch(o){case Dt:case Et:case Lt:case Ut:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(0===n.avail_out||o===Mt))if("string"===this.options.to){let e=Me(n.output,n.next_out),t=n.next_out-e,a=Ke(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Kt||0!==l){if(o===Mt)return o=Xt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},zt.prototype.onData=function(e){this.chunks.push(e)},zt.prototype.onEnd=function(e){e===Kt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jt={Inflate:zt,inflate:_t,inflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},ungzip:_t,constants:K};const{Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en}=rt,{Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an}=jt;var on={Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en,Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an,constants:K},ln=n(4),sn=n(34),cn=n(15),gn=n(18),un=ln.c.vtkErrorMacro,dn=ln.c.vtkDebugMacro,mn=0;function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(a.a)(e,2),n=t[0],o=t[1];return r.setRequestHeader(n,o)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var pn={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise((function(a,o){var i=fn("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);i.onreadystatechange=function(t){1===i.readyState&&(n.ref.pending=!0,1==++mn&&e.invokeBusy&&e.invokeBusy(!0)),4===i.readyState&&(n.ref.pending=!1,200===i.status||0===i.status?(n.buffer=i.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=on.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=on.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sn.a.ENDIANNESS!==n.ref.encode&&sn.a.ENDIANNESS&&(dn("Swap bytes of ".concat(n.name)),sn.a.swapBytes(n.buffer,cn.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&un("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--mn&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):o({xhr:i,e:t}))},i.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",i.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(on.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(un("Supported algorithms are: [gz]"),un("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(on.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=fn("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(gn.c)("http",(function(e){return pn}));var Cn=n(9),In=n(10),hn=n(19),bn=n(29),yn=n(16),vn=Object(Cn.d)((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;function a(){yn.a.call(this,"utf-8 decode"),this.leftOver=null}function o(){yn.a.call(this,"utf-8 encode")}n[254]=n[254]=1,t.utf8encode=function(e){return hn.a.nodebuffer?bn.a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},t.utf8decode=function(e){return hn.a.nodebuffer?In.a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,a,o,i=e.length,l=new Array(2*i);for(r=0,t=0;t4)l[r++]=65533,t+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),In.a.applyFromCharCode(l)}(e=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e))},In.a.inherits(a,yn.a),a.prototype.processChunk=function(e){var r=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(hn.a.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),i=r;o!==r.length&&(hn.a.uint8array?(i=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(i=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=a,In.a.inherits(o,yn.a),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o}),"/$$rollup_base$$/node_modules/jszip/lib"),Zn=n(50),An={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},Gn=n(28);function Sn(e){yn.a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=In.a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}In.a.inherits(Sn,yn.a),Sn.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this.data=null},Sn.prototype.resume=function(){return!!yn.a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,In.a.delay(this._tickAndRepeat,[],this)),!0)},Sn.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(In.a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sn.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Bn=Sn;function Vn(e){yn.a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}In.a.inherits(Vn,yn.a),Vn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}yn.a.prototype.processChunk.call(this,e)};var Rn=Vn,wn=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),kn=function(e,t){return void 0!==e&&e.length?"string"!==In.a.getTypeOf(e)?function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t[i])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t.charCodeAt(i))];return-1^e}(0|t,e,e.length):0};function Wn(){yn.a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}In.a.inherits(Wn,yn.a),Wn.prototype.processChunk=function(e){this.streamInfo.crc32=kn(e.data,this.streamInfo.crc32||0),this.push(e)};var xn=Wn;function Tn(e,t,n,r,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=a}Tn.prototype={getContentWorker:function(){var e=new Bn(Gn.a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Rn("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Bn(Gn.a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Tn.createWorkerFrom=function(e,t,n){return e.pipe(new xn).pipe(new Rn("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Rn("compressedSize")).withStreamInfo("compression",t)};var Jn=Tn,Xn=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Xn.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new vn.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new vn.Utf8DecodeWorker))}catch(e){(t=new yn.a("error")).error(e)}return new Zn.a(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Jn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new vn.Utf8EncodeWorker)),Jn.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Jn?this._data.getContentWorker():this._data instanceof yn.a?this._data:new Bn(this._data)}};for(var On=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Nn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Hn=0;Hn=0;)e[t]=0}var Kn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ln=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Dn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=new Array(576);Pn(En);var Un=new Array(60);Pn(Un);var zn=new Array(512);Pn(zn);var _n=new Array(256);Pn(_n);var jn=new Array(29);Pn(jn);var Qn,qn,$n,er=new Array(30);function tr(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function nr(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function rr(e){return e<256?zn[e]:zn[256+(e>>>7)]}function ar(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function or(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function sr(e,t,n){var r,a,o=new Array(16),i=0;for(r=1;r<=15;r++)o[r]=i=i+n[r-1]<<1;for(a=0;a<=t;a++){var l=e[2*a+1];0!==l&&(e[2*a]=lr(o[l]++,l))}}function cr(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function gr(e){e.bi_valid>8?ar(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ur(e,t,n,r){var a=2*t,o=2*n;return e[a]>1;n>=1;n--)dr(e,o,n);a=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],dr(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*a]=o[2*n]+o[2*r],e.depth[a]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=a,e.heap[1]=a++,dr(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,o,i,l,s=t.dyn_tree,c=t.max_code,g=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,p=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,p++),s[2*r+1]=o,r>c||(e.bl_count[o]++,i=0,r>=m&&(i=d[r-m]),l=s[2*r],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(g[2*r+1]+i)));if(0!==p){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,p-=2}while(p>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(a=e.heap[--n])>c||(s[2*a+1]!==o&&(e.opt_len+=(o-s[2*a+1])*s[2*a],s[2*a+1]=o),r--)}}(e,t),sr(o,c,e.bl_count)}function pr(e,t,n){var r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l>=7;r<30;r++)for(er[r]=a<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),fr(e,e.l_desc),fr(e,e.d_desc),i=function(e){var t;for(pr(e,e.dyn_ltree,e.l_desc.max_code),pr(e,e.dyn_dtree,e.d_desc.max_code),fr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Dn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?hr(e,t,n,r):4===e.strategy||o===a?(or(e,2+(r?1:0),3),mr(e,En,Un)):(or(e,4+(r?1:0),3),function(e,t,n,r){var a;for(or(e,t-257,5),or(e,n-1,5),or(e,r-4,4),a=0;a>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(_n[n]+256+1)]++,e.dyn_dtree[2*rr(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){or(e,2,3),ir(e,256,En),function(e){16===e.bi_valid?(ar(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},vr=function(e,t,n,r){for(var a=65535&e|0,o=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{o=o+(a=a+t[r++]|0)|0}while(--i);a%=65521,o%=65521}return a|o<<16|0},Zr=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),Ar=function(e,t,n,r){var a=Zr,o=r+n;e^=-1;for(var i=r;i>>8^a[255&(e^t[i])];return-1^e},Gr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Sr(e,t){return e.msg=Gr[t],t}function Br(e){return(e<<1)-(e>4?9:0)}function Vr(e){for(var t=e.length;--t>=0;)e[t]=0}function Rr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Fn.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function wr(e,t){yr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rr(e.strm)}function kr(e,t){e.pending_buf[e.pending++]=t}function Wr(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function xr(e,t){var n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258,m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(c[(n=t)+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead}function Tr(e){var t,n,r,a,o,i,l,s,c,g,u=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){Fn.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);a+=u}if(0===e.strm.avail_in)break;if(i=e.strm,l=e.window,s=e.strstart+e.lookahead,c=a,g=void 0,(g=i.avail_in)>c&&(g=c),n=0===g?0:(i.avail_in-=g,Fn.arraySet(l,i.input,i.next_in,g,s),1===i.state.wrap?i.adler=vr(i.adler,l,g,s):2===i.state.wrap&&(i.adler=Ar(i.adler,l,g,s)),i.next_in+=g,i.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=yr._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=yr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<15&&(i=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return Sr(e,-2);8===r&&(r=9);var l=new Nr;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tr(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wr(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wr(e,!1),e.strm.avail_out),1)})),new Or(4,4,8,4,Jr),new Or(4,5,16,8,Jr),new Or(4,6,32,32,Jr),new Or(4,4,16,16,Xr),new Or(8,16,32,32,Xr),new Or(8,16,128,128,Xr),new Or(8,32,128,256,Xr),new Or(32,128,258,1024,Xr),new Or(32,258,258,4096,Xr)];var Pr={deflateInit:function(e,t){return Fr(e,t,8,15,8,0)},deflateInit2:Fr,deflateReset:Yr,deflateResetKeep:Hr,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,a,o;if(!e||!e.state||t>5||t<0)return e?Sr(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Sr(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kr(r,31),kr(r,139),kr(r,8),r.gzhead?(kr(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kr(r,255&r.gzhead.time),kr(r,r.gzhead.time>>8&255),kr(r,r.gzhead.time>>16&255),kr(r,r.gzhead.time>>24&255),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kr(r,255&r.gzhead.extra.length),kr(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ar(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,3),r.status=113);else{var i=8+(r.w_bits-8<<4)<<8;i|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),i+=31-i%31,r.status=113,Wr(r,i),0!==r.strstart&&(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending!==r.pending_buf_size));)kr(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rr(e),r.pending+2<=r.pending_buf_size&&(kr(r,255&e.adler),kr(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rr(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Br(t)<=Br(n)&&4!==t)return Sr(e,-5);if(666===r.status&&0!==e.avail_in)return Sr(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var l=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Tr(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,a,o,i=e.window;;){if(e.lookahead<=258){if(Tr(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=i[a=e.strstart-1])===i[++a]&&r===i[++a]&&r===i[++a]){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=yr._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):br[r.level].func(r,t);if(3!==l&&4!==l||(r.status=666),1===l||3===l)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===t?yr._tr_align(r):5!==t&&(yr._tr_stored_block(r,0,0,!1),3===t&&(Vr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rr(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(kr(r,255&e.adler),kr(r,e.adler>>8&255),kr(r,e.adler>>16&255),kr(r,e.adler>>24&255),kr(r,255&e.total_in),kr(r,e.total_in>>8&255),kr(r,e.total_in>>16&255),kr(r,e.total_in>>24&255)):(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),Rr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Sr(e,-2):(e.state=null,113===t?Sr(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,a,o,i,l,s,c,g=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=vr(e.adler,t,g,0)),n.wrap=0,g>=n.w_size&&(0===o&&(Vr(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new Fn.Buf8(n.w_size),Fn.arraySet(c,t,g-n.w_size,n.w_size,0),t=c,g=n.w_size),i=e.avail_in,l=e.next_in,s=e.input,e.avail_in=g,e.next_in=0,e.input=t,Tr(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<=252?6:Dr>=248?5:Dr>=240?4:Dr>=224?3:Dr>=192?2:1;function Er(e,t){if(t<65534&&(e.subarray&&Mr||!e.subarray&&Kr))return String.fromCharCode.apply(null,Fn.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},zr=function(e){return Er(e,e.length)},_r=function(e){for(var t=new Fn.Buf8(e.length),n=0,r=t.length;n4)l[r++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return Er(l,r)},Qr=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Lr[e[n]]>t?n:t},qr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$r=Object.prototype.toString;function ea(e){if(!(this instanceof ea))return new ea(e);this.options=Fn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=Pr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(Gr[n]);if(t.header&&Pr.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ur(t.dictionary):"[object ArrayBuffer]"===$r.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Pr.deflateSetDictionary(this.strm,r)))throw new Error(Gr[n]);this._dict_set=!0}}function ta(e,t){var n=new ea(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}ea.prototype.push=function(e,t){var n,r,a=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=Ur(e):"[object ArrayBuffer]"===$r.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new Fn.Buf8(o),a.next_out=0,a.avail_out=o),1!==(n=Pr.deflate(a,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(zr(Fn.shrinkBuf(a.output,a.next_out))):this.onData(Fn.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===r?(n=Pr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),a.avail_out=0,!0)},ea.prototype.onData=function(e){this.chunks.push(e)},ea.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var na={Deflate:ea,deflate:ta,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ta(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ta(e,t)}},ra=function(e,t){var n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B;n=e.state,r=e.next_in,S=e.input,a=r+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,c=n.wsize,g=n.whave,u=n.wnext,d=n.window,m=n.hold,f=n.bits,p=n.lencode,C=n.distcode,I=(1<>>=y=b>>>24,f-=y,0==(y=b>>>16&255))B[o++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<>>=y,f-=y),f<15&&(m+=S[r++]<>>=y=b>>>24,f-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=C[(65535&b)+(m&(1<s){e.msg="invalid distance too far back",n.mode=30;break e}if(m>>>=y,f-=y,Z>(y=o-i)){if((y=Z-y)>g&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,G=d,0===u){if(A+=c-y,y2;)B[o++]=G[A++],B[o++]=G[A++],B[o++]=G[A++],v-=3;v&&(B[o++]=G[A++],v>1&&(B[o++]=G[A++]))}else{A=o-Z;do{B[o++]=B[A++],B[o++]=B[A++],B[o++]=B[A++],v-=3}while(v>2);v&&(B[o++]=B[A++],v>1&&(B[o++]=B[A++]))}break}}break}}while(r>3,m&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===k[v];v--);if(Z>v&&(Z=v),0===v)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(y=1;y0&&(0===e||1!==v))return-1;for(W[1]=0,h=1;h<15;h++)W[h+1]=W[h]+k[h];for(b=0;b852||2===e&&B>592)return 1;for(;;){f=h-G,i[b]m?(p=x[T+i[b]],C=R[w+i[b]]):(p=96,C=0),s=1<>G)+(c-=s)]=f<<24|p<<16|C|0}while(0!==c);for(s=1<>=1;if(0!==s?(V&=s-1,V+=s):V=0,b++,0==--k[h]){if(h===v)break;h=t[n+i[b]]}if(h>Z&&(V&u)!==g){for(0===G&&(G=Z),d+=y,S=1<<(A=h-G);A+G852||2===e&&B>592)return 1;a[g=V&u]=Z<<24|A<<16|d-o|0}}return 0!==V&&(a[d+V]=h-G<<24|64<<16|0),l.bits=Z,0};function ca(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fn.Buf16(320),this.work=new Fn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ua(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fn.Buf32(852),t.distcode=t.distdyn=new Fn.Buf32(592),t.sane=1,t.back=-1,0):-2}function da(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ua(e)):-2}function ma(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,da(e))):-2}function fa(e,t){var n,r;return e?(r=new ga,e.state=r,r.window=null,0!==(n=ma(e,t))&&(e.state=null),n):-2}var pa,Ca,Ia=!0;function ha(e){if(Ia){var t;for(pa=new Fn.Buf32(512),Ca=new Fn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sa(1,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sa(2,e.lens,0,32,Ca,0,e.work,{bits:5}),Ia=!1}e.lencode=pa,e.lenbits=9,e.distcode=Ca,e.distbits=5}function ba(e,t,n,r){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(Fn.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>r&&(a=r),Fn.arraySet(o.window,t,n-r,a,o.wnext),(r-=a)?(Fn.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ar(n.check,V,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,Z=8+(15&(c>>>=4)),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=Ar(n.check,V,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((m=n.length)>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Fn.arraySet(n.head.extra,r,o,m,Z)),512&n.flags&&(n.check=Ar(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(ha(n),n.mode=20,6===t){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(m=n.length){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;Fn.arraySet(a,r,o,m,i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},A=sa(0,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(S=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(S=C+3;g>>=C)),c>>>=3,g-=3}else{for(S=C+7;g>>=C)),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,G={bits:n.lenbits},A=sa(1,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},A=sa(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,ra(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=ya.inflateInit2(this.strm,t.windowBits);if(n!==va.Z_OK)throw new Error(Gr[n]);if(this.header=new Za,ya.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ur(t.dictionary):"[object ArrayBuffer]"===Aa.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ya.inflateSetDictionary(this.strm,t.dictionary))!==va.Z_OK))throw new Error(Gr[n])}function Sa(e,t){var n=new Ga(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}Ga.prototype.push=function(e,t){var n,r,a,o,i,l=this.strm,s=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?va.Z_FINISH:va.Z_NO_FLUSH,"string"==typeof e?l.input=_r(e):"[object ArrayBuffer]"===Aa.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new Fn.Buf8(s),l.next_out=0,l.avail_out=s),(n=ya.inflate(l,va.Z_NO_FLUSH))===va.Z_NEED_DICT&&c&&(n=ya.inflateSetDictionary(this.strm,c)),n===va.Z_BUF_ERROR&&!0===g&&(n=va.Z_OK,g=!1),n!==va.Z_STREAM_END&&n!==va.Z_OK)return this.onEnd(n),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&n!==va.Z_STREAM_END&&(0!==l.avail_in||r!==va.Z_FINISH&&r!==va.Z_SYNC_FLUSH)||("string"===this.options.to?(a=Qr(l.output,l.next_out),o=l.next_out-a,i=jr(l.output,a),l.next_out=o,l.avail_out=s-o,o&&Fn.arraySet(l.output,l.output,a,o,0),this.onData(i)):this.onData(Fn.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(g=!0)}while((l.avail_in>0||0===l.avail_out)&&n!==va.Z_STREAM_END);return n===va.Z_STREAM_END&&(r=va.Z_FINISH),r===va.Z_FINISH?(n=ya.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===va.Z_OK):r!==va.Z_SYNC_FLUSH||(this.onEnd(va.Z_OK),l.avail_out=0,!0)},Ga.prototype.onData=function(e){this.chunks.push(e)},Ga.prototype.onEnd=function(e){e===va.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ba={Inflate:Ga,inflate:Sa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Sa(e,t)},ungzip:Sa},Va={};(0,Fn.assign)(Va,na,Ba,va);var Ra=Va,wa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function ka(e,t){yn.a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}In.a.inherits(ka,yn.a),ka.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(In.a.transformTo(wa,e.data),!1)},ka.prototype.flush=function(){yn.a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},ka.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this._pako=null},ka.prototype._createPako=function(){this._pako=new Ra[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Wa={STORE:{magic:"\0\0",compressWorker:function(e){return new yn.a("STORE compression")},uncompressWorker:function(){return new yn.a("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new ka("Deflate",e)},uncompressWorker:function(){return new ka("Inflate",{})}}},xa="PK",Ta="PK",Ja="PK",Xa="PK",Oa="PK",Na="PK\b",Ha=function(e,t){var n,r="";for(n=0;n>>=8;return r},Ya=function(e,t,n,r,a,o){var i,l,s=e.file,c=e.compression,g=o!==vn.utf8encode,u=In.a.transformTo("string",o(s.name)),d=In.a.transformTo("string",vn.utf8encode(s.name)),m=s.comment,f=In.a.transformTo("string",o(m)),p=In.a.transformTo("string",vn.utf8encode(m)),C=d.length!==s.name.length,I=p.length!==m.length,h="",b="",y="",v=s.dir,Z=s.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var G=0;t&&(G|=8),g||!C&&!I||(G|=2048);var S,B,V=0,R=0;v&&(V|=16),"UNIX"===a?(R=798,V|=(B=S=s.unixPermissions,S||(B=v?16893:33204),(65535&B)<<16)):(R=20,V|=63&(s.dosPermissions||0)),i=Z.getUTCHours(),i<<=6,i|=Z.getUTCMinutes(),i<<=5,i|=Z.getUTCSeconds()/2,l=Z.getUTCFullYear()-1980,l<<=4,l|=Z.getUTCMonth()+1,l<<=5,l|=Z.getUTCDate(),C&&(b=Ha(1,1)+Ha(kn(u),4)+d,h+="up"+Ha(b.length,2)+b),I&&(y=Ha(1,1)+Ha(kn(f),4)+p,h+="uc"+Ha(y.length,2)+y);var w="";return w+="\n\0",w+=Ha(G,2),w+=c.magic,w+=Ha(i,2),w+=Ha(l,2),w+=Ha(A.crc32,4),w+=Ha(A.compressedSize,4),w+=Ha(A.uncompressedSize,4),w+=Ha(u.length,2),w+=Ha(h.length,2),{fileRecord:xa+w+u+h,dirRecord:Ta+Ha(R,2)+w+Ha(f.length,2)+"\0\0\0\0"+Ha(V,4)+Ha(r,4)+u+h+f}},Fa=function(e){return Na+Ha(e.crc32,4)+Ha(e.compressedSize,4)+Ha(e.uncompressedSize,4)};function Pa(e,t,n,r){yn.a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}In.a.inherits(Pa,yn.a),Pa.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,yn.a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Pa.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ya(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Pa.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ya(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Fa(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Pa.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},za=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_a=function(e,t){return t=void 0!==t?t:An.createFolders,e=za(e),this.files[e]||Ea.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function ja(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Qa={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(ja(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,Ea.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(ja(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=_a.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return In.a.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var $a=qa;function eo(e){$a.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===a)return o-this.zero;return-1},eo.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),a=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&a===o[3]},eo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var to=eo;function no(e){$a.call(this,e)}In.a.inherits(no,$a),no.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},no.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},no.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},no.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ro=no;function ao(e){to.call(this,e)}In.a.inherits(ao,to),ao.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var oo=ao;function io(e){oo.call(this,e)}In.a.inherits(io,oo),io.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var lo=io,so=function(e){var t=In.a.getTypeOf(e);return In.a.checkSupport(t),"string"!==t||hn.a.uint8array?"nodebuffer"===t?new lo(e):hn.a.uint8array?new oo(In.a.transformTo("uint8array",e)):new to(In.a.transformTo("array",e)):new ro(e)};function co(e,t){this.options=e,this.loadOptions=t}co.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Wa)if(Wa.hasOwnProperty(t)&&Wa[t].magic===e)return Wa[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+In.a.pretty(this.compressionMethod)+" unknown (inner file : "+In.a.transformTo("string",this.fileName)+")");this.decompressed=new Jn(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=so(this.extraFields[1].value);this.uncompressedSize===In.a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===In.a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===In.a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===In.a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,a=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,Ta)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=so(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var mo=uo;function fo(e){return new Gn.a.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new xn);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function po(){if(!(this instanceof po))return new po;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new po;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}po.prototype=Qa,po.prototype.loadAsync=function(e,t){var n=this;return t=In.a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:vn.utf8decode}),bn.a.isNode&&bn.a.isStream(e)?Gn.a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):In.a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new mo(t);return n.load(e),n})).then((function(e){var n=[Gn.a.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a1;){var i=o.shift();a=a.folder(i)}e.callback&&e.callback(r)})),{fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(l,s){t||Io("ERROR!!! zip not ready...");var c=vo([r,o.ref.basepath,i.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var g="string"!==o.dataType||i.compression?"uint8array":"string",u=yo[g](o,i.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),l(o)}));a.file(c).async(g).then(u)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(JSON.parse(e))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=vo(e);return t||Io("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,a.file(n).async("base64").then((function(e){r.src="data:image/".concat(bo(n),";base64,").concat(e)}))}))},fetchBinary:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).then((function(e){var t=on.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};Object(gn.c)("zip",(function(e){return Zo.create(e)}));var Ao=n(11),Go=n(13),So=n(23),Bo=n(7);function Vo(e,t){function n(){for(;t.cellFields.length0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=function(n,r){t.radius[n]=r,e.modified()},e.setCellField=function(n,r){t.cellFields[n]=r,e.modified()},e.removeMask=function(){t.mask=null,e.modified()},e.setMaskLayer=function(n,r){var a=!1;!t.mask&&r&&(a=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(a=!0),t.mask[n]=r),a&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var a;if(!t.deleted&&t.radius.length){n();var o=r[0],i=t.radius.length,l=t.height/2,s=0,c=0,g=t.startThetat.startTheta?t.endTheta:t.startTheta;u*=Math.PI/180;var d=t.resolution,m=!1;u>=g+2*Math.PI?u=g+2*Math.PI:(++d,m=!0);var f=(u-g)/t.resolution,p=d*i*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(s+=2*(d+1)+5*d+(m?10:0),c+=2+d+(m?2:0));for(var C=1;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.getArray(e,t,["cellFields"]),ln.c.algo(e,t,0,1),Vo(e,t)}),"vtkConcentricCylinderSource");function wo(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var a=n[0],o=2*Math.PI/t.resolution,i=-t.height/2,l=t.resolution+1,s=4*t.resolution+1+t.resolution,c=0,g=new window[t.pointType](3*l),u=0,d=new Uint32Array(s);g[0]=t.height/2,g[1]=0,g[2]=0,t.capping&&(d[u++]=t.resolution);for(var m=0;mt.resolution?1:f+2;(r=So.a.buildFromRadian()).translate.apply(r,Object(Ao.a)(t.center)).rotateFromDirections([1,0,0],t.direction).apply(g),(a=Go.a.newInstance()).getPoints().setData(g,3),a.getPolys().setData(d,1),n[0]=a}}}var ko={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ko,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),wo(e,t)}),"vtkConeSource");function Wo(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){var e=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))e=arguments.length<=0?void 0:arguments[0];else for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),ln.c.setGetArray(e,t,["center","rotations"],3),ln.c.algo(e,t,0,1),Wo(e,t)}),"vtkCubeSource");function To(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,a;if(!t.deleted){var o=n[0],i=2*Math.PI/t.resolution,l=2*t.resolution,s=5*t.resolution;t.capping&&(l=4*t.resolution,s=7*t.resolution+2);for(var c=new window[t.pointType](3*l),g=0,u=new Uint32Array(s),d=new Float32Array(3*l),m=Bo.a.newInstance({numberOfComponents:3,values:d,name:"Normals"}),f=new Float32Array(2*l),p=Bo.a.newInstance({numberOfComponents:2,values:f,name:"TCoords"}),C=[0,0,0],I=[0,0,0],h=[0,0,0],b=[0,0,0],y=[0,0],v=[0,0],Z=0;Z2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),To(e,t)}),"vtkCylinderSource");var Xo=n(6),Oo=ln.c.vtkWarningMacro;function No(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=new Float32Array(3);if(Object(Xo.t)(t.point2,t.point1,i),Object(Xo.A)(i)<=0)Oo("Zero-length line definition");else{var l=t.resolution,s=l+1,c=new window[a](3*s);o.getPoints().setData(c,3);var g=new Uint32Array(s+1);o.getLines().setData(g,1);for(var u=0,d=0,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),ln.c.obj(e,t),ln.c.setGet(e,t,["resolution"]),ln.c.setGetArray(e,t,["point1","point2"],3),ln.c.algo(e,t,0,1),No(e,t)}),"vtkLineSource");var Yo=n(8),Fo=n(12),Po=ln.c.vtkWarningMacro;function Ko(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var a=r[0],o=a?a.getPoints().getDataType():"Float32Array",i=Go.a.newInstance(),l=new Float32Array(3),s=new Float32Array(3);if(Object(Xo.t)(t.point1,t.origin,l),Object(Xo.t)(t.point2,t.origin,s),e.updatePlane(l,s)){var c=t.xResolution,g=t.yResolution,u=(c+1)*(g+1),d=c*g,m=new window[o](3*u);i.getPoints().setData(m,3);var f=new Uint32Array(5*d);i.getPolys().setData(f,1);var p=new Float32Array(3*u),C=Bo.a.newInstance({numberOfComponents:3,values:p,name:"Normals"});i.getPointData().setNormals(C);var I=new Float32Array(2*u),h=Bo.a.newInstance({numberOfComponents:2,values:I,name:"TextureCoordinates"});i.getPointData().setTCoords(h);for(var b=new Float32Array(2),y=0,v=0;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mo,n),t.normal=[0,0,1],t.center=[0,0,0],ln.c.obj(e,t),ln.c.setGet(e,t,["xResolution","yResolution"]),ln.c.setGetArray(e,t,["origin"],3),ln.c.getArray(e,t,["point1","point2","normal","center"],3),ln.c.algo(e,t,0,1),Ko(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}),"vtkPlaneSource");function Lo(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=t.numberOfPoints,l=new window[a](3*i);o.getPoints().setData(l,3);var s,c,g,u,d,m=new Uint32Array(i+1);o.getVerts().setData(m,1);for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Do,n),ln.c.obj(e,t),ln.c.setGet(e,t,["numberOfPoints","radius"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Lo(e,t)}),"vtkPointSource");function Eo(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array";r=Go.a.newInstance();var o=0,i=t.thetaResolution,l=t.startThetat.startTheta?t.endTheta:t.startTheta;s*=Math.PI/180;var c=t.startPhit.startPhi?t.endPhi:t.startPhi;g*=Math.PI/180,Math.abs(l-s)<2*Math.PI&&++i;var u=(s-l)/t.thetaResolution,d=t.startPhi<=0?1:0,m=t.phiResolution+(t.endPhi>=180?-1:0),f=t.phiResolution*i+2,p=2*t.phiResolution*t.thetaResolution,C=0,I=new window[a](3*f),h=new Float32Array(3*f),b=0,y=new Uint32Array(5*p);t.startPhi<=0&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]+t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=1,C++,o++),t.endPhi>=180&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]-t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=-1,C++,o++);for(var v=t.phiResolution-o,Z=(g-c)/(t.phiResolution-1),A=0;A=180)for(var W=v-1+o,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Eo(e,t)}),"vtkSphereSource");var zo=n(17),_o=n(27),jo=ln.c.vtkDebugMacro,Qo=ln.c.vtkErrorMacro;function qo(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var a=n[0];if(!a)return Qo("Invalid or missing input"),1;var o=a.getPoints(),i=a.getPointData().getNormals(),l=e.getInputArrayToProcess(0);if(!o||!l)return jo("No data to warp",!!o,!!l),r[0]=n[0],1;var s=o.getNumberOfPoints(),c=null,g=[0,0,1];i&&!t.useNormal?(c=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},jo("Using data normals")):e.getXyPlane()?(c=function(e,t){return g},jo("Using x-y plane normal")):(c=function(e,n){return t.normal},jo("Using Normal instance variable"));for(var u=new Float32Array(3*s),d=o.getData(),m=0,f=[0,0,1],p=1,C=l.getData(),I=l.getNumberOfComponents(),h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$o,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),ln.c.setGetArray(e,t,["normal"],3),qo(e,t)}),"vtkWarpScalar");var ei=n(36),ti=n(37),ni={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}},ri=ni.VaryRadius,ai=ni.GenerateTCoords,oi=ln.c.vtkDebugMacro,ii=ln.c.vtkErrorMacro,li=ln.c.vtkWarningMacro;function si(e,t){function n(e,n){var r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){for(var r=t[n],a=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],i=t,l=i[0],s=0;s1){var c=0,g=[0,0,0],u=[0,0,0],d=i.slice(s+1,s+1+l);if((c=r(e,d,0))!==l)!function(){var t=d[c],i=e.slice(3*t,3*(t+1)),s=d[c+1],m=e.slice(3*s,3*(s+1));if(g=m.map((function(e,t){return e-i[t]})),Object(Xo.y)(g),a)o=a;else{for(;++c.001){o=p,g=u;break}}if(c>=l)for(var C=0;C<3;++C)if(0!==g[C]){o[(C+2)%3]=0,o[(C+1)%3]=1,o[C]=-g[(C+1)%3]/g[C];break}}Object(Xo.y)(o);for(var I=0;++c0?Math.sqrt(Z):0;for(var A=[0,0,0],G=0;G<3;++G)A[G]=u[G]+g[G];Object(Xo.y)(A),Object(Xo.w)(A,y,b),Object(Xo.w)(g,y,A),Object(Xo.q)(o,A)*Object(Xo.q)(b,A)<0&&(Z*=-1);for(var S=I;St.radiusFactor&&(B=t.radiusFactor);else if(c&&t.varyRadius===ri.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(B=c.getComponent(r[R],0))<0)return li("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var X=0;X1&&k){var q=Z.slice(j,j+A+1);a(u.getData(),q,R)}o(z,A,Q,u.getData(),I.getData(),g.getPointData(),L,b,H,F,P,K,w,U)?(V=i(z,A,_,V,g.getCellData(),M,B),D&&l(z,A,Q,u.getData(),H,D.getData())):li("Could not generate points"),z=n(z,A),_++}c.setPoints(I),c.setStrips(B),c.setPointData(L),L.setNormals(y),s[0]=c}}}}}else ii("Invalid or missing input")}}var ci={outputPointsPrecision:ti.b.DEFAULT,radius:.5,varyRadius:ri.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:ai.TCOORDS_OFF,textureLength:1};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),ln.c.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),ln.c.obj(e,t),ln.c.algo(e,t,1,1),si(e,t)}),"vtkTubeFilter");var gi=n(40),ui=(n(25),{diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"}),di={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function mi(e){var t="",n=0,r=di.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var a,o,i,l={comments:[],elements:[],headerLength:n},s=t.split("\n"),c=0;c0,u=e.uvs.length>0,d=e.normals.length>0,m=e.faceVertexUvs.length>0,f=0;f0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(a)}}function hi(e,t,n,r){var a;switch(n){case"int8":case"char":a=[e.getInt8(t),1];break;case"uint8":case"uchar":a=[e.getUint8(t),1];break;case"int16":case"short":a=[e.getInt16(t,r),2];break;case"uint16":case"ushort":a=[e.getUint16(t,r),2];break;case"int32":case"int":a=[e.getInt32(t,r),4];break;case"uint32":case"uint":a=[e.getUint32(t,r),4];break;case"float32":case"float":a=[e.getFloat32(t,r),4];break;case"float64":case"double":a=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return a}function bi(e,t,n,r){for(var a,o={},i=0,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},a=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:a,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:a,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n(t.url,r);return a.then(e.parse),a},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified();var r=mi(gi.a.arrayBufferToString(n));if("ascii"!==r.format){t.parseData=n;for(var a,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},i="binary_little_endian"===r.format,l=n instanceof ArrayBuffer?n:n.buffer,s=new DataView(l,r.headerLength),c=0,g=0;g=a.elements[c].count&&(c++,g=0);var m=Ci(a.elements[c].properties,d);Ii(o,a.elements[c].name,m),g++}}var f=fi(o,a.elements);t.output[0]=f}}},e.requestData=function(n,r){e.parse(t.parseData)}}var vi={};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),yi(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkPLYReader"),n(69);function Zi(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){return t.url=n,e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then((function(t){return e.parseAsText(t),!0}))},e.parseAsText=function(n){t.csv=n,t.elevation=[],t.csv.split("\n").forEach((function(e,n){t.elevation.push(e.split(",").map((function(e){return Number(e)})))})),e.modified()},e.requestData=function(e,n){var r=Go.a.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var a=t.elevation.length,o=t.elevation[0].length,i=r.getPoints();i.setNumberOfPoints(o*a,3);var l=i.getData(),s=ei.a.newInstance({size:5*(o-1)*(a-1)});r.setPolys(s);var c=s.getData(),g=0,u=new Float32Array(o*a*2),d=Bo.a.newInstance({numberOfComponents:2,values:u,name:"TextureCoordinates"});r.getPointData().setTCoords(d);for(var m=0;m0&&m>0&&(c[g++]=4,c[g++]=p,c[g++]=p-1,c[g++]=p-1-o,c[g++]=p-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Ai={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ai,n),ln.c.obj(e,t),ln.c.get(e,t,["url"]),ln.c.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Zi(e,t)}),"vtkElevationReader");var Gi={};function Si(e,t,n,r){for(var a=0;a0&&"\r"!==e})),i=o.length;a.push(i);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.obj");return e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=function(n){return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,Gi.splitOn=r,Gi.pieces=[],Gi.v=[],Gi.vt=[],Gi.vn=[],Gi.f=[[]],Gi.size=0,n.split("\n").forEach(Bi),function(e){var t=!!Gi.vt.length,n=!!Gi.vn.length;if(e.splitMode){e.numberOfOutputs=Gi.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper","splitMode"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Vi(e,t)}),"vtkOBJReader");var wi=["chemical json","name","inchi","formula","atoms","bonds","properties"];function ki(e,t){t.classHierarchy.push("vtkMolecule")}var Wi={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function xi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),ln.c.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),ln.c.setGet(e,t,wi),ki(0,t)}var Ti={newInstance:ln.c.newInstance(xi,"vtkMolecule"),extend:xi},Ji={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};function Xi(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}return e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText)},e.parseAsText=function(n){return t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0},e.requestData=function(e,n){var r=Ti.newInstance();if(t.molecule){var o=t.molecule.length,i=[],l=[];t.numberOfAtoms=0;for(var s=0;s=78&&(C=g.substr(76,2).replace(/\s+/g,"")),""===C&&(C=d.substr(0,2).replace(/\d/g,"")),i.push(m),i.push(f),i.push(p);var I=Object(a.a)(Ji[C],1)[0];l.push(I),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(l),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(i)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Oi={numberOfAtoms:0,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Xi(e,t)}),"vtkPDBReader");var Ni=[];Ni["-".charCodeAt(0)]=62,Ni["_".charCodeAt(0)]=63;for(var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yi=0;Yi>16&255,r[g++]=c>>8&255,r[g++]=255&c}switch(i){case 3:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<10;!Fi(e[s]);)s++;for(c|=Ni[e.charCodeAt(s++)]<<4;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>2,r[g++]=c>>8&255,r[g++]=255&c;break;case 2:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<2;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>4,r[g++]=255&c;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return g}var Ki={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();var r=function(e){return gi.a.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),a=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var i=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(a).firstChild,l=i.getAttribute("type"),s=i.getAttribute("compressor"),c=i.getAttribute("byte_order"),g=i.getAttribute("header_type")||"UInt32";if(s&&"vtkZLibDataCompressor"!==s)return console.error("Invalid compressor",s),!1;if(c&&"LittleEndian"!==c)return console.error("Only LittleEndian encoding is supported"),!1;if(l!==t.dataType)return console.error("Invalid data type",l,"expecting",t.dataType),!1;if(i.querySelector("AppendedData")){var u=i.querySelector("AppendedData"),d=u.getAttribute("encoding"),m=i.querySelectorAll("DataArray"),f=t.binaryBuffer;"base64"===d&&(f=u.textContent.trim().substr(1));for(var p=[],C=0;C0?0===Z[3]?new ArrayBuffer(Z[2]*A):new ArrayBuffer(Z[2]*(A-1)+Z[3]):new ArrayBuffer(0);for(var S=new Uint8Array(y),B={offset:0,uint8:S},V=0;V2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ji,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),_i(e,t)},processDataArray:zi,processFieldData:function(e,t,n,r,a,o,i){if(t){var l={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(l[r]=n["set".concat(e)])}));for(var s=t.getElementsByTagName("DataArray"),c=s.length,g=0;g(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=o<(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[3]=i>(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[4]=l<(arguments.length<=3?void 0:arguments[3])?l:arguments.length<=3?void 0:arguments[3],e[5]=s>(arguments.length<=3?void 0:arguments[3])?s:arguments.length<=3?void 0:arguments[3]}function cl(e,t,n,r,o,i,l){var s=Object(a.a)(e,6),c=s[0],g=s[1],u=s[2],d=s[3],m=s[4],f=s[5];void 0===l?(e[0]=Math.min(t[0],c),e[1]=Math.max(t[1],g),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],m),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,c),e[1]=Math.max(n,g),e[2]=Math.min(r,u),e[3]=Math.max(o,d),e[4]=Math.min(i,m),e[5]=Math.max(l,f))}function gl(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t,e[1]=t>l?t:l,e[2]=n,e[3]=n>c?n:c,e[4]=r,e[5]=r>u?r:u,i!==t||s!==n||g!==r}function ul(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function fl(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function pl(e,t){return e[2*t+1]-e[2*t]}function Cl(e){return[pl(e,0),pl(e,1),pl(e,2)]}function Il(e){return e.slice(0,2)}function hl(e){return e.slice(2,4)}function bl(e){return e.slice(4,6)}function yl(e){var t=Cl(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function vl(e){if(ol(e)){var t=Cl(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Zl(e){return[e[0],e[2],e[4]]}function Al(e){return[e[1],e[3],e[5]]}function Gl(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Sl(e,t){for(var n=0,r=0;r<2;r++)for(var a=2;a<4;a++)for(var o=4;o<6;o++)t[n]=[e[r],e[a],e[o]],n++}function Bl(e,t,n){t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5]}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=fl(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Rl(e,t,n,r){for(var a=[].concat(rl),o=e.getData(),i=0;ie[2*g+1]?(i[g]=0,c[g]=e[2*g+1],o=!1):i[g]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],a[0]=0,1;for(var u=0;u<3;u++)2!==i[u]&&0!==n[u]?s[u]=(c[u]-t[u])/n[u]:s[u]=-1;for(var d=0;d<3;d++)s[l]1||s[l]<0)return 0;a[0]=s[l];for(var m=0;m<3;m++)if(l!==m){if(r[m]=t[m]+s[l]*n[m],r[m]e[2*m+1])return 0}else r[m]=c[m];return 1}function kl(e,t,n){for(var r=[],a=0,o=1,i=1,l=4;l<=5;++l){r[2]=e[l];for(var s=2;s<=3;++s){r[1]=e[s];for(var c=0;c<=1;++c)if(r[0]=e[c],a=tl.a.evaluate(n,t,r),i&&(o=a>=0?1:-1,i=0),0===a||o>0&&a<0||o<0&&a>0)return 1}}return 0}function Wl(e,t){if(!ol(e)||!ol(t))return!1;for(var n,r=[0,0,0,0,0,0],a=0;a<3;a++)if(n=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(n=!0,r[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(n=!0,r[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(n=!0,r[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(n=!0,r[2*a+1]=e[2*a+1]),!n)return!1;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],!0}function xl(e,t){if(!ol(e)||!ol(t))return!1;for(var n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function Tl(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Jl(e,t,n){for(var r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],o=0,i=0;i<2;i++)for(var l=2;l<4;l++)for(var s=4;s<6;s++){var c=[e[i],e[l],e[s]];a[o++]=tl.a.evaluate(n,t,c)}for(var g=2;g--&&!(Gl(a[r[g][0]],a[r[g][4]])&&Gl(a[r[g][1]],a[r[g][5]])&&Gl(a[r[g][2]],a[r[g][6]])&&Gl(a[r[g][3]],a[r[g][7]])););if(g<0)return!1;for(var u=Math.sign(n[g]),d=Math.abs((e[2*g+1]-e[2*g])*n[g]),m=u>0?1:0,f=0;f<4;f++)if(0!==d){var p=Math.abs(a[r[g][f]])/d;u>0&&pm&&(m=p)}var C=(1-m)*e[2*g]+m*e[2*g+1];return u>0?e[2*g]=C:e[2*g+1]=C,!0}var Xl=function(){function e(t){Object($i.a)(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),il(this.bounds,rl))}return Object(el.a)(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return al(this.bounds,e)}},{key:"isValid",value:function(){return ol(this.bounds)}},{key:"setBounds",value:function(e){return il(this.bounds,e)}},{key:"reset",value:function(){return ll(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne[1]||e[2]>e[3]||e[4]>e[5]?Pl.EMPTY:3===t?Pl.XYZ_GRID:2===t?e[0]===e[1]?Pl.YZ_PLANE:e[2]===e[3]?Pl.XZ_PLANE:Pl.XY_PLANE:1===t?e[0]1&&(n*=t[r]-1)}return n},e.getNumberOfPoints=function(){var t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=function(n){var r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return es("Requesting a point from an empty image."),null;var a=new Float64Array(3);switch(t.dataDescription){case Hl.EMPTY:return null;case Hl.SINGLE_POINT:break;case Hl.X_LINE:a[0]=n;break;case Hl.Y_LINE:a[1]=n;break;case Hl.Z_LINE:a[2]=n;break;case Hl.XY_PLANE:a[0]=n%r[0],a[1]=n/r[0];break;case Hl.YZ_PLANE:a[1]=n%r[1],a[2]=n/r[1];break;case Hl.XZ_PLANE:a[0]=n%r[0],a[2]=n/r[0];break;case Hl.XYZ_GRID:a[0]=n%r[0],a[1]=n/r[0]%r[1],a[2]=n/(r[0]*r[1]);break;default:es("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(a,o),o},e.getBounds=function(){return e.extentToBounds(t.extent)},e.extentToBounds=function(t){var n=[t[0],t[2],t[4],t[1],t[2],t[4],t[0],t[3],t[4],t[1],t[3],t[4],t[0],t[2],t[5],t[1],t[2],t[5],t[0],t[3],t[5],t[1],t[3],t[5]],r=new Float64Array([n[0],n[1],n[2]]),a=new Float64Array(3);e.indexToWorld(r,a);for(var o=[a[0],a[0],a[1],a[1],a[2],a[2]],i=3;i<24;i+=3)Object(Fo.p)(r,n[i],n[i+1],n[i+2]),e.indexToWorld(r,a),a[0]o[1]&&(o[1]=a[0]),a[1]>o[3]&&(o[3]=a[1]),a[2]>o[5]&&(o[5]=a[2]);return o},e.computeTransforms=function(){Object(Yo.e)(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],Object(Yo.r)(t.indexToWorld,t.indexToWorld,t.spacing),Object(Yo.g)(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return es("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.indexToWorld),Object(Fo.q)(i,a,t.indexToWorld),Object(Xo.p)(o,i,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.worldToIndex),Object(Fo.q)(i,a,t.worldToIndex),Object(Xo.p)(o,i,n),n},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=function(){for(var t=e.getBounds(),n=[],r=0;r<3;r++)n[r]=(t[2*r+1]+t[2*r])/2;return n},e.computeHistogram=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);var a=[0,0,0],o=[0,0,0];Ol.computeCornerPoints(r,a,o),Object(Xo.o)(a,a),Object(Xo.o)(o,o);var i=e.getDimensions();Object(Xo.r)(a,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],a),Object(Xo.r)(o,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],o);for(var l=i[0],s=i[0]*i[1],c=e.getPointData().getScalars().getData(),g=-1/0,u=1/0,d=0,m=0,f=0,p=a[2];p<=o[2];p++)for(var C=a[1];C<=o[1];C++)for(var I=a[0]+C*l+p*s,h=a[0];h<=o[0];h++){if(!n||n([h,C,p],r)){var b=c[I];b>g&&(g=b),b0?m/f:0,v=d-y*y,Z=Math.sqrt(v);return{minimum:u,maximum:g,average:y,variance:v,sigma:Z}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,a=0;a<3;++a)n[a]=r,r*=e[2*a+1]-e[2*a]+1;return n},e.computeOffsetIndex=function(t){var n=Object(a.a)(t,3),r=n[0],o=n[1],i=n[2],l=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),c=e.computeIncrements(l,s);return Math.floor((Math.round(r)-l[0])*c[0]+(Math.round(o)-l[2])*c[1]+(Math.round(i)-l[4])*c[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),a=0;a<3;++a)if(r[a]n[2*a+1])return es("GetScalarPointer: Pixel ".concat(r," is not in memory. Current extent = ").concat(n)),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return es("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,n)}}var ns={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:Hl.EMPTY};function rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ns,n),Nl.a.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=El(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),ln.c.get(e,t,["direction","indexToWorld","worldToIndex"]),ln.c.setGetArray(e,t,["origin","spacing"],3),ln.c.getArray(e,t,["extent"],6),ts(e,t)}var as={newInstance:ln.c.newInstance(rs,"vtkImageData"),extend:rs};function os(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=function(e,n,r,a,o){for(var i=e.getElementsByTagName(t.dataType)[0],l=i.getAttribute("Origin").split(" ").map((function(e){return Number(e)})),s=i.getAttribute("Spacing").split(" ").map((function(e){return Number(e)})),c=i.getElementsByTagName("Piece"),g=c.length,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,is,n),Qi.extend(e,t,n),os(e,t)}),"vtkXMLImageDataReader");function ls(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,a,o){var i=e.getElementsByTagName(t.dataType)[0],l=i.getElementsByTagName("FieldData")[0],s=i.getElementsByTagName("Piece"),c=s.length,g=[];l&&(g=Object(Ao.a)(l.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,a){var o=Number(e.getAttribute("NumberOfTuples"));return Bo.a.newInstance(Qi.processDataArray(o,e,t,n,r,a))}(e,r,a,o,t.binaryBuffer)})));for(var u=function(e){var n=Go.a.newInstance(),i=s[e],l=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],c=Qi.processDataArray(l,s,r,a,o,i),g=c.values,u=c.numberOfComponents;e["get".concat(t)]().setData(g,u)}return l}(n,"Points",i,r,a,o,t.binaryBuffer),c=0;["Verts","Lines","Strips","Polys"].forEach((function(e){c+=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=Qi.processCells(l,n.getElementsByTagName(t)[0],r,a,o,i);e["get".concat(t)]().setData(s)}return l}(n,e,i,r,a,o,t.binaryBuffer)})),Qi.processFieldData(l,i.getElementsByTagName("PointData")[0],n.getPointData(),r,a,o,t.binaryBuffer),Qi.processFieldData(c,i.getElementsByTagName("CellData")[0],n.getCellData(),r,a,o,t.binaryBuffer);for(var u=n.getFieldData(),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ss,n),Qi.extend(e,t,n),ls(e,t)}),"vtkXMLPolyDataReader");var cs=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return Xs[e]&&Xs[e](t)}function Hs(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=function(n){e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=function(n){t.renderers=t.renderers.filter((function(e){return e!==n})),e.modified()},e.hasRenderer=function(e){return-1!==t.renderers.indexOf(e)},e.newAPISpecificView=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ns(e||t.defaultViewAPI,n)},e.addView=function(n){e.hasView(n)||(n.setRenderable(e),t.views.push(n),e.modified())},e.removeView=function(n){t.views=t.views.filter((function(e){return e!==n})),e.modified()},e.hasView=function(e){return-1!==t.views.indexOf(e)},e.render=function(){t.interactor?t.interactor.render():t.views.forEach((function(e){return e.traverseAllPasses()}))},e.getStatistics=function(){var e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((function(t){t.getViewProps().forEach((function(t){if(t.getVisibility()){e.propCount+=1;var n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){var r=n.getPrimitiveCount();Object.keys(r).forEach((function(t){e[t]||(e[t]=0),e[t]+=r[t]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n"),e},e.captureImages=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return ln.c.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n):void 0})).filter((function(e){return!!e}))}}var Ys={defaultViewAPI:Js,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function Fs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),ln.c.obj(e,t),ln.c.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),ln.c.get(e,t,["neverRendered"]),ln.c.getArray(e,t,["renderers"]),ln.c.event(e,t,"completion"),Hs(e,t)}var Ps={newInstance:ln.c.newInstance(Fs,"vtkRenderWindow"),extend:Fs,registerViewConstructor:Os,listViewAPIs:function(){return Object.keys(Xs)},newAPISpecificView:Ns},Ks={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},Ms={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},Ls={Wrap:Ks,Filter:Ms},Ds=ln.c.vtkErrorMacro;function Es(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),a=e[r];if(a)a(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Us,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),t.renderableChildMap=new Map,ln.c.get(e,t,["visited"]),ln.c.setGet(e,t,["parent","renderable","myFactory"]),ln.c.getArray(e,t,["children"]),Es(e,t)}var _s={newInstance:ln.c.newInstance(zs,"vtkViewNode"),extend:zs,PASS_TYPES:["Build","Render"]};function js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qs=Ls.Wrap,qs=Ls.Filter,$s=Bo.a.VtkDataTypes,ec=ln.c.vtkDebugMacro,tc=ln.c.vtkErrorMacro,nc=ln.c.vtkWarningMacro;function rc(e,t){var n=this;function r(e,n){var r=[];if(e!==$s.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=t.width*t.height*t.components,o=0;o=a&&(I=a-1);var h=p-C,b=1-h;C=C*r*o,I=I*r*o;for(var y=0;y=r&&(G=r-1);var S=Z-A;A*=o,G*=o;for(var B=0;Ba[s]&&(a[s]=n[i]),i++;for(var c=[],g=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null;if(n?t.openGLRenderWindow=n:(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent()),t.context=t.openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qs.LINEAR),e.setMagnificationFilter(qs.LINEAR)):(e.setMinificationFilter(qs.NEAREST),e.setMagnificationFilter(qs.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(Qs.REPEAT),e.setWrapS(Qs.REPEAT),e.setWrapT(Qs.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified()));var r=t.renderable.getInputData(0);if(r&&r.getPointData().getScalars()){for(var a=r.getExtent(),o=r.getPointData().getScalars(),i=[],l=0;lt.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;switch(t.target){case t.context.TEXTURE_2D:n=t.context.TEXTURE_BINDING_2D;break;default:nc("impossible case")}e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=function(){t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t.openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=function(n,r){return t.internalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||ec("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var a=0;return(a=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(a=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(ec("Unsupported internal texture type!"),ec("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),a},e.setInternalFormat=function(n){n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=function(n,r){return t.format=e.getDefaultFormat(n,r),t.format},e.getDefaultFormat=function(e,n){if(t.openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}},e.resetFormatAndType=function(){t.format=0,t.internalFormat=0,t.openGLDataType=0},e.getDefaultDataType=function(e){if(t.openGLRenderWindow.getWebgl2())switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.FLOAT}switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear")?t.context.FLOAT:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){return t.openGLDataType=e.getDefaultDataType(n),t.openGLDataType},e.getShiftAndScale=function(){var e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:e=(n=127.5)-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:e=(n=32767.5)-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:e=(n=2147483647.5)-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;break;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case qs.NEAREST:return t.context.NEAREST;case qs.LINEAR:return t.context.LINEAR;case qs.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qs.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qs.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qs.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case Qs.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case Qs.REPEAT:return t.context.REPEAT;case Qs.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=a(r(l,[s]));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=s.length/6-1,e.createTexture(),e.bind();for(var c=a(r(l,s)),g=[],u=t.width,d=t.height,m=0;m=1&&y>=1;){var v=null;h<=t.maxLevel&&(v=g[6*h+I]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+I,h,t.internalFormat,b,y,0,t.format,t.openGLDataType,v),h++,b/=2,y/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,a,o){return e.getOpenGLDataType(a),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?a===$s.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType($s.UNSIGNED_CHAR),e.getInternalFormat($s.UNSIGNED_CHAR,4),e.getFormat($s.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.width=n.width,t.height=n.height,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);var r=!Object(Xo.m)(n.width)||!Object(Xo.m)(n.height),a=document.createElement("canvas");a.width=r?Object(Xo.h)(n.width):n.width,a.height=r?Object(Xo.h)(n.height):n.height;var o=a.getContext("2d");o.translate(0,a.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,a.width,a.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var i=a;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,i),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,a,o,i,l){return e.getOpenGLDataType(i),e.getInternalFormat(i,o),e.getFormat(i,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,l),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,a,i,l,s){for(var c=n*r*a,g=[],u=[],d=0;d4096&&(G===$s.FLOAT||i>=3)&&(B=4096);var V=1,R=1;c>B*B&&(R=V=Math.ceil(Math.sqrt(c/(B*B))));var w=Math.sqrt(c)/V;w=Object(Xo.h)(w);var k,W=Math.floor(w*V/n),x=Math.ceil(a/W),T=Object(Xo.h)(r*x/R);t.width=w,t.height=T,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=W,t.volumeInfo.yreps=x,t.volumeInfo.xstride=V,t.volumeInfo.ystride=R,t.volumeInfo.offset=Z.offset,t.volumeInfo.scale=Z.scale;var J=w*T*i;k=G===$s.FLOAT?new Float32Array(J):new Uint8Array(J);for(var X=0,O=Math.floor(n/V),N=Math.floor(r/R),H=0;H2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ac,n),_s.extend(e,t,n),t.sendParametersTime={},ln.c.obj(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},ln.c.obj(t.textureBuildTime,{mtime:0}),ln.c.set(e,t,["format","openGLDataType"]),ln.c.setGet(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ln.c.get(e,t,["width","height","volumeInfo","components","handle","target"]),rc(e,t)}var ic=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,a=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");a+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,a,r.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.context,r=n.COLOR_ATTACHMENT0;if(e>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");r+=e}n.framebufferTexture2D(n.FRAMEBUFFER,r,n.TEXTURE_2D,null,0)},e.setDepthBuffer=function(e){if(t.openGLRenderWindow.getWebgl2()){var n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else Object(ln.m)("Attaching depth buffer textures to fbo requires WebGL 2")},e.removeDepthBuffer=function(){if(t.openGLRenderWindow.getWebgl2()){var e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else Object(ln.m)("Attaching depth buffer textures to framebuffers requires WebGL 2")},e.getGLFramebuffer=function(){return t.glFramebuffer},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))},e.releaseGraphicsResources=function(){t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer),t.colorTexture&&t.colorTexture.releaseGraphicsResources()},e.getSize=function(){var e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=function(){e.bind();var n=t.context,r=ic.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(Ms.LINEAR),r.setMagnificationFilter(Ms.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,cn.b.UNSIGNED_CHAR,null),e.setColorBuffer(r),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)}}var sc={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function cc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Object(ln.h)(e,t),Object(ln.j)(e,t,["colorTexture"]),lc(e,t)}var gc={newInstance:Object(ln.g)(cc,"vtkFramebuffer"),extend:cc};function uc(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(ln.c.capitalize(t.currentOperation))},e.getTraverseOperation=function(){return t.currentTraverseOperation},e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t.currentParent=r,t.preDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((function(t){t.traverse(n,e)})),t.postDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})))}}var dc={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dc,n),ln.c.obj(e,t),ln.c.get(e,t,["currentOperation"]),ln.c.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),uc(e,t)}var fc={newInstance:ln.c.newInstance(mc,"vtkRenderPass"),extend:mc};function pc(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.deleted){t.currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);for(var a=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),i=0;i0&&t.volumeCount>0||t.depthRequested){var g=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=gc.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var u=t.framebuffer.getSize();null!==u&&u[0]===g[0]&&u[1]===g[1]||(t.framebuffer.create(g[0],g[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),s.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),s.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),s.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),s.traverse(e))}}}},e.getZBufferTexture=function(){return t.framebuffer?t.framebuffer.getColorTexture():null},e.requestDepth=function(){t.depthRequested=!0},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.incrementVolumeCount=function(){return t.volumeCount++}}var Cc={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cc,n),fc.extend(e,t,n),ln.c.get(e,t,["framebuffer"]),pc(e,t)}var hc={newInstance:ln.c.newInstance(Ic,"vtkForwardPass"),extend:Ic};function bc(e,t){t.classHierarchy.push("vtkGenericWidgetRepresentation")}var yc={};function vc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yc,n),_s.extend(e,t,n),bc(0,t)}var Zc={newInstance:ln.c.newInstance(vc),extend:vc};function Ac(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=function(n){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(var r=0;rt.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?El(t.keyMatrices.normalMatrix):(Dl(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Ul(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var Gc={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gc,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Ac(e,t)}var Bc={newInstance:ln.c.newInstance(Sc),extend:Sc};function Vc(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.activateTextures=function(){t.activeTextures=[],t.children.forEach((function(e){e.isA("vtkOpenGLTexture")&&(e.render(),e.getHandle()&&t.activeTextures.push(e))}))},e.opaquePass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}var Rc={context:null,activeTextures:[]};function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rc,n),_s.extend(e,t,n),Object(ln.j)(e,t,["context"]),Object(ln.e)(e,t,["activeTextures"]),Vc(e,t)}var kc={newInstance:Object(ln.g)(wc),extend:wc};function Wc(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=function(n){n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext())},e.opaquePass=function(e){if(e){var n=t.openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize),t.context.scissor(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)}},e.translucentPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=function(n){if(n!==t.lastRenderer||t.openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){Object(Yo.d)(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),Dl(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Object(Yo.i)(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Object(Yo.d)(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Object(Yo.i)(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Object(Yo.l)(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var xc={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function Tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),_s.extend(e,t,n),t.keyMatrixTime={},Object(ln.h)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Object(ln.j)(e,t,["context","keyMatrixTime"]),Wc(e,t)}var Jc={newInstance:Object(ln.g)(Tc),extend:Tc},Xc={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Oc={ObjectType:Xc};function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pc,n),ln.c.obj(e,t),ln.c.get(e,t,["openGLRenderWindow"]),Fc(e,t)}var Mc=Hc(Hc({newInstance:ln.c.newInstance(Kc),extend:Kc},{}),Oc),Lc={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}},Dc={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zc,n),ln.c.obj(e,t),t.properties={},ln.c.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Uc(e,t)}var jc=function(e){for(var t=1;t0&&(--o in t.hitProps||(t.hitProps[o]=!0))}},e.renderProp=function(n){t.currentPass===qc.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+t.idOffset),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===qc.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+t.idOffset)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.getPropFromID=function(e){return e>=0&&et.area[2]||n[1]t.area[3])return null;var i=[n[0]-t.area[0],n[1]-t.area[1]],l=e.convert(i[0],i[1],t.pixBuffer[qc.ACTOR_PASS]);if(l<=0)return null;var s={valid:!0};s.propID=l-t.idOffset,s.prop=e.getPropFromID(s.propID);var c=e.convert(i[0],i[1],t.pixBuffer[qc.COMPOSITE_INDEX_PASS]);if((c<0||c>16777215)&&(c=0),s.compositeID=c-t.idOffset,t.captureZValues){var g=4*(i[1]*(t.area[2]-t.area[0]+1)+i[0]);s.zValue=(256*t.zBuffer[g]+t.zBuffer[g+1])/65535,s.displayPosition=n}return s}var u=[n[0],n[1]],d=[0,0],m=e.getPixelInformation(n,0,a);if(m&&m.valid)return m;for(var f=1;ff?u[1]-f:0;p<=u[1]+f;++p){if(d[1]=p,u[0]>=f&&(d[0]=u[0]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[0]=u[0]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}for(var C=u[0]>=f?u[0]-(f-1):0;C<=u[0]+(f-1);++C){if(d[0]=C,u[1]>=f&&(d[1]=u[1]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[1]=u[1]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}}return a[0]=n[0],a[1]=n[1],null},e.convertSelection=function(e,n){var r=[],a=0;return n.forEach((function(n,o){var i=jc.newInstance();switch(i.setContentType($c.INDICES),e){case tg.FIELD_ASSOCIATION_CELLS:i.setFieldType(eg.CELL);break;case tg.FIELD_ASSOCIATION_POINTS:i.setFieldType(eg.POINT);break;default:ng("Unknown field association")}i.getProperties().propID=n.info.propID,i.getProperties().prop=n.info.prop,i.getProperties().compositeID=n.info.compositeID,i.getProperties().pixelCount=n.pixelCount,t.captureZValues&&(i.getProperties().displayPosition=[n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue],i.getProperties().worldPosition=t.openGLRenderWindow.displayToWorld(n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue,t.renderer)),i.setSelectionList(n.attributeIDs),r[a]=i,a++})),r},e.getInfoHash=function(e){return"".concat(e.propID," ").concat(e.compositeID)},e.generateSelection=function(n,r,a,o){for(var i=Math.floor(n),l=Math.floor(r),s=Math.floor(a),c=Math.floor(o),g=new Map,u=[0,0],d=l;d<=c;d++)for(var m=i;m<=s;m++){var f=[m,d],p=e.getPixelInformation(f,0,u);if(p&&p.valid){var C=e.getInfoHash(p);if(g.has(C)){var I=g.get(C);I.pixelCount++,t.captureZValues&&p.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ag,n),ln.c.obj(e,t),t.area=[0,0,0,0],t.propColorValue=[0,0,0],t.props=[],ln.c.setGet(e,t,["fieldAssociation","renderer","currentPass","captureZValues"]),ln.c.setGetArray(e,t,["area"],4),ln.c.setGetArray(e,t,["propColorValue"],3),ln.c.event(e,t,"event"),rg(e,t)}var ig=function(e){for(var t=1;t0&&(e=1/(t.ambient+t.diffuse+t.specular));for(var n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.addShaderVariable=mg("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(dg.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(dg.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(dg.PHONG)},e.getInterpolationAsString=function(){return ln.c.enumToString(dg,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ug.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ug.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ug.POINTS)},e.getRepresentationAsString=function(){return ln.c.enumToString(ug,t.representation)}}var pg={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,specular:0,specularPower:1,opacity:1,interpolation:dg.GOURAUD,representation:ug.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),ln.c.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),fg(e,t)}var Ig,hg=function(e){for(var t=1;t2)for(var r=0;r2){for(var r=0;r1?2*(e-1):0},polysToWireframe:function(e,t){return e>2?2*e:0},stripsToWireframe:function(e,t){return e>2?4*e-6:0},polysToSurface:function(e,t){return e>2?3*(e-2):0},stripsToSurface:function(e,t,n){return e>2?3*(e-2):0}},v=null,Z=null;a===sg.POINTS||"verts"===r?(v=b.anythingToPoints,Z=y.anythingToPoints):a===sg.WIREFRAME||"lines"===r?(v=b["".concat(r,"ToWireframe")],Z=y["".concat(r,"ToWireframe")]):(v=b["".concat(r,"ToSurface")],Z=y["".concat(r,"ToSurface")]);for(var A=n.getData(),G=A.length,S=0,B=0;B0&&(Math.abs(x)/W>1e6||Math.abs(Math.log10(W))>3||0===W&&x>1e6)){for(var N=new Float64Array(3),H=new Float64Array(3),Y=0;Y<3;++Y){var F=o.points.getRange(Y),P=F[1]-F[0];N[Y]=.5*(F[1]+F[0]),H[Y]=P>0?1/P:1}e.setCoordShiftAndScale(N,H)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);d=function(e){if(m=3*e,t.coordShiftAndScaleEnabled?(R[w++]=(i[m++]-t.coordShift[0])*t.coordScale[0],R[w++]=(i[m++]-t.coordShift[1])*t.coordScale[1],R[w++]=(i[m++]-t.coordShift[2])*t.coordScale[2]):(R[w++]=i[m++],R[w++]=i[m++],R[w++]=i[m++]),null!==l&&(f=o.haveCellNormals?3*(h+o.cellOffset):3*e,R[w++]=l[f++],R[w++]=l[f++],R[w++]=l[f++]),t.customData.forEach((function(t){I=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bg,n),Mc.extend(e,t,n),ln.c.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),ln.c.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),Sg(e,t)}var Rg={newInstance:ln.c.newInstance(Vg),extend:Vg},wg=ln.c.vtkErrorMacro;function kg(e,t){t.classHierarchy.push("vtkShader"),e.compile=function(){var e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;switch(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),t.shaderType){case"Fragment":e=t.context.FRAGMENT_SHADER;break;case"Vertex":default:e=t.context.VERTEX_SHADER}if(t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle),!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){var n=t.context.getShaderInfoLog(t.handle);return wg("Error compiling shader '".concat(t.source,"': ").concat(n)),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}var Wg={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["shaderType","source","error","handle","context"]),kg(e,t)}var Tg={newInstance:ln.c.newInstance(xg,"vtkShader"),extend:xg},Jg=ln.c.vtkErrorMacro;function Xg(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=function(){return t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(Jg("Links failed: ".concat(t.error)),0):(Jg(t.error),0):(Jg(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.fragmentShader.getError()),0):(Jg(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.vertexShader.getError()),0)},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=function(){return!(!t.linked&&!e.link()||(t.context.useProgram(t.handle),e.setBound(!0),0))},e.isBound=function(){return!!t.bound},e.release=function(){t.context.useProgram(null),e.setBound(!1)},e.setContext=function(e){t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=function(){if(t.inked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;if(t.uniformLocs={},t.context.linkProgram(t.handle),!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){var n=t.context.getProgramInfoLog(t.handle);return Jg("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(a,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(a,!1,o),!0},e.setUniformf=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(a,r),!0)},e.setUniformfv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(a,r),!0)},e.setUniformi=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(a,r),!0)},e.setUniformiv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(a,r),!0)},e.setUniform2f=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,a),!0},e.setUniform2fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(a,r),!0)},e.setUniform2i=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,a),!0},e.setUniform2iv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(a,r),!0)},e.setUniform3f=function(n,r,a,o){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r,a,o),!0},e.setUniform3fArray=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(a,r),!0)},e.setUniform3i=function(n){var r=e.findUniform(n);if(-1===r)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i1?a-1:0),i=1;i1?a-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=Tg.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=Tg.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=Tg.newInstance(),t.geometryShader.setShaderType("Geometry"),ln.c.obj(e,t),ln.c.get(e,t,["lastCameraMTime"]),ln.c.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),Xg(e,t)}var Hg={newInstance:ln.c.newInstance(Ng,"vtkShaderProgram"),extend:Ng,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var i="";r&&(i="g");var l=new RegExp(t,i),s=e.replace(l,a);return{replace:o,result:s}}};function Yg(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=function(){},e.initialize=function(){t.instancingExtension=null,t.openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t.openGLRenderWindow&&t.openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=function(){return 0!==t.handleVAO||!1===t.supported},e.bind=function(){if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,1):n.vertexAttribDivisor(i.index+s,1))}},e.release=function(){if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,0):n.vertexAttribDivisor(i.index+s,0)),n.disableVertexAttribArray(i.index+s)}},e.shaderProgramChanged=function(){e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=function(){e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=function(t,n,r,a,o,i,l,s){return e.addAttributeArrayWithDivisor(t,n,r,a,o,i,l,s,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,a,o,i,l,s,c,g,u){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Xc.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;var d=t.context,m={};if(m.name=a,m.index=d.getAttribLocation(t.handleProgram,a),m.offset=o,m.stride=i,m.type=l,m.size=s,m.normalize=c,m.isMatrix=u,m.divisor=g,-1===m.Index)return!1;if(r.bind(),d.enableVertexAttribArray(m.index),d.vertexAttribPointer(m.index,m.size,m.type,m.normalize,m.stride,m.offset),g>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m.index,1):d.vertexAttribDivisor(m.index,1)),m.buffer=r.getHandle(),!t.supported){for(var f=!1,p=0;p0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m+f,1):d.vertexAttribDivisor(m+f,1));return!0},e.removeAttributeArray=function(n){if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fg,n),t.buffers=[],ln.c.obj(e,t),ln.c.get(e,t,["supported"]),ln.c.setGet(e,t,["forceEmulation"]),Yg(e,t)}var Kg={newInstance:ln.c.newInstance(Pg,"vtkOpenGLVertexArrayObject"),extend:Pg};function Mg(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=function(e){t.program.setContext(e.getContext()),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=function(e){t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)}}var Lg={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lg,n),ln.c.obj(e,t),t.shaderSourceTime={},ln.c.obj(t.shaderSourceTime),t.attributeUpdateTime={},ln.c.obj(t.attributeUpdateTime),ln.c.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=Hg.newInstance(),t.VAO=Kg.newInstance(),t.CABO=Rg.newInstance(),Mg(e,t)}var Eg={newInstance:ln.c.newInstance(Dg),extend:Dg};function Ug(e,t){e.update=function(){e.getInputData()},e.addClippingPlane=function(e){"vtkPlane"===e.getClassName()&&t.clippingPlanes.push(e)},e.getNumberOfClippingPlanes=function(){return t.clippingPlanes.length},e.removeAllClippingPlanes=function(){t.clippingPlanes.length=0},e.removeClippingPlane=function(e){e<0||e>=6||t.clippingPlanes.splice(e,1)},e.getClippingPlanes=function(){return t.clippingPlanes},e.setClippingPlanes=function(t){if(t)if(Array.isArray(t))for(var n=t.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Ug(e,t)}};function jg(e,t){e.getBounds=function(){return 0},e.getBounds=function(n){e.getBounds();for(var r=0;r<6;r++)n[r]=t.bounds[r]},e.getCenter=function(){e.getBounds();for(var n=0;n<3;n++)t.center[n]=(t.bounds[2*n+1]+t.bounds[2*n])/2;return t.center.slice()},e.getLength=function(){var n=0,r=0;e.getBounds();for(var a=0;a<3;a++)r+=(n=t.bounds[2*a+1]-t.bounds[2*a])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var a=t.clippingPlanes,o=e;if(a){var i=a.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qg,n),_g.extend(e,t,n),t.bounds||Object(Xo.D)(t.bounds),t.center||(t.center=[0,0,0]),jg(e,t)}},$g={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},eu={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:$g},tu={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ru=eu.ScalarMappingTarget,au=eu.VectorMode,ou=Bo.a.VtkDataTypes,iu=tu.ColorMode,lu=ln.c.vtkErrorMacro;function su(e){return e}function cu(e){return Math.floor(255*e+.5)}function gu(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(au.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(au.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(au.RGBCOLORS)},e.build=function(){},e.isOpaque=function(){return!0},e.setAnnotations=function(n,r){if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)lu("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var a=r.length,o=0;o=0?t.annotationArray[a].annotation!==r&&(t.annotationArray[a].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),a=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=function(){return t.annotationArray.length},e.getAnnotatedValue=function(e){return e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value},e.getAnnotation=function(e){return void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation},e.getAnnotatedValueIndex=function(n){return t.annotationArray.length?e.checkForAnnotatedValue(n):-1},e.removeAnnotation=function(n){var r=e.checkForAnnotatedValue(n),a=r>=0;return a&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var a=e.getAnnotatedValueIndex(n);e.getIndexedColor(a,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=function(t){return e.getAnnotatedValueIndexInternal(t)},e.getAnnotatedValueIndexInternal=function(e){if(void 0!==t.annotatedValueMap[e]){var n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=function(e,t){t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=function(){t.annotatedValueMap=[];for(var e=t.annotationArray.length,n=0;n1?e.mapVectorsThroughTable(t,o,ru.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,o,ru.RGBA,s))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),a=e.getNumberOfComponents(),o=t.getData(),i=e.getData(),l=0;l=c&&(s=c-1)):(-1===l&&(l=e.getVectorSize()),l<=0?(s=0,l=c):(s<0&&(s=0),s>=c&&(s=c-1),s+l>c&&(l=c-s)),i!==au.MAGNITUDE||1!==c&&1!==l||(i=au.COMPONENT));var g=0;switch(s>0&&(g=s),i){case au.COMPONENT:e.mapScalarsThroughTable(t,n,r,g);break;default:case au.MAGNITUDE:var u=Bo.a.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,u,l),e.mapScalarsThroughTable(u,n,r,0);break;case au.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var a=r(n),o=t.getData(),i=e.getData(),l=o.length,s=0,c=0;c=1&&n.getDataType()===ou.UNSIGNED_CHAR)return n;var i=Bo.a.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:ou.UNSIGNED_CHAR});if(a<=0)return i;o=(o=o>0?o:0)<1?o:1;var l=su;switch(n.getDataType()!==ou.FLOAT&&n.getDataType()!==ou.DOUBLE||(l=cu),r){case 1:e.luminanceToRGBA(i,n,o,l);break;case 2:e.luminanceAlphaToRGBA(i,n,l);break;case 3:e.rGBToRGBA(i,n,o,l);break;case 4:e.rGBAToRGBA(i,n,o,l);break;default:return lu("Cannot convert colors"),null}return i},e.usingLogScale=function(){return!1},e.getNumberOfAvailableColors=function(){return 16777216},e.setRange=function(t,n){return e.setMappingRange(t,n)},e.getRange=function(t,n){return e.getMappingRange()}}var uu={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:au.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uu,n),ln.c.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],ln.c.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),ln.c.setArray(e,t,["mappingRange"],2),ln.c.getArray(e,t,["mappingRange"]),gu(e,t)}var mu=function(e){for(var t=1;tt.range[1]?t.maxIndex+1+1.5:(n=(e+t.shift)*t.scale)e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=function(n,r,a,o){var i=e.linearLookup;t.indexedLookup&&(i=e.indexedLookupFunction);var l=e.getMappingRange(),s={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,s);var c=e.getAlpha(),g=n.getNumberOfTuples(),u=n.getNumberOfComponents(),d=r.getData(),m=n.getData();if(c>=1){if(a===$g.RGBA)for(var f=0;ft.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Cu={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),mu.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},ln.c.obj(t.buildTime),t.opaqueFlagBuildTime={},ln.c.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},ln.c.obj(t.insertTime,{mtime:0}),ln.c.get(e,t,["buildTime"]),ln.c.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),ln.c.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),pu(e,t)}var hu={newInstance:ln.c.newInstance(Iu,"vtkLookupTable"),extend:Iu},bu=1,yu=0,vu=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Zu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;yu=e}var Au={getResolveCoincidentTopologyAsString:function(){return vu[yu]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bu},getResolveCoincidentTopology:function(){return yu},setResolveCoincidentTopology:Zu,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bu=e},setResolveCoincidentTopologyToDefault:function(){Zu(0)},setResolveCoincidentTopologyToOff:function(){Zu(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Zu(1)}};function Gu(e,t,n){n.forEach((function(n){e["get".concat(n.method)]=function(){return t[n.key]},e["set".concat(n.method)]=function(e,r){t[n.key]={factor:e,offset:r}}}))}var Su=["Polygon","Line","Point"],Bu={};Gu(Bu,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Su.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Vu={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),ln.c.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Au).forEach((function(t){e[t]=Au[t]})),Object.keys(Bu).forEach((function(t){e[t]=Bu[t]})),Gu(e,t.topologyOffset,Su.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Bu.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Bu,otherStaticMethods:Au,CATEGORIES:Su};function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:a}},e.createColorTextureCoordinates=function(t,n,r,a,o,i,l,s,c){var g=(i[1]-i[0])/s,u=[];u[0]=i[0]-g,u[1]=i[1]+g;var d=1/(u[1]-u[0]),m=n.getData(),f=t.getData(),p=0,C=0;if(o<0||o>=a)for(var I=0;It.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var l=t.lookupTable.getNumberOfAvailableColors();l>4094&&(l=4094),l+=2;for(var s=(a[1]-a[0])/(l-1-2),c=new Float64Array(2*l),g=0;gt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var m=n.getNumberOfComponents(),f=n.getNumberOfTuples();t.colorCoordinates=Bo.a.newInstance({numberOfComponents:2,values:new Float32Array(2*f)});var p=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Xu.MAGNITUDE&&n.getNumberOfComponents()>1&&(p=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,f,m,p,a,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,o)}},e.getIsOpaque=function(){var t=e.getLookupTable();return!t||(t.build(),t.isOpaque())},e.canUseTextureMapForColoring=function(n){if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;var r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),a=r.scalars;return!(!a||r.cellFlag||t.colorMode===xu.DEFAULT&&a.getDataType()===Ou.UNSIGNED_CHAR||t.colorMode===xu.DIRECT_SCALARS)},e.clearColorArrays=function(){t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=function(){return t.lookupTable||e.createDefaultLookupTable(),t.lookupTable},e.getMTime=function(){var e=t.mtime;if(null!==t.lookupTable){var n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=function(){var t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells()}},e.acquireInvertibleLookupTable=Nu("AcquireInvertibleLookupTable"),e.valueToColor=Nu("ValueToColor"),e.colorToValue=Nu("ColorToValue"),e.useInvertibleColorFor=Nu("UseInvertibleColorFor"),e.clearInvertibleColor=Nu("ClearInvertibleColor")}var Yu={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,viewSpecificProperties:null,customShaderAttributes:[]};function Fu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),qg.extend(e,t,n),ln.c.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),ln.c.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),ln.c.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Vu.implementCoincidentTopologyMethods(e,t),Hu(e,t)}var Pu=wu(wu(wu({newInstance:ln.c.newInstance(Fu,"vtkMapper"),extend:Fu},ku),Wu),tu),Ku="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",Mu="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n",Lu={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,a){var o=e.getCoincidentParameters(r,a);if(o&&(0!==o.factor||0!==o.offset)){var i=n.Fragment;i=Hg.substitute(i,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=i}}}},Du={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Eu=hg.Representation,Uu=hg.Shading,zu=Pu.ScalarMode,_u=ic.Filter,ju=ic.Wrap,Qu=ln.c.vtkErrorMacro,qu={type:"StartEvent"},$u={type:"EndEvent"};function ed(e,t){function n(e,t,n){return t.identity(n),e.reduce((function(e,n,r){return 0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e}),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=function(n){n&&(t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t.openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.openGLCamera=t.openGLRenderer.getViewNodeFor(t.openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.render=function(){var n=t.openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(var r=Du.Start;r= cos(radians(lightConeAngle".concat(u,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(u,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(u,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(u,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(u,");")," }"]);l=l.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),a=Hg.substitute(a,"//VTK::Light::Impl",l,!1).result;break;default:Qu("bad light complexity")}e.Fragment=a},e.replaceShaderNormal=function(n,r,a){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,i=n.Geometry,l=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Hg.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,l=Hg.substitute(l,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(a.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));"," vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," fdx = normalize(fdx);"," fdy = normalize(fdy);"," if (abs(fdx.x) > 0.0)"," { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),n.Vertex=o,n.Geometry=i,n.Fragment=l}},e.replaceShaderPositionVC=function(e,n,r){var a=e.Vertex,o=e.Geometry,i=e.Fragment;r.getProperty().getRepresentation()!==Eu.POINTS&&t.lastBoundBO.getPrimitiveType()!==Du.Points||(a=Hg.substitute(a,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(a=Hg.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=a,e.Geometry=o,e.Fragment=i},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var a=e.Vertex,o=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;a=Hg.substitute(a,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var l=t.openGLActor.getActiveTextures(),s=2,c=2;if(l&&l.length>0&&(s=l[0].getComponents(),l[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(c=3)),t.renderable.getColorTextureMap()&&(s=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),c=2),2===c){if(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,l&&l.length>=1)switch(s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=a,e.Geometry=o,e.Fragment=i}},e.replaceShaderClip=function(e,n,r){var a=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6),a=Hg.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,a=Hg.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Hg.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=Hg.substitute(o,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=a,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,a=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||a.getEdgeVisibility()&&a.getRepresentation()===Eu.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Du.Points||a.getRepresentation()===Eu.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Du.Lines||a.getRepresentation()===Eu.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Du.Tris&&o!==Du.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Du.TrisEdges&&o!==Du.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=Hg.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Hg.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderValues=function(n,r,a){if(e.replaceShaderColor(n,r,a),e.replaceShaderNormal(n,r,a),e.replaceShaderLight(n,r,a),e.replaceShaderTCoord(n,r,a),e.replaceShaderPicking(n,r,a),e.replaceShaderClip(n,r,a),e.replaceShaderCoincidentOffset(n,r,a),e.replaceShaderPositionVC(n,r,a),t.haveSeenDepthRequest){var o=n.Fragment;o=Hg.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=Hg.substitute(o,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=o}},e.getNeedToRebuildShaders=function(n,r,a){var o=0,i=0,l=n.getPrimitiveType(),s=t.currentInput,c=!1,g=s.getPointData().getNormals(),u=s.getCellData().getNormals(),d=a.getProperty().getInterpolation()===Uu.FLAT,m=a.getProperty().getRepresentation(),f=e.getOpenGLMode(m,l);if(f===t.context.TRIANGLES||u&&!g||!d&&g?c=!0:d||f!==t.context.LINES||(c=!0),a.getProperty().getLighting()&&c){o=0;for(var p=r.getLightsByReference(),C=0;C0&&(i++,0===o&&(o=1)),1===o&&(i>1||1!==I.getIntensity()||!I.lightTypeIsHeadLight())&&(o=2),o<3&&I.getPositional()&&(o=3)}}var h=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),y=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&y===i||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:i},!0),h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===n.getProgram()||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){var o=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&o>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach((function(e,r){n.getProgram().isAttributeUsed("".concat(e,"MC"))&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"".concat(e,"MC"),n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||Qu("Error setting ".concat(e,"MC in shader VAO.")))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||Qu("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||Qu("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6);for(var l=[],s=0;s0){var g=c.getColorByReference(),u=c.getIntensity();t.lightColor[0]=g[0]*u,t.lightColor[1]=g[1]*u,t.lightColor[2]=g[2]*u;var d=c.getDirection(),m=n.getActiveCamera().getViewMatrix(),f=Object(Ao.a)(d);c.lightTypeIsSceneLight()&&(f[0]=m[0]*d[0]+m[1]*d[1]+m[2]*d[2],f[1]=m[4]*d[0]+m[5]*d[1]+m[6]*d[2],f[2]=m[8]*d[0]+m[9]*d[1]+m[10]*d[2],Object(Xo.y)(f)),t.lightDirection[0]=f[0],t.lightDirection[1]=f[1],t.lightDirection[2]=f[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],Object(Xo.y)(t.lightDirection),o.setUniform3fArray("lightColor".concat(i),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(i),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(i),t.lightHalfAngle),i++}}if(!(a<3)){var p=n.getActiveCamera().getViewMatrix();Object(Yo.i)(p,p),i=0;for(var C=0;C0){var h=I.getTransformedPosition(),b=new Float64Array(3);Object(Fo.q)(b,h,p),o.setUniform3fArray("lightAttenuation".concat(i),I.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(i),I.getPositional()),o.setUniformf("lightExponent".concat(i),I.getExponent()),o.setUniformf("lightConeAngle".concat(i),I.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(i),[b[0],b[1],b[2]]),i++}}}}},e.setCameraShaderParameters=function(e,r,a){var o=e.getProgram(),i=t.openGLCamera.getKeyMatrices(r),l=r.getActiveCamera(),s=t.openGLCamera.getKeyMatrixTime().getMTime(),c=o.getLastCameraMTime(),g=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,u=a.getIsIdentity(),d=u?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();o.setUniformMatrix("MCPCMatrix",n([i.wcpc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("MCVCMatrix")&&o.setUniformMatrix("MCVCMatrix",n([i.wcvc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("normalMatrix")&&o.setUniformMatrix3x3("normalMatrix",n([i.normalMatrix,d.normalMatrix],$l,t.tmpMat3)),c!==s&&(o.isUniformUsed("cameraParallel")&&o.setUniformi("cameraParallel",l.getParallelProjection()),o.setLastCameraMTime(s)),u||o.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram(),o=r.getProperty(),i=o.getOpacity(),l=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),s=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),c=t.drawingEdges?1:o.getAmbient(),g=t.drawingEdges?0:o.getDiffuse(),u=t.drawingEdges?0:o.getSpecular(),d=o.getSpecularPower();a.setUniformf("opacityUniform",i),a.setUniform3fArray("ambientColorUniform",l),a.setUniform3fArray("diffuseColorUniform",s),a.setUniformf("ambient",c),a.setUniformf("diffuse",g);var m=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(m<1)){var f=o.getSpecularColorByReference();if(a.setUniform3fArray("specularColorUniform",f),a.setUniformf("specularPowerUniform",d),a.isUniformUsed("ambientIntensityBF")){if(i=(o=r.getBackfaceProperty()).getOpacity(),l=o.getAmbientColor(),c=o.getAmbient(),s=o.getDiffuseColor(),g=o.getDiffuse(),f=o.getSpecularColor(),u=o.getSpecular(),a.setUniformf("ambientIntensityBF",c),a.setUniformf("diffuseIntensityBF",g),a.setUniformf("opacityUniformBF",i),a.setUniform3fArray("ambientColorUniformBF",l),a.setUniform3fArray("diffuseColorUniformBF",s),m<1)return;a.setUniformf("specularIntensityBF",u),a.setUniform3fArray("specularColorUniformBF",f),a.setUniformf("specularPowerUniformBF",d)}}},e.renderPieceStart=function(n,r){t.primitiveIDOffset=0,t.openGLRenderer.getSelector()&&(t.openGLRenderer.getSelector().getCurrentPass(),t.openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===Eu.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var l=Du.Start;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,td,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=Du,t.tmpMat3=El(new Float64Array(9)),t.tmpMat4=Object(Yo.h)(new Float64Array(16));for(var r=Du.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,a)},e.replaceShaderColor=function(e,r,a){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,i=e.Geometry,l=e.Fragment,s=t.lastBoundBO.getReferenceByName("lastLightComplexity"),c=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];s&&(c=c.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var g=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(g=g.concat([" vec3 specularColor;"," float specularPower;"])),g=g.concat([" opacity = opacityUniform;"]),s&&(g=g.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(c=c.concat(["varying vec4 vertexColorVSOutput;"]),o=Hg.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,i=Hg.substitute(i,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,g=g.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),l=Hg.substitute(l,"//VTK::Color::Impl",g).result,l=Hg.substitute(l,"//VTK::Color::Dec",c).result,e.Vertex=o,e.Geometry=i,e.Fragment=l}n.replaceShaderColor(e,r,a)},e.replaceShaderPositionVC=function(e,r,a){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,a)},e.replaceShaderPicking=function(e,r,a){if(t.hardwareSupport){var o=e.Fragment,i=e.Vertex;i=Hg.substitute(i,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,i=Hg.substitute(i,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=i,o=Hg.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=Hg.substitute(o,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=o}else n.replaceShaderPicking(e,r,a)},e.updateGlyphShaderParameters=function(n,r,a,o,i,l,s,c){var g=a.getProgram();if(n){var u=t.normalMatrix,d=l,m=9*s,f=t.tmpMat3,p=u[0],C=u[1],I=u[2],h=u[3],b=u[4],y=u[5],v=u[6],Z=u[7],A=u[8],G=d[m],S=d[m+1],B=d[m+2],V=d[m+3],R=d[m+4],w=d[m+5],k=d[m+6],W=d[m+7],x=d[m+8];f[0]=G*p+S*h+B*v,f[1]=G*C+S*b+B*Z,f[2]=G*I+S*y+B*A,f[3]=V*p+R*h+w*v,f[4]=V*C+R*b+w*Z,f[5]=V*I+R*y+w*A,f[6]=k*p+W*h+x*v,f[7]=k*C+W*b+x*Z,f[8]=k*I+W*y+x*A,g.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,i,16*s),g.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,i,16*s),g.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var T=o.getData();t.tmpColor[0]=T[4*s]/255,t.tmpColor[1]=T[4*s+1]/255,t.tmpColor[2]=T[4*s+2]/255,g.setUniform3fArray("ambientColorUniform",t.tmpColor),g.setUniform3fArray("diffuseColorUniform",t.tmpColor)}c&&g.setUniform3fArray("mapperIndex",c.getPropColorValue())},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===id.SURFACE,l=t.openGLCamera.getKeyMatrices(n),s=t.openGLActor.getKeyMatrices();_l(t.normalMatrix,l.normalMatrix,s.normalMatrix),Object(Yo.l)(t.mcpcMatrix,l.wcpc,s.mcwc),Object(Yo.l)(t.mcvcMatrix,l.wcvc,s.mcwc);var c=t.renderable.getMatrixArray(),g=t.renderable.getNormalArray(),u=t.renderable.getColorArray(),d=c.length/16,m=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===sd.COMPOSITE_INDEX_PASS&&(m=!0);for(var f=t.primTypes.Start;fe.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||od("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||od("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,a),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,a)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(a,ld.ARRAY_BUFFER),t.normalBuffer.upload(o,ld.ARRAY_BUFFER),i?t.colorBuffer.upload(i.getData(),ld.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var l=a.length/16,s=new Uint8Array(4*l),c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),rd.extend(e,t,n),t.tmpMat3=El(new Float64Array(9)),t.normalMatrix=El(new Float64Array(9)),t.mcpcMatrix=Object(Yo.h)(new Float64Array(16)),t.mcvcMatrix=Object(Yo.h)(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},ln.c.obj(t.glyphBOBuildTime,{mtime:0}),ud(e,t)}var fd={newInstance:ln.c.newInstance(md,"vtkOpenGLGlyph3DMapper"),extend:md},pd={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}},Cd={NEAREST:0,LINEAR:1},Id={InterpolationType:Cd},hd=ln.c.vtkErrorMacro,bd=pd.SlicingMode;function yd(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function vd(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=function(n){if(n){t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera()),t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(r.getActiveCamera())}},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.getCoincidentParameters=function(e,n){return t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null},e.render=function(){var n=t.openGLImageSlice.getRenderable(),r=t.openGLRenderer.getRenderable();e.renderPiece(r,n)},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=Ku,e.Fragment=Mu,e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Vertex,i=n.Fragment;o=Hg.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var l=t.openGLTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(s){for(var g=1;gn.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||hd("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||hd("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var i=t.openGLTexture.getComponents(),l=a.getProperty().getIndependentComponents();if(l)for(var s=0;s1?1:0;var M=o.getData(),L=null;if(T===bd.I){L=new M.constructor(H[2]*H[1]*s);for(var D=0,E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zd,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=Eg.newInstance(),t.openGLTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.pwfTexture=ic.newInstance(),t.imagemat=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,[]),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime),vd(e,t)}var Gd={newInstance:ln.c.newInstance(Ad,"vtkOpenGLImageMapper"),extend:Ad};function Sd(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.opaqueZBufferPass=function(t,n){return e.opaquePass(t,n)},e.opaquePass=function(n,r){n&&(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}var Bd={context:null,keyMatrixTime:null,keyMatrices:null};function Vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bd,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),Sd(e,t)}var Rd={newInstance:ln.c.newInstance(Vd,"vtkOpenGLImageSlice"),extend:Vd},wd=ln.c.vtkDebugMacro;function kd(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var a=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,i=t.openGLRenderer.getTiledSizeAndOrigin(),l=null;if(t.renderable.getUseZValues()){var s=r.getZBufferTexture(),c=Math.floor(s.getWidth()),g=Math.floor(s.getHeight()),u=t.openGLRenderWindow.getContext();s.bind();var d=r.getFramebuffer();d?d.saveCurrentBindingsAndBuffers():wd("No framebuffer to save/restore");var m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.getHandle(),0),u.checkFramebufferStatus(u.FRAMEBUFFER)===u.FRAMEBUFFER_COMPLETE&&(l=new Uint8Array(c*g*4),u.viewport(0,0,c,g),u.readPixels(0,0,c,g,u.RGBA,u.UNSIGNED_BYTE,l)),d&&d.restorePreviousBindingsAndBuffers(),u.deleteFramebuffer(m)}t.renderable.invokeCallback(t.renderable.getInputData(),o,a,i,l)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var Wd={};function xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),_s.extend(e,t,n),kd(e,t)}var Td={newInstance:ln.c.newInstance(xd,"vtkOpenGLPixelSpaceCallbackMapper"),extend:xd},Jd=ln.c.vtkDebugMacro;function Xd(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.renderable.isActiveCameraCreated()||t.renderable.resetCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=function(){for(var e=0,n=t.renderable.getLightsByReference(),r=0;r0&&e++;return e||(Jd("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,a=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=a.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(a.clearDepth(1),r|=a.DEPTH_BUFFER_BIT,a.depthMask(!0));var o=e.getTiledSizeAndOrigin();a.enable(a.SCISSOR_TEST),a.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.colorMask(!0,!0,!0,!0),a.clear(r),a.enable(a.DEPTH_TEST)}},e.cameraPass=function(t){t&&e.clear()},e.getAspectRatio=function(){var e=t.parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=function(){var e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=Object(Xo.a)(e[0]-n[0],0,1),a=Object(Xo.a)(e[1]-n[1],0,1),o=t.parent.normalizedDisplayToDisplay(r,a),i=Math.round(o[0]),l=Math.round(o[1]),s=Object(Xo.a)(e[2]-n[0],0,1),c=Object(Xo.a)(e[3]-n[1],0,1);s>n[2]-n[0]&&(s=n[2]-n[0]),c>n[3]-n[1]&&(c=n[3]-n[1]);var g=t.parent.normalizedDisplayToDisplay(s,c),u=Math.round(g[0])-i,d=Math.round(g[1])-l;return u<0&&(u=0),d<0&&(d=0),{usize:u,vsize:d,lowerLeftU:i,lowerLeftV:l}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var a=t.renderable.getBackgroundByReference();t.context.clearColor(a[0],a[1],a[2],a[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,r.depthMask(!0)),r.colorMask(!0,!0,!0,!0);var o=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=function(){null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))}}var Od={context:null,openGLRenderWindow:null,selector:null};function Nd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),_s.extend(e,t,n),ln.c.get(e,t,["shaderCache"]),ln.c.setGet(e,t,["selector"]),Xd(e,t)}var Hd={newInstance:ln.c.newInstance(Nd,"vtkOpenGLRenderer"),extend:Nd},Yd=ln.c.vtkErrorMacro;function Fd(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=function(n){if(n){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera())}},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=function(n,r){if(n&&!t.openGLRenderer.getSelector()){e.updateBufferObjects(),t.openGLRenderWindow.enableDepthMask(),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var a=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",a);var o=t.openGLRenderer.getRenderable(),i=t.openGLCamera.getKeyMatrices(o),l=new Float64Array(16);if(Object(Yo.g)(l,i.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",l),"box"===t.lastFormat){var s=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",s[0],s[1],s[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=function(){if(!t.tris.getCABO().getElementCount()){for(var e=new Float32Array(12),n=0;n<4;n++)e[3*n]=n%2*2-1,e[3*n+1]=n>1?1:-1,e[3*n+2]=1;var r=Bo.a.newInstance({numberOfComponents:3,values:e});r.setName("points");var a=new Uint16Array(8);a[0]=3,a[1]=0,a[2]=1,a[3]=3,a[4]=3,a[5]=0,a[6]=3,a[7]=2;var o=Bo.a.newInstance({numberOfComponents:1,values:a});t.tris.getCABO().createVBO(o,"polys",sg.SURFACE,{points:r,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Yd("Error setting vertexMC in shader VAO."));var i=t.renderable.getTextures();i.length||Yd("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==i[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(i[0]))}}var Pd={context:null};function Kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),_s.extend(e,t,n),t.openGLTexture=ic.newInstance(),t.tris=Eg.newInstance(),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Fd(e,t)}var Md={newInstance:ln.c.newInstance(Kd),extend:Kd};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dd=ln.c.vtkErrorMacro;function Ed(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||Dd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),a.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())a.setUniformMatrix("MCVCMatrix",i.wcvc);else{var l=t.openGLActor.getKeyMatrices(),s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(g=i.getArray(t.renderable.getScaleArray()).getData());var u=null,d=0,m=null;a?(d=a.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),u=a.getData(),m=new Uint8Array(3*s*4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(d);var f=new Float32Array(5*s*3);o.setStride(20);for(var p=Math.cos(Object(Xo.B)(30)),C=0,I=0,h=0,b=0,y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ud,n),rd.extend(e,t,n),Ed(e,t)}var _d={newInstance:ln.c.newInstance(zd,"vtkOpenGLSphereMapper"),extend:zd};function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qd=ln.m;function qd(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||Qd("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||Qd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||Qd("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),r.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",i.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",i.normalMatrix);else{var l=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){var s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}if(a.isUniformUsed("normalMatrix")){var c=new Float64Array(9);_l(c,i.normalMatrix,l.normalMatrix),a.setUniformMatrix3x3("normalMatrix",c)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null,u=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),a&&(u=a.getNumberOfComponents(),o.setColorOffset(4),g=a.getData(),o.setColorBOStride(8)),o.setColorComponents(u),o.setStride(28);var d=new Float32Array(7*s*12),m=new Uint8Array(12*s*(g?8:4)),f=null,p=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(f=i.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&i.hasArray(t.renderable.getOrientationArray())?p=i.getArray(t.renderable.getOrientationArray()).getData():Qd(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var C=[0,1,3,0,3,2,2,3,5,2,5,4],I=0,h=0,b=0,y=0,v=0;v=4?255:0,m[y++]=C[G]>=2?255:0,m[y++]=255,h=v*u,g&&(m[y++]=g[h],m[y++]=g[h+1],m[y++]=g[h+2],m[y++]=g[h+3])}o.setElementCount(b/7),o.upload(d,Xc.ARRAY_BUFFER),o.getColorBO().upload(m,Xc.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var $d={};function em(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),rd.extend(e,t,n),qd(e,t)}var tm={newInstance:Object(ln.g)(em,"vtkOpenGLStickMapper"),extend:em},nm="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n",rm=hg.Representation;function am(e,t,n,r){var o=Object(a.a)(t,2),i=o[0],l=o[1],s=e.getContext(),c=ic.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:s.FLOAT,baseLevel:0,maxLevel:0});return c.setOpenGLRenderWindow(e),c.setInternalFormat(s.RGBA32F),c.create2DFromRaw(i,l,4,"Float32Array",null),c.activate(),c.sendParameters(),c.deactivate(),c}function om(e,t){return am(e,t,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE)}function im(e,t){t.classHierarchy.push("vtkLICPingPongBufferManager"),t.openGLRenderWindow?(t.quad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",rm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow),t.context=t.openGLRenderWindow.getContext(),t.licTexture0=om(t.openGLRenderWindow,t.size),t.seedTexture0=om(t.openGLRenderWindow,t.size),t.licTexture1=om(t.openGLRenderWindow,t.size),t.seedTexture1=om(t.openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?am(t.openGLRenderWindow,t.size,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE):null,t.imageVectorTexture=t.doVTPass?function(e,t){return am(e,t,ic.Filter.LINEAR,ic.Wrap.CLAMP_TO_EDGE)}(t.openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=function(){t.readIndex=1-t.readIndex},e.renderQuad=function(e,n){var r=t.quad,a=t.context,o=t.quadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=function(){return 0===t.readIndex?t.licTexture0:t.licTexture1},e.getLastSeedBuffer=function(){return 0===t.readIndex?t.seedTexture0:t.seedTexture1},e.getLICBuffer=function(){return 1-t.readIndex==0?t.licTexture0:t.licTexture1},e.getSeedBuffer=function(){return 1-t.readIndex==0?t.seedTexture0:t.seedTexture1},e.getLICTextureUnit=function(){var e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=function(){var e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=function(){return t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()},e.getImageVectorTextureUnit=function(){return t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit()},e.getMaskVectorTextureUnit=function(){return t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit()},e.clearBuffers=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);var a=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),a.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(a),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=function(e){var n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,a=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1])},e.detachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=function(){var e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=function(){var e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=function(){t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);var e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=function(){var e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]),t.textures[t.readIndex][0].deactivate()},e.detachBuffers=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);var r=t.textures[t.readIndex],a=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),a[0]&&a[0].deactivate(),a[1]&&a[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=function(){return 1-t.readIndex},e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}var lm={openGLRenderWindow:null,vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lm,n),ln.c.obj(e,t),ln.c.get(e,t,["readIndex"]),ln.c.setGet(e,t,["doEEPass","doVTPass","openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),im(e,t)}var cm={newInstance:ln.c.newInstance(sm,"vtkLICPingPongBufferManager"),extend:sm},gm=0,um=1,dm=2,mm=3,fm=0,pm=1;function Cm(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.dumpTextureValues=function(e,n){var r=Object(a.a)(n,2),o=r[0],i=r[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,g=gc.newInstance(),u=l,d=null;return g.setOpenGLRenderWindow(s),g.saveCurrentBindingsAndBuffers(),g.create(o,i),g.populateFramebuffer(),g.setColorBuffer(e),d=new Float32Array(o*i*c),u.readPixels(0,0,o,i,4===c?u.RGBA:u.RGB,u.FLOAT,d),g.restorePreviousBindingsAndBuffers(),d},e.getTextureMinMax=function(n,r){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,i=e.dumpTextureValues(n,r,a,o,4),l=Number.MAX_VALUE,s=Number.MIN_VALUE,c=0;cs&&(s=g)}return{min:l,max:s}},e.getComponentSelectionProgram=function(e){var t="xyzw";return".".concat(t[e[0]]).concat(t[e[1]])},e.buildShaders=function(){t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");var n=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl","vec2 V = texture2D(texVectors, tcoordVC.st)".concat(e.getComponentSelectionProgram(t.componentIds),";")).result;t.VTProgram=e.buildAShader(n);var r=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){var e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=function(a,o,i,l,s,c){if(t.openGLRenderWindow=s,t.context=s.getContext(),Object.assign(t,c),a[0]<=0||a[1]<=0)return null;var g=[1/a[0],1/a[1]],u=t.stepSize*Math.sqrt(g[0]*g[0]+g[1]*g[1]);u<=0&&(u=1e-10);var d,m=t.context,f=t.framebuffer;f&&a[0]===f.getSize()[0]&&a[1]===f.getSize()[1]||((f=gc.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),(d=f).create.apply(d,Object(Ao.a)(a)),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),m.viewport.apply(m,[0,0].concat(Object(Ao.a)(a))),m.scissor.apply(m,[0,0].concat(Object(Ao.a)(a))),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(i),t.bufs.setNoiseTexture(l)):t.bufs=cm.newInstance({openGLRenderWindow:s,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:i,noiseTexture:l,framebuffer:f,size:a});var p=[(l.getWidth()+1)/a[0],(l.getHeight()+1)/a[1]],C=1/a[0],I=1/a[1],h=t.openGLRenderWindow.getShaderCache();if(t.transformVectors){var b=t.VTProgram;h.readyShaderProgram(b),t.bufs.attachImageVectorBuffer(),b.setUniform2f.apply(b,["uTexSize"].concat(Object(Ao.a)(a))),b.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),t.bufs.renderQuad(a,b),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);var y=t.LIC0ShaderProgram;h.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f.apply(y,["uNoiseBoundsPt1"].concat(p)),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,a,y);var v=t.LICIShaderProgram;h.readyShaderProgram(v),v.setUniformi("uPassNo",0),v.setUniformf("uStepSize",-u),v.setUniform2f.apply(v,["uNoiseBoundsPt1"].concat(p)),v.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),v.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(var Z=0;Z1||l<0)&&(console.error("Invalid color range: ",l,s),l=0,s=1);var c=s-l;n&&(l+=c*t.lowLICContrastEnhancementFactor,c=(s-=c*t.highLICContrastEnhancementFactor)-l);var g=t.CEProgram;o.readyShaderProgram(g),g.setUniformi("texLIC",t.bufs.getLICTextureUnit()),g.setUniformf("uMin",l),g.setUniformf("uMaxMinDiff",c),r(t.bufs,a,g)}}var Im={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Im,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),Cm(e,t)}var bm={newInstance:ln.c.newInstance(hm,"vtkLineIntegralConvolution2D"),extend:hm},ym=n(53);function vm(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}var Zm={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:gm,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:0,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:pm,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function Am(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),ln.c.obj(e,t),ln.c.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),vm(0,t)}var Gm={newInstance:ln.c.newInstance(Am,"vtkSurfaceLICInterface"),extend:Am},Sm=hg.Representation;function Bm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=function(e,n){var r=t.licQuad,a=t.context,o=t.licQuadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=function(e){if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Object(ym.a)(t.noiseGeneratorSeed,{global:!0});var n=[],r=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue"),o=r.noiseTextureType,i=r.noiseGrainSize,l=r.numberOfNoiseLevels,s=r.noiseImpulseProbability,c=r.noiseImpulseBackgroundValue,g=r.minNoiseValue,u=r.maxNoiseValue;switch(o){case pm:n=function(e,t,n,r,a,o){var i=Math.max(0,Math.min(1,n)),l=Float32Array.from({length:e*e},(function(){var e=0;if(1===i||Math.random()>1-i)for(var t=0;t<2048;++t)e+=Math.random();return e})),s=0,c=2049;l.forEach((function(e){c=1===i?e0?e:c,s=e>s?e:s}));var g=s-c;0===g&&(c=0,g=0===s?1:s);var u=t-1,d=0!==u?1/u:0,m=o-a;return l.map((function(e){var n=e=c?1===t?o:a+(i>u?u:i)*d*m:r}))}(Math.floor(e/i),l,s,c,g,u);break;case fm:default:n=function(e,t,n,r){var o=Object(a.a)(e,2),i=o[0],l=o[1],s=r-n;return Float32Array.from({length:i*l},(function(){var e=Math.random();return(e=(e=Math.floor(e*t)/t)*s+n)>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],l,g,u)}var d=1/i,m=Float32Array.from({length:e*e*4},(function(t,r){var a=r/4;if(r%4==0){var o=Math.floor(a%e*d),l=Math.floor(a/e*d);return n[l*(e/i)+o]}return r%4==1||r%4==3?1:0})),f=ic.newInstance({wrapS:ic.Wrap.REPEAT,wrapT:ic.Wrap.REPEAT,minificationFilter:ic.Filter.NEAREST,magnificationFilter:ic.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});f.setOpenGLRenderWindow(t.openGLRenderWindow),f.create2DFromRaw(e,e,4,"Float32Array",m),f.activate(),f.sendParameters(),f.deactivate(),t.noiseTexture=f}},e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.allocateTextures=function(){var n=ic.Filter.NEAREST,r=ic.Filter.LINEAR,a=t.openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(a,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(a,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(a,r)),t.LICImage||(t.LICImage=e.allocateTexture(a,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(a,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(a,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(a))},e.allocateTexture=function(e,n){var r=t.context,a=ic.newInstance({wrapS:ic.Wrap.CLAMP_TO_EDGE,wrapT:ic.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return a.setOpenGLRenderWindow(e),a.setInternalFormat(r.RGBA32F),a.create2DFromRaw.apply(a,Object(Ao.a)(t.size).concat([4,"Float32Array",null])),a.activate(),a.sendParameters(),a.deactivate(),a},e.allocateDepthTexture=function(e){var n=t.context,r=ic.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw.apply(r,Object(Ao.a)(t.size).concat(["Float32Array",null])),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=function(){if(!t.framebuffer){t.licHelper=null;var e=gc.newInstance();e.setOpenGLRenderWindow(t.openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create.apply(e,Object(Ao.a)(t.size)),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=function(){t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=function(){e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",Sm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow)),t.licHelper||(t.licHelper=bm.newInstance())},e.prepareForGeometry=function(){var e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(1),e.removeColorBuffer(2),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,1),e.setColorBuffer(t.maskVectorImage,2),e.setDepthBuffer(t.depthTexture);var n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1,n.COLOR_ATTACHMENT2]),n.viewport.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.scissor.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=function(n){t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();var r=t.licCopyPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(r);var a=t.context;a.viewport.apply(a,[0,0].concat(Object(Ao.a)(n))),a.scissor.apply(a,[0,0].concat(Object(Ao.a)(n))),a.disable(a.BLEND),a.enable(a.DEPTH_TEST),a.disable(a.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=function(){var n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create.apply(r,Object(Ao.a)(t.size)),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();var a=t.licColorPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(a),a.setUniformi("texVectors",t.vectorImage.getTextureUnit()),a.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());var o=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor"),i=o.colorMode,l=o.LICIntensity,s=o.mapModeBias,c=o.maskIntensity,g=o.maskColor,u=o.enhanceContrast,d=o.lowColorContrastEnhancementFactor,m=o.highColorContrastEnhancementFactor;if(a.setUniformi("texLIC",t.LICImage.getTextureUnit()),a.setUniformi("uScalarColorMode",i),a.setUniformf("uLICIntensity",l),a.setUniformf("uMapBias",s),a.setUniformf("uMaskIntensity",c),a.setUniform3f.apply(a,["uMaskColor"].concat(Object(Ao.a)(g))),e.renderQuad(t.size,a),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),u===dm||u===mm){var f=0,p=1,C=p-f;C=(p-=C*m)-(f+=C*d),r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();var I=t.enhanceContrastPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(I),I.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),I.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),I.setUniformi("texLIC",t.LICImage.getTextureUnit()),I.setUniformf("uLMin",f),I.setUniformf("uLMaxMinDiff",C),e.renderQuad(t.size,I),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=function(){var e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t.openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=function(n){Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=function(){t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}var Vm={context:null,openGLRenderWindow:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vm,n),Gm.extend(e,t,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","reallocateTextures","licInterface","size"]),Bm(e,t)}var wm={newInstance:ln.c.newInstance(Rm,"vtkSurfaceLICInterface"),extend:Rm};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=ln.c.vtkErrorMacro;function xm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");var n=function(e){for(var t=1;t1&&t.renderable.setCustomShaderAttributes([a.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=function(e){var n;t.stateCache=(Object(qi.a)(n={},e.BLEND,e.isEnabled(e.BLEND)),Object(qi.a)(n,e.DEPTH_TEST,e.isEnabled(e.DEPTH_TEST)),Object(qi.a)(n,e.SCISSOR_TEST,e.isEnabled(e.SCISSOR_TEST)),n)},e.popState=function(e){var n=function(n){return t.stateCache[n]?e.enable(n):e.disable(n)};n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST)},e.renderPiece=function(r,a){var o=!0;t.openGLRenderWindow.getWebgl2()||(Wm("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(Wm("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(Wm("No input"),o=!1);var i=t.renderable.getLicInterface();i||(i=Gm.newInstance(),t.renderable.setLicInterface(i)),t.openGLLicInterface||(t.openGLLicInterface=wm.newInstance()),i!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(i);var l=t.renderable.getInputArrayToProcess(0);if(i.getEnableLIC()&&(!l||l.getNumberOfComponents()<2)&&(Wm("No vector input array"),o=!1),i.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,o&&i.getEnableLIC()){var s=t.openGLRenderWindow.getSize(),c=s.map((function(e){return Math.round(e*i.getViewPortScale())}));t.openGLLicInterface.setSize(c),t.openGLLicInterface.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,a),n.renderPieceDraw(r,a),n.renderPieceFinish(r,a),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(s),e.popState(t.context)}else n.renderPiece(r,a)}}var Tm={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tm,n),rd.extend(e,t,n),xm(e,t),ln.c.setGet(e,t,["openGLLicInterface"])}var Xm={newInstance:ln.c.newInstance(Jm,"vtkOpenGLSurfaceLICMapper"),extend:Jm};function Om(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0))},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.MCWCMatrix,t.renderable.getMatrix()),Object(Yo.i)(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?El(t.normalMatrix):(Dl(t.normalMatrix,t.MCWCMatrix),zl(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}var Nm={};function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nm,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),ln.c.setGet(e,t,["context"]),Om(e,t)}var Ym={newInstance:ln.c.newInstance(Hm,"vtkOpenGLVolume"),extend:Hm},Fm={NEAREST:0,LINEAR:1,FAST_LINEAR:2},Pm={FRACTIONAL:0,PROPORTIONAL:1},Km={InterpolationType:Fm,OpacityMode:Pm},Mm={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3},Lm={BlendMode:Mm};function Dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Em=ln.c.vtkWarningMacro,Um=ln.c.vtkErrorMacro;function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n// Lighting values\n//VTK::Light::Dec\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing triliear values from multiple z slices\n#ifdef vtkTriliearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)).a - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)).a - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)).a - scalar;\n\n // divide by spacing\n result.xyz /= vSpacing;\n\n result.w = length(result.xyz);\n\n // rotate to View Coords\n result.xyz =\n result.x * vPlaneNormal0 +\n result.y * vPlaneNormal2 +\n result.z * vPlaneNormal4;\n\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - 0.5) * 2.0,\n (fragCoord.y / vpHeight - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n return (vWCtoIDX * vertex).xyz / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\n//\nfloat computeGradientOpacityFactor(\n vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n#if vtkLightComplexity > 0\nvoid applyLighting(inout vec3 tColor, vec4 normal)\n{\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n //VTK::Light::Impl\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n}\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = 1.0;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normal0 = computeNormal(posIS, tValue.a, tstep);\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n applyLighting(tColor.rgb, normal0);\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n#endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\n\n\n\n\n\n\n\nreturn tColor;\n}\n\n\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, float sampleDistanceIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 //AVERAGE_INTENSITY_BLEND\n vec4 averageIPScalarRangeMin = vec4 (\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n 1.0);\n vec4 averageIPScalarRangeMax = vec4(\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n 1.0);\n\n vec4 sum = vec4(0.);\n\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n // - We are setting the alpha channel for averageIPScalarRangeMin and\n // averageIPScalarRangeMax so that we do not trigger this 'continue'\n // based on the alpha channel comparison.\n // - There might be a better way to do this. I'm not sure if there is an\n // equivalent of 'any' which only operates on RGB, though I suppose\n // we could write an 'anyRGB' function and see if that is faster.\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n if (any(lessThan(tValue, averageIPScalarRangeMin)) ||\n any(greaterThan(tValue, averageIPScalarRangeMax))) {\n continue;\n }\n\n // Sum the values across each step in the path\n sum += tValue;\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (result == 0.0)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*(tdims - 1.0);\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, out float sampleDistanceIS, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n}\n\nvoid main()\n{\n\n vec3 rayDirVC;\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n float sampleDistanceIS;\n computeIndexSpaceValues(posIS, endIS, sampleDistanceIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, sampleDistanceIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Fragment;a.getProperty().getInterpolationType()===Fm.LINEAR&&(o=Hg.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===a.getProperty().getUseLabelOutline()&&(o=Hg.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var i=t.scalarTexture.getComponents();o=Hg.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(i)).result;var l=a.getProperty().getIndependentComponents();if(l){o=Hg.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var s=[],c=0;c0&&(o=Hg.substitute(o,"//VTK::vtkProportionalComponents",s.join("\n")).result)}var g=t.currentInput.getExtent(),u=t.currentInput.getSpacing(),d=new Float64Array(3);Object(Fo.p)(d,(g[1]-g[0])*u[0],(g[3]-g[2])*u[1],(g[5]-g[4])*u[2]);var m=Object(Fo.j)(d)/t.renderable.getSampleDistance();o=Hg.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(m))).result,o=Hg.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=a.getProperty().getUseGradientOpacity(0);for(var f=1;l&&!t.gopacity&&f0&&(a=Hg.substitute(a,"//VTK::Light::Dec",["uniform vec3 lightColor".concat(o,";"),"uniform vec3 lightDirectionVC".concat(o,"; // normalized"),"uniform vec3 lightHalfAngleVC".concat(o,"; // normalized"),"//VTK::Light::Dec"],!1).result,a=Hg.substitute(a,"//VTK::Light::Impl",[" float df = abs(dot(normal.rgb, -lightDirectionVC".concat(o,"));")," diffuse += ((df".concat("",") * lightColor").concat(o,");")," float sf = pow( abs(dot(lightHalfAngleVC".concat(o,",normal.rgb)), vSpecularPower);")," specular += ((sf".concat("",") * lightColor").concat(o,");")," //VTK::Light::Impl"],!1).result,o++)}))}e.Fragment=a},e.replaceShaderClippingPlane=function(e,n,r){var a=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;a=Hg.substitute(a,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,a=Hg.substitute(a,"//VTK::ClipPlane::Impl",["for(int i = 0; i < ".concat(o,"; i++) {")," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=a},e.getNeedToRebuildShaders=function(n,r,a){var o=0;a.getProperty().getShade()&&t.renderable.getBlendMode()===Mm.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((function(e){e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));var i=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,i=!0);var l=t.scalarTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=!1,g=[];if(s){for(var u=0;u0&&(c=!0)}var d=t.currentInput.getExtent(),m=t.currentInput.getSpacing(),f=new Float64Array(3);Object(Fo.p)(f,(d[1]-d[0])*m[0],(d[3]-d[2])*m[1],(d[5]-d[4])*m[2]);var p=Object(Fo.j)(f)/t.renderable.getSampleDistance(),C={interpolationType:a.getProperty().getInterpolationType(),useLabelOutline:a.getProperty().getUseLabelOutline(),numComp:l,usesProportionalComponents:c,iComps:s,maxSamples:p,useGradientOpacity:a.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),averageIPScalarMode:t.renderable.getAverageIPScalarRange(),proportionalComponents:g};return t.previousState&&t.previousState.interpolationType===C.interpolationType&&t.previousState.useLabelOutline===C.useLabelOutline&&t.previousState.numComp===C.numComp&&t.previousState.usesProportionalComponents===C.usesProportionalComponents&&t.previousState.iComps===C.iComps&&t.previousState.maxSamples===C.maxSamples&&t.previousState.useGradientOpacity===C.useGradientOpacity&&t.previousState.blendMode===C.blendMode&&zm(t.previousState.averageIPScalarMode,C.averageIPScalarMode)&&zm(t.previousState.proportionalComponents,C.proportionalComponents)?!!(0===n.getProgram()||i||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||!!t.lastZBufferTexture!=!!t.zBufferTexture||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance()),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var i=e.getRenderTargetSize();o.setUniformf("vpWidth",i[0]),o.setUniformf("vpHeight",i[1])}},e.setCameraShaderParameters=function(n,r,a){var o=t.openGLCamera.getKeyMatrices(r),i=t.openGLVolume.getKeyMatrices();Object(Yo.l)(t.modelToView,o.wcvc,i.mcwc);var l=n.getProgram(),s=t.openGLCamera.getRenderable(),c=s.getClippingRange();l.setUniformf("camThick",c[1]-c[0]),l.setUniformf("camNear",c[0]),l.setUniformf("camFar",c[1]);for(var g=t.currentInput.getBounds(),u=t.currentInput.getDimensions(),d=new Float64Array(3),m=new Float64Array(3),f=1,p=-1,C=1,I=-1,h=0;h<8;++h){if(Object(Fo.p)(d,g[h%2],g[2+Math.floor(h/2)%2],g[4+Math.floor(h/4)]),Object(Fo.q)(d,d,t.modelToView),!s.getParallelProjection()){Object(Fo.l)(m,d);var b=-c[0]/d[2];Object(Fo.b)(d,m,b)}Object(Fo.q)(d,d,o.vcpc),f=Math.min(d[0],f),p=Math.max(d[0],p),C=Math.min(d[1],C),I=Math.max(d[1],I)}l.setUniformf("dcxmin",f),l.setUniformf("dcxmax",p),l.setUniformf("dcymin",C),l.setUniformf("dcymax",I),l.isUniformUsed("cameraParallel")&&l.setUniformi("cameraParallel",s.getParallelProjection());var y=t.currentInput.getExtent(),v=t.currentInput.getSpacing(),Z=new Float64Array(3);Object(Fo.p)(Z,(y[1]-y[0]+1)*v[0],(y[3]-y[2]+1)*v[1],(y[5]-y[4]+1)*v[2]),l.setUniform3f("vSpacing",v[0],v[1],v[2]),Object(Fo.p)(d,y[0],y[2],y[4]),t.currentInput.indexToWorldVec3(d,d),Object(Fo.q)(d,d,t.modelToView),l.setUniform3f("vOriginVC",d[0],d[1],d[2]);var A=t.currentInput.getIndexToWorld();Object(Yo.l)(t.idxToView,t.modelToView,A),_l(t.idxNormalMatrix,o.normalMatrix,i.normalMatrix),_l(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var G=Object(Fo.j)(Z)/t.renderable.getSampleDistance();G>t.renderable.getMaximumSamplesPerRay()&&Em("The number of steps required ".concat(Math.ceil(G)," is larger than the\n specified maximum number of steps ").concat(t.renderable.getMaximumSamplesPerRay(),".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));var S=new Float64Array(3);if(Object(Fo.p)(S,1,1,1),Object(Fo.k)(S,S,Z),l.setUniform3f("vVCToIJK",S[0],S[1],S[2]),l.setUniform3i("volumeDimensions",u[0],u[1],u[2]),!t.openGLRenderWindow.getWebgl2()){var B=t.scalarTexture.getVolumeInfo();l.setUniformf("texWidth",t.scalarTexture.getWidth()),l.setUniformf("texHeight",t.scalarTexture.getHeight()),l.setUniformi("xreps",B.xreps),l.setUniformi("xstride",B.xstride),l.setUniformi("ystride",B.ystride)}for(var V=new Float64Array(3),R=new Float64Array(3),w=0;w<6;++w){switch(w){default:case 0:Object(Fo.p)(V,1,0,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 1:Object(Fo.p)(V,-1,0,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 2:Object(Fo.p)(V,0,1,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 3:Object(Fo.p)(V,0,-1,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 4:Object(Fo.p)(V,0,0,1),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 5:Object(Fo.p)(V,0,0,-1),Object(Fo.p)(R,y[0],y[2],y[4])}Object(Fo.m)(V,V,t.idxNormalMatrix),Object(Fo.q)(R,R,t.idxToView);var k=-1*Object(Fo.d)(R,V);if(l.setUniform3f("vPlaneNormal".concat(w),V[0],V[1],V[2]),l.setUniformf("vPlaneDistance".concat(w),k),a.getProperty().getUseLabelOutline()){var W=t.currentInput.getWorldToIndex();l.setUniformMatrix("vWCtoIDX",W),Object(Yo.g)(t.projectionToWorld,o.wcpc),l.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var x=e.getRenderTargetSize();l.setUniformf("vpWidth",x[0]),l.setUniformf("vpHeight",x[1])}}switch(Object(Yo.g)(t.projectionToView,o.vcpc),l.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var T=0,J=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();J[0]=t[0]*n,J[1]=t[1]*n,J[2]=t[2]*n,l.setUniform3fArray("lightColor".concat(T),J);var r=e.getDirection();Object(Fo.p)(V,r[0],r[1],r[2]),Object(Fo.m)(V,V,o.normalMatrix),l.setUniform3f("lightDirectionVC".concat(T),V[0],V[1],V[2]);var a=[-.5*V[0],-.5*V[1],-.5*(V[2]-1)];l.setUniform3fArray("lightHalfAngleVC".concat(T),a),T++}}))}},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram();a.setUniformi("ctexture",t.colorTexture.getTextureUnit()),a.setUniformi("otexture",t.opacityTexture.getTextureUnit()),a.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),i=r.getProperty(),l=t.scalarTexture.getComponents(),s=r.getProperty().getIndependentComponents();if(s&&l>=2)for(var c=0;c0&&(a.setUniformf("vAmbient",i.getAmbient()),a.setUniformf("vDiffuse",i.getDiffuse()),a.setUniformf("vSpecular",i.getSpecular()),a.setUniformf("vSpecularPower",i.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var a=t.openGLCamera.getKeyMatrices(n),o=[],i=[],l=t.renderable.getClippingPlanes(),s=l.length,c=0;c1.43){var e=t.framebuffer.getSize();return[t.fvp[0]*e[0],t.fvp[1]*e[1]]}return t.openGLRenderWindow.getFramebufferSize()},e.renderPieceStart=function(n,r){if(t.renderable.getAutoAdjustSampleDistances()){var a=n.getVTKWindow().getInteractor(),o=a.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var i=Math.sqrt(t.avgFrameTime*a.getDesiredUpdateRate()/t.avgWindowArea);i>10&&(i=10),t.targetXYF=i}else t.targetXYF=Math.sqrt(t.avgFrameTime*a.getStillUpdateRate()/t.avgWindowArea);t.targetXYF<1.53&&t.targetXYF>1.33&&(t.targetXYF=t.lastXYF),Math.abs(1-t.targetXYF/t.lastXYF)<.1&&(t.targetXYF=t.lastXYF),t.lastXYF=t.targetXYF}else t.lastXYF=t.renderable.getImageSampleDistance();t.lastXYF<=1.43&&(t.lastXYF=1);var l=t.lastXYF,s=t.openGLRenderWindow.getFramebufferSize();if(l>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer();else{var c=t.framebuffer.getSize();c[0]===Math.floor(.7*s[0])&&c[1]===Math.floor(.7*s[1])||(t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var g=t.context;g.clearColor(0,0,0,0),g.colorMask(!0,!0,!0,!0),g.clear(g.COLOR_BUFFER_BIT),g.viewport(0,0,s[0]/l,s[1]/l),t.fvp=[Math.floor(s[0]/l)/Math.floor(.7*s[0]),Math.floor(s[1]/l)/Math.floor(.7*s[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===Fm.NEAREST?(t.scalarTexture.setMinificationFilter(Ms.NEAREST),t.scalarTexture.setMagnificationFilter(Ms.NEAREST)):(t.scalarTexture.setMinificationFilter(Ms.LINEAR),t.scalarTexture.setMagnificationFilter(Ms.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var a=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),a.drawArrays(a.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=function(e,n){if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t.lastXYF>1.43){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");var r=t.copyShader;t.copyVAO=Kg.newInstance(),t.copyVAO.setOpenGLRenderWindow(t.openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(r,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var a=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,a[0],a[1]);var o=t.framebuffer.getColorTexture();o.activate(),t.copyShader.setUniformi("texture",o.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);var i=t.context;i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=function(n,r){e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Um("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():Object(Xo.D)(t.Bounds)},e.updateBufferObjects=function(t,n){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=function(n,r){return t.VBOBuildTime.getMTime()1?1:-1,k[3*W+2]=-1;var x=new Uint16Array(8);x[0]=3,x[1]=0,x[2]=1,x[3]=3,x[4]=3,x[5]=0,x[6]=3,x[7]=2;var T=Bo.a.newInstance({numberOfComponents:3,values:k});T.setName("points");var J=Bo.a.newInstance({numberOfComponents:1,values:x});t.tris.getCABO().createVBO(J,"polys",sg.SURFACE,{points:T,cellOffset:0})}t.VBOBuildTime.modified()}}}}var jm={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function Qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jm,n),_s.extend(e,t,n),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime,{mtime:0}),t.tris=Eg.newInstance(),t.scalarTexture=ic.newInstance(),t.opacityTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.jitterTexture=ic.newInstance(),t.jitterTexture.setWrapS(Ks.REPEAT),t.jitterTexture.setWrapT(Ks.REPEAT),t.framebuffer=gc.newInstance(),t.idxToView=Object(Yo.h)(new Float64Array(16)),t.idxNormalMatrix=El(new Float64Array(9)),t.modelToView=Object(Yo.h)(new Float64Array(16)),t.projectionToView=Object(Yo.h)(new Float64Array(16)),t.projectionToWorld=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,["context"]),_m(e,t)}var qm={newInstance:ln.c.newInstance(Qm,"vtkOpenGLVolumeMapper"),extend:Qm};function $m(e,t){t.overrides={},t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,a=n.getClassName(r++),o=!1,i=Object.keys(t.overrides);a&&!o;)-1!==i.indexOf(a)?o=!0:a=n.getClassName(r++);if(!o)return null;var l=t.overrides[a]();return l.setMyFactory(e),l},e.registerOverride=function(e,n){t.overrides[e]=n}}var ef={};function tf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ef,n),ln.c.obj(e,t),$m(e,t)}var nf={newInstance:ln.c.newInstance(tf,"vtkViewNodeFactory"),extend:tf};function rf(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var af={};function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,af,n),nf.extend(e,t,n),rf(0,t),e.registerOverride("vtkActor",Bc.newInstance),e.registerOverride("vtkActor2D",kc.newInstance),e.registerOverride("vtkCamera",Jc.newInstance),e.registerOverride("vtkGlyph3DMapper",fd.newInstance),e.registerOverride("vtkImageMapper",Gd.newInstance),e.registerOverride("vtkImageSlice",Rd.newInstance),e.registerOverride("vtkMapper",rd.newInstance),e.registerOverride("vtkPixelSpaceCallbackMapper",Td.newInstance),e.registerOverride("vtkRenderer",Hd.newInstance),e.registerOverride("vtkSkybox",Md.newInstance),e.registerOverride("vtkSphereMapper",_d.newInstance),e.registerOverride("vtkStickMapper",tm.newInstance),e.registerOverride("vtkTexture",ic.newInstance),e.registerOverride("vtkSurfaceLICMapper",Xm.newInstance),e.registerOverride("vtkVolume",Ym.newInstance),e.registerOverride("vtkVolumeMapper",qm.newInstance),e.registerOverride("vtkWidgetRepresentation",Zc.newInstance)}var lf={newInstance:ln.c.newInstance(of,"vtkOpenGLViewNodeFactory"),extend:of},sf=Object(Cn.d)((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,a,o,i){return n((l=n(n(t,e),n(a,i)))<<(s=o)|l>>>32-s,r);var l,s}function a(e,t,n,a,o,i,l){return r(t&n|~t&a,e,t,o,i,l)}function o(e,t,n,a,o,i,l){return r(t&a|n&~a,e,t,o,i,l)}function i(e,t,n,a,o,i,l){return r(t^n^a,e,t,o,i,l)}function l(e,t,n,a,o,i,l){return r(n^(t|~a),e,t,o,i,l)}function s(e,t){var r,s,c,g,u;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,m=-271733879,f=-1732584194,p=271733878;for(r=0;r>5]>>>t%32&255);return n}function g(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function d(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return c(s(g(e),8*e.length))}(d(e))}function f(e,t){return function(e,t){var n,r,a=g(e),o=[],i=[];for(o[15]=i[15]=void 0,a.length>16&&(a=s(a,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^a[n],i[n]=1549556828^a[n];return r=s(o.concat(g(t)),512+8*t.length),c(s(i.concat(r),640))}(d(e),d(t))}function p(e,t,n){return t?n?f(t,e):u(f(t,e)):n?m(e):u(m(e))}e.exports?e.exports=p:t.md5=p}(Cn.b)}),"/$$rollup_base$$/node_modules/blueimp-md5/js"),cf=["lastShaderBound","context","openGLRenderWindow"];function gf(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var a=n;r.length>0&&(a=Hg.substitute(a,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),i="\n",l="#version 100\n";o?l="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(i="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),a=Hg.substitute(a,"//VTK::System::Dec",["".concat(l,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",i,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var s=Hg.substitute(e,"//VTK::System::Dec",["".concat(l,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(s=Hg.substitute(s,"varying","out").result,a=Hg.substitute(a,"varying","in").result,a=Hg.substitute(a,"gl_FragData\\[0\\]","fragOutput0").result,a=Hg.substitute(a,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:s,FSSource:a,GSSource:Hg.substitute(r,"//VTK::System::Dec",l).result}},e.readyShaderProgramArray=function(t,n,r){var a=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(a.VSSource,a.FSSource,a.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=function(t){return t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null},e.getShaderProgram=function(e,n,r){var a="".concat(e).concat(n).concat(r),o=sf(a);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var i=Hg.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=function(n){e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((function(e){return t.shaderPrograms[e]})).forEach((function(e){return e.releaseGraphicsResources(n)}))},e.releaseGraphicsResources=function(){t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=function(e){return t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1}}var uf={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign(t,uf,n),t.shaderPrograms={},ln.c.obj(e,t),ln.c.setGet(e,t,cf),gf(e,t),Object.freeze(e)}var mf={newInstance:ln.c.newInstance(df,"vtkShaderCache"),extend:df},ff=ln.c.vtkErrorMacro;function pf(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),ln.c.obj(e,t),t.textureUnits=[],ln.c.get(e,t,["numberOfTextureUnits"]),ln.c.setGet(e,t,["context"]),pf(e,t)}var hf={newInstance:ln.c.newInstance(If,"vtkOpenGLTextureUnitManager"),extend:If},bf=ln.c.vtkDebugMacro,yf=ln.c.vtkErrorMacro,vf=-1!==navigator.userAgent.indexOf("Chrome");function Zf(e,t,n){var r=e.createFramebuffer(),a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}var Af=0,Gf=[];function Sf(){Af++,Gf.forEach((function(e){return e(Af)}))}function Bf(){Af--,Gf.forEach((function(e){return e(Af)}))}function Vf(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");var n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=function(n){if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((function(t){t.setOpenGLRenderWindow(e)}))}},e.initialize=function(){if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=hf.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);var n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=function(){t.context.makeCurrent()},e.setContainer=function(n){t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&yf("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=function(){return t.el},e.getContainerSize=function(){if(!t.containerSize&&t.el){var e=t.el.getBoundingClientRect(),n=e.width,r=e.height;t.containerSize=[n,r]}return t.containerSize||t.size},e.getFramebufferSize=function(){return t.activeFramebuffer?t.activeFramebuffer.getSize():t.size},e.isInViewport=function(t,n,r){var a=r.getViewportByReference(),o=e.getFramebufferSize();return a[0]*o[0]<=t&&a[2]*o[0]>=t&&a[1]*o[1]<=n&&a[3]*o[1]>=n},e.getViewportSize=function(t){var n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=function(t){var n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t/a[0],n/a[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t*a[0],n*a[1],r]},e.worldToView=function(e,t,n,r){return r.worldToView(e,t,n)},e.viewToWorld=function(e,t,n,r){return r.viewToWorld(e,t,n)},e.worldToDisplay=function(t,n,r,a){var o=a.worldToView(t,n,r),i=e.getViewportSize(a),l=a.viewToProjection(o[0],o[1],o[2],i[0]/i[1]),s=a.projectionToNormalizedDisplay(l[0],l[1],l[2]);return e.normalizedDisplayToDisplay(s[0],s[1],s[2])},e.displayToWorld=function(t,n,r,a){var o=e.displayToNormalizedDisplay(t,n,r),i=a.normalizedDisplayToProjection(o[0],o[1],o[2]),l=e.getViewportSize(a),s=a.projectionToView(i[0],i[1],i[2],l[0]/l[1]);return a.viewToWorld(s[0],s[1],s[2])},e.normalizedDisplayToViewport=function(t,n,r,a){var o=a.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var i=e.normalizedDisplayToDisplay(t,n,r);return[i[0]-o[0]-.5,i[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,a){var o=e.getViewportSize(a);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=function(t,n,r){var a=e.getFramebufferSize();return[t*(a[0]-1),n*(a[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,a){var o=a.getViewportByReference(),i=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,l=n+o[1]+.5;return e.displayToNormalizedDisplay(i,l,r)},e.getPixelData=function(e,n,r,a){var o=new Uint8Array((r-e+1)*(a-n+1)*4);return t.context.readPixels(e,n,r-e+1,a-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,a="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&a&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bf("using webgl2")),r||(bf("using webgl1"),r=t.canvas.getContext("webgl",n)||t.canvas.getContext("experimental-webgl",n)),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(n){n.length>0&&(t.vrDisplay=n[0],t.vrDisplay.depthNear=.01,t.vrDisplay.depthFar=100,e.invokeHaveVRDisplay())})),t.canvas.addEventListener("webglcontextlost",(function(e){e.preventDefault()}),!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1),r},e.startVR=function(){t.oldCanvasSize=t.size.slice(),t.vrDisplay.capabilities.canPresent?t.vrDisplay.requestPresent([{source:t.canvas}]).then((function(){if(t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&t.hideCanvasInVR&&(t.el.style.display="none"),t.queryVRSize){var n=t.vrDisplay.getEyeParameters("left"),r=t.vrDisplay.getEyeParameters("right"),a=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(a,o)}else e.setSize(t.vrResolution);t.renderable.getRenderers()[0].resetCamera(),t.vrFrameData=new VRFrameData,t.renderable.getInteractor().switchToVRAnimation(),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),vf&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):yf("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,Object(Ao.a)(t.oldCanvasSize)),t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&(t.el.style.display="block");var n=t.renderable.getRenderers()[0];n.getActiveCamera().setProjectionMatrix(null),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.vrRender=function(){if(t.vrDisplay.isPresenting){t.renderable.getInteractor().updateGamepads(t.vrDisplay.displayId),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),t.vrDisplay.getFrameData(t.vrFrameData);var n=t.renderable.getRenderers()[0];n.setViewport(0,0,.5,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.leftViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.leftProjectionMatrix),e.traverseAllPasses(),n.setViewport(.5,0,1,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.rightViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.rightProjectionMatrix),e.traverseAllPasses(),t.vrDisplay.submitFrame()}},e.restoreContext=function(){var t=fc.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t.textureResourceIds.get(n);if(void 0===r){var a=e.getTextureUnitManager().allocate();a<0?yf("Hardware does not support the number of textures defined."):(t.textureResourceIds.set(n,a),t.context.activeTexture(t.context.TEXTURE0+a))}else t.context.activeTexture(t.context.TEXTURE0+r)},e.deactivateTexture=function(n){var r=t.textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t.textureResourceIds.delete(n))},e.getTextureUnitForTexture=function(e){var n=t.textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n,r){if(t.webgl2)switch(e){case cn.b.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;case 4:default:return t.context.RGBA8}default:case cn.b.FLOAT:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;case 4:default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:default:return t.context.RGBA}},e.setBackgroundImage=function(e){t.bgImage.src=e.src},e.setUseBackgroundImage=function(e){t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(t.deleted)return null;t.imageFormat=n;var r=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,new Promise((function(n,a){var o=e.onImageReady((function(e){t.notifyStartCaptureImage=r,o.unsubscribe(),n(e)}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),o=n.getExtension("OES_texture_half_float"),i=n.getExtension("WEBGL_debug_renderer_info"),l=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),c=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&Zf(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[o&&Zf(n,n.RGBA,o.HALF_FLOAT_OES)?"RGBA":"",o&&Zf(n,n.RGB,o.HALF_FLOAT_OES)?"RGB":"",o&&Zf(n,n.LUMINANCE,o.HALF_FLOAT_OES)?"LUMINANCE":"",o&&Zf(n,n.ALPHA,o.HALF_FLOAT_OES)?"ALPHA":"",o&&Zf(n,n.LUMINANCE_ALPHA,o.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&Zf(n,n.RGB,n.FLOAT)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",l?n.getParameter(l.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",i&&n.getParameter(i.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",i&&n.getParameter(i.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],g={};c.length;){var u=c.pop(),d=Object(a.a)(u,3),m=d[0],f=d[1],p=d[2];f&&(g[f]={label:m,value:p})}return g},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,a.drawImage(t.canvas,0,0);var o=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rf,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",Sf(),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t.textureResourceIds=new Map,_s.extend(e,t,n),t.myFactory=lf.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",kf),t.shaderCache=mf.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hc.newInstance(),ln.c.event(e,t,"imageReady"),ln.c.event(e,t,"haveVRDisplay"),ln.c.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),ln.c.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),ln.c.setGetArray(e,t,["size","vrResolution"],2),Vf(e,t)}var kf=ln.c.newInstance(wf,"vtkOpenGLRenderWindow");Os("WebGL",kf);var Wf={newInstance:kf,extend:wf,pushMonitorGLContextCount:function(e){Gf.push(e)},popMonitorGLContextCount:function(e){return Gf.pop()}},xf={Device:{Unknown:0,LeftController:1,RightController:2},Input:{Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4}};function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,i=n?"addEventListener":"removeEventListener",l=n?"removeEventListener":"addEventListener";!a&&!n&&r>0&&--r,r&&!a||(r=0,t.container&&t.container[l]("mousemove",e.handleMouseMove),o[i]("mouseup",e.handleMouseUp),o[i]("mousemove",e.handleMouseMove),o[i]("touchend",e.handleTouchEnd,!1),o[i]("touchcancel",e.handleTouchEnd,!1),o[i]("touchmove",e.handleTouchMove,!1)),!a&&n&&++r}function g(){t.view&&t.enabled&&t.enableRender&&(t.inRender=!0,t.view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.start=function(){(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=function(e){Hf("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=function(n){t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=function(){t.initialized=!0,e.enable(),e.render()},e.enable=function(){return e.setEnabled(!0)},e.disable=function(){return e.setEnabled(!1)},e.startEventLoop=function(){return Nf("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||a(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Mf),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("mouseenter",e.handleMouseEnter),n.addEventListener("mouseleave",e.handleMouseLeave),n.addEventListener("mousemove",e.handleMouseMove),n.addEventListener("mousedown",e.handleMouseDown),document.querySelector("body").addEventListener("keypress",e.handleKeyPress),document.querySelector("body").addEventListener("keydown",e.handleKeyDown),document.querySelector("body").addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){c(!1,!0),t.container.removeEventListener("contextmenu",Mf),t.container.removeEventListener("wheel",e.handleWheel),t.container.removeEventListener("DOMMouseScroll",e.handleWheel),t.container.removeEventListener("mouseenter",e.handleMouseEnter),t.container.removeEventListener("mouseleave",e.handleMouseLeave),t.container.removeEventListener("mousemove",e.handleMouseMove),t.container.removeEventListener("mousedown",e.handleMouseDown),document.querySelector("body").removeEventListener("keypress",e.handleKeyPress),document.querySelector("body").removeEventListener("keydown",e.handleKeyDown),document.querySelector("body").removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=s(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=s(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=s(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){c(!0),t.stopPropagation(),t.preventDefault();var n=Jf(Jf({},l(t)),{},{position:o(t)});switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:Hf("Unknown mouse button pressed: ".concat(t.button))}}},e.requestPointerLock=function(){e.getView().getCanvas().requestPointerLock()},e.exitPointerLock=function(){return document.exitPointerLock()},e.isPointerLocked=function(){return!!document.pointerLockElement},e.handlePointerLockChange=function(){e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=function(r){void 0!==r?n.has(r)?Nf("requester is already registered for animating"):(n.add(r),1===n.size&&(t.lastFrameTime=.1,t.lastFrameStart=Date.now(),t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):Hf("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!a){var o=r&&r.getClassName?r.getClassName():r;Nf("".concat(o," did not request an animation"))}},e.switchToVRAnimation=function(){t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.vrAnimation=!0},e.returnFromVRAnimation=function(){t.vrAnimation=!1,0!==n.size&&(t.FrameTime=-1,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateGamepads=function(n){for(var r=navigator.getGamepads(),a=0;a1){var r=i(n.touches);if(2===n.touches.length){var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(a)}e.recognizeGesture("TouchStart",r)}else{var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}},e.handleTouchMove=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures&&n.touches.length>1){var r=i(n.touches);e.recognizeGesture("TouchMove",r)}else{var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(a)}},e.handleTouchEnd=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures)if(0===n.touches.length)if(1===n.changedTouches.length){var r={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(r),c(!1)}else{var a=i(n.changedTouches);e.recognizeGesture("TouchEnd",a),c(!1)}else if(1===n.touches.length){var l=i(n.changedTouches);e.recognizeGesture("TouchEnd",l);var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}else{var g=i(n.touches);e.recognizeGesture("TouchMove",g)}else{var u={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(u),c(!1)}},e.setView=function(n){t.view!==n&&(t.view=n,t.view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=function(){return t.view.getRenderable().getRenderersByReference()[0]},e.findPokedRenderer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.view)return null;var r=t.view.getRenderable().getRenderers();r.sort((function(e,t){return e.getLayer()-t.getLayer()}));for(var a=null,o=null,i=null,l=r.length;l--;){var s=r[l];if(t.view.isInViewport(e,n,s)&&s.getInteractive()){i=s;break}null===a&&s.getInteractive()&&(a=s),null===o&&t.view.isInViewport(e,n,s)&&(o=s)}return null===i&&(i=a),null===i&&(i=o),null==i&&(i=r[0]),i},e.render=function(){null!==t.animationRequest||t.inRender||g()},Kf.forEach((function(n){var r=n.charAt(0).toLowerCase()+n.slice(1);e["".concat(r,"Event")]=function(r){if(t.enabled)if(e.getCurrentRenderer()){var a=Jf({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](a)}else Ff("\n Can not forward events without a current renderer on the interactor.\n ")}})),e.recognizeGesture=function(n,r){if(!(Object.keys(r).length>2)){if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((function(e){t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});var a=0,o=[],i=[];Object.keys(r).forEach((function(e){o[a]=r[e],i[a]=t.startingEventPositions[e],a++}));var l=Math.sqrt((i[0].x-i[1].x)*(i[0].x-i[1].x)+(i[0].y-i[1].y)*(i[0].y-i[1].y)),s=Math.sqrt((o[0].x-o[1].x)*(o[0].x-o[1].x)+(o[0].y-o[1].y)*(o[0].y-o[1].y)),c=Object(Xo.F)(Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)),g=Object(Xo.F)(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),u=g-c;g=g+180>=360?g-180:g+180,c=c+180>=360?c-180:c+180,Math.abs(g-c)m&&f>p&&f>C){t.currentGesture="Pinch";var I={scale:1,touches:r};e.startPinchEvent(I)}else if(p>m&&p>C){t.currentGesture="Rotate";var h={rotation:0,touches:r};e.startRotateEvent(h)}else if(C>m){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var y={rotation:u,touches:r};e.rotateEvent(y)}if("Pinch"===t.currentGesture){var v={scale:s/l,touches:r};e.pinchEvent(v)}if("Pan"===t.currentGesture){var Z={translation:d,touches:r};e.panEvent(Z)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()};var u=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),u()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Df={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,view:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{}};function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Df,n),ln.c.obj(e,t),ln.c.event(e,t,"RenderEvent"),Kf.forEach((function(n){return ln.c.event(e,t,n)})),ln.c.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),ln.c.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Lf(e,t)}var Uf=Jf({newInstance:ln.c.newInstance(Ef,"vtkRenderWindowInteractor"),extend:Ef,handledEvents:Kf},xf),zf=ln.c.vtkDebugMacro;function _f(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),o=Object(Yo.h)(new Float64Array(16)),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3),c=Object(Yo.h)(new Float64Array(16)),g=Object(Yo.h)(new Float64Array(16)),u=new Float64Array(3),d=new Float64Array(3);function m(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=function(){var n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=function(n,r,a){n===t.position[0]&&r===t.position[1]&&a===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,a){n===t.focalPoint[0]&&r===t.focalPoint[1]&&a===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,zf("Distance is set to minimum."));var r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()}},e.computeDistance=function(){var e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,zf("Distance is set to minimum.");var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,m()},e.dolly=function(n){if(!(n<=0)){var r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])}},e.roll=function(n){var r=t.position,a=t.focalPoint,o=t.viewUp,i=new Float64Array([o[0],o[1],o[2],0]);Object(Yo.h)(c);var l=new Float64Array([a[0]-r[0],a[1]-r[1],a[2]-r[2]]);Object(Yo.q)(c,c,Object(Xo.B)(n),l),bg(i,i,c),t.viewUp[0]=i[0],t.viewUp[1]=i[1],t.viewUp[2]=i[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.yaw=function(n){var r=t.position;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint(d[0],d[1],d[2])},e.elevation=function(n){var r=t.focalPoint,a=e.getViewMatrix(),o=[-a[0],-a[1],-a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.pitch=function(n){var r=t.position,a=e.getViewMatrix(),o=[a[0],a[1],a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint.apply(e,Object(Ao.a)(d))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,a){var o=[n,r,a];Object(Xo.x)(t.position,o,t.position),Object(Xo.x)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(Object(Ao.a)(t.viewUp),[1]),a=[],o=[],i=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],bg(a,[].concat(Object(Ao.a)(t.position),[1]),n),bg(o,[].concat(Object(Ao.a)(t.focalPoint),[1]),n),bg(i,r,n),i[0]-=a[0],i[1]-=a[1],i[2]-=a[2],e.setPosition.apply(e,Object(Ao.a)(a.slice(0,3))),e.setFocalPoint.apply(e,Object(Ao.a)(o.slice(0,3))),e.setViewUp.apply(e,Object(Ao.a)(i.slice(0,3)))},e.getThickness=function(){return t.clippingRange[1]-t.clippingRange[0]},e.setThickness=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=function(e){},e.getRoll=function(){},e.setObliqueAngles=function(e,t){},e.getOrientation=function(){},e.getOrientationWXYZ=function(){},e.getFrustumPlanes=function(e){},e.getCameraLightTransformMatrix=function(){},e.deepCopy=function(e){},e.physicalOrientationToWorldDirection=function(e){var t,n,r=Ag(e[0],e[1],e[2],e[3]),a=yg(),o=Ag(0,0,1,0);return n=r,(t=a)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Zg(o,r,o),Zg(o,o,a),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Object(Yo.g)(t,t)},e.getWorldToPhysicalMatrix=function(e){Object(Yo.h)(e);var n=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Object(Yo.i)(e,e),Object(Fo.p)(i,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Object(Yo.r)(e,e,i),Object(Yo.s)(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(c){Object(Yo.g)(o,c),Object(Fo.q)(i,n,o),e.computeDistance();var g=t.distance;e.setPosition(i[0],i[1],i[2]),Object(Fo.q)(l,r,o),Object(Fo.a)(l,l,i),Object(Fo.l)(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),Object(Fo.q)(s,a,o),Object(Fo.a)(s,s,i),Object(Fo.l)(s,s),e.setViewUp(s[0],s[1],s[2]),e.setDistance(g)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Object(Yo.l)(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Object(Yo.d)(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Object(Yo.i)(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;Object(Yo.k)(o,t.position,t.focalPoint,t.viewUp),Object(Yo.i)(o,o);var e=new Float64Array(16);return Object(Yo.d)(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var a=new Float64Array(16);if(Object(Yo.h)(a),t.projectionMatrix){var l=1/t.physicalScale;return Object(Fo.p)(i,l,l,l),Object(Yo.d)(a,t.projectionMatrix),Object(Yo.r)(a,a,i),Object(Yo.i)(a,a),a}Object(Yo.h)(o);var s=t.clippingRange[1]-t.clippingRange[0],c=[t.clippingRange[0]+(n+1)*s/2,t.clippingRange[0]+(r+1)*s/2];if(t.parallelProjection){var g=t.parallelScale*e,u=t.parallelScale,d=(t.windowCenter[0]-1)*g,m=(t.windowCenter[0]+1)*g,f=(t.windowCenter[1]-1)*u,p=(t.windowCenter[1]+1)*u;Object(Yo.n)(o,d,m,f,p,c[0],c[1]),Object(Yo.i)(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var C,I,h=Math.tan(Object(Xo.B)(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(C=t.clippingRange[0]*h,I=t.clippingRange[0]*h/e):(C=t.clippingRange[0]*h*e,I=t.clippingRange[0]*h);var b=(t.windowCenter[0]-1)*C,y=(t.windowCenter[0]+1)*C,v=(t.windowCenter[1]-1)*I,Z=(t.windowCenter[1]+1)*I,A=c[0],G=c[1];o[0]=2*A/(y-b),o[5]=2*A/(Z-v),o[2]=(b+y)/(y-b),o[6]=(v+Z)/(Z-v),o[10]=-(A+G)/(G-A),o[14]=-1,o[11]=-2*A*G/(G-A),o[15]=0}return Object(Yo.d)(a,o),a},e.getCompositeProjectionMatrix=function(t,n,r){var a=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Object(Yo.l)(o,a,o),o},e.setDirectionOfProjection=function(e,n,r){if(t.directionOfProjection[0]!==e||t.directionOfProjection[1]!==n||t.directionOfProjection[2]!==r){t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,m()}},e.setDeviceAngles=function(n,r,a,o){var i=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,i);var l=Object(Yo.h)(new Float64Array(16));Object(Yo.q)(l,l,Object(Xo.B)(n),t.physicalViewUp),Object(Yo.q)(l,l,Object(Xo.B)(r),i),Object(Yo.q)(l,l,Object(Xo.B)(a),t.physicalViewNorth),Object(Yo.q)(l,l,Object(Xo.B)(-o),t.physicalViewUp);var s=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),c=new Float64Array(t.physicalViewNorth);Object(Fo.q)(s,s,l),Object(Fo.q)(c,c,l),e.setDirectionOfProjection(s[0],s[1],s[2]),e.setViewUp(c[0],c[1],c[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,a){var o=Object(Yo.h)(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==a)){var i=Object(Xo.B)(t),l=yg();vg(l,[n,r,a],i),Object(Yo.j)(o,l)}var s=new Float64Array(3);Object(Fo.q)(s,[0,0,-1],o);var c=new Float64Array(3);Object(Fo.q)(c,[0,1,0],o),e.setDirectionOfProjection.apply(e,Object(Ao.a)(s)),e.setViewUp.apply(e,Object(Ao.a)(c)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var a=-n[0],o=-n[1],i=-n[2],l=-(a*r[0]+o*r[1]+i*r[2]),s=[a*e[0]+o*e[2]+i*e[4]+l,1e-18],c=0;c<2;c++)for(var g=0;g<2;g++)for(var u=0;u<2;u++){var d=a*e[u]+o*e[2+g]+i*e[4+c]+l;s[0]=ds[1]?d:s[1]}return s}}var jf={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function Qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jf,n),ln.c.obj(e,t),ln.c.get(e,t,["distance"]),ln.c.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),ln.c.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),ln.c.setGetArray(e,t,["clippingRange","windowCenter"],2),ln.c.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),_f(e,t)}var qf={newInstance:ln.c.newInstance(Qf,"vtkCamera"),extend:Qf};function $f(e,t){t.classHierarchy.push("vtkLight"),e.getTransformedPosition=function(){return t.transformMatrix?[]:[].concat(t.position)},e.getTransformedFocalPoint=function(){return t.transformMatrix?[]:[].concat(t.focalPoint)},e.getDirection=function(){return t.directionMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ep,n),ln.c.obj(e,t),ln.c.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),ln.c.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),$f(e,t)}var np={newInstance:ln.c.newInstance(tp,"vtkLight"),extend:tp,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},rp=ln.c.vtkErrorMacro;function ap(e,t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);var r=e.getNestedProps();if(r&&r.length)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,op,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),ln.c.setGetArray(e,t,["viewport"],4),ln.c.setGetArray(e,t,["background","background2"],3),ap(e,t)}var lp={newInstance:ln.c.newInstance(ip,"vtkViewport"),extend:ip},sp=ln.l,cp=ln.m,gp=ln.n;function up(e){return function(){return cp("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function dp(e,t){for(t.classHierarchy.push("vtkRenderer"),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1);var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},a={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(sp("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0},e.updateLightsGeometryToFollowCamera=function(){var n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((function(e){e.lightTypeIsSceneLight()||e.lightTypeIsCameraLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):cp("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=up("allocateTime"),e.updateGeometry=up("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){sp(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=function(n){return t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0)},e.makeCamera=function(){var t=qf.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=function(){return t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera},e.getActiveCameraAndResetIfCreated=function(){return t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera},e.getActors=function(){return t.actors=[],t.props.forEach((function(e){t.actors=t.actors.concat(e.getActors())})),t.actors},e.addActor=e.addViewProp,e.removeActor=function(n){t.actors=t.actors.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllActors=function(){e.getActors().forEach((function(t){e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=function(){return t.volumes=[],t.props.forEach((function(e){t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes},e.addVolume=e.addViewProp,e.removeVolume=function(n){t.volumes=t.volumes.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllVolumes=function(){e.getVolumes().forEach((function(t){e.removeViewProp(t)})),t.volumes=[],e.modified()},e.addLight=function(n){t.lights=[].concat(t.lights,n),e.modified()},e.removeLight=function(n){t.lights=t.lights.filter((function(e){return e!==n})),e.modified()},e.removeAllLights=function(){t.lights=[],e.modified()},e.setLightCollection=function(n){t.lights=n,e.modified()},e.makeLight=np.newInstance,e.createLight=function(){t.automaticLightCreation&&(t.createdLight&&(e.removeLight(t.createdLight),t.createdLight.delete(),t.createdLight=null),t.createdLight=e.makeLight(),e.addLight(t.createdLight),t.createdLight.setLightTypeToHeadLight(),t.createdLight.setPosition(e.getActiveCamera().getPosition()),t.createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=function(t,n,r,a){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],a),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,a){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],a),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return cp("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.g)(a,a),Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.projectionToView=function(e,n,r,a){if(null===t.activeCamera)return cp("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.g)(o,o),Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.worldToView=function(e,n,r){if(null===t.activeCamera)return cp("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.viewToProjection=function(e,n,r,a){if(null===t.activeCamera)return cp("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.computeVisiblePropBounds=function(){t.allBounds[0]=Ol.INIT_BOUNDS[0],t.allBounds[1]=Ol.INIT_BOUNDS[1],t.allBounds[2]=Ol.INIT_BOUNDS[2],t.allBounds[3]=Ol.INIT_BOUNDS[3],t.allBounds[4]=Ol.INIT_BOUNDS[4],t.allBounds[5]=Ol.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var a=0;at.allBounds[1]&&(t.allBounds[1]=i[1]),i[2]t.allBounds[3]&&(t.allBounds[3]=i[3]),i[4]t.allBounds[5]&&(t.allBounds[5]=i[5]))}}return r&&(Object(Xo.D)(t.allBounds),sp("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!Object(Xo.l)(r))return sp("Cannot reset camera!"),!1;var i=null;if(!e.getActiveCamera())return cp("Trying to reset non-existent camera"),!1;i=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;var l=r[1]-r[0],s=r[3]-r[2],c=r[5]-r[4],g=(l*=l)+(s*=s)+(c*=c);g=0===g?1:g,g=.5*Math.sqrt(g);var u=Object(Xo.B)(t.activeCamera.getViewAngle()),d=g,m=g/Math.sin(.5*u),f=t.activeCamera.getViewUp();return Math.abs(Object(Xo.q)(f,i))>.999&&(gp("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-f[2],f[0],f[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+m*i[0],o[1]+m*i[1],o[2]+m*i[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(d),t.activeCamera.setPhysicalScale(g),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(a),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=n||e.computeVisiblePropBounds();if(!Object(Xo.l)(a))return sp("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return cp("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(a),i=0;if(t.activeCamera.getParallelProjection())i=.1*t.activeCamera.getParallelScale();else{var l=Object(Xo.B)(t.activeCamera.getViewAngle());i=.2*Math.tan(l/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]e&&(e=n);var r=t.createdLight?t.createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=function(){return!!t.preserveColorBuffer},e.isActiveCameraCreated=function(){return!!t.activeCamera}}var mp={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,createdLight:null,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:Object(Xo.j)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,pass:0};function fp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mp,n),lp.extend(e,t,n),Object(ln.e)(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Object(ln.j)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Object(ln.f)(e,t,["actors","volumes","lights"]),Object(ln.k)(e,t,["background"],4,1),dp(e,t)}var pp={newInstance:Object(ln.g)(fp,"vtkRenderer"),extend:fp};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),ln.c.obj(e,t),ln.c.event(e,t,"InteractionEvent"),ln.c.event(e,t,"StartInteractionEvent"),ln.c.event(e,t,"EndInteractionEvent"),ln.c.get(e,t,["interactor","enabled"]),ln.c.setGet(e,t,["priority","processEvents"]),yp(e,t)}var Ap=Ip({newInstance:ln.c.newInstance(Zp,"vtkInteractorObserver"),extend:Zp},{computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}}),Gp={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}};function Sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bp=Gp.States,Vp={Rotate:Bp.IS_ROTATE,Pan:Bp.IS_PAN,Spin:Bp.IS_SPIN,Dolly:Bp.IS_DOLLY,CameraPose:Bp.IS_CAMERA_POSE,WindowLevel:Bp.IS_WINDOW_LEVEL,Slice:Bp.IS_SLICE};function Rp(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Vp).forEach((function(n){ln.c.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===Bp.IS_NONE&&(t.state=Vp[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},ln.c.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Vp[n]&&(t.state=Bp.IS_NONE,t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e["invokeEnd".concat(n,"Event")]({type:"End".concat(n,"Event")}),t.interactor.render())}})),e.handleKeyPress=function(e){var n=t.interactor;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}var wp={state:Bp.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function kp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wp,n),Ap.extend(e,t,n),Rp(e,t)}var Wp=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pp,n),Wp.extend(e,t,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),ln.c.setGetArray(e,t,["centerOfRotation"],3),Fp(e,t)}var Mp=function(e){for(var t=1;te&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Lp("pick"),e.hasKey=Lp("hasKey"),e.getRedrawMTime=function(){return t.mtime},e.setEstimatedRenderTime=function(e){t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=function(){t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=function(e){t.estimatedRenderTime+=e},e.setAllocatedRenderTime=function(e){t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=function(){return!1},e.getTextures=function(){return t.textures},e.hasTexture=function(e){return-1!==t.textures.indexOf(e)},e.addTexture=function(n){n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=function(n){var r=t.textures.filter((function(e){return e!==n}));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=function(){t.textures=[],e.modified()}}var Ep={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ep,n),ln.c.obj(e,t),ln.c.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),ln.c.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Dp(e,t)}var zp={newInstance:ln.c.newInstance(Up,"vtkProp"),extend:Up};function _p(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=function(n){t.position=t.position.map((function(e,t){return e+n[t]})),e.modified()},e.getOrientationWXYZ=function(){var e=yg();Object(Yo.m)(e,t.rotation);var n=new Float64Array(3),r=function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ml.b?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}(n,e);return[Object(Xo.F)(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Object(Yo.a)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateY=function(n){0!==n&&(Object(Yo.b)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Object(Yo.c)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateWXYZ=function(n,r,a,o){if(0!==n&&(0!==r||0!==a||0!==o)){var i=Object(Xo.B)(n),l=yg();vg(l,[r,a,o],i);var s=new Float64Array(16);Object(Yo.j)(s,l),Object(Yo.l)(t.rotation,t.rotation,s),e.modified()}},e.setOrientation=function(n,r,a){return(n!==t.orientation[0]||r!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[n,r,a],Object(Yo.h)(t.rotation),e.rotateZ(a),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Object(Yo.d)(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Object(Yo.h)(t.matrix),t.userMatrix&&Object(Yo.l)(t.matrix,t.matrix,t.userMatrix),Object(Yo.s)(t.matrix,t.matrix,t.origin),Object(Yo.s)(t.matrix,t.matrix,t.position),Object(Yo.l)(t.matrix,t.matrix,t.rotation),Object(Yo.r)(t.matrix,t.matrix,t.scale),Object(Yo.s)(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Object(Yo.i)(t.matrix,t.matrix),t.isIdentity=!0;for(var n=0;n<4;++n)for(var r=0;r<4;++r)(n===r?1:0)!==t.matrix[n+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=function(){return Ol.getCenter(t.bounds)},e.getLength=function(){return Ol.getLength(t.bounds)},e.getXRange=function(){return Ol.getXRange(t.bounds)},e.getYRange=function(){return Ol.getYRange(t.bounds)},e.getZRange=function(){return Ol.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var jp={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Qp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jp,n),zp.extend(e,t,n),t.matrixMTime={},ln.c.obj(t.matrixMTime),ln.c.get(e,t,["bounds","isIdentity"]),ln.c.getArray(e,t,["orientation"]),ln.c.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Object(Yo.h)(new Float64Array(16)),t.rotation=Object(Yo.h)(new Float64Array(16)),t.userMatrix=Object(Yo.h)(new Float64Array(16)),t.transform=null,_p(e,t)}var qp={newInstance:ln.c.newInstance(Qp,"vtkProp3D"),extend:Qp};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var eC=ln.c.vtkDebugMacro;function tC(e,t){t.classHierarchy.push("vtkActor");var n=function(e){for(var t=1;t=1;return(n=n&&(!t.texture||!t.texture.isTranslucent()))&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque())},e.makeProperty=hg.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){eC("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Ol.getCorners(n,r),e.computeMatrix();var a=new Float64Array(16);Object(Yo.i)(a,t.matrix),r.forEach((function(e){return Object(Fo.q)(e,e,a)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?r.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):r.reduce((function(e,n){return ee?r:e}if(null!==t.backfaceProperty){var a=t.backfaceProperty.getMTime();e=a>e?a:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var nC={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nC,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),tC(e,t)}var aC={newInstance:ln.c.newInstance(rC,"vtkActor"),extend:rC};function oC(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,a,o){if(t.callback){var i=n.getCompositeProjectionMatrix(r,-1,1);Object(Yo.i)(i,i);for(var l=e.getPoints(),s=new Float64Array(3),c=a.usize,g=a.vsize,u=c/2,d=g/2,m=[],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iC,n),Pu.extend(e,t,n),ln.c.setGet(e,t,["callback","useZValues"]),oC(e,t)}var sC={newInstance:ln.c.newInstance(lC,"vtkPixelSpaceCallbackMapper"),extend:lC};function cC(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=function(){t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setImage=function(n){t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null)),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())}}var gC={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function uC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gC,n),ln.c.obj(e,t),ln.c.algo(e,t,6,0),ln.c.get(e,t,["imageLoaded"]),ln.c.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),cC(e,t)}var dC={newInstance:ln.c.newInstance(uC,"vtkTexture"),extend:uC};function mC(e){return+e}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var CC=e=>()=>e;function IC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):CC(isNaN(e)?t:e)}function hC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yC(){}var vC="\\s*([+-]?\\d+)\\s*",ZC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GC=/^#([0-9a-f]{3,8})$/,SC=new RegExp("^rgb\\("+[vC,vC,vC]+"\\)$"),BC=new RegExp("^rgb\\("+[AC,AC,AC]+"\\)$"),VC=new RegExp("^rgba\\("+[vC,vC,vC,ZC]+"\\)$"),RC=new RegExp("^rgba\\("+[AC,AC,AC,ZC]+"\\)$"),wC=new RegExp("^hsl\\("+[ZC,AC,AC]+"\\)$"),kC=new RegExp("^hsla\\("+[ZC,AC,AC,ZC]+"\\)$"),WC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xC(){return this.rgb().formatHex()}function TC(){return this.rgb().formatRgb()}function JC(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XC(t):3===n?new YC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?OC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?OC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SC.exec(e))?new YC(t[1],t[2],t[3],1):(t=BC.exec(e))?new YC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VC.exec(e))?OC(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?OC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wC.exec(e))?MC(t[1],t[2]/100,t[3]/100,1):(t=kC.exec(e))?MC(t[1],t[2]/100,t[3]/100,t[4]):WC.hasOwnProperty(e)?XC(WC[e]):"transparent"===e?new YC(NaN,NaN,NaN,0):null}function XC(e){return new YC(e>>16&255,e>>8&255,255&e,1)}function OC(e,t,n,r){return r<=0&&(e=t=n=NaN),new YC(e,t,n,r)}function NC(e){return e instanceof yC||(e=JC(e)),e?new YC((e=e.rgb()).r,e.g,e.b,e.opacity):new YC}function HC(e,t,n,r){return 1===arguments.length?NC(e):new YC(e,t,n,null==r?1:r)}function YC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FC(){return"#"+KC(this.r)+KC(this.g)+KC(this.b)}function PC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function KC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function MC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DC(e,t,n,r)}function LC(e){if(e instanceof DC)return new DC(e.h,e.s,e.l,e.opacity);if(e instanceof yC||(e=JC(e)),!e)return new DC;if(e instanceof DC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-a,s=(o+a)/2;return l?(i=t===o?(n-r)/l+6*(n0&&s<1?0:i,new DC(i,l,s,e.opacity)}function DC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function EC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hC(yC,JC,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xC,formatHex:xC,formatHsl:function(){return LC(this).formatHsl()},formatRgb:TC,toString:TC}),hC(YC,HC,bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FC,formatHex:FC,formatRgb:PC,toString:PC})),hC(DC,(function(e,t,n,r){return 1===arguments.length?LC(e):new DC(e,t,n,null==r?1:r)}),bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new YC(EC(e>=240?e-240:e+120,a,r),EC(e,a,r),EC(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var UC=function e(t){var n=function(e){return 1==(e=+e)?IC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):CC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=HC(e)).r,(t=HC(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=IC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function zC(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;ni&&(a=t.slice(i,a),s[l]?s[l]+=a:s[++l]=a),(n=n[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,c.push({i:l,x:fC(n,r)})),i=qC.lastIndex;return it?1:e>=t?0:NaN}function rI(e){let t=e,n=e;function r(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)<0?r=o+1:a=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>nI(e(t),n)}(e)),{left:r,center:function(e,n,a,o){null==a&&(a=0),null==o&&(o=e.length);const i=r(e,n,a,o-1);return i>a&&t(e[i-1],n)>-t(e[i],n)?i-1:i},right:function(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)>0?a=o:r=o+1}return r}}}const aI=rI(nI).right;rI((function(e){return null===e?NaN:+e})).center;var oI=[0,1];function iI(e){return e}function lI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function sI(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return at&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=s>2?cI:sI,a=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),l,s)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(l,i.map(e),fC)))(n)))},u.domain=function(e){return arguments.length?(i=Array.from(e,mC),g()):i.slice()},u.range=function(e){return arguments.length?(l=Array.from(e),g()):l.slice()},u.rangeRound=function(e){return l=Array.from(e),s=pC,g()},u.clamp=function(e){return arguments.length?(c=!!e||iI,g()):c!==iI},u.interpolate=function(e){return arguments.length?(s=e,g()):s},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,g()}}()(iI,iI)}function dI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mI,fI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pI(e){if(!(t=fI.exec(e)))throw new Error("invalid format: "+e);var t;return new CI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CI(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hI(e){return(e=II(Math.abs(e)))?e[1]:NaN}function bI(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}pI.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bI(100*e,t),r:bI,s:function(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(mI=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+II(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vI(e){return e}var ZI,AI,GI,SI=Array.prototype.map,BI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ZI=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?vI:(t=SI.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?vI:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(SI.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=pI(e)).fill,n=e.align,u=e.sign,d=e.symbol,m=e.zero,f=e.width,p=e.comma,C=e.precision,I=e.trim,h=e.type;"n"===h?(p=!0,h="g"):yI[h]||(void 0===C&&(C=12),I=!0,h="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===d?o:/[%p]/.test(h)?s:"",v=yI[h],Z=/[defgprs%]/.test(h);function A(e){var a,o,s,d=b,A=y;if("c"===h)A=v(e)+A,e="";else{var G=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:v(Math.abs(e),C),I&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),G&&0==+e&&"+"!==u&&(G=!1),d=(G?"("===u?u:c:"-"===u||"("===u?"":u)+d,A=("s"===h?BI[8+mI/3]:"")+A+(G&&"("===u?")":""),Z)for(a=-1,o=e.length;++a(s=e.charCodeAt(a))||s>57){A=(46===s?i+e.slice(a+1):e.slice(a))+A,e=e.slice(0,a);break}}p&&!m&&(e=r(e,1/0));var S=d.length+e.length+A.length,B=S>1)+d+e+A+B.slice(S);break;default:e=B+d+e+A}return l(e)}return C=void 0===C?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=u(((e=pI(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hI(t)/3))),a=Math.pow(10,-r),o=BI[8+r/3];return function(e){return n(a*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),AI=ZI.format,GI=ZI.formatPrefix;var VI=Math.sqrt(50),RI=Math.sqrt(10),wI=Math.sqrt(2);function kI(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=VI?10:o>=RI?5:o>=wI?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=VI?10:o>=RI?5:o>=wI?2:1)}function WI(e,t,n,r){var a,o,i,l,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=VI?a*=10:o>=RI?a*=5:o>=wI&&(a*=2),t0)return[e];if((r=t0){let n=Math.round(e/i),r=Math.round(t/i);for(n*it&&--r,o=new Array(a=r-n+1);++lt&&--r,o=new Array(a=r-n+1);++l0;){if((a=kI(s,c,n))===r)return o[i]=s,o[l]=c,t(o);if(a>0)s=Math.floor(s/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function TI(){var e=uI();return e.copy=function(){return gI(e,TI())},dI.apply(e,arguments),xI(e)}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XI(e){for(var t=1;ta,t.camera.getParallelProjection()||(Object(Fo.l)(LI,LI),i=Object(Fo.d)(LI,MI)>a)),i!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=i,n=!0)}return n},e.updatePolyData=function(e,n,r){var a=0,o=0;a+=8;for(var i=0,l=0;l<12;l++)n[l]>0&&i++;if(o+=i,t.gridLines)for(var s=0;s<6;s++)e[s]&&(a+=2*r[FI[s][0]].length+2*r[FI[s][1]].length,o+=r[FI[s][0]].length+r[FI[s][1]].length);for(var c=new Float64Array(3*a),g=new Uint32Array(3*o),u=0,d=0,m=0;m<2;m++)for(var f=0;f<2;f++)for(var p=0;p<2;p++)c[3*u]=t.dataBounds[p],c[3*u+1]=t.dataBounds[2+f],c[3*u+2]=t.dataBounds[4+m],u++;for(var C=0;C<12;C++)n[C]>0&&(g[3*d]=2,g[3*d+1]=HI[C][0],g[3*d+2]=HI[C][1],d++);if(t.gridLines)for(var I=0;I<6;I++)if(e[I]){for(var h=Math.floor(I/2),b=r[FI[I][0]],y=0;y.5?Object(Fo.b)(MI,DI,i[0]*l):Object(Fo.b)(MI,DI,i[0]*l-c.width/2),Object(Fo.g)(PI,PI,MI),Object(Fo.b)(MI,EI,i[1]*l-c.height/2),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[0],s.tcoords[2*m+1]=c.tcoords[1],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[2],s.tcoords[2*m+1]=c.tcoords[3],m++,Object(Fo.b)(MI,EI,c.height),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[4],s.tcoords[2*m+1]=c.tcoords[5],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.a)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[6],s.tcoords[2*m+1]=c.tcoords[7],m++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-3,s.polys[4*f+3]=m-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-2,s.polys[4*f+3]=m-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n);var r=t.textValues.length,a=4*r,o=2*r,i=new Float64Array(3*a),l=new Uint16Array(4*o),s=new Float32Array(2*a);Object(Yo.g)(UI,n);for(var c={ptIdx:0,cellIdx:0,polys:l,points:i,tcoords:s},g=0,u=0,d=0,m=t.textPolyData.getPoints().getData();g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jI(n)),aC.extend(e,t,n),t.lastSize=[800,800],t.lastAspectRatio=1,t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.mapper=Pu.newInstance(),t.polyData=Go.a.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,a,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=aC.newInstance(),t.pixelActor.setMapper(t.pixelMapper),ln.c.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),ln.c.setGetArray(e,t,["dataBounds"],6),ln.c.setGetArray(e,t,["axisLabels"],3),ln.c.get(e,t,["axisTextStyle","tickTextStyle","camera"]),_I(e,t)}var qI={newInstance:ln.c.newInstance(QI,"vtkCubeAxesActor"),extend:QI};function $I(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=function(e,n){var r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}var eh={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var th={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eh,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.setGetArray(e,t,["displayCenter"],2),ln.c.setGetArray(e,t,["center"],3),$I(e,t)}};function nh(e,t){t.classHierarchy.push("vtkCompositeMouseManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onButtonDown=function(e,t,n){},e.onButtonUp=function(e){},e.onMouseMove=function(e,t,n){},e.onStartScroll=function(e,t,n){},e.onScroll=function(e,t,n){},e.onEndScroll=function(e){},e.isDragEnabled=function(){return t.dragEnabled},e.isScrollEnabled=function(){return t.scrollEnabled}}var rh={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var ah={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rh,n),ln.c.setGet(e,t,["button","shift","control","alt"]),ln.c.set(e,t,["dragEnabled","scrollEnabled"]),nh(e,t)}};function oh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,c,g){if(g){var u=c.getActiveCamera(),d=u.getPosition(),m=u.getFocalPoint();Object(Yo.h)(o);var f=t.center,p=t.rotationFactor;Object(Yo.s)(o,o,f);var C=t.previousPosition.x-g.x,I=t.previousPosition.y-g.y,h=e.getView().getSize(),b=u.getViewUp();Object(Yo.q)(o,o,Object(Xo.B)(360*C/h[0]*p),b),Object(Xo.w)(u.getDirectionOfProjection(),b,i),Object(Yo.q)(o,o,Object(Xo.B)(-360*I/h[1]*p),i),l[0]=-f[0],l[1]=-f[1],l[2]=-f[2],Object(Yo.s)(o,o,l),Object(Fo.q)(n,d,o),Object(Fo.q)(r,m,o),s[0]=b[0]+d[0],s[1]=b[1]+d[1],s[2]=b[2]+d[2],Object(Fo.q)(a,s,o),u.setPosition(n[0],n[1],n[2]),u.setFocalPoint(r[0],r[1],r[2]),u.setViewUp(a[0]-n[0],a[1]-n[1],a[2]-n[2]),u.orthogonalizeViewUp(),c.resetCameraClippingRange(),e.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=g}}}var ih={};function lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ih,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),oh(e,t)}var sh={newInstance:ln.c.newInstance(lh,"vtkMouseCameraTrackballRotateManipulator"),extend:lh};function ch(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(c,g,u){if(u){var d=g.getActiveCamera(),m=d.getPosition(),f=d.getFocalPoint(),p=d.getViewUp();n[0]=f[0]-m[0],n[1]=f[1]-m[1],n[2]=f[2]-m[2],e.computeDisplayCenter(c.getInteractorStyle(),g);var C=t.previousPosition.x-t.displayCenter[0],I=u.x-t.displayCenter[0],h=t.previousPosition.y-t.displayCenter[1],b=u.y-t.displayCenter[1];if(!(0===I&&0===b||0===C&&0===h)){var y=Object(Xo.F)((C*b-h*I)/(Math.sqrt(C*C+h*h)*Math.sqrt(I*I+b*b))),v=t.center;Object(Yo.h)(o),a[0]=-v[0],a[1]=-v[1],a[2]=-v[2],Object(Yo.s)(o,o,v),Object(Yo.q)(o,o,Object(Xo.B)(y),n),Object(Yo.s)(o,o,a),Object(Fo.q)(i,m,o),Object(Fo.q)(l,f,o),r[0]=p[0]+m[0],r[1]=p[1]+m[1],r[2]=p[2]+m[2],Object(Fo.q)(s,r,o),d.setPosition(i[0],i[1],i[2]),d.setFocalPoint(l[0],l[1],l[2]),d.setViewUp(s[0]-i[0],s[1]-i[1],s[2]-i[2]),d.orthogonalizeViewUp(),g.resetCameraClippingRange(),c.getLightFollowCamera()&&g.updateLightsGeometryToFollowCamera(),t.previousPosition=u}}}}var gh={};function uh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),ch(e,t)}var dh={newInstance:ln.c.newInstance(uh,"vtkMouseCameraTrackballRollManipulator"),extend:uh};function mh(e){return e*e}function fh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=sh.newInstance(),r=dh.newInstance(),a=null;e.onButtonDown=function(t,o,i){var l,s,c=t.getView().getSize(),g=[.5*c[0],.5*c[1]],u=.9*((l=g[0])<(s=g[1])?s:l),d=mh(g[0]-i.x)+mh(g[1]-i.y);(a=u*u>d?n:r).setButton(e.getButton()),a.setShift(e.getShift()),a.setControl(e.getControl()),a.setCenter(e.getCenter()),a.onButtonDown(t,i)},e.onButtonUp=function(e){a&&a.onButtonUp(e)},e.onMouseMove=function(e,t,n){a&&a.onMouseMove(e,t,n)}}var ph={};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ph,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),fh(e,t)}var Ih={newInstance:ln.c.newInstance(Ch,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ch};function hh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var a=r,o=t.previousPosition;t.previousPosition=r;var i=n.getActiveCamera(),l=i.getPosition(),s=i.getFocalPoint();if(i.getParallelProjection()){i.orthogonalizeViewUp();var c=i.getViewUp(),g=i.getViewPlaneNormal(),u=[0,0,0];Object(Xo.w)(g,c,u);var d=e.getView().getSize()[1],m=(a.x-o.x)/d,f=(o.y-a.y)/d,p=i.getParallelScale();f*=2*p;var C=u[0]*(m*=2*p)+c[0]*f;l[0]+=C,s[0]+=C,C=u[1]*m+c[1]*f,l[1]+=C,s[1]+=C,C=u[2]*m+c[2]*f,l[2]+=C,s[2]+=C,i.setPosition(l[0],l[1],l[2]),i.setFocalPoint(s[0],s[1],s[2])}else{var I=t.center,h=e.getInteractorStyle(),b=h.computeWorldToDisplay(n,I[0],I[1],I[2])[2],y=h.computeDisplayToWorld(n,a.x,a.y,b),v=h.computeDisplayToWorld(n,o.x,o.y,b),Z=[l[0]+(v[0]-y[0]),l[1]+(v[1]-y[1]),l[2]+(v[2]-y[2])],A=[s[0]+(v[0]-y[0]),s[1]+(v[1]-y[1]),s[2]+(v[2]-y[2])];i.setPosition(Z[0],Z[1],Z[2]),i.setFocalPoint(A[0],A[1],A[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var bh={};function yh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),hh(e,t)}var vh={newInstance:ln.c.newInstance(yh,"vtkMouseCameraTrackballPanManipulator"),extend:yh};function Zh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var a=e.getView().getSize(),o=n.getActiveCamera(),i=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/a[1]*i;else{var l=o.getClippingRange();t.zoomScale=l[1]/a[1]*1.5*i}},e.onMouseMove=function(e,n,r){if(r){var a=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var i=a*t.zoomScale;o.setParallelScale((1-i)*o.getParallelScale())}else{var l=o.getPosition(),s=o.getFocalPoint(),c=o.getDirectionOfProjection(),g=a*t.zoomScale,u=g*c[0];l[0]+=u,s[0]+=u,u=g*c[1],l[1]+=u,s[1]+=u,u=g*c[2],l[2]+=u,s[2]+=u,o.getFreezeFocalPoint()||o.setFocalPoint(s[0],s[1],s[2]),o.setPosition(l[0],l[1],l[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),a=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/a):(r.dolly(a),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Ah={zoomScale:0,flipDirection:!1};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ah,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),ln.c.setGet(e,t,["flipDirection"]),Zh(e,t)}var Sh={newInstance:ln.c.newInstance(Gh,"vtkMouseCameraTrackballZoomManipulator"),extend:Gh};function Bh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,a){n(e,r,a),t.zoomPosition=a},e.onMouseMove=function(e,n,r){if(r){var a=(t.previousPosition.y-r.y)*t.zoomScale;Mp.dollyToPosition(1-a,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var a=1-.1*n;Mp.dollyToPosition(a,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Vh={zoomPosition:null};function Rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vh,n),Sh.extend(e,t,n),Bh(e,t)}var wh={newInstance:ln.c.newInstance(Rh,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Rh};function kh(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onStartPinch=function(e,t){},e.onStartRotate=function(e,t){},e.onStartPan=function(e,t){},e.onPinch=function(e,t,n){},e.onRotate=function(e,t,n){},e.onPan=function(e,t,n){},e.onEndPinch=function(e){},e.onEndRotate=function(e){},e.onEndPan=function(e){},e.isPinchEnabled=function(){return t.pinchEnabled},e.isPanEnabled=function(){return t.panEnabled},e.isRotateEnabled=function(){return t.rotateEnabled}}var Wh={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var xh={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wh,n),ln.c.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),ln.c.setGet(e,t,["interactorStyle"]),kh(e,t)}};function Th(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=function(e,n){t.previousScale=n},e.onStartRotate=function(e,n){t.previousRotation=n},e.onStartPan=function(e,n){t.previousTranslation=n},e.onPinch=function(e,n,r){Mp.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=function(e,n,r){var a=n.getActiveCamera(),o=e.getInteractorStyle(),i=a.getFocalPoint(),l=(i=o.computeWorldToDisplay(n,i[0],i[1],i[2]))[2],s=r,c=t.previousTranslation,g=o.computeDisplayToWorld(n,i[0]+s[0]-c[0],i[1]+s[1]-c[1],l),u=o.computeDisplayToWorld(n,i[0],i[1],l),d=[];d[0]=u[0]-g[0],d[1]=u[1]-g[1],d[2]=u[2]-g[2],i=a.getFocalPoint();var m=a.getPosition();a.setFocalPoint(d[0]+i[0],d[1]+i[1],d[2]+i[2]),a.setPosition(d[0]+m[0],d[1]+m[1],d[2]+m[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=function(e,n,r){var a=n.getActiveCamera();a.roll(r-t.previousRotation),a.orthogonalizeViewUp(),t.previousRotation=r}}var Jh={};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jh,n),ln.c.obj(e,t),xh.extend(e,t,n),th.extend(e,t,n),Th(e,t)}var Oh={newInstance:ln.c.newInstance(Xh,"vtkGestureCameraManipulator"),extend:Xh};function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh(n)),Object(ln.h)(e,t),ah.extend(e,t,n),Object(ln.d)(e,t,"BoxSelectChange"),Object(ln.d)(e,t,"BoxSelectInput"),Object(ln.j)(e,t,["renderSelection","selectionStyle"]),Ph(e,t)}var Lh={newInstance:Object(ln.g)(Mh,"vtkMouseBoxSelectionManipulator"),extend:Mh},Dh=n(38);function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uh(e){for(var t=1;t.001?Math.acos(n/o):0,l=i>.001?Math.atan2(a,r):0;t[0]=o,t[1]=i,t[2]=l}function db(e,t){if(e[0]>=t-.1)return e[2];var n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function mb(e,t,n,r){var a=[],o=[];Object(Xo.e)(t,a),Object(Xo.e)(n,o);var i=[],l=[];ub(a,i),ub(o,l);var s=e;if(i[1]>.05&&l[1]>.05&&function(e,t){var n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(i[2],l[2])>.33*Math.PI){var c=Math.max(i[0],l[0]);c=Math.max(88,c),e<.5?(l[0]=c,l[1]=0,l[2]=0,s*=2):(i[0]=c,i[1]=0,i[2]=0,s=2*s-1)}i[1]<.05&&l[1]>.05?i[2]=db(l,i[0]):l[1]<.05&&i[1]>.05&&(l[2]=db(i,l[0]));var g=[];g[0]=(1-s)*i[0]+s*l[0],g[1]=(1-s)*i[1]+s*l[1],g[2]=(1-s)*i[2]+s*l[2];var u=[];!function(e,t){var n=e[0],r=e[1],a=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(a),t[2]=n*Math.sin(r)*Math.sin(a)}(g,u),Object(Xo.f)(u,r)}function fb(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,a){return e.addRGBPointLong(t,n,r,a,.5,0)},e.addRGBPointLong=function(n,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i<0||i>1)return cb("Midpoint outside range [0.0, 1.0]"),-1;if(l<0||l>1)return cb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var s={x:n,r:r,g:a,b:o,midpoint:i,sharpness:l};t.nodes.push(s),e.sortAndUpdateRange();for(var c=0;c4&&void 0!==arguments[4]?arguments[4]:.5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=[],s=[n,r,a];return Object(Xo.u)(s,l),e.addRGBPoint(t,l[0],l[1],l[2],o,i)},e.setNodes=function(n){t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=function(){t.nodes.sort((function(e,t){return e.x-t.x})),e.updateRange()||e.modified()},e.updateRange=function(){var n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];var r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=function(n){for(var r=0;r=t.nodes.length)return-1;var o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var a=0;a=n&&t.nodes[g].x<=i?t.nodes.splice(g,1):g++;e.addRGBPointLong(n,r,a,o,.5,0),e.addRGBPointLong(i,l,s,c,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,a,o,i,l,s){var c=[i,l,s],g=[],u=[];Object(Xo.u)([n,r,a],g),Object(Xo.u)(c,u),e.addRGBSegment(t,g[0],g[1],g[2],o,u[0],u[1],u[2])},e.mapValue=function(t){var n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=function(n,r){if(t.indexedLookup){var a=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===a)e.getNanColor(r);else{var i=[];e.getNodeValue(o%a,i),r[0]=i.r,r[1]=i.g,r[2]=i.b}}else e.getTable(n,n,1,r)},e.getRedValue=function(t){var n=[];return e.getColor(t,n),n[0]},e.getGreenValue=function(t){var n=[];return e.getColor(t,n),n[1]},e.getBlueValue=function(t){var n=[];return e.getColor(t,n),n[2]},e.getTable=function(n,r,a,o){if(Object(Xo.v)(n)||Object(Xo.v)(r))for(var i=0;i0);var v=0,Z=0,A=0;y&&(v=Math.log10(n),Z=Math.log10(r));for(var G=0;G1?y?(A=v+G/(a-1)*(Z-v),d=Math.pow(10,A)):d=n+G/(a-1)*(r-n):y?(A=.5*(v+Z),d=Math.pow(10,A)):d=.5*(n+r),t.discretize){var B=t.mappingRange;if(d>=B[0]&&d<=B[1]){var V=t.numberOfValues,R=B[1]-B[0];if(V<=1)d=B[0]+R/2;else{var w=(d-B[0])/R,k=Object(Xo.g)(V*w);d=B[0]+k/(V-1)*R}}}for(;lt.nodes[l].x;)++l.99999&&(I=.99999));if(d>t.mappingRange[1])o[S]=0,o[S+1]=0,o[S+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[S]=t.aboveRangeColor[0],o[S+1]=t.aboveRangeColor[1],o[S+2]=t.aboveRangeColor[2]):(o[S]=c,o[S+1]=g,o[S+2]=u));else if(d0&&(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b));else if(0===l&&(Math.abs(d-n)<1e-6||t.discretize))s>0?(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b):(o[S]=0,o[S+1]=0,o[S+2]=0);else{var W=0;if(W=(W=y?(A-m)/(f-m):(d-m)/(f-m)).99){if(W<.5){o[S]=p[0],o[S+1]=p[1],o[S+2]=p[2];continue}o[S]=C[0],o[S+1]=C[1],o[S+2]=C[2];continue}if(h<.01){if(t.colorSpace===ob.RGB)o[S]=(1-W)*p[0]+W*C[0],o[S+1]=(1-W)*p[1]+W*C[1],o[S+2]=(1-W)*p[2]+W*C[2];else if(t.colorSpace===ob.HSV){var x=[],T=[];Object(Xo.d)(p,x),Object(Xo.d)(C,T),t.hSVWrap&&(x[0]-T[0]>.5||T[0]-x[0]>.5)&&(x[0]>T[0]?x[0]-=1:T[0]-=1);var J=[];J[0]=(1-W)*x[0]+W*T[0],J[0]<0&&(J[0]+=1),J[1]=(1-W)*x[1]+W*T[1],J[2]=(1-W)*x[2]+W*T[2],Object(Xo.u)(J,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var X=[],O=[];Object(Xo.e)(p,X),Object(Xo.e)(C,O);var N=[];N[0]=(1-W)*X[0]+W*O[0],N[1]=(1-W)*X[1]+W*O[1],N[2]=(1-W)*X[2]+W*O[2],Object(Xo.f)(N,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.",t.colorSpace);continue}W<.5?W=.5*Math.pow(2*W,1+10*h):W>.5&&(W=1-.5*Math.pow(2*(1-W),1+10*h));var H=W*W,Y=H*W,F=2*Y-3*H+1,P=-2*Y+3*H,K=Y-2*H+W,M=Y-H,L=void 0;if(t.colorSpace===ob.RGB)for(var D=0;D<3;D++)L=(1-h)*(C[D]-p[D]),o[S+D]=F*p[D]+P*C[D]+K*L+M*L;else if(t.colorSpace===ob.HSV){var E=[],U=[];Object(Xo.d)(p,E),Object(Xo.d)(C,U),t.hSVWrap&&(E[0]-U[0]>.5||U[0]-E[0]>.5)&&(E[0]>U[0]?E[0]-=1:U[0]-=1);for(var z=[],_=0;_<3;_++)L=(1-h)*(U[_]-E[_]),z[_]=F*E[_]+P*U[_]+K*L+M*L,0===_&&z[_]<0&&(z[_]+=1);Object(Xo.u)(z,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var j=[],Q=[];Object(Xo.e)(p,j),Object(Xo.e)(C,Q);for(var q=[],$=0;$<3;$++)L=(1-h)*(Q[$]-j[$]),q[$]=F*j[$]+P*Q[$]+K*L+M*L;Object(Xo.f)(q,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[S+ee]=o[S+ee]<0?0:o[S+ee],o[S+ee]=o[S+ee]>1?1:o[S+ee]}}}},e.getUint8Table=function(n,r,a){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return cb("Attempting to lookup a value with no points in the function"),t.table;var i=o?4:3;t.tableSize===a&&t.tableWithAlpha===o||(t.table=new Uint8Array(a*i),t.tableSize=a,t.tableWithAlpha=o);var l=[];e.getTable(n,r,a,l);for(var s=0;s1&&(i=(r-n)/(a-1));for(var l=0;l=t.nodes.length?(cb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){if(n<0||n>=t.nodes.length)return cb("Index out of range!"),-1;var a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=function(){return t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216},e.getIndexedColor=function(t,n){var r=e.getSize();if(r>0&&t>=0){var a=[];e.getNodeValue(t%r,a);for(var o=0;o<3;++o)n[o]=a[o+1];n[3]=1}else e.getNanColor(n),n[3]=1},e.fillFromDataPointer=function(t,n){if(!(t<=0)&&n){e.removeAllPoints();for(var r=0;rn[1]?(e.getColor(n[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])):(e.getColor(r[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])),e.sortAndUpdateRange();for(var o=0;o=n[0]&&t.nodes[o].x<=n[1]?t.nodes.splice(o,1):++o;return 1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){if(t.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pb,n),mu.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},ln.c.obj(t.buildTime),ln.c.get(e,t,["buildTime","mappingRange"]),ln.c.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),fb(e,t)}var Ib=function(e){for(var t=1;t0&&(n=t.nodes[0].y);for(var a=1;an)switch(r){case 0:case 1:r=1;break;default:case 2:r=3}else switch(r){case 0:case 2:r=2;break;default:case 1:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:case 3:return"Varied"}},e.getDataPointer=function(){var e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(var n=0;n0?t.nodes[n-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=function(e,n){var r=t.nodes.length;return e<0||e>=r?(hb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){var a=t.nodes.length;if(n<0||n>=a)return hb("Index out of range!"),-1;var o=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],o!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=function(t,n){return e.addPointLong(t,n,.5,0)},e.addPointLong=function(n,r,a,o){if(a<0||a>1)return hb("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return hb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var i,l={x:n,y:r,midpoint:a,sharpness:o};for(t.nodes.push(l),e.sortAndUpdateRange(),i=0;i=t.nodes.length)return-1;var a=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,a,o){e.sortAndUpdateRange();for(var i=0;i=n&&t.nodes[i].x<=a?t.nodes.splice(i,1):i++;e.addPoint(n,r,.5,0),e.addPoint(a,o,.5,0)},e.getValue=function(t){var n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=function(n){if(n.length<2)return 0;var r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(var a=0;a=n[0]&&t.nodes[a].x<=n[1]?t.nodes.splice(a,1):++a;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){var e=t.nodes.length;if(e<2)return-1;for(var n=t.nodes[1].x-t.nodes[0].x,r=0;r4&&void 0!==arguments[4]?arguments[4]:1,l=0,s=t.nodes.length,c=0;0!==s&&(c=t.nodes[s-1].y);var g=0,u=0,d=0,m=0,f=0,p=0,C=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);lt.nodes[l].x;)++l.99999&&(p=.99999));if(l>=s)a[I]=t.clamping?c:0;else if(0===l)a[I]=t.clamping?t.nodes[0].y:0;else{var h=(g-u)/(d-u);if(h=h.99){if(h<.5){a[I]=m;continue}a[I]=f;continue}if(C<.01){a[I]=(1-h)*m+h*f;continue}h<.5?h=.5*Math.pow(2*h,1+10*C):h>.5&&(h=1-.5*Math.pow(2*(1-h),1+10*C));var b=h*h,y=b*h,v=2*y-3*b+1,Z=-2*y+3*b,A=y-2*b+h,G=y-b,S=f-m,B=(1-C)*S;a[I]=v*m+Z*f+A*B+G*B;var V=mf?m:f;a[I]=a[I]R?R:a[I]}}}}var yb={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yb,n),ln.c.obj(e,t),t.nodes=[],ln.c.setGet(e,t,["allowDuplicateScalars","clamping"]),ln.c.setArray(e,t,["range"],2),ln.c.getArray(e,t,["range"]),bb(e,t)}var Zb={newInstance:ln.c.newInstance(vb,"vtkPiecewiseFunction"),extend:vb};function Ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Gb=Km.InterpolationType,Sb=Km.OpacityMode,Bb=ln.c.vtkErrorMacro;function Vb(e,t){t.classHierarchy.push("vtkVolumeProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(n=n>(e=t.componentData[r].grayTransferFunction.getMTime())?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].scalarOpacity&&(n=n>(e=t.componentData[r].scalarOpacity.getMTime())?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(n=n>(e=t.componentData[r].gradientOpacity.getMTime())?n:e));return n},e.getColorChannels=function(e){return e<0||e>3?(Bb("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var a=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,a=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,a=!0),a&&e.modified(),a},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Zb.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction},e.setRGBTransferFunction=function(n,r){var a=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,a=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,a=!0),a&&e.modified(),a},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=Ib.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction},e.setScalarOpacity=function(n,r){return t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0)},e.getScalarOpacity=function(n){return null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=Zb.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Bb("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Bb("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Gb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Gb.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(Gb.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Gb,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["set".concat(r)]=function(r,a){return t.componentData[r]["".concat(n)]!==a&&(t.componentData[r]["".concat(n)]=a,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var Rb={independentComponents:!0,interpolationType:Gb.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function wb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rb,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;++r)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:Sb.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),Vb(e,t)}var kb=function(e){for(var t=1;tr[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){Wb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e}}var Tb={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function Jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tb,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),xb(e,t)}var Xb={newInstance:ln.c.newInstance(Jb,"vtkVolume"),extend:Jb},Ob=Lm.BlendMode;function Nb(e,t){t.classHierarchy.push("vtkVolumeMapper"),e.getBounds=function(){var n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=Object(Xo.j)(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(Ob.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(Ob.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(Ob.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(Ob.AVERAGE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return ln.c.enumToString(Ob,t.blendMode)}}var Hb={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:Ob.COMPOSITE_BLEND,averageIPScalarRange:[-1e6,1e6]};function Yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),_g.extend(e,t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),ln.c.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),ln.c.setGetArray(e,t,["averageIPScalarRange"],2),ln.c.event(e,t,"lightingActivated"),Nb(e,t)}var Fb={newInstance:ln.c.newInstance(Yb,"vtkVolumeMapper"),extend:Yb},Pb=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Pb[e.Name]=e}));var Kb=Object.keys(Pb);Kb.sort();var Mb={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Pb[e.Name]||(Kb.push(e.Name),Kb.sort()),Pb[e.Name]=e)},removePresetByName:function(e){var t=Kb.indexOf(e);t>-1&&Kb.splice(t,1),delete Pb[e]},getPresetByName:function(e){return Pb[e]},rgbPresetNames:Kb};var Lb=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.volume=Xb.newInstance({visibility:!1}),t.mapper=Fb.newInstance(),t.volume.setMapper(t.mapper),t.volume.getProperty().setRGBTransferFunction(0,t.lookupTable),t.volume.getProperty().setScalarOpacity(0,t.piecewiseFunction),t.volume.getProperty().setInterpolationTypeToLinear(),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addVolume(e.volume),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&(this.view.renderer.removeVolume(this.volume),this.view=null),this.volume.delete(),this.volume=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.volume,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange;if(!r||t&&r===t.volume||this.volume.set(r),!a||t&&a===t.property||this.volume.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var s,c=Mb.getPresetByName(i);this.lookupTable.applyColorMap(c),(s=this.lookupTable).setMappingRange.apply(s,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?(console.log("from update"),this.dataChanged()):(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.volume.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.volume.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();Lb.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},Lb.propTypes={id:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Db=Lb,Eb=Id.InterpolationType,Ub=ln.c.vtkErrorMacro;function zb(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].piecewiseFunction&&(n=n>(e=t.componentData[r].piecewiseFunction.getMTime())?n:e);return n},e.setRGBTransferFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].rGBTransferFunction!==o&&(t.componentData[a].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].piecewiseFunction!==o&&(t.componentData[a].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=function(t,n){var r=t,a=n;return Number.isInteger(t)||(a=t,r=0),e.setPiecewiseFunction(r,a)},e.getScalarOpacity=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Ub("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Ub("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Eb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Eb.LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Eb,t.interpolationType)}}var _b={independentComponents:!1,interpolationType:Eb.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,_b,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),zb(e,t)}var Qb={newInstance:ln.c.newInstance(jb,"vtkImageProperty"),extend:jb},qb=ln.c.vtkDebugMacro;function $b(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=function(){return e},e.getImages=function(){return e},e.getIsOpaque=function(){if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=Qb.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n,r=t.mapper.getBounds();if(!r||6!==r.length)return r;if(r[0]>r[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){qb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,a=t.mapper.getBoundsForSlice(n,r);if(!a||6!==a.length)return a;if(a[0]>a[1])return a;var o=[];Ol.getCorners(a,o),e.computeMatrix();var i=new Float64Array(16);Object(Yo.i)(i,t.matrix),o.forEach((function(e){return Object(Fo.q)(e,e,i)}));var l=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return l.map((function(e,t){return t%2==0?o.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):o.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}if(null!==t.property){var r=t.property.getMTime();e=r>e?r:e,null!==t.property.getRGBTransferFunction()&&(e=(r=t.property.getRGBTransferFunction().getMTime())>e?r:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var ey={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ey,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),$b(e,t)}var ny={newInstance:ln.c.newInstance(ty,"vtkImageSlice"),extend:ty};function ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ay(e){for(var t=1;ti&&(i=g,s=r[c]<0,l=c)}if(1!==i){var u="IJKXYZ"[t.slicingMode],d="IJKXYZ"[l];ly("Unaccurate slicing along ".concat(u," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(i,"% aligned). ")+"Necessitates slice reformat that is not yet implemented. You can switch the slicing mode on your mapper to do IJK slicing instead.")}t.closestIJKAxis={ijkMode:l,flip:s}}function r(n,r){var a=e.getInputData(),o=a.getExtent(),i=[o[0],o[2],o[4]],l=e.getClosestIJKAxis().ijkMode,s=t.slice;l!==t.slicingMode&&(s=e.getSliceAtPosition(s)),i[l]+=s;var c=[0,0,0];a.indexToWorld(i,c),i[l]+=1;var g=[0,0,0];a.indexToWorld(i,g),g[0]-=c[0],g[1]-=c[1],g[2]-=c[2],Object(Fo.l)(g,g);var u=tl.a.intersectWithLine(n,r,c,g);if(u.intersection){var d=u.x,m=[0,0,0];return a.worldToIndex(d,m),{t:u.t,absoluteIJK:m}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,a=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=a.getBounds();switch(t.slicingMode){case sy.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case sy.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case sy.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var i=[0,0,0];a.worldToIndex(r,i);var l=a.getExtent(),s=0;switch(e.getClosestIJKAxis().ijkMode){case sy.I:s=Object(Xo.a)(i[0],l[0],l[1]),s=Math.round(s);break;case sy.J:s=Object(Xo.a)(i[1],l[2],l[3]),s=Math.round(s);break;case sy.K:s=Object(Xo.a)(i[2],l[4],l[5]),s=Math.round(s);break;default:return 0}return s},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case sy.I:case sy.J:case sy.K:var a=e.getSliceAtPosition(r);e.setSlice(a);break;case sy.X:e.setSlice(r[0]);break;case sy.Y:e.setSlice(r[1]);break;case sy.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(sy.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(sy.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(sy.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(sy.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(sy.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(sy.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),a=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case sy.X:n[0]=1;break;case sy.Y:n[1]=1;break;case sy.Z:n[2]=1;break;case sy.I:Object(Xo.k)(a,[1,0,0],n);break;case sy.J:Object(Xo.k)(a,[0,1,0],n);break;case sy.K:Object(Xo.k)(a,[0,0,1],n)}return n},e.setSlicingMode=function(r){t.slicingMode!==r&&(t.slicingMode=r,e.getInputData()&&n(),e.modified())},e.getClosestIJKAxis=function(){return void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==sy.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return Object(Xo.j)();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),a=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(a!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),a){case sy.I:r[0]=o,r[1]=o;break;case sy.J:r[2]=o,r[3]=o;break;case sy.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getInputData();if(!a)return Object(Xo.j)();var o=a.getExtent(),i=e.getClosestIJKAxis(),l=i.ijkMode,s=n;switch(l!==t.slicingMode&&(s=e.getSliceAtPosition(n)),l){case sy.I:o[0]=s-r,o[1]=s+r;break;case sy.J:o[2]=s-r,o[3]=s+r;break;case sy.K:o[4]=s-r,o[5]=s+r}return a.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=[Math.round(a.absoluteIJK[0]),Math.round(a.absoluteIJK[1]),Math.round(a.absoluteIJK[2])];return i[0]o[1]||i[1]o[3]||i[2]o[5]?null:{t:a.t,ijk:i}}return null},e.intersectWithLineForCellPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=a.absoluteIJK,l=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])];if(l[0]o[1]-1||l[1]o[3]-1||l[2]o[5]-1)return null;var s=[i[0]-l[0],i[1]-l[1],i[2]-l[2]];return{t:a.t,ijk:l,pCoords:s}}return null}}var gy={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:sy.NONE,closestIJKAxis:{ijkMode:sy.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gy,n),_g.extend(e,t,n),ln.c.get(e,t,["slicingMode"]),ln.c.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),ln.c.setGetArray(e,t,["customDisplayExtent"],4),Vu.implementCoincidentTopologyMethods(e,t),cy(e,t)}var dy=ay(ay(ay({newInstance:ln.c.newInstance(uy,"vtkImageMapper"),extend:uy},oy),iy),pd);var my=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.actor=ny.newInstance({visibility:!1}),t.mapper=dy.newInstance(),t.actor.setMapper(t.mapper),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addActor(e.actor),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&this.view.renderer.removeActor(this.actor),this.actor.delete(),this.actor=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.actor,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange,s=e.iSlice,c=e.jSlice,g=e.kSlice,u=e.xSlice,d=e.ySlice,m=e.zSlice;if(!r||t&&r===t.actor||this.actor.set(r),!a||t&&a===t.property||this.actor.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var f,p=Mb.getPresetByName(i);this.lookupTable.applyColorMap(p),(f=this.lookupTable).setMappingRange.apply(f,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?this.dataChanged():(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),!s||t&&s===t.iSlice||this.mapper.setISlice(s),!c||t&&c===t.jSlice||this.mapper.setJSlice(c),!g||t&&g===t.kSlice||this.mapper.setKSlice(g),!u||t&&u===t.xSlice||this.mapper.setXSlice(u),!d||t&&d===t.ySlice||this.mapper.setYSlice(d),!m||t&&m===t.zSlice||this.mapper.setZSlice(m),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.actor.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.actor.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();my.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},my.propTypes={id:Rs.a.string,mapper:Rs.a.object,actor:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),iSlice:Rs.a.number,jSlice:Rs.a.number,kSlice:Rs.a.number,xSlice:Rs.a.number,ySlice:Rs.a.number,zSlice:Rs.a.number,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var fy=my,py=Object.create(null);[{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){py[e.Name]=e}));var Cy=Object.keys(py);Cy.sort();var Iy={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(py[e.Name]||(Cy.push(e.Name),Cy.sort()),py[e.Name]=e)},removePresetByName:function(e){var t=Cy.indexOf(e);t>-1&&Cy.splice(t,1),delete py[e]},getPresetByName:function(e){return py[e]},rgbPresetNames:Cy},hy=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments[3];return new Promise((function(o,i){var l=n._messageId++;n._messages.set(l,[o,i,a]),n._worker.postMessage([l,t,e],r||[])}))}},{key:"postMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return new Promise((function(a,o){var i=t._messageId++;t._messages.set(i,[a,o,r]),t._worker.postMessage([i,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+l||uo+s?d===s?o:o+d/(d-s)*(u-o-s):-d===s?o:o-d/(d+s)*(u-o-s))-o)/d,f=Math.exp(-4*m*m),p=1-m*m,C=1,I=i*(c<1?c*p+(1-c)*f:(2-c)*p+(c-1)*C);I>n[g]&&(n[g]=I)}}return n}function Xy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},a=t[3],o=t[2]/(n.length-1),i=!!r.fillStyle,l=a+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var s=0;s3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function Ny(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,Object(Ao.a)(n));return n.indexOf(r)}function Hy(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,a=n.offsetY;t&&n.preventDefault(),e(r,a)}}function Yy(){xy.filter((function(e){return e.ready})).forEach((function(e){e.callbacks.forEach((function(t){t.touches===e.touches&&t.clicks===e.count&&t.action.apply(t,Object(Ao.a)(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(a){var o=a.target.getBoundingClientRect(),i=Array.prototype.map.call(a.touches,(function(e){return[e.pageX-o.left,e.pageY-o.top]})).reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]).map((function(e){return e/a.touches.length}));"touchstart"===a.type?(clearTimeout(xy[e].timeout),xy[e].ts=a.timeStamp,xy[e].singleTouche=i,xy[e].touches=a.touches.length):"touchmove"===a.type?(xy[e].ts=0,xy[e].count=0,xy[e].ready=!1):"touchend"===a.type&&(a.timeStamp-xy[e].ts1&&void 0!==arguments[1]?arguments[1]:{},o=r.numberOfBinToConsiders,i=void 0===o?1:o,l=r.numberOfBinsToSkip,s=void 0===l?1:l,c=r.numberOfComponents,g=void 0===c?1:c,u=r.component,d=void 0===u?0:u;t.histogram=null,t.histogramArray=n,t.dataRange=Object(Xo.b)(n,d,g);var m=Object(a.a)(t.dataRange,2),f=m[0],p=m[1],C=4,I=Math.floor(n.length/C)||1;I+=I%g;for(var h=0,b=[],y=[];hr;)a.shift();for(var l=a.reduce((function(e,t){return e+t}),0)/r,c=0,g=t.histogram.length;c1){for(var c=t.style.iconSize+t.style.padding,g=c,u=0;r>g;)u+=1,g+=c;switch(u){case 0:var d=e.addGaussian(0,1,.1,0,0),m=t.gaussians[d],f=ky({},m),p=Ty.adjustPosition;t.activeGaussian=d,t.selectedGaussian=d,ln.c.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:p,gaussian:m,originalGaussian:f}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(l<0||l>1||s<0||s>1)t.selectedGaussian=-1,t.dragAction=null;else{var C=Ny(l,t.gaussians);C!==t.selectedGaussian&&(t.selectedGaussian=C,e.modified())}return!0},e.onHover=function(n,r){var o=20/t.canvas.height,i=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),l=Object(a.a)(i,2),s=l[0],c=l[1],g=Oy(n,r,t.graphArea),u=Object(a.a)(g,1)[0],d=s<0?t.selectedGaussian:Ny(s,t.gaussians);t.canvas.style.cursor="default";var m=t.gaussians[d];if(t.enableRangeZoom&&u>=0&&rt.rangeZoom[1]-f?t.canvas.style.cursor=Wy.adjustZoom:t.canvas.style.cursor=Wy.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:Ty.adjustZoom}}else if(m&&u>=0){var p,C=1-c;p=C>m.height+o?"adjustPosition":C>m.height-o?Math.abs(s-m.position).5*m.height+o?"adjustPosition":C>.5*m.height-o?Math.abs(s-m.position)o?"adjustPosition":"adjustWidth",t.canvas.style.cursor=Wy[p];var I=Ty[p],h=ky({},m);t.dragAction={originalXY:[s,c],action:I,gaussian:m,originalGaussian:h}}return d!==t.activeGaussian&&(t.activeGaussian=d,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);t.gaussianSide=0;var i=t.gaussians[o];return i&&(t.gaussianSide=i.position-a),o!==t.selectedGaussian&&a>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];(0,t.dragAction.action)(l,s,ky({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=Jy(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=function(n,r){return t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0},e.onLeave=function(n,r){return e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0},e.onAddGaussian=function(n,r){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];return l>=0&&e.addGaussian(l,1-s,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);return a>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=xy.length,t=arguments.length,n=new Array(t),r=0;r1){var c=Math.round(t.style.iconSize/2-t.style.strokeWidth),g=Math.round(c+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(g-i/2,g,c,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g),e.stroke(),e.moveTo(g-i/2,g-c+t.style.strokeWidth+2),e.lineTo(g-i/2,g+c-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(g-i/2,g+i/2+t.style.iconSize,c,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g+i/2+t.style.iconSize),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&Xy(e,l,Ky(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),Xy(e,l,Ky(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var u=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){var a=r||document.createElement("canvas");a.setAttribute("width",t),a.setAttribute("height",256);for(var o=a.getContext("2d"),i=e.getUint8Table(n[0],n[1],t,4),l=o.getImageData(0,0,t,256),s=0;s<256;s++)l.data.set(i,4*s*t);for(var c=256*t*4,g=4*t,u=3;u0&&(a=Math.min(a,i)),t.opacities[i]>0&&(o=Math.max(o,i));return[n[0]+a*r,n[0]+o*r]};var n=e.setEnableRangeZoom;e.setEnableRangeZoom=function(e){var r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};var r=e.setRangeZoom;e.setRangeZoom=function(){var e=r.apply(void 0,arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((function(){return e.render()})),e.setSize.apply(e,Object(Ao.a)(t.size))}var Dy={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),ln.c.obj(e,t),ln.c.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),ln.c.setGetArray(e,t,["rangeZoom"],2),ln.c.get(e,t,["size","canvas","gaussians"]),ln.c.event(e,t,"opacityChange"),ln.c.event(e,t,"animation"),ln.c.event(e,t,"zoomChange"),Ly(e,t)}var Uy=ky({newInstance:ln.c.newInstance(Ey,"vtkPiecewiseGaussianWidget"),extend:Ey},My),zy='',_y='',jy='';var Qy={container:"VolumeController-module_container__2HNSO",line:"VolumeController-module_line__3rtqL",button:"VolumeController-module_button__2T-xL",sliderEntry:"VolumeController-module_sliderEntry__27XSC",sliderIcon:"VolumeController-module_sliderIcon__U8YAZ VolumeController-module_button__2T-xL",slider:"VolumeController-module_slider__3PS68",piecewiseEditor:"VolumeController-module_piecewiseEditor__2_jav",select:"VolumeController-module_select__7mbfS",presets:"VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadow:"VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonDarkBG:"VolumeController-module_buttonDarkBG__3W1zO VolumeController-module_button__2T-xL",presetsDarkBG:"VolumeController-module_presetsDarkBG__2ZI2W VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowDarkBG:"VolumeController-module_shadowDarkBG__WHYZ- VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonBrightBG:"VolumeController-module_buttonBrightBG__2dstz VolumeController-module_button__2T-xL",presetsBrightBG:"VolumeController-module_presetsBrightBG__3_VRC VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowBrightBG:"VolumeController-module_shadowBrightBG__YCHpe VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".VolumeController-module_container__2HNSO {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n justify-content: space-between;\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(128, 128, 128, 0.5);\n border-radius: 5px;\n padding: 2px;\n border: 0.5px solid black;\n box-sizing: border-box;\n}\n\n.VolumeController-module_line__3rtqL {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.VolumeController-module_button__2T-xL {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module_button__2T-xL svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module_sliderEntry__27XSC {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module_sliderIcon__U8YAZ {\n height: 1rem;\n}\n\n.VolumeController-module_slider__3PS68 {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module_piecewiseEditor__2_jav {\n flex: 1;\n}\n\n.VolumeController-module_select__7mbfS {\n flex: 1;\n border: none;\n background: transparent;\n color: white;\n border: none;\n -moz-appearance: none;\n width: 5px;\n}\n\n.VolumeController-module_select__7mbfS select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module_presets__1h4j5 {\n}\n\n.VolumeController-module_shadow__29K9t {\n}\n\n.VolumeController-module_buttonDarkBG__3W1zO {\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W {\n color: white;\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W option {\n color: black;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- {\n color: white;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- option {\n color: black;\n}\n\n.VolumeController-module_buttonBrightBG__2dstz {\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC {\n color: black;\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC option {\n color: white;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe {\n color: black;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe option {\n color: white;\n}\n");var qy=Iy.rgbPresetNames.map((function(e){return'")}));function $y(e,t){function n(){var e=!!Number(t.el.querySelector(".js-shadow").value);t.actor.getProperty().setShade(e),t.renderWindow.render()}function r(){var e=t.actor.getMapper().getInputData();if(e){var n=e.getPointData().getScalars()||e.getPointData().getArrays()[0],r=t.rescaleColorMap?t.colorDataRange:n.getRange(),a=Iy.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(a),o.setMappingRange.apply(o,Object(Ao.a)(r)),o.updateRange(),t.renderWindow.render()}}function a(){var e=Number(t.el.querySelector(".js-spacing").value),n=t.actor.getMapper().getInputData(),r=.7*Math.sqrt(n.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.actor.getMapper().setSampleDistance(r*Math.pow(2,3*e-1.5)),t.renderWindow.render()}function o(){var e=Number(t.el.querySelector(".js-edge").value);if(0===e)t.actor.getProperty().setUseGradientOpacity(0,!1);else{var n=t.actor.getMapper().getInputData(),r=(n.getPointData().getScalars()||n.getPointData().getArrays()[0]).getRange();t.actor.getProperty().setUseGradientOpacity(0,!0);var a=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*a*a),t.actor.getProperty().setGradientOpacityMaximumValue(0,1*(r[1]-r[0])*e*e)}t.renderWindow.render()}t.classHierarchy.push("vtkVolumeController"),t.el=document.createElement("div"),t.el.setAttribute("class",Qy.container),t.widget=Uy.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(i,l,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(l),e.setRenderWindow(i);var u=t.actor.getMapper().getInputData(),d=u.getPointData().getScalars()||u.getPointData().getArrays()[0],m=t.actor.getProperty().getRGBTransferFunction(0),f=t.actor.getProperty().getScalarOpacity(0),p=s?"DarkBG":"BrightBG",C={};["button","presets","shadow"].forEach((function(e){C[e]=Qy["".concat(e).concat(p)]})),t.el.innerHTML='\n
\n
').concat(zy,'
\n \n \n
\n
\n
\n
').concat(jy,'
\n \n
\n
\n
').concat(_y,'
\n \n
\n
\n
\n ');var I=t.el.querySelector(".js-button"),h=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),y=t.el.querySelector(".js-spacing"),v=t.el.querySelector(".js-edge"),Z=t.el.querySelector(".js-pwf");t.widget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),t.widget.addGaussian(.5,1,.5,.5,.4),t.widget.setDataArray(d.getData()),t.widget.setColorTransferFunction(m),t.widget.applyOpacity(f),t.widget.setContainer(Z),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),I.addEventListener("click",e.toggleVisibility),h.addEventListener("change",n),b.addEventListener("change",r),y.addEventListener("input",a),v.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(f),t.colorDataRange=t.widget.getOpacityRange(),t.rescaleColorMap&&r(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),t.widget.onAnimation((function(e){e?t.renderWindow.getInteractor().requestAnimation(t.widget):(t.renderWindow.getInteractor().cancelAnimation(t.widget),t.renderWindow.render())})),m.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),h.value=Number(c)?"1":"0",b.value=g,n(),r(),a(),o()},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.el),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.el),e.modified())};var i=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!i(e)&&(r(),!0)},e.toggleVisibility=function(){e.setExpanded(!e.getExpanded())},e.setExpanded=function(e){var n=t.el.querySelectorAll(".js-toggle"),r=n.length;if(t.expanded=e,t.expanded)for(;r--;)n[r].style.display="flex";else for(;r--;)n[r].style.display="none"},e.getExpanded=function(){return t.expanded},e.setSize=t.widget.setSize,e.render=t.widget.render,e.onAnimation=t.widget.onAnimation,e.onModified(e.render),e.setSize.apply(e,Object(Ao.a)(t.size))}var ev={size:[600,300],expanded:!0,rescaleColorMap:!1};function tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ev,n),ln.c.obj(e,t),ln.c.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),ln.c.get(e,t,["widget"]),$y(e,t)}var nv={newInstance:ln.c.newInstance(tv,"vtkVolumeController"),extend:tv};var rv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;ps(this,n),(r=t.call(this,e)).subscriptions=[],r.containerRef=Bs.a.createRef();var a=e.size,o=e.rescaleColorMap;return r.controller=nv.newInstance({size:a,rescaleColorMap:o}),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return Bs.a.createElement(_h.Consumer,null,(function(n){return e.view=t,e.representation=n,Bs.a.createElement("div",{ref:e.containerRef})}))}))}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t,n){var r;(r=this.controller).setSize.apply(r,fs(this.props.size)),this.controller.render()}},{key:"componentWillUnmount",value:function(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.controller.setContainer(null),this.controller.delete(),this.controller=null}},{key:"init",value:function(){var e=this,t=this.containerRef.current,n=this.view,r=n.renderWindow,a=n.props,o=this.representation.volume,i=a.background[0]+a.background[1]+a.background[2]<1.5;if(o&&o.getMapper()&&o.getMapper().getInputData()){var l=o.getMapper().getInputData();this.controller.setContainer(t),this.controller.setupContent(r,o,i),this.controller.render(),this.view.resetCamera(),this.view.renderView(),this.subscriptions.push(l.onModified((function(){return e.onDataChange()}),-1))}else setTimeout((function(){return e.init()}),100)}},{key:"onDataChange",value:function(){var e=this.controller.getWidget();if(this.representation&&this.representation.volume){var t=this.representation.volume.getMapper().getInputData(),n=t.getPointData().getScalars()||t.getPointData().getArrays()[0];e.setDataArray(n.getData())}}}]),n}();rv.defaultProps={size:[400,150],rescaleColorMap:!0},rv.propTypes={id:Rs.a.string,size:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool};var av=rv;function ov(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getPointData()},e.children)}))}ov.defaultProps={},ov.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var iv=ov,lv={int32:Int32Array,int16:Int16Array,int8:Int8Array,uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array,float32:Float32Array,float64:Float64Array};function sv(e,t){if(!e)return null;if(Array.isArray(e))return t.from(e);if(e.dtype){var n=e.bvals,r=e.dtype,a=Ki.toArrayBuffer(n);return new lv[r](a)}return e}var cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).polydata=Go.a.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(jh.Provider,{value:e},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.polydata.delete(),this.polydata=null}},{key:"update",value:function(e,t){var n=e.connectivity,r=e.points,a=e.verts,o=e.lines,i=e.polys,l=e.strips,s=!1,c=r&&r.length>196608?Uint32Array:Uint16Array;if(!r||t&&r===t.points||(this.polydata.getPoints().setData(sv(r,Float64Array),3),s=!0),!a||t&&a===t.verts||(this.polydata.getVerts().setData(sv(a,c)),s=!0),!o||t&&o===t.lines||(this.polydata.getLines().setData(sv(o,c)),s=!0),!i||t&&i===t.polys||(this.polydata.getPolys().setData(sv(i,c)),s=!0),!l||t&&l===t.strips||(this.polydata.getStrips().setData(sv(l,c)),s=!0),n&&(n||!t||n!==t.connectivity)){var g=r.length/3;switch(n){case"points":var u=new Uint32Array(g+1);u[0]=g;for(var d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.event(e,t,"DataAvailable"),mv(e,t)}),"vtkTrivialProducer"),pv={},Cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(){return ps(this,n),t.apply(this,arguments)}return Is(n,[{key:"getTrivialProducer",value:function(){var e=pv[this.props.name];return e||(e=fv(),pv[this.props.name]=e),e}},{key:"render",value:function(){var e=this;return this.update(),Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.getTrivialProducer()},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}))}},{key:"update",value:function(){var e=this;this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.subscription=this.getTrivialProducer().onDataAvailable((function(){e.dataAvailable()}))}},{key:"dataAvailable",value:function(){this.downstream&&this.downstream.setInputConnection(this.getTrivialProducer().getOutputPort(),this.props.port),this.validData||(this.validData=!0,this.getTrivialProducer().invokeDataAvailable()),this.representation&&this.representation.dataAvailable()}},{key:"dataChanged",value:function(){this.representation&&this.representation.dataChanged()}}]),n}();Cv.defaultProps={port:0,name:"shared"},Cv.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Iv=Cv;function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*a,10):t.tickTextStyle.fontSize=Math.max(16*a,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var i=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var l=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];i+.4*l>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=i+.4*l,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=i+1.4*l,t.boxPosition=[.99-t.boxSize[0],-.92]),t.boxSize[1]=Math.max(1.2,Math.min(1.84/r,1.84))}else{t.axisTitlePixelOffset=2*t.tickTextStyle.fontSize,t.tickLabelPixelOffset=.5*t.tickTextStyle.fontSize;var s=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],c=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],g=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*g*(t.ticks.length+3))),t.boxSize[1]=s+c,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)},e.update=function(){if(t.scalarsToColors&&t.visibility){if(t.barMapper.setLookupTable(t.scalarsToColors),t.forceUpdate||Math.max(t.scalarsToColors.getMTime(),e.getMTime())>t.lastRebuildTime.getMTime()){var n=t.scalarsToColors.getMappingRange();t.lastTickBounds=Object(Ao.a)(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=TI().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var a=r.tickFormat(5);if(t.tickStrings=t.ticks.map(a),t.automated)e.computeAndApplyAutomatedSettings();else{var o=e.updateTextureAtlas();e.recomputeBarSegments(o)}t.forceViewUpdate=!0,t.lastRebuildTime.modified(),t.forceUpdate=!1}(t.forceViewUpdate||t.camera.getMTime()>t.lastRedrawTime.getMTime())&&(e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRedrawTime.modified(),t.forceViewUpdate=!1)}},e.completedImage=function(r){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,n=t.nextAtlas,t.nextAtlas=null,r&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,a=0,o=1;Rv(t.tmContext,t.axisTextStyle);var i=t.tmContext.measureText(t.axisLabel),l={height:i.actualBoundingBoxAscent+2,startingHeight:o,width:i.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,l),o+=l.height,a=l.width,n.titleWidth=l.width,n.titleHeight=l.height,n.tickWidth=0,n.tickHeight=0,Rv(t.tmContext,t.tickTextStyle);for(var s=[].concat(Object(Ao.a)(t.tickStrings),["NaN","Below","Above"]),c=0;ct.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var a=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){var o=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-a,t.barSize[1]=t.boxSize[1]-o}else{var i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-i-a,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+a,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var l=(2*e.tickWidth-8)/t.lastSize[0],s=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-s-n,t.barPosition[1]=t.boxPosition[1],r[0]=l}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var a=[0,0],o=t.vertical?1:0,i=t.vertical?.01:.02;function l(e,n){t.barSegments.push({corners:[[].concat(a),[a[0]+r[0],a[1]],[a[0]+r[0],a[1]+r[1]],[a[0],a[1]+r[1]]],scalars:n,title:e}),a[o]+=r[o]+i}"function"==typeof t.scalarsToColors.getNanColor&&l("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&l("Below",[-.1,-.1,-.1,-.1]);var s="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();a[o]+=i;var c=r[o];r[o]=s?1-2*i-r[o]-a[o]:1-i-a[o],l("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),s&&(r[o]=c,a[o]+=i,l("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,t,r,a,o,i,l){var s=n.get(e);if(s){var c=l.ptIdx,g=l.cellIdx;vv[0]=t[0],vv[1]=t[1],vv[2]=t[2],o[0]<-.5?Object(Fo.b)(Av,r,o[0]*i-s.width):o[0]>.5?Object(Fo.b)(Av,r,o[0]*i):Object(Fo.b)(Av,r,o[0]*i-s.width/2),Object(Fo.g)(vv,vv,Av),Object(Fo.b)(Av,a,o[1]*i-s.height/2),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[0],l.tcoords[2*c+1]=s.tcoords[1],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[2],l.tcoords[2*c+1]=s.tcoords[3],c++,Object(Fo.b)(Av,a,s.height),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[4],l.tcoords[2*c+1]=s.tcoords[5],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.a)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[6],l.tcoords[2*c+1]=s.tcoords[7],c++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-3,l.polys[4*g+3]=c-2,g++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-2,l.polys[4*g+3]=c-1,l.ptIdx+=4,l.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n),Object(Yo.g)(Vv,n);var r=t.lastSize;Av[0]=0,Av[1]=0,Av[2]=-.99,Object(Fo.q)(vv,Av,Vv),Av[0]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Sv,Zv,vv),Av[0]-=.1,Av[1]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Bv,Zv,vv);for(var a=0;a<3;a++)Sv[a]/=.05*r[0],Bv[a]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,i=4*o,l=2*o,s=new Float64Array(3*i),c=new Uint16Array(4*l),g=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:c,points:s,tcoords:g},d=t.vertical?0:1,m=t.vertical?1:0,f=[0,1];t.vertical?(t.topTitle?(Av[0]=t.boxPosition[0]+.5*t.boxSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,[0,1],t.axisTitlePixelOffset,u)):(Av[0]=t.barPosition[0]+t.barSize[0],Av[1]=t.barPosition[1]+.5*t.barSize[1],Object(Fo.q)(vv,Av,Vv),Object(Fo.b)(Sv,Sv,-1),e.createPolyDataForOneLabel(t.axisLabel,vv,Bv,Sv,[0,-1],t.axisTitlePixelOffset,u),Object(Fo.b)(Sv,Sv,-1)),f=[-1,0]):(Av[0]=t.barPosition[0]+.5*t.barSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,f,t.axisTitlePixelOffset,u)),Gv[2]=-.99,Gv[d]=t.barPosition[d]+(.5*f[d]+.5)*t.barSize[d],Gv[m]=t.barPosition[m]+.5*t.barSize[m];for(var p=null,C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kv(n)),aC.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=Pu.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=Go.a.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=aC.newInstance(),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},ln.c.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},ln.c.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmActor.setProperty(e.getProperty()),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.mapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,a,o,i){t.camera=r,t.lastSize[0]===i[0]&&t.lastSize[1]===i[1]||(t.lastSize[0]=i[0],t.lastSize[1]=i[1],t.lastAspectRatio=i[0]/i[1],t.forceUpdate=!0),e.update()})),ln.c.setGet(e,t,["automated","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),ln.c.get(e,t,["axisTextStyle","tickTextStyle"]),ln.c.getArray(e,t,["boxPosition","boxSize"]),ln.c.setArray(e,t,["boxPosition","boxSize"],2),wv(e,t)}var xv={newInstance:ln.c.newInstance(Wv,"vtkScalarBarActor"),extend:Wv};var Tv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).validData=!1,r.currentVisibility=!0,r.actor=aC.newInstance({visibility:!1,representationId:e.id}),r.lookupTable=Ib.newInstance(),r.mapper=Pu.newInstance({lookupTable:r.lookupTable,useLookupTableScalarRange:!0}),r.actor.setMapper(r.mapper),r.cubeAxes=qI.newInstance({visibility:!1,dataBounds:[-1,1,-1,1,-1,1]}),r.cubeAxes.getActors().forEach((function(e){return(0,e.setVisibility)(!1)})),r.scalarBar=xv.newInstance(),r.scalarBar.setScalarsToColors(r.lookupTable),r.scalarBar.setVisibility(!1),r.subscriptions=[],r.subscriptions.push(r.mapper.onModified((function e(){if(r.mapper.getInputData()){1===r.subscriptions.length&&r.subscriptions.push(r.mapper.getInputData().onModified(e));var t=r.mapper.getInputData().getBounds();t[0]t.bounds[1]&&(t.bounds[1]=g[0]),g[1]>t.bounds[3]&&(t.bounds[3]=g[1]),g[2]>t.bounds[5]&&(t.bounds[5]=g[2]);var R=new Float32Array(I,36*b,9);Dl(R,y),zl(R,R),Ul(R,R)}var w=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),t.colorArray=null;var k=e.getLookupTable();k&&w&&(k.build(),t.colorArray=k.mapScalars(w,t.colorMode,0)),t.buildTime.modified()}},e.getPrimitiveCount=function(){var t=e.getInputData(1),n=e.getInputData().getPoints().getNumberOfValues()/3;return{points:n*t.getPoints().getNumberOfValues()/3,verts:n*(t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells()),lines:n*(t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells()),triangles:n*(t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells())}}}var Pv={orient:!0,orientationMode:Nv.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:Hv.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function Kv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pv,n),Pu.extend(e,t,n),ln.c.algo(e,t,2,0),t.buildTime={},ln.c.obj(t.buildTime,{mtime:0}),t.boundsTime={},ln.c.obj(t.boundsTime,{mtime:0}),ln.c.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),ln.c.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),Fv(e,t)}var Mv=function(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};return{getArrays:function(){return{input:e.augmentInputArrays(t,n.map((function(e){return{location:t,name:e}}))),output:[{location:t,name:r,attribute:"outputAttributeType"in o?o.outputAttributeType:ti.a.SCALARS,numberOfComponents:"numberOfOutputComponents"in o?o.numberOfOutputComponents:1}]}},evaluate:function(e,t){var n=new Array(e.length),r=e.map((function(e,t){var r=e.getNumberOfComponents(),a=e.getData();return 1===r?function(e){return a[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],i=o.getData(),l=o.getNumberOfComponents(),s=new Array(l);if(1===l)i.forEach((function(e,t){i[t]=a.apply(void 0,Object(Ao.a)(r.map((function(e){return e(t)}))).concat([t,s]))}));else for(var c=o.getNumberOfTuples(),g=function(e){s=a.apply(void 0,Object(Ao.a)(r.map((function(t){return t(e)}))).concat([e,s])),o.setTuple(e,s)},u=0;u4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,a,o))},e.prepareArrays=function(e,t,n){var r=[],a=[];return e.input.forEach((function(e){if(e.location===Dh.b.COORDINATE)r.push(t.getPoints());else{var n=[[Dh.b.UNIFORM,function(e){return e.getFieldData()}],[Dh.b.POINT,function(e){return e.getPointData()}],[Dh.b.CELL,function(e){return e.getCellData()}],[Dh.b.VERTEX,function(e){return e.getVertexData()}],[Dh.b.EDGE,function(e){return e.getEdgeData()}],[Dh.b.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),a="location"in e&&e.location in n?n[e.location](t):null;a?e.name?r.push(a.getArrayByName(e.name)):"index"in e?r.push(a.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Dh.b.UNIFORM?r.push(a.getActiveAttribute(e.attribute)):(rZ('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rZ('Specifier "'.concat(JSON.stringify(e),'" did not provide a usable location.')),r.push(null))}})),e.output.forEach((function(e){var r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),aZ(e,t)}var lZ={newInstance:ln.c.newInstance(iZ,"vtkCalculator"),extend:iZ};var sZ=Nl.a.FieldDataTypes,cZ=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).calculator=lZ.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.arrays,a=t.location,o=t.formula;return this.calculator.setFormulaSimple(sZ[a],r,n,o),Bs.a.createElement(qh.Consumer,null,(function(t){return e.downstream||(t.setInputConnection(e.calculator.getOutputPort(),e.props.port),e.downstream=t),Bs.a.createElement(qh.Provider,{value:e.calculator},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}},{key:"componentWillUnmount",value:function(){this.calculator.delete(),this.calculator=null}}]),n}();cZ.defaultProps={port:0,name:"scalars",location:"POINT",arrays:[],formula:function(e){return e[0]}},cZ.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,location:Rs.a.string,arrays:Rs.a.arrayOf(Rs.a.string),formula:Rs.a.func,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var gZ=cZ;function uZ(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getCellData()},e.children)}))}uZ.defaultProps={},uZ.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var dZ={VolumeRepresentation:Db,SliceRepresentation:fy,VolumeController:av,PointData:iv,PolyData:gv,Reader:dv,ShareDataSet:Iv,View:nb,GeometryRepresentation:Jv,GlyphRepresentation:Dv,ImageData:Uv,DataArray:_v,FieldData:Qv,Algorithm:tZ,Calculator:gZ,CellData:uZ};function mZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r="Float32Array"),console.log("nbComponents",t),Bs.a.createElement(Jv,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,showCubeAxes:e.showCubeAxes,cubeAxesStyle:e.cubeAxesStyle,showScalarBar:e.showScalarBar,scalarBarTitle:e.scalarBarTitle,scalarBarStyle:e.scalarBarStyle},Bs.a.createElement(gv,{points:e.xyz,connectivity:"points"},t&&Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}mZ.defaultProps={xyz:[0,0,0],colorMapPreset:"erdc_rainbow_bright",colorDataRange:[0,1],showCubeAxes:!1,showScalarBar:!1,scalarBarTitle:""},mZ.propTypes={id:Rs.a.string,xyz:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),colorMapPreset:Rs.a.string,colorDataRange:Rs.a.arrayOf(Rs.a.number),property:Rs.a.object,showCubeAxes:Rs.a.bool,cubeAxesStyle:Rs.a.object,showScalarBar:Rs.a.bool,scalarBarTitle:Rs.a.string,scalarBarStyle:Rs.a.object};var fZ=mZ;function pZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r=e.scalarsType),Bs.a.createElement(Db,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,mapper:e.mapper,volume:e.volume},e.volumeController&&Bs.a.createElement(av,{rescaleColorMap:e.rescaleColorMap,size:e.controllerSize}),Bs.a.createElement(Uv,{dimensions:e.dimensions,origin:e.origin,spacing:e.spacing},Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}pZ.defaultProps={scalarsType:"Float32Array",colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto",volumeController:!0,rescaleColorMap:!0,controllerSize:[400,150]},pZ.propTypes={id:Rs.a.string,dimensions:Rs.a.arrayOf(Rs.a.number),spacing:Rs.a.arrayOf(Rs.a.number),origin:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),scalarsType:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,volumeController:Rs.a.bool,controllerSize:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string])};var CZ={PointCloudRepresentation:fZ,VolumeDataRepresentation:pZ},IZ=dZ.VolumeRepresentation,hZ=dZ.SliceRepresentation,bZ=dZ.VolumeController,yZ=dZ.PointData,vZ=dZ.PolyData,ZZ=dZ.Reader,AZ=dZ.ShareDataSet,GZ=dZ.View,SZ=dZ.GeometryRepresentation,BZ=dZ.GlyphRepresentation,VZ=dZ.ImageData,RZ=dZ.DataArray,wZ=dZ.FieldData,kZ=dZ.Algorithm,WZ=dZ.Calculator,xZ=dZ.CellData,TZ=CZ.PointCloudRepresentation,JZ=CZ.VolumeDataRepresentation,XZ={ViewContext:zh,RepresentationContext:_h,DataSetContext:jh,FieldsContext:Qh,DownstreamContext:qh},OZ={Core:dZ,Representations:CZ,Contexts:XZ};t.default=r}]]); +(window.webpackJsonpdash_vtk=window.webpackJsonpdash_vtk||[]).push([[0],[,,,function(e,t,n){"use strict";(function(e){var t=n(43),r=n(47),a=n(26),o=n(9);Object(o.c)("/$$rollup_base$$/node_modules/readable-stream/lib/_stream_duplex.js",(function(n,o){var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};n.exports=d;var l=t.a,s=r.a;Object(a.a)(d,l);for(var c=i(s.prototype),g=0;g0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(t);var n=[];function r(e){n[e]=null}function a(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++g),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?C("instance deleted - cannot call any method"):r&&r0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(l){var s=a?null:e["set".concat(y(l))];s&&Array.isArray(n[l])&&s.length>1?o=s.apply(void 0,Object(i.a)(n[l]))||o:s?o=s(n[l])||o:(-1!==["mtime"].indexOf(l)||r||I("Warning: Set value to model directly ".concat(l,", ").concat(n[l])),t[l]=n[l],o=!0)})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error("Cannot ShallowCopy ".concat(n.getClassName()," into ").concat(e.getClassName()));var a=n.get(),o=Object.keys(t).sort(),i=Object.keys(a).sort();i.forEach((function(e){var n=o.indexOf(e);-1===n?r&&p("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=a[e]})),o.length&&r&&p("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function B(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["get".concat(y(n.name))]=function(){return t[n.name]}:e["get".concat(y(n))]=function(){return t[n]}}))}var V={enum:function(e,t,n){return function(r){if("string"==typeof r){if(void 0!==n.enum[r])return t[n.name]!==n.enum[r]&&(t[n.name]=n.enum[r],e.modified(),!0);throw C("Set Enum with invalid argument ".concat(n,", ").concat(r)),new RangeError("Set Enum with invalid string argument")}if("number"==typeof r){if(t[n.name]!==r){if(-1!==Object.keys(n.enum).map((function(e){return n.enum[e]})).indexOf(r))return t[n.name]=r,e.modified(),!0;throw C("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw C("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function R(e){if("object"===Object(a.a)(e)){var t=V[e.type];if(t)return function(n,r){return t(n,r,e)};throw C("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(C("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function w(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["set".concat(y(n.name))]=R(n)(e,t):e["set".concat(y(n))]=R(n)(e,t)}))}function k(e,t,n){B(e,t,n),w(e,t,n)}function W(e,t,n){n.forEach((function(n){e["get".concat(y(n))]=function(){return[].concat(t[n])},e["get".concat(y(n),"ByReference")]=function(){return t[n]}}))}function x(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(y(n))]=function(){if(t.deleted)return C("instance deleted - cannot call any method"),!1;for(var o=arguments.length,i=new Array(o),l=0;l4&&void 0!==arguments[4]?arguments[4]:void 0;W(e,t,n),x(e,t,n,r,a)}var J=Symbol("Event abort");function X(e,t,n){var a=[],o=e.delete,i=1;function l(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return C("instance deleted - cannot call any method"),null;var o=i++;return a.push([o,e,r]),a.sort((function(e,t){return t[2]-e[2]})),s(o)},e.delete=function(){o(),a.forEach((function(e){return l(Object(r.a)(e,1)[0])}))}}function O(e,t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return e(r,n,t),Object.freeze(r)};return t&&l.a.register(t,n),n}function N(e){return e&&e.isA&&e.isA("vtkObject")}function H(e,t,n){var r,a=this;return function(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=function(e,n){t.keystore[e]=n},e.getKey=function(e){return t.keystore[e]},e.getAllKeys=function(){return Object.keys(t.keystore)},e.deleteKey=function(e){return delete t.keystore[e]},e.clearKeystore=function(){return e.getAllKeys().forEach((function(e){return delete t.keystore[e]}))}}var F=1;var P={algo:function(e,t,n,r){function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?C("instance deleted - cannot call any method"):r>=t.numberOfInputs?C("algorithm ".concat(e.getClassName()," only has ").concat(t.numberOfInputs," input ports. To add more input ports, use addInputData()")):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)C("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var a="algorithm ".concat(e.getClassName()," only has ");return a+="".concat(t.numberOfInputs),void C(a+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(C("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(l.a):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(l.a):t.inputConnection=[],t.output?t.output=t.output.map(l.a):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(l.a):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),a=r,o=1/0;a--;){if(!t.output[a])return!0;var i=t.output[a].getMTime();if(io)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=o,e.addInputData=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,a(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,o(e,t.numberOfInputs-1))},e.getInputData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=i,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return i(t)};return n.filter=e,n}),e.update=function(){var n=[];if(t.numberOfInputs)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:"Scalars";t.inputArrayToProcess.length1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],a=Number(e),o="B";a>n;)a/=n,o=r.pop();return"".concat(a.toFixed(t)," ").concat(o)},formatNumbersWithThousandSeparator:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=[],r=e;r>1e3;)n.push("000".concat(r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)},get:B,getArray:W,getCurrentGlobalMTime:function(){return g},getStateArrayMapFunc:A,isVtkObject:N,keystore:Y,newInstance:O,normalizeWheel:function(e){var t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}},obj:S,proxy:function(e,t){Y(e,t);var n=e.delete;t.proxyId="".concat(F++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),B(e,t,["proxyId","proxyGroup","proxyName"]),k(e,t,["proxyManager"]);var r={},a={};function i(e,t){a[t]||(a[t]=[]);for(var n=a[t],o=0;o0&&void 0!==arguments[0]?arguments[0]:"__root__";return a[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__root__",r=[],a=t.proxyId,o=l(n)||[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,a=[],i=0,l=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l)return null;var c=[],g=null;for(i=a.length;i--;){var u=a[i];u.instance===n?g=u:c.push(u)}if(!g)return null;var d=g.instance["get".concat(y(g.propertyName))]();if(!Z(d,r)||s){for(r=d,l=!0;c.length;){var m=c.pop();m.instance.set(Object(o.a)({},m.propertyName,r))}l=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function c(e,t){var n=[];for(i=a.length;i--;){var r=a[i];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(i))}for(;n.length;)a.splice(n.pop(),1)}function g(n,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.onModified(s),g=a[0];return a.push({instance:n,propertyName:r,subscription:l}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(Object(o.a)({},r,t.propertyLinkMap[e].value)):g&&s(g.instance,!0)),{unsubscribe:function(){return c(n,r)}}}function u(){for(;a.length;)a.pop().subscription.unsubscribe()}var d={bind:g,unbind:c,unsubscribe:u,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=function(){return s().map((function(e){return e.name}))},e.getPropertyByName=function(e){return s().find((function(t){return t.name===e}))},e.getPropertyDomainByName=function(e){return(r[e]||{}).domain},e.getProxySection=function(){return{id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}},e.delete=function(){for(var r=Object.keys(t.propertyLinkMap),a=r.length;a--;)t.propertyLinkMap[r[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},G((function(){if(t.links)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function a(e){for(var n=Object.keys(e),r=n.length;r--;){var a=n[r];t[a].set(e[a])}}t.this=e;for(var o=Object.keys(r),i=o.length,l=function(){var l=o[i];t[l]=r[l];var s=n[l];e["set".concat(y(l))]=function(n){n!==t[l]&&(t[l]=n,a(s[n]),e.modified())}};i--;)l();o.length&&B(e,t,o)},safeArrays:v,set:w,setArray:x,setGet:k,setGetArray:T,setImmediate:G,setLoggerFunction:function(e,t){f[e]&&(f[e]=t||m)},throttle:function(e,t){var n=!1,r=null;function a(){n=!1,null!==r&&(o.apply(void 0,Object(i.a)(r)),r=null)}function o(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(N(t)){if(a.indexOf(t)>=0)return r;a.push(t);var o=n(t);void 0!==o&&r.push(o);var i=t.get();Object.keys(i).forEach((function(t){var o=i[t];Array.isArray(o)?o.forEach((function(t){e(t,n,r,a)})):e(o,n,r,a)}))}return r},TYPED_ARRAYS:b,uncapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},VOID:u,vtkDebugMacro:p,vtkErrorMacro:C,vtkInfoMacro:function(){f.info.apply(f,arguments)},vtkLogMacro:function(){f.log.apply(f,arguments)},vtkOnceErrorMacro:function(e){h[e]||(f.error(e),h[e]=!0)},vtkWarningMacro:I};t.c=P}).call(this,n(20))},function(e,t,n){"use strict";t.a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return Y})),n.d(t,"k",(function(){return Z})),n.d(t,"l",(function(){return T})),n.d(t,"m",(function(){return u})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return J})),n.d(t,"q",(function(){return p})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return b})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return h})),n.d(t,"z",(function(){return v})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return i})),n.d(t,"C",(function(){return V})),n.d(t,"D",(function(){return x})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return l}));var r=n(14),a=(n(3),n(53),n(4).c.vtkWarningMacro);function o(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[];t.length1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,a=-1/0,o=t,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t-e;return e+n*Math.random()}function m(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function f(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){var r=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=a,n[2]=o,n}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:for(var n=0,r=0;r2&&void 0!==arguments[2]?arguments[2]:1e-6;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!"".concat(e).includes("e"))return+"".concat(Math.round("".concat(e,"e+").concat(t)),"e-").concat(t);var n="".concat(e).split("e"),r="";return+n[1]+t>0&&(r="+"),+"".concat(Math.round("".concat(+n[0],"e").concat(r).concat(+n[1]+t)),"e-").concat(t)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=G(e[0],n),t[1]=G(e[1],n),t[2]=G(e[2],n),t}function B(e,t,n){var r,i,l,s,c,g,u,d=0,m=o(n);for(r=0;rs&&(s=u);if(0===s)return a("Unable to factor linear system"),0;m[r]=1/s}for(i=0;i=s&&(s=g,d=r)}if(i!==d){for(l=0;l=0)for(o=i;o<=a-1;o++)s-=e[a][o]*n[o];else 0!==s&&(i=a);n[a]=s}for(a=r-1;a>=0;a--){for(s=n[a],o=a+1;oc?c=l:lc?c=s:s0?(c-g)/c:0)>0?(n=i===c?1/6*(l-s)/(c-g):l===c?1/3+1/6*(s-i)/(c-g):2/3+1/6*(i-l)/(c-g))<0&&(n+=1):n=0,t[0]=n,t[1]=a,t[2]=u}function w(e,t){var n,a,o,i=Object(r.a)(e,3),l=i[0],s=i[1],c=i[2],g=1/3,u=1/6,d=2/3;l>u&&l<=g?(a=1,n=(g-l)/u,o=0):l>g&&l<=.5?(a=1,o=(l-g)/u,n=0):l>.5&&l<=d?(o=1,a=(d-l)/u,n=0):l>d&&l<=5/6?(o=1,n=(l-d)/u,a=0):l>5/6&&l<=1?(n=1,o=(1-l)/u,a=0):(n=1,a=l/u,o=0),n=s*n+(1-s),a=s*a+(1-s),o=s*o+(1-s),n*=c,a*=c,o*=c,t[0]=n,t[1]=a,t[2]=o}function k(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2];a>.04045?a=Math.pow((a+.055)/1.055,2.4):a/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,t[0]=.4124*a+.3576*o+.1805*i,t[1]=.2126*a+.7152*o+.0722*i,t[2]=.0193*a+.1192*o+.9505*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0]/.9505,o=n[1]/1,i=n[2]/1.089;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t[0]=116*o-16,t[1]=500*(a-o),t[2]=200*(o-i)}(n,t)}function W(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=(n[0]+16)/116,o=n[1]/500+a,i=a-n[2]/200;a=Math.pow(a,3)>.008856?Math.pow(a,3):(a-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,t[0]=.9505*o,t[1]=1*a,t[2]=1.089*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2],l=3.2406*a+-1.5372*o+-.4986*i,s=-.9689*a+1.8758*o+.0415*i,c=.0557*a+-.204*o+1.057*i;l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,c>.0031308?c=1.055*Math.pow(c,1/2.4)-.055:c*=12.92;var g=l;g1&&(l/=g,s/=g,c/=g),l<0&&(l=0),s<0&&(s=0),c<0&&(c=0),t[0]=l,t[1]=s,t[2]=c}(n,t)}function x(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function T(e){return!(e[1]-e[0]<0)}function J(e,t,n){n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2])}function X(e,t,n){return en?n:e}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=X(e[0],t[0],n[0]),r[1]=X(e[1],t[1],n[1]),r[2]=X(e[2],t[2],n[2]),r}var N=function(e){return!Number.isFinite(e)},H=Number.isNaN;function Y(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(15)),o=n(4),i=n(6);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ta&&(e=a),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=u(),a=e.length,o=0;if(t<0&&n>1){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}var p={computeRange:d,createRangeHelper:u,getDataType:f,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=a)}return n}};function C(e,t){function n(){t.ranges=null,e.modified()}t.classHierarchy.push("vtkDataArray"),e.getElementComponentSize=function(){return t.values.BYTES_PER_ELEMENT},e.getComponent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=function(e,r,a){a!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=a,n())},e.getData=function(){return t.values},e.getRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=e<0?t.numberOfComponents:e,r=null;return t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=d(t.values,e,t.numberOfComponents),t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple)},e.setRange=function(e,n){t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents));var r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=function(e,n){for(var r=e*t.numberOfComponents,a=0;a1&&void 0!==arguments[1]?arguments[1]:g,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var a=e*r;if(1===r)n[0]=t.values[a];else if(2===r)n[0]=t.values[a],n[1]=t.values[a+1];else if(3===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2];else if(4===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2],n[3]=t.values[a+3];else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=function(){return t.numberOfComponents},e.getNumberOfValues=function(){return t.values.length},e.getNumberOfTuples=function(){return t.values.length/t.numberOfComponents},e.getDataType=function(){return t.dataType},e.newClone=function(){return b({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkDataArray".concat(e.getMTime())),t.name},e.setData=function(e,r){t.values=e,t.size=e.length,t.dataType=f(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=s(s({},t),{},{vtkClass:e.getClassName()});n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((function(e){n[e]||delete n[e]}));var r={};return Object.keys(n).sort().forEach((function(e){r[e]=n[e]})),r.mtime&&delete r.mtime,r}}var I={name:"",numberOfComponents:1,size:0,dataType:c,rangeTuple:[0,0]};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,I,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=window[t.dataType].from(t.values)):t.values=new window[t.dataType](t.size),t.values&&(t.size=t.values.length,t.dataType=f(t.values)),Object(o.h)(e,t),Object(o.i)(e,t,["name","numberOfComponents"]),C(e,t)}var b=Object(o.g)(h,"vtkDataArray"),y=s(s({newInstance:b,extend:h},p),a.c);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return Z})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return u})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return c}));var r=n(24);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],o=t[6],i=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],s=t[6],c=t[7],g=t[8],u=t[9],d=t[10],m=t[11],f=t[12],p=t[13],C=t[14],I=t[15],h=n*l-r*i,b=n*s-a*i,y=n*c-o*i,v=r*s-a*l,Z=r*c-o*l,A=a*c-o*s,G=g*p-u*f,S=g*C-d*f,B=g*I-m*f,V=u*C-d*p,R=u*I-m*p,w=d*I-m*C,k=h*w-b*R+y*V+v*B-Z*S+A*G;return k?(k=1/k,e[0]=(l*w-s*R+c*V)*k,e[1]=(a*R-r*w-o*V)*k,e[2]=(p*A-C*Z+I*v)*k,e[3]=(d*Z-u*A-m*v)*k,e[4]=(s*B-i*w-c*S)*k,e[5]=(n*w-a*B+o*S)*k,e[6]=(C*y-f*A-I*b)*k,e[7]=(g*A-d*y+m*b)*k,e[8]=(i*R-l*B+c*G)*k,e[9]=(r*B-n*R-o*G)*k,e[10]=(f*Z-p*y+I*h)*k,e[11]=(u*y-g*Z-m*h)*k,e[12]=(l*S-i*V-s*G)*k,e[13]=(n*V-r*S+a*G)*k,e[14]=(p*b-f*v-C*h)*k,e[15]=(g*v-u*b+d*h)*k,e):null}function s(e,t,n){var r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],p=t[12],C=t[13],I=t[14],h=t[15],b=n[0],y=n[1],v=n[2],Z=n[3];return e[0]=b*r+y*l+v*u+Z*p,e[1]=b*a+y*s+v*d+Z*C,e[2]=b*o+y*c+v*m+Z*I,e[3]=b*i+y*g+v*f+Z*h,b=n[4],y=n[5],v=n[6],Z=n[7],e[4]=b*r+y*l+v*u+Z*p,e[5]=b*a+y*s+v*d+Z*C,e[6]=b*o+y*c+v*m+Z*I,e[7]=b*i+y*g+v*f+Z*h,b=n[8],y=n[9],v=n[10],Z=n[11],e[8]=b*r+y*l+v*u+Z*p,e[9]=b*a+y*s+v*d+Z*C,e[10]=b*o+y*c+v*m+Z*I,e[11]=b*i+y*g+v*f+Z*h,b=n[12],y=n[13],v=n[14],Z=n[15],e[12]=b*r+y*l+v*u+Z*p,e[13]=b*a+y*s+v*d+Z*C,e[14]=b*o+y*c+v*m+Z*I,e[15]=b*i+y*g+v*f+Z*h,e}function c(e,t,n){var r,a,o,i,l,s,c,g,u,d,m,f,p=n[0],C=n[1],I=n[2];return t===e?(e[12]=t[0]*p+t[4]*C+t[8]*I+t[12],e[13]=t[1]*p+t[5]*C+t[9]*I+t[13],e[14]=t[2]*p+t[6]*C+t[10]*I+t[14],e[15]=t[3]*p+t[7]*C+t[11]*I+t[15]):(r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=s,e[6]=c,e[7]=g,e[8]=u,e[9]=d,e[10]=m,e[11]=f,e[12]=r*p+l*C+u*I+t[12],e[13]=a*p+s*C+d*I+t[13],e[14]=o*p+c*C+m*I+t[14],e[15]=i*p+g*C+f*I+t[15]),e}function g(e,t,n){var r=n[0],a=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u(e,t,n,a){var o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B,V,R,w=a[0],k=a[1],W=a[2],x=Math.hypot(w,k,W);return x0?(I=2*Math.sqrt(C+1),e[3]=.25*I,e[0]=(d-f)/I,e[1]=(m-c)/I,e[2]=(s-g)/I):l>u&&l>p?(I=2*Math.sqrt(1+l-u-p),e[3]=(d-f)/I,e[0]=.25*I,e[1]=(s+g)/I,e[2]=(m+c)/I):u>p?(I=2*Math.sqrt(1+u-l-p),e[3]=(m-c)/I,e[0]=(s+g)/I,e[1]=.25*I,e[2]=(d+f)/I):(I=2*Math.sqrt(1+p-l-u),e[3]=(s-g)/I,e[0]=(m+c)/I,e[1]=(d+f)/I,e[2]=.25*I),e}function y(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=t[3],s=a+a,c=o+o,g=i+i,u=a*s,d=a*c,m=a*g,f=o*c,p=o*g,C=i*g,I=l*s,h=l*c,b=l*g,y=r[0],v=r[1],Z=r[2];return e[0]=(1-(f+C))*y,e[1]=(d+b)*y,e[2]=(m-h)*y,e[3]=0,e[4]=(d-b)*v,e[5]=(1-(u+C))*v,e[6]=(p+I)*v,e[7]=0,e[8]=(m+h)*Z,e[9]=(p-I)*Z,e[10]=(1-(u+f))*Z,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function v(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=n+n,l=r+r,s=a+a,c=n*i,g=r*i,u=r*l,d=a*i,m=a*l,f=a*s,p=o*i,C=o*l,I=o*s;return e[0]=1-u-f,e[1]=g+I,e[2]=d-C,e[3]=0,e[4]=g-I,e[5]=1-c-f,e[6]=m+p,e[7]=0,e[8]=d+C,e[9]=m-p,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Z(e,t,n,r,a,o,i){var l=1/(t-n),s=1/(r-a),c=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(i+o)*c,e[15]=1,e}function A(e,t,n,a){var i,l,s,c,g,u,d,m,f,p,C=t[0],I=t[1],h=t[2],b=a[0],y=a[1],v=a[2],Z=n[0],A=n[1],G=n[2];return Math.abs(C-Z)0?(n[0]=2*(s*l+u*a+c*i-g*o)/d,n[1]=2*(c*l+u*o+g*a-s*i)/d,n[2]=2*(g*l+u*i+s*o-c*a)/d):(n[0]=2*(s*l+u*a+c*i-g*o),n[1]=2*(c*l+u*o+g*a-s*i),n[2]=2*(g*l+u*i+s*o-c*a)),I(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:h,getRotation:b,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(e,t,n,r,a){var o=t[0],i=t[1],l=t[2],s=t[3],c=o+o,g=i+i,u=l+l,d=o*c,m=o*g,f=o*u,p=i*g,C=i*u,I=l*u,h=s*c,b=s*g,y=s*u,v=r[0],Z=r[1],A=r[2],G=a[0],S=a[1],B=a[2],V=(1-(p+I))*v,R=(m+y)*v,w=(f-b)*v,k=(m-y)*Z,W=(1-(d+I))*Z,x=(C+h)*Z,T=(f+b)*A,J=(C-h)*A,X=(1-(d+p))*A;return e[0]=V,e[1]=R,e[2]=w,e[3]=0,e[4]=k,e[5]=W,e[6]=x,e[7]=0,e[8]=T,e[9]=J,e[10]=X,e[11]=0,e[12]=n[0]+G-(V*G+k*S+T*B),e[13]=n[1]+S-(R*G+W*S+J*B),e[14]=n[2]+B-(w*G+x*S+X*B),e[15]=1,e},fromQuat:v,frustum:function(e,t,n,r,a,o,i){var l=1/(n-t),s=1/(a-r),c=1/(o-i);return e[0]=2*o*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(i+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*c,e[15]=0,e},perspective:function(e,t,n,r,a){var o,i=1/Math.tan(t/2);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(o=1/(r-a),e[10]=(a+r)*o,e[14]=2*a*r*o):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(i+l),c=2/(a+o);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(i-l)*s*.5,e[9]=(a-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:Z,lookAt:A,targetTo:function(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=r[0],s=r[1],c=r[2],g=a-n[0],u=o-n[1],d=i-n[2],m=g*g+u*u+d*d;m>0&&(g*=m=1/Math.sqrt(m),u*=m,d*=m);var f=s*d-c*u,p=c*g-l*d,C=l*u-s*g;return(m=f*f+p*p+C*C)>0&&(f*=m=1/Math.sqrt(m),p*=m,C*=m),e[0]=f,e[1]=p,e[2]=C,e[3]=0,e[4]=u*C-d*p,e[5]=d*f-g*C,e[6]=g*p-u*f,e[7]=0,e[8]=g,e[9]=u,e[10]=d,e[11]=0,e[12]=a,e[13]=o,e[14]=i,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:G,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var n=e[0],a=e[1],o=e[2],i=e[3],l=e[4],s=e[5],c=e[6],g=e[7],u=e[8],d=e[9],m=e[10],f=e[11],p=e[12],C=e[13],I=e[14],h=e[15],b=t[0],y=t[1],v=t[2],Z=t[3],A=t[4],G=t[5],S=t[6],B=t[7],V=t[8],R=t[9],w=t[10],k=t[11],W=t[12],x=t[13],T=t[14],J=t[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-y)<=r.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(o-v)<=r.b*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-Z)<=r.b*Math.max(1,Math.abs(i),Math.abs(Z))&&Math.abs(l-A)<=r.b*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(s-G)<=r.b*Math.max(1,Math.abs(s),Math.abs(G))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(g-B)<=r.b*Math.max(1,Math.abs(g),Math.abs(B))&&Math.abs(u-V)<=r.b*Math.max(1,Math.abs(u),Math.abs(V))&&Math.abs(d-R)<=r.b*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(m-w)<=r.b*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(f-k)<=r.b*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-W)<=r.b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(C-x)<=r.b*Math.max(1,Math.abs(C),Math.abs(x))&&Math.abs(I-T)<=r.b*Math.max(1,Math.abs(I),Math.abs(T))&&Math.abs(h-J)<=r.b*Math.max(1,Math.abs(h),Math.abs(J))},mul:S,sub:B})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return p(e,null==t?n.path:t)}},n.exports),n.exports}function i(e,t){l[e]=t}const l=Object.create(null),s=Object.create(null),c={id:"",exports:{},parent:void 0,filename:null,loaded:!1,children:[],paths:[]},g=["",".js",".json"];function u(e){const t=(e=e.replace(/\\/g,"/")).split("/"),n=""===t[0];for(let e=1;e0&&".."!==t[e-1]&&"."!==t[e-1]&&(t.splice(--e,2),e--);return e=t.join("/"),n&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}function d(){if(0===arguments.length)return".";let e;for(let t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":e}function m(e){if(0===e.length)return".";let t=e.length-1;for(;t>0;){const n=e.charCodeAt(t);if((47===n||92===n)&&t!==e.length-1)break;t--}return t>0?e.substr(0,t):47===e.chartCodeAt(0)||92===e.chartCodeAt(0)?e.charAt(0):"."}function f(e,t,n){const r=function(e){let t=e[0];if("/"===t||"\\"===t)return!1;let n=e[1],r=e[2];return!(!("."!==t||n&&"/"!==n&&"\\"!==n)||!("."!==t||"."!==n||r&&"/"!==r&&"\\"!==r))&&(":"!==n||"/"!==r&&"\\"!==r)}(e);let a;for("/"===(e=u(e))[0]&&(t="/");a=r?u(t?t+"/node_modules/"+e:d("node_modules",e)):t?u(t+"/"+e):e,!a.endsWith("/..");){for(let e=0;e1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function u(e,t){for(var n=0;n0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[0],l=n[1],s=n[2];return e[0]=a*s-o*l,e[1]=o*i-r*s,e[2]=r*l-a*i,e}function v(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[3]*r+n[7]*a+n[11]*o+n[15];return i=i||1,e[0]=(n[0]*r+n[4]*a+n[8]*o+n[12])/i,e[1]=(n[1]*r+n[5]*a+n[9]*o+n[13])/i,e[2]=(n[2]*r+n[6]*a+n[10]*o+n[14])/i,e}function Z(e,t,n){var r=t[0],a=t[1],o=t[2];return e[0]=r*n[0]+a*n[3]+o*n[6],e[1]=r*n[1]+a*n[4]+o*n[7],e[2]=r*n[2]+a*n[5]+o*n[8],e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function G(e,t){var n=e[0],a=e[1],o=e[2],i=t[0],l=t[1],s=t[2];return Math.abs(n-i)<=r.b*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-s)<=r.b*Math.max(1,Math.abs(o),Math.abs(s))}var S,B=c,V=g,R=u,w=m,k=f,W=o,x=p,T=(S=a(),function(e,t,n,r,a,o){var i,l;for(t||(t=3),n||(n=0),l=r?Math.min(r*t+n,e.length):e.length,i=n;i1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=new(window[e.getDataType()])(3*t.pointsIds.length));var a=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=a[n],r[++o]=a[++n],r[++o]=a[++n]})),t.points.setData(r)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(var o=e.getNumberOfPoints()-1;o>=0;--o)t.pointsIds[o]=o}},e.getBounds=function(){var e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(var r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else Object(s.D)(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,a=0;a<3;a++)n+=(r=t.bounds[2*a+1]-t.bounds[2*a])*r;return n},e.getParametricDistance=function(e){for(var t,n=0,r=0;r<3;r++)(t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0)>n&&(n=t);return n},e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.deepCopy=function(e){e.initialize(t.points,t.pointsIds)},e.getCellDimension=function(){},e.intersectWithLine=function(e,t,n,r,a,o,i){},e.evaluatePosition=function(e,t,n,r,a,o){}}var u={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.c.obj(e,t),t.points||(t.points=c.a.newInstance()),a.c.get(e,t,["points","pointsIds"]),g(e,t)}var m={newInstance:a.c.newInstance(d,"vtkCell"),extend:d};function f(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),a=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((function(){return{ncells:0,cells:null}})),t.extend=n,t.maxId=-1},e.initialize=function(){t.array=null},e.getLink=function(e){return t.array[e]},e.getNcells=function(e){return t.array[e].ncells},e.getCells=function(e){return t.array[e].cells},e.insertNextPoint=function(e){t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=function(e,n){t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=function(e){t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=function(e,n){t.array[n].cells=t.array[n].cells.filter((function(t){return t!==e})),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=function(e,n){t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=function(e,n){t.array[e].cells.length=n},e.squeeze=function(){!function(e,t){var n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=function(){t.maxId=-1},e.deepCopy=function(e){t.array=Object(l.a)(e.array),t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=function(e){++t.array[e].ncells},e.allocateLinks=function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.c.obj(e,t),f(e,t)}var I={newInstance:a.c.newInstance(C,"vtkCellLinks"),extend:C},h=0,b=1,y=2,v=3,Z=4,A=5,G=6,S=7,B=9,V=21,R=41,w=42,k=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=function(e,n,r){t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=function(n,r){return e.insertCell(++t.maxId,n,r),t.maxId},e.setCellTypes=function(e,n,r){t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=function(e){return t.locationArray[e]},e.deleteCell=function(e){t.typeArray[e]=h},e.getNumberOfTypes=function(){return t.maxId+1},e.isType=function(t){for(var n=e.getNumberOfTypes(),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J,n),a.c.obj(e,t),a.c.get(e,t,["size","maxId","extend"]),a.c.getArray(e,t,["typeArray","locationArray"]),T(e,t)}var O=function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},i=[];i[0]=n[0]-t[0],i[1]=n[1]-t[1],i[2]=n[2]-t[2];var l=i[0]*(e[0]-t[0])+i[1]*(e[1]-t[1])+i[2]*(e[2]-t[2]),c=Object(s.q)(i,i),g=1e-5*l;return 0!==c&&(o.t=l/c),g<0&&(g=-g),-g1?r=n:(r=i,i[0]=t[0]+o.t*i[0],i[1]=t[1]+o.t*i[1],i[2]=t[2]+o.t*i[2]),a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2]),o.distance=Object(s.s)(r,e),o}function K(e,t,n,r,a,o){var i=[],l=[],c=[];a[0]=0,o[0]=0,i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],l[0]=r[0]-n[0],l[1]=r[1]-n[1],l[2]=r[2]-n[2],c[0]=n[0]-e[0],c[1]=n[1]-e[1],c[2]=n[2]-e[2];var g=[];g[0]=[Object(s.q)(i,i),-Object(s.q)(i,l)],g[1]=[g[0][1],Object(s.q)(l,l)];var u=[];if(u[0]=Object(s.q)(i,c),u[1]=-Object(s.q)(l,c),0===Object(s.C)(g,u,2)){for(var d,m=Number.MAX_VALUE,f=[e,t,n,r],p=[n,n,e,e],C=[r,r,t,t],I=[o[0],o[0],a[0],a[0]],h=[a[0],a[0],o[0],o[0]],b=0;b<4;b++)(d=P(f[b],p[b],C[b])).distance=0&&a[0]<=1&&o[0]>=0&&o[0]<=1?F.YES_INTERSECTION:F.NO_INTERSECTION}var M={distanceToLine:P,intersection:K};function L(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,a,o){var i={intersect:0,t:Number.MIN_VALUE,subId:0};o[1]=0,o[2]=0;var l=[],c=[],g=[];t.points.getPoint(0,c),t.points.getPoint(1,g);var u=[],d=[],m=K(e,n,c,g,u,d);if(i.t=u[0],o[0]=d[0],m===F.YES_INTERSECTION){for(var f=0;f<3;f++)a[f]=c[f]+o[0]*(g[f]-c[f]),l[f]=e[f]+i.t*(n[f]-e[f]);if(Object(s.s)(a,l)<=r*r)return i.intersect=1,i}else{var p;if(i.t<0)return i.t=0,p=P(e,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(i.t>1)return i.t=1,p=P(n,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[0]<0)return o[0]=0,p=P(c,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[1]>1)return o[1]=1,p=P(g,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i}return i},e.evaluatePosition=function(e,t,n,r,a,o){}}var D={};function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),m.extend(e,t,n),L(e,t)}var U=Y(Y({newInstance:a.c.newInstance(E,"vtkLine"),extend:E},M),N),z=n(31);function _(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=Object(o.a)(t.points):t.points=c.a.newInstance(),e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.getBounds=function(){return t.points.getBounds()},e.computeBounds=function(){e.getBounds()};var n=e.shallowCopy;e.shallowCopy=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=c.a.newInstance(),t.points.shallowCopy(e.getPoints())}}var j={};function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),z.a.extend(e,t,n),a.c.setGet(e,t,["points"]),_(e,t)}var q={newInstance:a.c.newInstance(Q,"vtkPointSet"),extend:Q},$=n(39);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n,r){var a=n[0]-t[0],o=n[1]-t[1],i=n[2]-t[2],l=e[0]-t[0],s=e[1]-t[1],c=e[2]-t[2];r[0]=o*c-i*s,r[1]=i*l-a*c,r[2]=a*s-o*l}function ne(e,t,n,r){te(e,t,n,r);var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==a&&(r[0]/=a,r[1]/=a,r[2]/=a)}var re={computeNormalDirection:te,computeNormal:ne};function ae(e,t){t.classHierarchy.push("vtkTriangle"),e.getCellDimension=function(){return 2},e.intersectWithLine=function(n,r,a,o,i){var l={subId:0,t:0,intersect:-1};i[2]=0;var c=a*a,g=[],u=[],d=[];t.points.getPoint(0,g),t.points.getPoint(1,u),t.points.getPoint(2,d);var m=[];if(ne(g,u,d,m),0!==m[0]||0!==m[1]||0!==m[2]){var f=$.a.intersectWithLine(n,r,g,m);if(l.t=f.t,o[0]=f.x[0],o[1]=f.x[1],o[2]=f.x[2],!f.intersection)return i[0]=0,i[1]=0,l.intersect=0,l;var p=e.evaluatePosition(o,[],i,[]);if(p.evaluation>=0)return p.dist2<=c?(l.intersect=1,l):(l.intersect=p.evaluation,l)}var C=Object(s.s)(g,u),I=Object(s.s)(u,d),h=Object(s.s)(d,g);if(t.line||(t.line=U.newInstance()),C>I&&C>h?(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,u)):I>h&&I>C?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,g)),t.line.intersectWithLine(n,r,a,o,i).intersect){for(var b=[],y=[],v=[],Z=0;Z<3;Z++)b[Z]=g[Z]-d[Z],y[Z]=u[Z]-d[Z],v[Z]=o[Z]-d[Z];return i[0]=Object(s.q)(v,b)/h,i[1]=Object(s.q)(v,y)/I,l.evaluation=1,l}return i[0]=0,i[1]=0,l.evaluation=0,l},e.evaluatePosition=function(e,n,r,a){var o,i,l,c,g,u,d,m={subId:0,dist2:0,evaluation:-1},f=[],p=[],C=[],I=[],h=[],b=[],y=[],v=0,Z=[],A=[],G=[],S=[],B=[];m.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,p),t.points.getPoint(0,C),te(f,p,C,I),$.a.generalizedProjectPoint(e,f,I,B);var V=0;for(o=0;o<3;o++)(l=I[o]<0?-I[o]:I[o])>V&&(V=l,v=o);for(i=0,o=0;o<3;o++)o!==v&&(Z[i++]=o);for(o=0;o<2;o++)h[o]=B[Z[o]]-C[Z[o]],b[o]=f[Z[o]]-C[Z[o]],y[o]=p[Z[o]]-C[Z[o]];if(0===(c=Object(s.z)(b,y)))return r[0]=0,r[1]=0,m.evaluation=-1,m;if(r[0]=Object(s.z)(h,y)/c,r[1]=Object(s.z)(b,h)/c,a[0]=1-(r[0]+r[1]),a[1]=r[0],a[2]=r[1],a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&a[2]>=0&&a[2]<=1)n&&(m.dist2=Object(s.s)(B,e),n[0]=B[0],n[1]=B[1],n[2]=B[2]),m.evaluation=1;else{var R;if(n)if(a[1]<0&&a[2]<0)for(g=Object(s.s)(e,C),u=U.distanceToLine(e,f,C,R,G),d=U.distanceToLine(e,C,p,R,S),g1?r[a]-1:0)>n&&(n=t);return n}}var oe={};function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oe,n),m.extend(e,t,n),ae(e,t)}var le,se=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),ce.forEach((function(n){t[n]=i.a.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),a=e.getNumberOfPolys(),o=e.getNumberOfStrips(),i=n+r+a+o,l=new Uint8Array(i),s=l,c=new Uint32Array(i),g=c;if(n){var u=0;t.verts.getCellSizes().forEach((function(e,t){g[t]=u,s[t]=e>1?y:b,u+=e+1})),g=g.subarray(n),s=s.subarray(n)}if(r){var d=0;t.lines.getCellSizes().forEach((function(e,t){g[t]=d,s[t]=e>2?Z:v,1===e&&ge("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),d+=e+1})),g=g.subarray(r),s=s.subarray(r)}if(a){var m=0;t.polys.getCellSizes().forEach((function(e,t){switch(g[t]=m,e){case 3:s[t]=A;break;case 4:s[t]=B;break;default:s[t]=S}e<3&&ge("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),m+=e+1})),g+=g.subarray(a),s+=s.subarray(a)}if(o){var f=0;s.fill(G,0,o),t.strips.getCellSizes().forEach((function(e,t){g[t]=f,f+=e+1}))}t.cells=O.newInstance(),t.cells.setCellTypes(i,l,c)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=I.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellPoints=function(e){var n=t.cells.getCellType(e),r=null;switch(n){case b:case y:r=t.verts;break;case v:case Z:r=t.lines;break;case A:case B:case S:r=t.polys;break;case G:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var a=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(a)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var a=t.links.getLink(n),o=t.links.getLink(r);return a.cells.filter((function(t){return t!==e&&-1!==o.cells.indexOf(t)}))},e.getCell=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.getCellPoints(t),a=n||ue[r.cellType].newInstance();return a.initialize(e.getPoints(),r.cellPointIds),a}}var me={};function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,me,n),q.extend(e,t,n),a.c.get(e,t,["cells","links"]),a.c.setGet(e,t,["verts","lines","polys","strips"]),de(e,t)}var pe={newInstance:a.c.newInstance(fe,"vtkPolyData"),extend:fe};t.a=pe},function(e,t,n){"use strict";var r=function(e){if(Array.isArray(e))return e};var a=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}},o=n(41);var i=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};t.a=function(e,t){return r(e)||a(e,t)||Object(o.a)(e,t)||i()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},a={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"},o={DefaultDataType:a.FLOAT,DataTypeByteSize:r,VtkDataTypes:a};t.c=o},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.d(t,"a",(function(){return a})),r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}};var a=r},function(e,t,n){"use strict";(function(e){var r=n(48),a=n(5);n(3);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i={vtkObject:function(){return null}};function l(t){if(null==t)return t;if(t.isA)return t;if(!t.vtkClass)return e.console&&e.console.error&&e.console.error("Invalid VTK object"),null;var n=i[t.vtkClass];if(!n)return e.console&&e.console.error&&e.console.error("No vtk class found for Object of type ".concat(t.vtkClass)),null;var s=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:a,registerType:o};t.a=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),a=n(54),o=Object(r.d)((function(t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!a.a.Readable}catch(t){n.nodestream=!1}}),"/$$rollup_base$$/node_modules/jszip/lib")}).call(this,n(35).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],g=!1,u=-1;function d(){g&&s&&(g=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!g){var e=l(d);g=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,a,i;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+".".length>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var i={codes:r}},function(e,t,n){"use strict";var r=n(11),a=n(51),o=n(52),i=(n(3),n(24)),l=n(8),s=n(12),c=n(6),g=function(e){return e},u=Object(l.h)(new Float64Array(16)),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(a.a)(this,e),this.matrix=Object(l.h)(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?i.d:g}return Object(o.a)(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(16);Object(s.p)(n,e[0],e[1],e[2]),Object(s.p)(r,t[0],t[1],t[2]),Object(s.l)(n,n),Object(s.l)(r,r);var o=Object(s.d)(n,r);return o>=1||(Object(s.c)(this.tmp,n,r),Object(s.j)(this.tmp)<1e-6&&(Object(s.c)(this.tmp,[1,0,0],e),Object(s.j)(this.tmp)<1e-6&&Object(s.c)(this.tmp,[0,1,0],e)),Object(l.f)(a,Math.acos(o),this.tmp),Object(l.l)(this.matrix,this.matrix,a)),this}},{key:"rotate",value:function(e,t){return s.p.apply(s.r,[this.tmp].concat(Object(r.a)(t))),Object(s.l)(this.tmp,this.tmp),Object(l.q)(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Object(l.a)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return Object(l.b)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Object(l.c)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.s)(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.r)(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Object(l.l)(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Object(l.h)(this.matrix),this}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Object(c.n)(u,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,a=t;a2&&void 0!==arguments[2]?arguments[2]:{},a=new XMLHttpRequest;return a.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return a.setRequestHeader(n,o)})),n.progressCallback&&a.addEventListener("progress",n.progressCallback),a}var m={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r&&r.compression?g():n.ref&&!n.ref.pending?new Promise((function(a,l){var g=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);g.onreadystatechange=function(t){1===g.readyState&&(n.ref.pending=!0,1==++u&&e.invokeBusy&&e.invokeBusy(!0)),4===g.readyState&&(n.ref.pending=!1,200===g.status||0===g.status?(n.buffer=g.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.a.ENDIANNESS!==n.ref.encode&&o.a.ENDIANNESS&&(c("Swap bytes of ".concat(n.name)),o.a.swapBytes(n.buffer,i.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&s("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--u&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):l({xhr:g,e:t}))},g.responseType="string"!==n.dataType?"arraybuffer":"text",g.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=d("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(l.b)("http")||Object(l.c)("http",(function(e){return m}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),a=Object(r.d)((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),"/$$rollup_base$$/node_modules/inherits")},function(e,t,n){"use strict";n(3);var r=n(4),a=n(7),o=n(15),i=r.c.vtkErrorMacro,l=[1,-1,1,-1,1,-1];function s(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=new window[t.dataType](t.size),e.setNumberOfComponents(r),e.modified())},e.setPoint=function(e){for(var n=e*t.numberOfComponents,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.a.extend(e,t,n),s(e,t)}var u={newInstance:r.c.newInstance(g,"vtkPoints"),extend:g};t.a=u},function(e,t,n){"use strict";var r,a,o=n(9),i=o.b.MutationObserver||o.b.WebKitMutationObserver;if(i){var l=0,s=new i(d),c=o.b.document.createTextNode("");s.observe(c,{characterData:!0}),r=function(){c.data=l=++l%2}}else if(o.b.setImmediate||void 0===o.b.MessageChannel)r="document"in o.b&&"onreadystatechange"in o.b.document.createElement("script")?function(){var e=o.b.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},o.b.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var g=new o.b.MessageChannel;g.port1.onmessage=d,r=function(){g.port2.postMessage(0)}}var u=[];function d(){var e,t;a=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,i=[],l=t;l>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var d=function(e){var t,n,r=g(e),a=r[0],l=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,u=l>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===l&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[c++]=255&t),1===l&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},m=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,l=0,s=n-r;ls?s:l+i));return 1===r?(t=e[n-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")},f=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},p=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p};n.d(t,"a",(function(){return C}));var C=Object(r.d)((function(e,t){const n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;const r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|C(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return o.from(r,t,n);const i=function(e){if(o.isBuffer(e)){const t=0|u(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),a(e<0?0:0|u(e))}function c(e){const t=e.length<0?0:0|u(e.length),n=a(t);for(let r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function C(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return r?-1:U(e).length;t=(""+t).toLowerCase(),a=!0}}function I(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){let o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){let r=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;ra&&(r=a):r=a;const o=t.length;let i;for(r>o/2&&(r=o/2),i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function V(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a239?4:t>223?3:t>191?2:1;if(a+i<=n){let n,r,l,s;switch(i){case 1:t<128&&(o=t);break;case 2:n=e[a+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[a+1],r=e[a+2],l=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&l)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},o.byteLength=C,o.prototype._isBuffer=!0,o.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,n,r,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0);const s=Math.min(i,l),c=this.slice(r,a),g=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return Z(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return G(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;ar)&&(n=r);let a="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function X(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function O(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function N(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,4),p(e,t,n,r,23,4),n+4}function Y(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,8),p(e,t,n,r,52,8),n+8}o.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o=a&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);let r=t,a=1,o=this[e+--r];for(;r>0&&(a*=256);)o+=this[e+--r]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||T(e,4,this.length),f(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),f(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=0,o=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=n-1,o=1,i=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/o>>0)-i&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return Y(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Y(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||D(t,e.length-(n+1))}(r,a,o)}function L(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function D(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=K(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=K(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const E=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;const r=e.length;let a=null;const o=[];for(let i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function $(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}),"/$$rollup_base$$/node_modules/buffer")},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(17),i=n(7);function l(e,t){t.classHierarchy.push("vtkFieldData");var n=e.getState;t.arrays&&(t.arrays=t.arrays.map((function(e){return{data:Object(o.a)(e.data)}}))),e.initialize=function(){e.initializeFields(),e.copyAllOn(),e.clearFieldFlags()},e.initializeFields=function(){t.arrays=[],t.copyFieldFlags={},e.modified()},e.copyStructure=function(n){e.initializeFields(),t.copyFieldFlags=n.getCopyFieldFlags().map((function(e){return e})),t.arrays=n.arrays().map((function(e){return{array:e}}))},e.getNumberOfArrays=function(){return t.arrays.length},e.getNumberOfActiveArrays=function(){return t.arrays.length},e.addArray=function(e){return t.arrays=[].concat(t.arrays,{data:e}),t.arrays.length-1},e.removeAllArrays=function(){t.arrays=[]},e.removeArray=function(e){t.arrays=t.arrays.filter((function(t){return e!==t.data.getName()}))},e.removeArrayByIndex=function(e){t.arrays=t.arrays.filter((function(t,n){return n!==e}))},e.getArrays=function(){return t.arrays.map((function(e){return e.data}))},e.getArray=function(t){return"number"==typeof t?e.getArrayByIndex(t):e.getArrayByName(t)},e.getArrayByName=function(e){return t.arrays.reduce((function(t,n,r){return n.data.getName()===e?n.data:t}),null)},e.getArrayWithIndex=function(e){return t.arrays.reduce((function(t,n,r){return n.data&&n.data.getName()===e?{array:n.data,index:r}:t}),{array:null,index:-1})},e.getArrayByIndex=function(e){return e>=0&&e=0},e.getArrayName=function(e){var n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=function(){return t.copyFieldFlags},e.getFlag=function(e){return t.copyFieldFlags[e]},e.passData=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((function(n){var o=e.getFlag(n.getName());if(!1!==o&&(!t.doCopyAllOff||!0===o)&&n){var l=e.getArrayByName(n.getName());if(l){if(n.getNumberOfComponents()===l.getNumberOfComponents())if(r>-1&&r-1?a:r;l.setTuple(s,n.getTuple(r))}else for(var c=0;cn.getNumberOfTuples())e.addArray(n);else{var g=n.getNumberOfComponents(),u=n.getNumberOfValues(),d=a>-1?a:r;ue?t.data.getMTime():e}),t.mtime)},e.getNumberOfComponents=function(){return t.arrays.reduce((function(e,t){return e+t.data.getNumberOfComponents()}),0)},e.getNumberOfTuples=function(){return t.arrays.length>0?t.arrays[0].getNumberOfTuples():0},e.getState=function(){var e=n();return e.arrays=t.arrays.map((function(e){return{data:e.data.getState()}})),e}}var s={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),a.c.obj(e,t),l(e,t)}var g={newInstance:a.c.newInstance(c,"vtkFieldData"),extend:c},u=n(37);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=u.c.AttributeTypes,f=u.c.AttributeCopyOperations,p=a.c.vtkWarningMacro;function C(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return m[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()}));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes"),e.checkNumberOfComponents=function(e){return!0},e.setAttribute=function(n,a){var o=r(a);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return p("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return p("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var i=t["active".concat(o)];if(i>=0&&i=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),g.extend(e,t,n),a.c.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),C(e,t)}var b=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Z.forEach((function(n){t[n]=b.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var G={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,G,n),a.c.obj(e,t),a.c.setGet(e,t,Z),A(e,t)}var B=function(e){for(var t=1;t0&&i.length>a&&!i.warned){i.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=i.length,l=s,console&&console.warn&&console.warn(l)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=m.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,g=I(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},l.prototype.listenerCount=C,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},s.once=function(e,t){return new Promise((function(n,r){function a(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,a),r(n)},e.once("error",o)),e.once(t,a)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22).a.codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}var o=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function I(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:h(e,t,n,r,a);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):h(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,n,r,a){var o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var g=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){for(var u=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+u<=n)switch(u){case 1:c<128&&(g=c);break;case 2:128==(192&(o=e[a+1]))&&(s=(31&c)<<6|63&o)>127&&(g=s);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(s=(15&c)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:o=e[a+1],i=e[a+2],l=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&l)&&(s=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&l)>65535&&s<1114112&&(g=s)}null===g?(g=65533,u=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),a+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,a){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),l=Math.min(o,i),c=this.slice(r,a),g=e.slice(t,n),u=0;ua)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return Z(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,a,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function J(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function X(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||X(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||X(e,0,n,8),a.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},s.prototype.readUInt8=function(e,t){return t||W(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||W(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||W(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||W(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||W(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):J(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=0,i=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=n-1,i=1,l=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/i>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):J(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(7),i=n(15);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};o.a.extend(e,t,d(n)),u(e,t)}var f=s({newInstance:a.c.newInstance(m,"vtkCellArray"),extend:m},g);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},a={DEFAULT:0,SINGLE:1,DOUBLE:2},o={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:r,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:a,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};t.c=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));n(3);var r={UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},a={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7},o={FieldDataTypes:r,FieldAssociations:a};t.c=o},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(6)),o=n(4);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){var r=n[0]*(e[0]-t[0])+n[1]*(e[1]-t[1])+n[2]*(e[2]-t[2]);return Math.abs(r)}function s(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o);r[0]=e[0]-i*n[0],r[1]=e[1]-i*n[1],r[2]=e[2]-i*n[2]}function c(e,t,n){var r=Object(a.q)(e,t),o=Object(a.q)(t,t);return 0===o&&(o=1),n[0]=e[0]-r*t[0]/o,n[1]=e[1]-r*t[1]/o,n[2]=e[2]-r*t[2]/o,n}function g(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o),l=Object(a.q)(n,n);0!==l?(r[0]=e[0]-i*n[0]/l,r[1]=e[1]-i*n[1]/l,r[2]=e[2]-i*n[2]/l):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function u(e,t,n,r){var o={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],l=[];Object(a.t)(t,e,i),Object(a.t)(n,e,l);var s=Object(a.q)(r,l),c=Object(a.q)(r,i);return(c<0?-c:c)<=(s<0?1e-6*-s:1e-6*s)||(o.t=s/c,o.x[0]=e[0]+o.t*i[0],o.x[1]=e[1]+o.t*i[1],o.x[2]=e[2]+o.t*i[2],o.intersection=!0,o.betweenPoints=o.t>=0&&o.t<=1),o}function d(e,t,n,r){var o={intersection:!1,l0:[],l1:[],error:null},i=[];Object(a.w)(t,r,i);var l,s=i.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<1e-6){var c=[];return Object(a.t)(e,n,c),0===Object(a.q)(t,c)?o.error="coincide":o.error="disjoint",o}l=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var g=[],u=-Object(a.q)(t,e),d=-Object(a.q)(r,n);switch(l){case"x":g[0]=0,g[1]=(d*t[2]-u*r[2])/i[0],g[2]=(u*r[1]-d*t[1])/i[0];break;case"y":g[0]=(u*r[2]-d*t[2])/i[1],g[1]=0,g[2]=(d*t[0]-u*r[0])/i[1];break;case"z":g[0]=(d*t[1]-u*r[1])/i[2],g[1]=(u*r[0]-d*t[0])/i[2],g[2]=0}return o.l0=g,Object(a.x)(g,i,o.l1),o.intersection=!0,o}var m={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:s,projectVector:c,generalizedProjectPoint:g,intersectWithLine:u,intersectWithPlane:d,DISJOINT:"disjoint",COINCIDE:"coincide"};function f(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return l(e,t.origin,t.normal)},e.projectPoint=function(e,n){s(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return c(e,t.normal,n)},e.push=function(e){if(0!==e)for(var n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=function(e,n){g(e,t.origin,t.normal,n)},e.evaluateFunction=function(e,n,r){return Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2])},e.evaluateGradient=function(e){return[t.normal[0],t.normal[1],t.normal[2]]},e.intersectWithLine=function(e,n){return u(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return d(e,n,t.origin,t.normal)}}var p={normal:[0,0,1],origin:[0,0,0]};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.c.obj(e,t),o.c.setGetArray(e,t,["normal","origin"],3),f(e,t)}var I=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,a=r(e),o=t.exec(a);if(!o)return{text:a};var i=o.index+o[0].length,l=a.substring(0,i),s=null,c=n?n.exec(a):null;if(c){var g=a.substr(c.index);s={text:l+g,binaryBuffer:e.slice(i,c.index)}}else s={text:l,binaryBuffer:e.slice(i)};return s}};t.a=a},function(e,t,n){"use strict";var r=n(42);t.a=function(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===b.prototype||(t=function(e){return b.from(e)}(t)),r)i.endEmitted?k(e,new w):X(e,i,t,!0);else if(i.ended)k(e,new V);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):Y(e,i)):X(e,i,t,!1)}else r||(i.reading=!1,Y(e,i));return!i.ended&&(i.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(t){var n=t._readableState;I("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(I("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(H,t))}function H(e){var t=e._readableState;I("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function Y(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(F,t,n))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){I("readable nexttick read 0"),e.read(0)}function M(e,t){I("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function E(t){var n=t._readableState;I("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(U,n,t))}function U(e,t){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):N(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&E(this),null;var r,a=t.needReadable;return I("need readable",a),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){k(this,new R("_read()"))},T.prototype.pipe=function(t,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,I("pipe count=%d opts=%j",a.pipesCount,n);var o=n&&!1===n.end||t===e.stdout||t===e.stderr?m:i;function i(){I("onend"),t.end()}a.endEmitted?e.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){I("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,I("cleanup"),t.removeListener("close",u),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),s=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(e,"data")&&(t.flowing=!0,L(e))}}(r);t.on("drain",l);var s=!1;function c(e){I("ondata");var n=t.write(e);I("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==z(a.pipes,t))&&!s&&(I("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function g(e){I("onerror",e),m(),t.removeListener("error",g),0===h(t,"error")&&k(t,e)}function u(){t.removeListener("finish",d),m()}function d(){I("onfinish"),t.removeListener("close",u),m()}function m(){I("unpipe"),r.unpipe(t)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",u),t.once("finish",d),t.emit("pipe",r),a.flowing||(I("pipe resume"),r.resume()),t},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==a.flowing&&this.resume()):"readable"===t&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,I("on readable",a.length,a.reading),a.length?N(this):a.reading||e.nextTick(K,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,n){var r=o.a.prototype.removeListener.call(this,t,n);return"readable"===t&&e.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var n=o.a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||e.nextTick(P,this),n},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!t.readableListening,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(M,t,n))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(I("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){I("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new V(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),W.prototype._write=function(e,t,n){n(new v("_write()"))},W.prototype._writev=null,W.prototype.end=function(t,n,r){var a=this._writableState;return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),a.corked&&(a.corked=1,this.uncork()),a.ending||function(t,n,r){n.ending=!0,N(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,a,r),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),W.prototype.destroy=s.a.destroy,W.prototype._undestroy=s.a.undestroy,W.prototype._destroy=function(e,t){t(e)}}).call(this,n(21))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),a=n(19),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){for(var t,n,a,i,l,s,c,g=[],u=0,d=e.length,m=d,f="string"!==r.a.getTypeOf(e);u>2,l=(3&t)<<4|n>>4,s=m>1?(15&n)<<2|a>>6:64,c=m>2?63&a:64,g.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(c));return g.join("")},decode:function(e){var t,n,r,i,l,s,c=0,g=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,m=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&m--,e.charAt(e.length-2)===o.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.a.uint8array?new Uint8Array(0|m):new Array(0|m);c>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(c++)))>>2,r=(3&l)<<6|(s=o.indexOf(e.charAt(c++))),d[g++]=t,64!==l&&(d[g++]=n),64!==s&&(d[g++]=r);return d}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(67),o=n(16),i=n(49),l=n(19),s=n(28),c=n(68),g=null;if(l.a.nodestream)try{g=c.a}catch(e){}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,r.a.checkSupport(i),this._worker=e.pipe(new a.a(i)),e.lock()}catch(e){this._worker=new o.a("error"),this._worker.error(e)}}u.prototype={accumulate:function(t){return n=this,a=t,new s.a.Promise((function(t,o){var l=[],s=n._internalType,c=n._outputType,g=n._mimeType;n.on("data",(function(e,t){l.push(e),a&&a(t)})).on("error",(function(e){l=[],o(e)})).on("end",(function(){try{var n=function(e,t,n){switch(e){case"blob":return r.a.newBlob(r.a.transformTo("arraybuffer",t),n);case"base64":return i.a.encode(t);default:return r.a.transformTo(e,t)}}(c,function(t,n){var r,a=0,o=null,i=0;for(r=0;r>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new r(e),o=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.alea=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),o=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor128=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),i=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorwow=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),l=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,a=t.i;return e=r[a],n=(e^=e>>>7)^e<<24,n^=(e=r[a+1&7])^e>>>10,n^=(e=r[a+3&7])^e>>>3,n^=(e=r[a+4&7])^e<<7,e=r[a+7&7],n^=(e^=e<<13)^e<<9,r[a]=n,t.i=a+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.x&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorshift7=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),s=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,a=t.X,o=t.i;return t.w=r=r+1640531527|0,n=a[o+34&127],e=a[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=a[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,a,o,i,l=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),a=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(i=i+1640531527|0,a=0==(n=l[127&o]^=r+i)?a+1:0);for(a>=128&&(l[127&(t&&t.length||0)]=-1),a=127,o=512;o>0;--o)r=l[a+34&127],n=l[a=a+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,l[a]=r^n;e.w=i,e.X=l,e.i=a}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.X&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor4096=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),c=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,a=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^a,a=a-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^a,t.a=a-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.tychei=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),g=Object.freeze({__proto__:null,default:{}}),u=Object(r.e)(g),d=Object(r.d)((function(e){!function(t,n,r){var a,o=256,i=r.pow(o,6),l=r.pow(2,52),s=2*l,c=255;function g(e,c,g){var u=[],C=f(function e(t,n){var r,a=[],o=typeof t;if(n&&"object"==o)for(r in t)try{a.push(e(t[r],n-1))}catch(t){}return a.length?a:"string"==o?t:t+"\0"}((c=1==c?{entropy:!0}:c||{}).entropy?[e,p(n)]:null==e?function(){try{var e;return a&&(e=a.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),p(e)}catch(e){var r=t.navigator,i=r&&r.plugins;return[+new Date,t,i,t.screen,p(n)]}}():e,3),u),I=new d(u),h=function(){for(var e=I.g(6),t=i,n=0;e=s;)e/=2,t/=2,n>>>=1;return(e+n)/t};return h.int32=function(){return 0|I.g(4)},h.quick=function(){return I.g(4)/4294967296},h.double=h,f(p(I.S),n),(c.pass||g||function(e,t,n,a){return a&&(a.S&&m(a,I),e.state=function(){return m(I,{})}),n?(r.random=e,t):e})(h,C,"global"in c?c.global:this==r,c.state)}function d(e){var t,n=e.length,r=this,a=0,i=r.i=r.j=0,l=r.S=[];for(n||(e=[n++]);a0,(function(e){r||(r=e),e&&o.forEach(k),i||(o.forEach(k),a(r))}))}));return t.reduce(W)},X.Stream=X,X.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",i),n.on("close",l));var o=!1;function i(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===J.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e},n.d(t,"a",(function(){return O}));var O=T},function(e,t,n){"use strict";var r=Object.freeze({__proto__:null,default:{}}),a=n(9);n.d(t,"a",(function(){return o}));var o=Object(a.e)(r)},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=56},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(30),a=n(55);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=r.a.Buffer,s=a.a.inspect,c=s&&s.custom||"inspect",g=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,a=l.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,n=a,r=i,l.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return a},t.consume=function(e,t){var n;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++r}return this.length-=r,t},t[c]=function(e,t){return s(this,function(e){for(var t=1;t0?i-4:i;for(n=0;n>16&255,s[g++]=t>>8&255,s[g++]=255&t;2===l&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,s[g++]=255&t);1===l&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,s[g++]=t>>8&255,s[g++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,l=n-a;il?l:i+16383));1===a?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],a=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=i.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var a,o,i=[],l=t;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},t.write=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,n(65).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,l,s=1,c={},g=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=a.compression,o=a.progressCallback;return t.binary?a.dataAccessHelper.fetchBinary(e,{compression:r,progressCallback:o}):a.dataAccessHelper.fetchText(n,e,{compression:r,progressCallback:o})}a.classHierarchy.push("vtkSTLReader"),a.dataAccessHelper||(a.dataAccessHelper=r.a.get("http")),n.setUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};a.url=e;var r=e.split("/");return r.pop(),a.baseURL=r.join("/"),a.compression=t.compression,n.loadData({progressCallback:t.progressCallback,binary:!!t.binary})},n.loadData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(a.url,e);return t.then(n.parse),t},n.parse=function(e){"string"==typeof e?n.parseAsText(e):n.parseAsArrayBuffer(e)},n.parseAsArrayBuffer=function(r){if(r&&r!==a.parseData)if(n.modified(),a.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var c=r.slice(0,80),g=function(e){for(var t=e.split(" ").filter((function(e){return e.indexOf("=")>-1})),n={},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.c.obj(e,t),a.c.get(e,t,["url","baseURL"]),a.c.setGet(e,t,["dataAccessHelper"]),a.c.algo(e,t,0,1),u(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkSTLReader")}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9),a=n(30),o=Object(r.d)((function(e,t){var n=a.a.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a.a:(r(a.a,t),t.Buffer=o),r(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof r?a.fill(t,r):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.a.SlowBuffer(e)}}),"/$$rollup_base$$/node_modules/safe-buffer");n.d(t,"a",(function(){return h}));var i=o.Buffer,l=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=c;function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===l||!l(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=C,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function g(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C(e){return e.toString(this.encoding)}function I(e){return e&&e.length?this.write(e):""}c.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(e.lastNeed=a-1),a):--r=0?(a>0&&(e.lastNeed=a-2),a):--r=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var h={StringDecoder:s}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return OZ})),n.d(r,"Algorithm",(function(){return kZ})),n.d(r,"Calculator",(function(){return WZ})),n.d(r,"CellData",(function(){return xZ})),n.d(r,"Contexts",(function(){return XZ})),n.d(r,"DataArray",(function(){return RZ})),n.d(r,"FieldData",(function(){return wZ})),n.d(r,"GeometryRepresentation",(function(){return SZ})),n.d(r,"GlyphRepresentation",(function(){return BZ})),n.d(r,"ImageData",(function(){return VZ})),n.d(r,"PointCloudRepresentation",(function(){return TZ})),n.d(r,"PointData",(function(){return yZ})),n.d(r,"PolyData",(function(){return vZ})),n.d(r,"Reader",(function(){return ZZ})),n.d(r,"ShareDataSet",(function(){return AZ})),n.d(r,"SliceRepresentation",(function(){return hZ})),n.d(r,"View",(function(){return GZ})),n.d(r,"VolumeController",(function(){return bZ})),n.d(r,"VolumeDataRepresentation",(function(){return JZ})),n.d(r,"VolumeRepresentation",(function(){return IZ}));var a=n(14);n(3);function o(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);o(g);const u=new Array(60);o(u);const d=new Array(512);o(d);const m=new Array(256);o(m);const f=new Array(29);o(f);const p=new Array(30);function C(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let I,h,b;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}o(p);const v=e=>e<256?d[e]:d[256+(e>>>7)],Z=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},A=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{A(e,n[2*t],n[2*t+1])},S=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},B=(e,t,n)=>{const r=new Array(16);let a,o,i=0;for(a=1;a<=15;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=S(r[t]++,t))}},V=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},R=e=>{e.bi_valid>8?Z(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},w=(e,t,n,r)=>{const a=2*t,o=2*n;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],a=e.pending_buf[e.l_buf+c],c++,0===r?G(e,a,t):(o=m[a],G(e,o+256+1,t),s=i[o],0!==s&&(a-=f[o],A(e,a,s)),r--,o=v(r),G(e,o,n),s=l[o],0!==s&&(r-=p[o],A(e,r,s)))}while(c{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)k(e,n,i);s=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,n[2*s]=n[2*i]+n[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,n[2*i+1]=n[2*l+1]=s,e.heap[1]=s++,k(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,g,u,d,m,f,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)g=e.heap[c],d=n[2*n[2*g+1]+1]+1,d>s&&(d=s,p++),n[2*g+1]=d,g>r||(e.bl_count[d]++,m=0,g>=l&&(m=i[g-l]),f=n[2*g],e.opt_len+=f*(d+m),o&&(e.static_len+=f*(a[2*g+1]+m)));if(0!==p){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;0!==d;d--)for(g=e.bl_count[d];0!==g;)u=e.heap[--c],u>r||(n[2*u+1]!==d&&(e.opt_len+=(d-n[2*u+1])*n[2*u],n[2*u+1]=d),g--)}})(e,t),B(n,c,e.bl_count)},T=(e,t,n)=>{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),r=0;r<=n;r++)if(a=i,i=t[2*(r+1)+1],!(++l{A(e,0+(r?1:0),3),((e,t,n,r)=>{R(e),Z(e,n),Z(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var N={_tr_init:e=>{X||((()=>{let e,t,n,r,a;const o=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<>=7;r<30;r++)for(p[r]=a<<7,e=0;e<1<{let a,o,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),x(e,e.l_desc),x(e,e.d_desc),i=(e=>{let t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?O(e,t,n,r):4===e.strategy||o===a?(A(e,2+(r?1:0),3),W(e,g,u)):(A(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),a=0;a(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{A(e,2,3),G(e,256,g),(e=>{16===e.bi_valid?(Z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},H=(e,t,n,r)=>{let a=65535&e|0,o=e>>>16&65535|0,i=0;for(;0!==n;){i=n>2e3?2e3:n,n-=i;do{a=a+t[r++]|0,o=o+a|0}while(--i);a%=65521,o%=65521}return a|o<<16|0};const Y=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var F=(e,t,n,r)=>{const a=Y,o=r+n;e^=-1;for(let n=r;n>>8^a[255&(e^t[n])];return-1^e},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:M,_tr_stored_block:L,_tr_flush_block:D,_tr_tally:E,_tr_align:U}=N,{Z_NO_FLUSH:z,Z_PARTIAL_FLUSH:_,Z_FULL_FLUSH:j,Z_FINISH:Q,Z_BLOCK:q,Z_OK:$,Z_STREAM_END:ee,Z_STREAM_ERROR:te,Z_DATA_ERROR:ne,Z_BUF_ERROR:re,Z_DEFAULT_COMPRESSION:ae,Z_FILTERED:oe,Z_HUFFMAN_ONLY:ie,Z_RLE:le,Z_FIXED:se,Z_DEFAULT_STRATEGY:ce,Z_UNKNOWN:ge,Z_DEFLATED:ue}=K,de=(e,t)=>(e.msg=P[t],t),me=e=>(e<<1)-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let pe=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ie=(e,t)=>{D(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ce(e.strm)},he=(e,t)=>{e.pending_buf[e.pending++]=t},be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ye=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=H(e.adler,t,a,n):2===e.state.wrap&&(e.adler=F(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},ve=(e,t)=>{let n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258;let m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(n=t,c[n+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead},Ze=e=>{const t=e.w_size;let n,r,a,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{a=e.head[--n],e.head[n]=a>=t?a-t:0}while(--r);r=t,n=r;do{a=e.prev[--n],e.prev[n]=a>=t?a-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=ye(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pe(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Ae=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=ve(e,n)),e.match_length>=3)if(r=E(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=pe(e,e.ins_h,e.window[e.strstart+1]);else r=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2},Ge=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=E(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ie(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=E(e,0,e.window[e.strstart-1]),r&&Ie(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=E(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2};function Se(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Be=[new Se(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ze(e),0===e.lookahead&&t===z)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ie(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Ie(e,!1),e.strm.avail_out),1)}),new Se(4,4,8,4,Ae),new Se(4,5,16,8,Ae),new Se(4,6,32,32,Ae),new Se(4,4,16,16,Ge),new Se(8,16,32,32,Ge),new Se(8,16,128,128,Ge),new Se(8,32,128,256,Ge),new Se(32,128,258,1024,Ge),new Se(32,258,258,4096,Ge)];function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Re=e=>{if(!e||!e.state)return de(e,te);e.total_in=e.total_out=0,e.data_type=ge;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=z,M(t),$},we=e=>{const t=Re(e);var n;return t===$&&((n=e.state).window_size=2*n.w_size,fe(n.head),n.max_lazy_match=Be[n.level].max_lazy,n.good_match=Be[n.level].good_length,n.nice_match=Be[n.level].nice_length,n.max_chain_length=Be[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ke=(e,t,n,r,a,o)=>{if(!e)return te;let i=1;if(t===ae&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>se)return de(e,te);8===r&&(r=9);const l=new Ve;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e&&e.state?2!==e.state.wrap?te:(e.state.gzhead=t,$):te,Te=(e,t)=>{let n,r;if(!e||!e.state||t>q||t<0)return e?de(e,te):te;const a=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===a.status&&t!==Q)return de(e,0===e.avail_out?re:te);a.strm=e;const o=a.last_flush;if(a.last_flush=t,42===a.status)if(2===a.wrap)e.adler=0,he(a,31),he(a,139),he(a,8),a.gzhead?(he(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),he(a,255&a.gzhead.time),he(a,a.gzhead.time>>8&255),he(a,a.gzhead.time>>16&255),he(a,a.gzhead.time>>24&255),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(he(a,255&a.gzhead.extra.length),he(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=F(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(he(a,0),he(a,0),he(a,0),he(a,0),he(a,0),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,3),a.status=113);else{let t=ue+(a.w_bits-8<<4)<<8,n=-1;n=a.strategy>=ie||a.level<2?0:a.level<6?1:6===a.level?2:3,t|=n<<6,0!==a.strstart&&(t|=32),t+=31-t%31,a.status=113,be(a,t),0!==a.strstart&&(be(a,e.adler>>>16),be(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending!==a.pending_buf_size));)he(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Ce(e),a.pending+2<=a.pending_buf_size&&(he(a,255&e.adler),he(a,e.adler>>8&255),e.adler=0,a.status=113)):a.status=113),0!==a.pending){if(Ce(e),0===e.avail_out)return a.last_flush=-1,$}else if(0===e.avail_in&&me(t)<=me(o)&&t!==Q)return de(e,re);if(666===a.status&&0!==e.avail_in)return de(e,re);if(0!==e.avail_in||0!==a.lookahead||t!==z&&666!==a.status){let n=a.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ze(e),0===e.lookahead)){if(t===z)return 1;break}if(e.match_length=0,n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):a.strategy===le?((e,t)=>{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=258){if(Ze(e),e.lookahead<=258&&t===z)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=E(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):Be[a.level].func(a,t);if(3!==n&&4!==n||(a.status=666),1===n||3===n)return 0===e.avail_out&&(a.last_flush=-1),$;if(2===n&&(t===_?U(a):t!==q&&(L(a,0,0,!1),t===j&&(fe(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Ce(e),0===e.avail_out))return a.last_flush=-1,$}return t!==Q?$:a.wrap<=0?ee:(2===a.wrap?(he(a,255&e.adler),he(a,e.adler>>8&255),he(a,e.adler>>16&255),he(a,e.adler>>24&255),he(a,255&e.total_in),he(a,e.total_in>>8&255),he(a,e.total_in>>16&255),he(a,e.total_in>>24&255)):(be(a,e.adler>>>16),be(a,65535&e.adler)),Ce(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$:ee)},Je=e=>{if(!e||!e.state)return te;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?de(e,te):(e.state=null,113===t?de(e,ne):$)},Xe=(e,t)=>{let n=t.length;if(!e||!e.state)return te;const r=e.state,a=r.wrap;if(2===a||1===a&&42!==r.status||r.lookahead)return te;if(1===a&&(e.adler=H(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(fe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ze(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=pe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ze(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=i,e.input=l,e.avail_in=o,r.wrap=a,$};const Oe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ne=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Oe(n,t)&&(e[t]=n[t])}}return e},He=e=>{let t=0;for(let n=0,r=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Pe=e=>{let t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Ke=(e,t)=>{let n,r;const a=t||e.length,o=new Array(2*a);for(r=0,n=0;n4)o[r++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fe[e[n]]>t?n:t},Le=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const De=Object.prototype.toString,{Z_NO_FLUSH:Ee,Z_SYNC_FLUSH:Ue,Z_FULL_FLUSH:ze,Z_FINISH:_e,Z_OK:je,Z_STREAM_END:Qe,Z_DEFAULT_COMPRESSION:qe,Z_DEFAULT_STRATEGY:$e,Z_DEFLATED:et}=K;function tt(e){this.options=Ne({level:qe,method:et,chunkSize:16384,windowBits:15,memLevel:8,strategy:$e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=We(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==je)throw new Error(P[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Pe(t.dictionary):"[object ArrayBuffer]"===De.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Xe(this.strm,e),n!==je)throw new Error(P[n]);this._dict_set=!0}}function nt(e,t){const n=new tt(t);if(n.push(e,!0),n.err)throw n.msg||P[n.err];return n.result}tt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?_e:Ee,"string"==typeof e?n.input=Pe(e):"[object ArrayBuffer]"===De.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Ue||o===ze)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Te(n,o),a===Qe)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Je(this.strm),this.onEnd(a),this.ended=!0,a===je;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},tt.prototype.onData=function(e){this.chunks.push(e)},tt.prototype.onEnd=function(e){e===je&&(this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:tt,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:K},at=function(e,t){let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S;const B=e.state;n=e.next_in,G=e.input,r=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),i=a+(e.avail_out-257),l=B.dmax,s=B.wsize,c=B.whave,g=B.wnext,u=B.window,d=B.hold,m=B.bits,f=B.lencode,p=B.distcode,C=(1<>>24,d>>>=b,m-=b,b=h>>>16&255,0===b)S[a++]=65535&h;else{if(!(16&b)){if(0==(64&b)){h=f[(65535&h)+(d&(1<>>=b,m-=b),m<15&&(d+=G[n++]<>>24,d>>>=b,m-=b,b=h>>>16&255,!(16&b)){if(0==(64&b)){h=p[(65535&h)+(d&(1<l){e.msg="invalid distance too far back",B.mode=30;break e}if(d>>>=b,m-=b,b=a-o,v>b){if(b=v-b,b>c&&B.sane){e.msg="invalid distance too far back",B.mode=30;break e}if(Z=0,A=u,0===g){if(Z+=s-b,b2;)S[a++]=A[Z++],S[a++]=A[Z++],S[a++]=A[Z++],y-=3;y&&(S[a++]=A[Z++],y>1&&(S[a++]=A[Z++]))}else{Z=a-v;do{S[a++]=S[Z++],S[a++]=S[Z++],S[a++]=S[Z++],y-=3}while(y>2);y&&(S[a++]=S[Z++],y>1&&(S[a++]=S[Z++]))}break}}break}}while(n>3,n-=y,m-=y<<3,d&=(1<{const s=l.bits;let c,g,u,d,m,f,p=0,C=0,I=0,h=0,b=0,y=0,v=0,Z=0,A=0,G=0,S=null,B=0;const V=new Uint16Array(16),R=new Uint16Array(16);let w,k,W,x=null,T=0;for(p=0;p<=15;p++)V[p]=0;for(C=0;C=1&&0===V[h];h--);if(b>h&&(b=h),0===h)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==h))return-1;for(R[1]=0,p=1;p<15;p++)R[p+1]=R[p]+V[p];for(C=0;C852||2===e&&A>592)return 1;for(;;){w=p-v,i[C]f?(k=x[T+i[C]],W=S[B+i[C]]):(k=96,W=0),c=1<>v)+g]=w<<24|k<<16|W|0}while(0!==g);for(c=1<>=1;if(0!==c?(G&=c-1,G+=c):G=0,C++,0==--V[p]){if(p===h)break;p=t[n+i[C]]}if(p>b&&(G&d)!==u){for(0===v&&(v=b),m+=I,y=p-v,Z=1<852||2===e&&A>592)return 1;u=G&d,a[u]=b<<24|y<<16|m-o|0}}return 0!==G&&(a[m+G]=p-v<<24|64<<16|0),l.bits=b,0};const{Z_FINISH:gt,Z_BLOCK:ut,Z_TREES:dt,Z_OK:mt,Z_STREAM_END:ft,Z_NEED_DICT:pt,Z_STREAM_ERROR:Ct,Z_DATA_ERROR:It,Z_MEM_ERROR:ht,Z_BUF_ERROR:bt,Z_DEFLATED:yt}=K,vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Zt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const At=e=>{if(!e||!e.state)return Ct;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,mt},Gt=e=>{if(!e||!e.state)return Ct;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,At(e)},St=(e,t)=>{let n;if(!e||!e.state)return Ct;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ct:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gt(e))},Bt=(e,t)=>{if(!e)return Ct;const n=new Zt;e.state=n,n.window=null;const r=St(e,t);return r!==mt&&(e.state=null),r};let Vt,Rt,wt=!0;const kt=e=>{if(wt){Vt=new Int32Array(512),Rt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ct(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ct(2,e.lens,0,32,Rt,0,e.work,{bits:5}),wt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=Rt,e.distbits=5},Wt=(e,t,n,r)=>{let a;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),(r-=a)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G=0;const S=new Uint8Array(4);let B,V;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ct;n=e.state,12===n.mode&&(n.mode=13),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,u=l,d=s,A=mt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&c)!==yt){e.msg="unknown compression method",n.mode=30;break}if(c>>>=4,g-=4,Z=8+(15&c),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=F(n.check,S,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m=n.length,m>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+m),Z)),512&n.flags&&(n.check=F(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1,g-=1,3&c){case 0:n.mode=14;break;case 1:if(kt(n),n.mode=20,t===dt){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,t===dt)break e;case 15:n.mode=16;case 16:if(m=n.length,m){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;a.set(r.subarray(o,o+m),i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},A=ct(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(V=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(V=C+3;g>>=C,g-=C,Z=0,m=3+(7&c),c>>>=3,g-=3}else{for(V=C+7;g>>=C,g-=C,Z=0,m=11+(127&c),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},A=ct(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},A=ct(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===dt)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,at(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;G=n.lencode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=n.distcode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<{if(!e||!e.state)return Ct;let t=e.state;return t.window&&(t.window=null),e.state=null,mt},Ot=(e,t)=>{if(!e||!e.state)return Ct;const n=e.state;return 0==(2&n.wrap)?Ct:(n.head=t,t.done=!1,mt)},Nt=(e,t)=>{const n=t.length;let r,a,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?Ct:11===r.mode&&(a=1,a=H(a,t,n,0),a!==r.check)?It:(o=Wt(e,t,n,n),o?(r.mode=31,ht):(r.havedict=1,mt))):Ct},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Yt=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_FINISH:Pt,Z_OK:Kt,Z_STREAM_END:Mt,Z_NEED_DICT:Lt,Z_STREAM_ERROR:Dt,Z_DATA_ERROR:Et,Z_MEM_ERROR:Ut}=K;function zt(e){this.options=Ne({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=Tt(this.strm,t.windowBits);if(n!==Kt)throw new Error(P[n]);if(this.header=new Ht,Ot(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Pe(t.dictionary):"[object ArrayBuffer]"===Yt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Nt(this.strm,t.dictionary),n!==Kt)))throw new Error(P[n])}function _t(e,t){const n=new zt(t);if(n.push(e),n.err)throw n.msg||P[n.err];return n.result}zt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Pt:Ft,"[object ArrayBuffer]"===Yt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Jt(n,i),o===Lt&&a&&(o=Nt(n,a),o===Kt?o=Jt(n,i):o===Et&&(o=Lt));n.avail_in>0&&o===Mt&&n.state.wrap>0&&0!==e[n.next_in];)xt(n),o=Jt(n,i);switch(o){case Dt:case Et:case Lt:case Ut:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(0===n.avail_out||o===Mt))if("string"===this.options.to){let e=Me(n.output,n.next_out),t=n.next_out-e,a=Ke(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Kt||0!==l){if(o===Mt)return o=Xt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},zt.prototype.onData=function(e){this.chunks.push(e)},zt.prototype.onEnd=function(e){e===Kt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jt={Inflate:zt,inflate:_t,inflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},ungzip:_t,constants:K};const{Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en}=rt,{Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an}=jt;var on={Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en,Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an,constants:K},ln=n(4),sn=n(34),cn=n(15),gn=n(18),un=ln.c.vtkErrorMacro,dn=ln.c.vtkDebugMacro,mn=0;function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(a.a)(e,2),n=t[0],o=t[1];return r.setRequestHeader(n,o)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var pn={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise((function(a,o){var i=fn("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);i.onreadystatechange=function(t){1===i.readyState&&(n.ref.pending=!0,1==++mn&&e.invokeBusy&&e.invokeBusy(!0)),4===i.readyState&&(n.ref.pending=!1,200===i.status||0===i.status?(n.buffer=i.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=on.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=on.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sn.a.ENDIANNESS!==n.ref.encode&&sn.a.ENDIANNESS&&(dn("Swap bytes of ".concat(n.name)),sn.a.swapBytes(n.buffer,cn.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&un("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--mn&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):o({xhr:i,e:t}))},i.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",i.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(on.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(un("Supported algorithms are: [gz]"),un("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(on.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=fn("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(gn.c)("http",(function(e){return pn}));var Cn=n(9),In=n(10),hn=n(19),bn=n(29),yn=n(16),vn=Object(Cn.d)((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;function a(){yn.a.call(this,"utf-8 decode"),this.leftOver=null}function o(){yn.a.call(this,"utf-8 encode")}n[254]=n[254]=1,t.utf8encode=function(e){return hn.a.nodebuffer?bn.a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},t.utf8decode=function(e){return hn.a.nodebuffer?In.a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,a,o,i=e.length,l=new Array(2*i);for(r=0,t=0;t4)l[r++]=65533,t+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),In.a.applyFromCharCode(l)}(e=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e))},In.a.inherits(a,yn.a),a.prototype.processChunk=function(e){var r=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(hn.a.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),i=r;o!==r.length&&(hn.a.uint8array?(i=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(i=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=a,In.a.inherits(o,yn.a),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o}),"/$$rollup_base$$/node_modules/jszip/lib"),Zn=n(50),An={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},Gn=n(28);function Sn(e){yn.a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=In.a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}In.a.inherits(Sn,yn.a),Sn.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this.data=null},Sn.prototype.resume=function(){return!!yn.a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,In.a.delay(this._tickAndRepeat,[],this)),!0)},Sn.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(In.a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sn.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Bn=Sn;function Vn(e){yn.a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}In.a.inherits(Vn,yn.a),Vn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}yn.a.prototype.processChunk.call(this,e)};var Rn=Vn,wn=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),kn=function(e,t){return void 0!==e&&e.length?"string"!==In.a.getTypeOf(e)?function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t[i])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t.charCodeAt(i))];return-1^e}(0|t,e,e.length):0};function Wn(){yn.a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}In.a.inherits(Wn,yn.a),Wn.prototype.processChunk=function(e){this.streamInfo.crc32=kn(e.data,this.streamInfo.crc32||0),this.push(e)};var xn=Wn;function Tn(e,t,n,r,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=a}Tn.prototype={getContentWorker:function(){var e=new Bn(Gn.a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Rn("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Bn(Gn.a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Tn.createWorkerFrom=function(e,t,n){return e.pipe(new xn).pipe(new Rn("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Rn("compressedSize")).withStreamInfo("compression",t)};var Jn=Tn,Xn=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Xn.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new vn.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new vn.Utf8DecodeWorker))}catch(e){(t=new yn.a("error")).error(e)}return new Zn.a(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Jn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new vn.Utf8EncodeWorker)),Jn.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Jn?this._data.getContentWorker():this._data instanceof yn.a?this._data:new Bn(this._data)}};for(var On=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Nn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Hn=0;Hn=0;)e[t]=0}var Kn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ln=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Dn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=new Array(576);Pn(En);var Un=new Array(60);Pn(Un);var zn=new Array(512);Pn(zn);var _n=new Array(256);Pn(_n);var jn=new Array(29);Pn(jn);var Qn,qn,$n,er=new Array(30);function tr(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function nr(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function rr(e){return e<256?zn[e]:zn[256+(e>>>7)]}function ar(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function or(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function sr(e,t,n){var r,a,o=new Array(16),i=0;for(r=1;r<=15;r++)o[r]=i=i+n[r-1]<<1;for(a=0;a<=t;a++){var l=e[2*a+1];0!==l&&(e[2*a]=lr(o[l]++,l))}}function cr(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function gr(e){e.bi_valid>8?ar(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ur(e,t,n,r){var a=2*t,o=2*n;return e[a]>1;n>=1;n--)dr(e,o,n);a=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],dr(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*a]=o[2*n]+o[2*r],e.depth[a]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=a,e.heap[1]=a++,dr(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,o,i,l,s=t.dyn_tree,c=t.max_code,g=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,p=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,p++),s[2*r+1]=o,r>c||(e.bl_count[o]++,i=0,r>=m&&(i=d[r-m]),l=s[2*r],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(g[2*r+1]+i)));if(0!==p){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,p-=2}while(p>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(a=e.heap[--n])>c||(s[2*a+1]!==o&&(e.opt_len+=(o-s[2*a+1])*s[2*a],s[2*a+1]=o),r--)}}(e,t),sr(o,c,e.bl_count)}function pr(e,t,n){var r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l>=7;r<30;r++)for(er[r]=a<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),fr(e,e.l_desc),fr(e,e.d_desc),i=function(e){var t;for(pr(e,e.dyn_ltree,e.l_desc.max_code),pr(e,e.dyn_dtree,e.d_desc.max_code),fr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Dn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?hr(e,t,n,r):4===e.strategy||o===a?(or(e,2+(r?1:0),3),mr(e,En,Un)):(or(e,4+(r?1:0),3),function(e,t,n,r){var a;for(or(e,t-257,5),or(e,n-1,5),or(e,r-4,4),a=0;a>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(_n[n]+256+1)]++,e.dyn_dtree[2*rr(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){or(e,2,3),ir(e,256,En),function(e){16===e.bi_valid?(ar(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},vr=function(e,t,n,r){for(var a=65535&e|0,o=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{o=o+(a=a+t[r++]|0)|0}while(--i);a%=65521,o%=65521}return a|o<<16|0},Zr=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),Ar=function(e,t,n,r){var a=Zr,o=r+n;e^=-1;for(var i=r;i>>8^a[255&(e^t[i])];return-1^e},Gr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Sr(e,t){return e.msg=Gr[t],t}function Br(e){return(e<<1)-(e>4?9:0)}function Vr(e){for(var t=e.length;--t>=0;)e[t]=0}function Rr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Fn.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function wr(e,t){yr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rr(e.strm)}function kr(e,t){e.pending_buf[e.pending++]=t}function Wr(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function xr(e,t){var n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258,m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(c[(n=t)+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead}function Tr(e){var t,n,r,a,o,i,l,s,c,g,u=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){Fn.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);a+=u}if(0===e.strm.avail_in)break;if(i=e.strm,l=e.window,s=e.strstart+e.lookahead,c=a,g=void 0,(g=i.avail_in)>c&&(g=c),n=0===g?0:(i.avail_in-=g,Fn.arraySet(l,i.input,i.next_in,g,s),1===i.state.wrap?i.adler=vr(i.adler,l,g,s):2===i.state.wrap&&(i.adler=Ar(i.adler,l,g,s)),i.next_in+=g,i.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=yr._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=yr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<15&&(i=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return Sr(e,-2);8===r&&(r=9);var l=new Nr;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tr(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wr(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wr(e,!1),e.strm.avail_out),1)})),new Or(4,4,8,4,Jr),new Or(4,5,16,8,Jr),new Or(4,6,32,32,Jr),new Or(4,4,16,16,Xr),new Or(8,16,32,32,Xr),new Or(8,16,128,128,Xr),new Or(8,32,128,256,Xr),new Or(32,128,258,1024,Xr),new Or(32,258,258,4096,Xr)];var Pr={deflateInit:function(e,t){return Fr(e,t,8,15,8,0)},deflateInit2:Fr,deflateReset:Yr,deflateResetKeep:Hr,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,a,o;if(!e||!e.state||t>5||t<0)return e?Sr(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Sr(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kr(r,31),kr(r,139),kr(r,8),r.gzhead?(kr(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kr(r,255&r.gzhead.time),kr(r,r.gzhead.time>>8&255),kr(r,r.gzhead.time>>16&255),kr(r,r.gzhead.time>>24&255),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kr(r,255&r.gzhead.extra.length),kr(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ar(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,3),r.status=113);else{var i=8+(r.w_bits-8<<4)<<8;i|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),i+=31-i%31,r.status=113,Wr(r,i),0!==r.strstart&&(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending!==r.pending_buf_size));)kr(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rr(e),r.pending+2<=r.pending_buf_size&&(kr(r,255&e.adler),kr(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rr(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Br(t)<=Br(n)&&4!==t)return Sr(e,-5);if(666===r.status&&0!==e.avail_in)return Sr(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var l=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Tr(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,a,o,i=e.window;;){if(e.lookahead<=258){if(Tr(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=i[a=e.strstart-1])===i[++a]&&r===i[++a]&&r===i[++a]){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=yr._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):br[r.level].func(r,t);if(3!==l&&4!==l||(r.status=666),1===l||3===l)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===t?yr._tr_align(r):5!==t&&(yr._tr_stored_block(r,0,0,!1),3===t&&(Vr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rr(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(kr(r,255&e.adler),kr(r,e.adler>>8&255),kr(r,e.adler>>16&255),kr(r,e.adler>>24&255),kr(r,255&e.total_in),kr(r,e.total_in>>8&255),kr(r,e.total_in>>16&255),kr(r,e.total_in>>24&255)):(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),Rr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Sr(e,-2):(e.state=null,113===t?Sr(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,a,o,i,l,s,c,g=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=vr(e.adler,t,g,0)),n.wrap=0,g>=n.w_size&&(0===o&&(Vr(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new Fn.Buf8(n.w_size),Fn.arraySet(c,t,g-n.w_size,n.w_size,0),t=c,g=n.w_size),i=e.avail_in,l=e.next_in,s=e.input,e.avail_in=g,e.next_in=0,e.input=t,Tr(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<=252?6:Dr>=248?5:Dr>=240?4:Dr>=224?3:Dr>=192?2:1;function Er(e,t){if(t<65534&&(e.subarray&&Mr||!e.subarray&&Kr))return String.fromCharCode.apply(null,Fn.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},zr=function(e){return Er(e,e.length)},_r=function(e){for(var t=new Fn.Buf8(e.length),n=0,r=t.length;n4)l[r++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return Er(l,r)},Qr=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Lr[e[n]]>t?n:t},qr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$r=Object.prototype.toString;function ea(e){if(!(this instanceof ea))return new ea(e);this.options=Fn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=Pr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(Gr[n]);if(t.header&&Pr.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ur(t.dictionary):"[object ArrayBuffer]"===$r.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Pr.deflateSetDictionary(this.strm,r)))throw new Error(Gr[n]);this._dict_set=!0}}function ta(e,t){var n=new ea(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}ea.prototype.push=function(e,t){var n,r,a=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=Ur(e):"[object ArrayBuffer]"===$r.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new Fn.Buf8(o),a.next_out=0,a.avail_out=o),1!==(n=Pr.deflate(a,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(zr(Fn.shrinkBuf(a.output,a.next_out))):this.onData(Fn.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===r?(n=Pr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),a.avail_out=0,!0)},ea.prototype.onData=function(e){this.chunks.push(e)},ea.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var na={Deflate:ea,deflate:ta,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ta(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ta(e,t)}},ra=function(e,t){var n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B;n=e.state,r=e.next_in,S=e.input,a=r+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,c=n.wsize,g=n.whave,u=n.wnext,d=n.window,m=n.hold,f=n.bits,p=n.lencode,C=n.distcode,I=(1<>>=y=b>>>24,f-=y,0==(y=b>>>16&255))B[o++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<>>=y,f-=y),f<15&&(m+=S[r++]<>>=y=b>>>24,f-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=C[(65535&b)+(m&(1<s){e.msg="invalid distance too far back",n.mode=30;break e}if(m>>>=y,f-=y,Z>(y=o-i)){if((y=Z-y)>g&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,G=d,0===u){if(A+=c-y,y2;)B[o++]=G[A++],B[o++]=G[A++],B[o++]=G[A++],v-=3;v&&(B[o++]=G[A++],v>1&&(B[o++]=G[A++]))}else{A=o-Z;do{B[o++]=B[A++],B[o++]=B[A++],B[o++]=B[A++],v-=3}while(v>2);v&&(B[o++]=B[A++],v>1&&(B[o++]=B[A++]))}break}}break}}while(r>3,m&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===k[v];v--);if(Z>v&&(Z=v),0===v)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(y=1;y0&&(0===e||1!==v))return-1;for(W[1]=0,h=1;h<15;h++)W[h+1]=W[h]+k[h];for(b=0;b852||2===e&&B>592)return 1;for(;;){f=h-G,i[b]m?(p=x[T+i[b]],C=R[w+i[b]]):(p=96,C=0),s=1<>G)+(c-=s)]=f<<24|p<<16|C|0}while(0!==c);for(s=1<>=1;if(0!==s?(V&=s-1,V+=s):V=0,b++,0==--k[h]){if(h===v)break;h=t[n+i[b]]}if(h>Z&&(V&u)!==g){for(0===G&&(G=Z),d+=y,S=1<<(A=h-G);A+G852||2===e&&B>592)return 1;a[g=V&u]=Z<<24|A<<16|d-o|0}}return 0!==V&&(a[d+V]=h-G<<24|64<<16|0),l.bits=Z,0};function ca(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fn.Buf16(320),this.work=new Fn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ua(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fn.Buf32(852),t.distcode=t.distdyn=new Fn.Buf32(592),t.sane=1,t.back=-1,0):-2}function da(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ua(e)):-2}function ma(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,da(e))):-2}function fa(e,t){var n,r;return e?(r=new ga,e.state=r,r.window=null,0!==(n=ma(e,t))&&(e.state=null),n):-2}var pa,Ca,Ia=!0;function ha(e){if(Ia){var t;for(pa=new Fn.Buf32(512),Ca=new Fn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sa(1,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sa(2,e.lens,0,32,Ca,0,e.work,{bits:5}),Ia=!1}e.lencode=pa,e.lenbits=9,e.distcode=Ca,e.distbits=5}function ba(e,t,n,r){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(Fn.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>r&&(a=r),Fn.arraySet(o.window,t,n-r,a,o.wnext),(r-=a)?(Fn.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ar(n.check,V,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,Z=8+(15&(c>>>=4)),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=Ar(n.check,V,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((m=n.length)>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Fn.arraySet(n.head.extra,r,o,m,Z)),512&n.flags&&(n.check=Ar(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(ha(n),n.mode=20,6===t){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(m=n.length){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;Fn.arraySet(a,r,o,m,i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},A=sa(0,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(S=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(S=C+3;g>>=C)),c>>>=3,g-=3}else{for(S=C+7;g>>=C)),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,G={bits:n.lenbits},A=sa(1,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},A=sa(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,ra(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=ya.inflateInit2(this.strm,t.windowBits);if(n!==va.Z_OK)throw new Error(Gr[n]);if(this.header=new Za,ya.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ur(t.dictionary):"[object ArrayBuffer]"===Aa.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ya.inflateSetDictionary(this.strm,t.dictionary))!==va.Z_OK))throw new Error(Gr[n])}function Sa(e,t){var n=new Ga(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}Ga.prototype.push=function(e,t){var n,r,a,o,i,l=this.strm,s=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?va.Z_FINISH:va.Z_NO_FLUSH,"string"==typeof e?l.input=_r(e):"[object ArrayBuffer]"===Aa.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new Fn.Buf8(s),l.next_out=0,l.avail_out=s),(n=ya.inflate(l,va.Z_NO_FLUSH))===va.Z_NEED_DICT&&c&&(n=ya.inflateSetDictionary(this.strm,c)),n===va.Z_BUF_ERROR&&!0===g&&(n=va.Z_OK,g=!1),n!==va.Z_STREAM_END&&n!==va.Z_OK)return this.onEnd(n),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&n!==va.Z_STREAM_END&&(0!==l.avail_in||r!==va.Z_FINISH&&r!==va.Z_SYNC_FLUSH)||("string"===this.options.to?(a=Qr(l.output,l.next_out),o=l.next_out-a,i=jr(l.output,a),l.next_out=o,l.avail_out=s-o,o&&Fn.arraySet(l.output,l.output,a,o,0),this.onData(i)):this.onData(Fn.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(g=!0)}while((l.avail_in>0||0===l.avail_out)&&n!==va.Z_STREAM_END);return n===va.Z_STREAM_END&&(r=va.Z_FINISH),r===va.Z_FINISH?(n=ya.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===va.Z_OK):r!==va.Z_SYNC_FLUSH||(this.onEnd(va.Z_OK),l.avail_out=0,!0)},Ga.prototype.onData=function(e){this.chunks.push(e)},Ga.prototype.onEnd=function(e){e===va.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ba={Inflate:Ga,inflate:Sa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Sa(e,t)},ungzip:Sa},Va={};(0,Fn.assign)(Va,na,Ba,va);var Ra=Va,wa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function ka(e,t){yn.a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}In.a.inherits(ka,yn.a),ka.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(In.a.transformTo(wa,e.data),!1)},ka.prototype.flush=function(){yn.a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},ka.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this._pako=null},ka.prototype._createPako=function(){this._pako=new Ra[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Wa={STORE:{magic:"\0\0",compressWorker:function(e){return new yn.a("STORE compression")},uncompressWorker:function(){return new yn.a("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new ka("Deflate",e)},uncompressWorker:function(){return new ka("Inflate",{})}}},xa="PK",Ta="PK",Ja="PK",Xa="PK",Oa="PK",Na="PK\b",Ha=function(e,t){var n,r="";for(n=0;n>>=8;return r},Ya=function(e,t,n,r,a,o){var i,l,s=e.file,c=e.compression,g=o!==vn.utf8encode,u=In.a.transformTo("string",o(s.name)),d=In.a.transformTo("string",vn.utf8encode(s.name)),m=s.comment,f=In.a.transformTo("string",o(m)),p=In.a.transformTo("string",vn.utf8encode(m)),C=d.length!==s.name.length,I=p.length!==m.length,h="",b="",y="",v=s.dir,Z=s.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var G=0;t&&(G|=8),g||!C&&!I||(G|=2048);var S,B,V=0,R=0;v&&(V|=16),"UNIX"===a?(R=798,V|=(B=S=s.unixPermissions,S||(B=v?16893:33204),(65535&B)<<16)):(R=20,V|=63&(s.dosPermissions||0)),i=Z.getUTCHours(),i<<=6,i|=Z.getUTCMinutes(),i<<=5,i|=Z.getUTCSeconds()/2,l=Z.getUTCFullYear()-1980,l<<=4,l|=Z.getUTCMonth()+1,l<<=5,l|=Z.getUTCDate(),C&&(b=Ha(1,1)+Ha(kn(u),4)+d,h+="up"+Ha(b.length,2)+b),I&&(y=Ha(1,1)+Ha(kn(f),4)+p,h+="uc"+Ha(y.length,2)+y);var w="";return w+="\n\0",w+=Ha(G,2),w+=c.magic,w+=Ha(i,2),w+=Ha(l,2),w+=Ha(A.crc32,4),w+=Ha(A.compressedSize,4),w+=Ha(A.uncompressedSize,4),w+=Ha(u.length,2),w+=Ha(h.length,2),{fileRecord:xa+w+u+h,dirRecord:Ta+Ha(R,2)+w+Ha(f.length,2)+"\0\0\0\0"+Ha(V,4)+Ha(r,4)+u+h+f}},Fa=function(e){return Na+Ha(e.crc32,4)+Ha(e.compressedSize,4)+Ha(e.uncompressedSize,4)};function Pa(e,t,n,r){yn.a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}In.a.inherits(Pa,yn.a),Pa.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,yn.a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Pa.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ya(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Pa.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ya(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Fa(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Pa.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},za=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_a=function(e,t){return t=void 0!==t?t:An.createFolders,e=za(e),this.files[e]||Ea.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function ja(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Qa={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(ja(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,Ea.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(ja(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=_a.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return In.a.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var $a=qa;function eo(e){$a.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===a)return o-this.zero;return-1},eo.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),a=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&a===o[3]},eo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var to=eo;function no(e){$a.call(this,e)}In.a.inherits(no,$a),no.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},no.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},no.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},no.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ro=no;function ao(e){to.call(this,e)}In.a.inherits(ao,to),ao.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var oo=ao;function io(e){oo.call(this,e)}In.a.inherits(io,oo),io.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var lo=io,so=function(e){var t=In.a.getTypeOf(e);return In.a.checkSupport(t),"string"!==t||hn.a.uint8array?"nodebuffer"===t?new lo(e):hn.a.uint8array?new oo(In.a.transformTo("uint8array",e)):new to(In.a.transformTo("array",e)):new ro(e)};function co(e,t){this.options=e,this.loadOptions=t}co.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Wa)if(Wa.hasOwnProperty(t)&&Wa[t].magic===e)return Wa[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+In.a.pretty(this.compressionMethod)+" unknown (inner file : "+In.a.transformTo("string",this.fileName)+")");this.decompressed=new Jn(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=so(this.extraFields[1].value);this.uncompressedSize===In.a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===In.a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===In.a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===In.a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,a=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,Ta)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=so(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var mo=uo;function fo(e){return new Gn.a.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new xn);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function po(){if(!(this instanceof po))return new po;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new po;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}po.prototype=Qa,po.prototype.loadAsync=function(e,t){var n=this;return t=In.a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:vn.utf8decode}),bn.a.isNode&&bn.a.isStream(e)?Gn.a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):In.a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new mo(t);return n.load(e),n})).then((function(e){var n=[Gn.a.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a1;){var i=o.shift();a=a.folder(i)}e.callback&&e.callback(r)})),{fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(l,s){t||Io("ERROR!!! zip not ready...");var c=vo([r,o.ref.basepath,i.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var g="string"!==o.dataType||i.compression?"uint8array":"string",u=yo[g](o,i.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),l(o)}));a.file(c).async(g).then(u)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(JSON.parse(e))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=vo(e);return t||Io("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,a.file(n).async("base64").then((function(e){r.src="data:image/".concat(bo(n),";base64,").concat(e)}))}))},fetchBinary:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).then((function(e){var t=on.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};Object(gn.c)("zip",(function(e){return Zo.create(e)}));var Ao=n(11),Go=n(13),So=n(23),Bo=n(7);function Vo(e,t){function n(){for(;t.cellFields.length0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=function(n,r){t.radius[n]=r,e.modified()},e.setCellField=function(n,r){t.cellFields[n]=r,e.modified()},e.removeMask=function(){t.mask=null,e.modified()},e.setMaskLayer=function(n,r){var a=!1;!t.mask&&r&&(a=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(a=!0),t.mask[n]=r),a&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var a;if(!t.deleted&&t.radius.length){n();var o=r[0],i=t.radius.length,l=t.height/2,s=0,c=0,g=t.startThetat.startTheta?t.endTheta:t.startTheta;u*=Math.PI/180;var d=t.resolution,m=!1;u>=g+2*Math.PI?u=g+2*Math.PI:(++d,m=!0);var f=(u-g)/t.resolution,p=d*i*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(s+=2*(d+1)+5*d+(m?10:0),c+=2+d+(m?2:0));for(var C=1;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.getArray(e,t,["cellFields"]),ln.c.algo(e,t,0,1),Vo(e,t)}),"vtkConcentricCylinderSource");function wo(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var a=n[0],o=2*Math.PI/t.resolution,i=-t.height/2,l=t.resolution+1,s=4*t.resolution+1+t.resolution,c=0,g=new window[t.pointType](3*l),u=0,d=new Uint32Array(s);g[0]=t.height/2,g[1]=0,g[2]=0,t.capping&&(d[u++]=t.resolution);for(var m=0;mt.resolution?1:f+2;(r=So.a.buildFromRadian()).translate.apply(r,Object(Ao.a)(t.center)).rotateFromDirections([1,0,0],t.direction).apply(g),(a=Go.a.newInstance()).getPoints().setData(g,3),a.getPolys().setData(d,1),n[0]=a}}}var ko={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ko,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),wo(e,t)}),"vtkConeSource");function Wo(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){var e=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))e=arguments.length<=0?void 0:arguments[0];else for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),ln.c.setGetArray(e,t,["center","rotations"],3),ln.c.algo(e,t,0,1),Wo(e,t)}),"vtkCubeSource");function To(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,a;if(!t.deleted){var o=n[0],i=2*Math.PI/t.resolution,l=2*t.resolution,s=5*t.resolution;t.capping&&(l=4*t.resolution,s=7*t.resolution+2);for(var c=new window[t.pointType](3*l),g=0,u=new Uint32Array(s),d=new Float32Array(3*l),m=Bo.a.newInstance({numberOfComponents:3,values:d,name:"Normals"}),f=new Float32Array(2*l),p=Bo.a.newInstance({numberOfComponents:2,values:f,name:"TCoords"}),C=[0,0,0],I=[0,0,0],h=[0,0,0],b=[0,0,0],y=[0,0],v=[0,0],Z=0;Z2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),To(e,t)}),"vtkCylinderSource");var Xo=n(6),Oo=ln.c.vtkWarningMacro;function No(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=new Float32Array(3);if(Object(Xo.t)(t.point2,t.point1,i),Object(Xo.A)(i)<=0)Oo("Zero-length line definition");else{var l=t.resolution,s=l+1,c=new window[a](3*s);o.getPoints().setData(c,3);var g=new Uint32Array(s+1);o.getLines().setData(g,1);for(var u=0,d=0,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),ln.c.obj(e,t),ln.c.setGet(e,t,["resolution"]),ln.c.setGetArray(e,t,["point1","point2"],3),ln.c.algo(e,t,0,1),No(e,t)}),"vtkLineSource");var Yo=n(8),Fo=n(12),Po=ln.c.vtkWarningMacro;function Ko(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var a=r[0],o=a?a.getPoints().getDataType():"Float32Array",i=Go.a.newInstance(),l=new Float32Array(3),s=new Float32Array(3);if(Object(Xo.t)(t.point1,t.origin,l),Object(Xo.t)(t.point2,t.origin,s),e.updatePlane(l,s)){var c=t.xResolution,g=t.yResolution,u=(c+1)*(g+1),d=c*g,m=new window[o](3*u);i.getPoints().setData(m,3);var f=new Uint32Array(5*d);i.getPolys().setData(f,1);var p=new Float32Array(3*u),C=Bo.a.newInstance({numberOfComponents:3,values:p,name:"Normals"});i.getPointData().setNormals(C);var I=new Float32Array(2*u),h=Bo.a.newInstance({numberOfComponents:2,values:I,name:"TextureCoordinates"});i.getPointData().setTCoords(h);for(var b=new Float32Array(2),y=0,v=0;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mo,n),t.normal=[0,0,1],t.center=[0,0,0],ln.c.obj(e,t),ln.c.setGet(e,t,["xResolution","yResolution"]),ln.c.setGetArray(e,t,["origin"],3),ln.c.getArray(e,t,["point1","point2","normal","center"],3),ln.c.algo(e,t,0,1),Ko(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}),"vtkPlaneSource");function Lo(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=t.numberOfPoints,l=new window[a](3*i);o.getPoints().setData(l,3);var s,c,g,u,d,m=new Uint32Array(i+1);o.getVerts().setData(m,1);for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Do,n),ln.c.obj(e,t),ln.c.setGet(e,t,["numberOfPoints","radius"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Lo(e,t)}),"vtkPointSource");function Eo(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array";r=Go.a.newInstance();var o=0,i=t.thetaResolution,l=t.startThetat.startTheta?t.endTheta:t.startTheta;s*=Math.PI/180;var c=t.startPhit.startPhi?t.endPhi:t.startPhi;g*=Math.PI/180,Math.abs(l-s)<2*Math.PI&&++i;var u=(s-l)/t.thetaResolution,d=t.startPhi<=0?1:0,m=t.phiResolution+(t.endPhi>=180?-1:0),f=t.phiResolution*i+2,p=2*t.phiResolution*t.thetaResolution,C=0,I=new window[a](3*f),h=new Float32Array(3*f),b=0,y=new Uint32Array(5*p);t.startPhi<=0&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]+t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=1,C++,o++),t.endPhi>=180&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]-t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=-1,C++,o++);for(var v=t.phiResolution-o,Z=(g-c)/(t.phiResolution-1),A=0;A=180)for(var W=v-1+o,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Eo(e,t)}),"vtkSphereSource");var zo=n(17),_o=n(27),jo=ln.c.vtkDebugMacro,Qo=ln.c.vtkErrorMacro;function qo(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var a=n[0];if(!a)return Qo("Invalid or missing input"),1;var o=a.getPoints(),i=a.getPointData().getNormals(),l=e.getInputArrayToProcess(0);if(!o||!l)return jo("No data to warp",!!o,!!l),r[0]=n[0],1;var s=o.getNumberOfPoints(),c=null,g=[0,0,1];i&&!t.useNormal?(c=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},jo("Using data normals")):e.getXyPlane()?(c=function(e,t){return g},jo("Using x-y plane normal")):(c=function(e,n){return t.normal},jo("Using Normal instance variable"));for(var u=new Float32Array(3*s),d=o.getData(),m=0,f=[0,0,1],p=1,C=l.getData(),I=l.getNumberOfComponents(),h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$o,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),ln.c.setGetArray(e,t,["normal"],3),qo(e,t)}),"vtkWarpScalar");var ei=n(36),ti=n(37),ni={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}},ri=ni.VaryRadius,ai=ni.GenerateTCoords,oi=ln.c.vtkDebugMacro,ii=ln.c.vtkErrorMacro,li=ln.c.vtkWarningMacro;function si(e,t){function n(e,n){var r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){for(var r=t[n],a=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],i=t,l=i[0],s=0;s1){var c=0,g=[0,0,0],u=[0,0,0],d=i.slice(s+1,s+1+l);if((c=r(e,d,0))!==l)!function(){var t=d[c],i=e.slice(3*t,3*(t+1)),s=d[c+1],m=e.slice(3*s,3*(s+1));if(g=m.map((function(e,t){return e-i[t]})),Object(Xo.y)(g),a)o=a;else{for(;++c.001){o=p,g=u;break}}if(c>=l)for(var C=0;C<3;++C)if(0!==g[C]){o[(C+2)%3]=0,o[(C+1)%3]=1,o[C]=-g[(C+1)%3]/g[C];break}}Object(Xo.y)(o);for(var I=0;++c0?Math.sqrt(Z):0;for(var A=[0,0,0],G=0;G<3;++G)A[G]=u[G]+g[G];Object(Xo.y)(A),Object(Xo.w)(A,y,b),Object(Xo.w)(g,y,A),Object(Xo.q)(o,A)*Object(Xo.q)(b,A)<0&&(Z*=-1);for(var S=I;St.radiusFactor&&(B=t.radiusFactor);else if(c&&t.varyRadius===ri.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(B=c.getComponent(r[R],0))<0)return li("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var X=0;X1&&k){var q=Z.slice(j,j+A+1);a(u.getData(),q,R)}o(z,A,Q,u.getData(),I.getData(),g.getPointData(),L,b,H,F,P,K,w,U)?(V=i(z,A,_,V,g.getCellData(),M,B),D&&l(z,A,Q,u.getData(),H,D.getData())):li("Could not generate points"),z=n(z,A),_++}c.setPoints(I),c.setStrips(B),c.setPointData(L),L.setNormals(y),s[0]=c}}}}}else ii("Invalid or missing input")}}var ci={outputPointsPrecision:ti.b.DEFAULT,radius:.5,varyRadius:ri.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:ai.TCOORDS_OFF,textureLength:1};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),ln.c.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),ln.c.obj(e,t),ln.c.algo(e,t,1,1),si(e,t)}),"vtkTubeFilter");var gi=n(40),ui=(n(25),{diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"}),di={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function mi(e){var t="",n=0,r=di.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var a,o,i,l={comments:[],elements:[],headerLength:n},s=t.split("\n"),c=0;c0,u=e.uvs.length>0,d=e.normals.length>0,m=e.faceVertexUvs.length>0,f=0;f0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(a)}}function hi(e,t,n,r){var a;switch(n){case"int8":case"char":a=[e.getInt8(t),1];break;case"uint8":case"uchar":a=[e.getUint8(t),1];break;case"int16":case"short":a=[e.getInt16(t,r),2];break;case"uint16":case"ushort":a=[e.getUint16(t,r),2];break;case"int32":case"int":a=[e.getInt32(t,r),4];break;case"uint32":case"uint":a=[e.getUint32(t,r),4];break;case"float32":case"float":a=[e.getFloat32(t,r),4];break;case"float64":case"double":a=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return a}function bi(e,t,n,r){for(var a,o={},i=0,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},a=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:a,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:a,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n(t.url,r);return a.then(e.parse),a},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified();var r=mi(gi.a.arrayBufferToString(n));if("ascii"!==r.format){t.parseData=n;for(var a,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},i="binary_little_endian"===r.format,l=n instanceof ArrayBuffer?n:n.buffer,s=new DataView(l,r.headerLength),c=0,g=0;g=a.elements[c].count&&(c++,g=0);var m=Ci(a.elements[c].properties,d);Ii(o,a.elements[c].name,m),g++}}var f=fi(o,a.elements);t.output[0]=f}}},e.requestData=function(n,r){e.parse(t.parseData)}}var vi={};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),yi(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkPLYReader"),n(69);function Zi(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){return t.url=n,e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then((function(t){return e.parseAsText(t),!0}))},e.parseAsText=function(n){t.csv=n,t.elevation=[],t.csv.split("\n").forEach((function(e,n){t.elevation.push(e.split(",").map((function(e){return Number(e)})))})),e.modified()},e.requestData=function(e,n){var r=Go.a.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var a=t.elevation.length,o=t.elevation[0].length,i=r.getPoints();i.setNumberOfPoints(o*a,3);var l=i.getData(),s=ei.a.newInstance({size:5*(o-1)*(a-1)});r.setPolys(s);var c=s.getData(),g=0,u=new Float32Array(o*a*2),d=Bo.a.newInstance({numberOfComponents:2,values:u,name:"TextureCoordinates"});r.getPointData().setTCoords(d);for(var m=0;m0&&m>0&&(c[g++]=4,c[g++]=p,c[g++]=p-1,c[g++]=p-1-o,c[g++]=p-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Ai={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ai,n),ln.c.obj(e,t),ln.c.get(e,t,["url"]),ln.c.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Zi(e,t)}),"vtkElevationReader");var Gi={};function Si(e,t,n,r){for(var a=0;a0&&"\r"!==e})),i=o.length;a.push(i);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.obj");return e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=function(n){return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,Gi.splitOn=r,Gi.pieces=[],Gi.v=[],Gi.vt=[],Gi.vn=[],Gi.f=[[]],Gi.size=0,n.split("\n").forEach(Bi),function(e){var t=!!Gi.vt.length,n=!!Gi.vn.length;if(e.splitMode){e.numberOfOutputs=Gi.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper","splitMode"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Vi(e,t)}),"vtkOBJReader");var wi=["chemical json","name","inchi","formula","atoms","bonds","properties"];function ki(e,t){t.classHierarchy.push("vtkMolecule")}var Wi={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function xi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),ln.c.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),ln.c.setGet(e,t,wi),ki(0,t)}var Ti={newInstance:ln.c.newInstance(xi,"vtkMolecule"),extend:xi},Ji={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};function Xi(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}return e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText)},e.parseAsText=function(n){return t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0},e.requestData=function(e,n){var r=Ti.newInstance();if(t.molecule){var o=t.molecule.length,i=[],l=[];t.numberOfAtoms=0;for(var s=0;s=78&&(C=g.substr(76,2).replace(/\s+/g,"")),""===C&&(C=d.substr(0,2).replace(/\d/g,"")),i.push(m),i.push(f),i.push(p);var I=Object(a.a)(Ji[C],1)[0];l.push(I),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(l),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(i)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Oi={numberOfAtoms:0,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Xi(e,t)}),"vtkPDBReader");var Ni=[];Ni["-".charCodeAt(0)]=62,Ni["_".charCodeAt(0)]=63;for(var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yi=0;Yi>16&255,r[g++]=c>>8&255,r[g++]=255&c}switch(i){case 3:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<10;!Fi(e[s]);)s++;for(c|=Ni[e.charCodeAt(s++)]<<4;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>2,r[g++]=c>>8&255,r[g++]=255&c;break;case 2:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<2;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>4,r[g++]=255&c;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return g}var Ki={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();var r=function(e){return gi.a.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),a=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var i=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(a).firstChild,l=i.getAttribute("type"),s=i.getAttribute("compressor"),c=i.getAttribute("byte_order"),g=i.getAttribute("header_type")||"UInt32";if(s&&"vtkZLibDataCompressor"!==s)return console.error("Invalid compressor",s),!1;if(c&&"LittleEndian"!==c)return console.error("Only LittleEndian encoding is supported"),!1;if(l!==t.dataType)return console.error("Invalid data type",l,"expecting",t.dataType),!1;if(i.querySelector("AppendedData")){var u=i.querySelector("AppendedData"),d=u.getAttribute("encoding"),m=i.querySelectorAll("DataArray"),f=t.binaryBuffer;"base64"===d&&(f=u.textContent.trim().substr(1));for(var p=[],C=0;C0?0===Z[3]?new ArrayBuffer(Z[2]*A):new ArrayBuffer(Z[2]*(A-1)+Z[3]):new ArrayBuffer(0);for(var S=new Uint8Array(y),B={offset:0,uint8:S},V=0;V2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ji,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),_i(e,t)},processDataArray:zi,processFieldData:function(e,t,n,r,a,o,i){if(t){var l={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(l[r]=n["set".concat(e)])}));for(var s=t.getElementsByTagName("DataArray"),c=s.length,g=0;g(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=o<(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[3]=i>(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[4]=l<(arguments.length<=3?void 0:arguments[3])?l:arguments.length<=3?void 0:arguments[3],e[5]=s>(arguments.length<=3?void 0:arguments[3])?s:arguments.length<=3?void 0:arguments[3]}function cl(e,t,n,r,o,i,l){var s=Object(a.a)(e,6),c=s[0],g=s[1],u=s[2],d=s[3],m=s[4],f=s[5];void 0===l?(e[0]=Math.min(t[0],c),e[1]=Math.max(t[1],g),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],m),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,c),e[1]=Math.max(n,g),e[2]=Math.min(r,u),e[3]=Math.max(o,d),e[4]=Math.min(i,m),e[5]=Math.max(l,f))}function gl(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t,e[1]=t>l?t:l,e[2]=n,e[3]=n>c?n:c,e[4]=r,e[5]=r>u?r:u,i!==t||s!==n||g!==r}function ul(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function fl(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function pl(e,t){return e[2*t+1]-e[2*t]}function Cl(e){return[pl(e,0),pl(e,1),pl(e,2)]}function Il(e){return e.slice(0,2)}function hl(e){return e.slice(2,4)}function bl(e){return e.slice(4,6)}function yl(e){var t=Cl(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function vl(e){if(ol(e)){var t=Cl(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Zl(e){return[e[0],e[2],e[4]]}function Al(e){return[e[1],e[3],e[5]]}function Gl(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Sl(e,t){for(var n=0,r=0;r<2;r++)for(var a=2;a<4;a++)for(var o=4;o<6;o++)t[n]=[e[r],e[a],e[o]],n++}function Bl(e,t,n){t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5]}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=fl(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Rl(e,t,n,r){for(var a=[].concat(rl),o=e.getData(),i=0;ie[2*g+1]?(i[g]=0,c[g]=e[2*g+1],o=!1):i[g]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],a[0]=0,1;for(var u=0;u<3;u++)2!==i[u]&&0!==n[u]?s[u]=(c[u]-t[u])/n[u]:s[u]=-1;for(var d=0;d<3;d++)s[l]1||s[l]<0)return 0;a[0]=s[l];for(var m=0;m<3;m++)if(l!==m){if(r[m]=t[m]+s[l]*n[m],r[m]e[2*m+1])return 0}else r[m]=c[m];return 1}function kl(e,t,n){for(var r=[],a=0,o=1,i=1,l=4;l<=5;++l){r[2]=e[l];for(var s=2;s<=3;++s){r[1]=e[s];for(var c=0;c<=1;++c)if(r[0]=e[c],a=tl.a.evaluate(n,t,r),i&&(o=a>=0?1:-1,i=0),0===a||o>0&&a<0||o<0&&a>0)return 1}}return 0}function Wl(e,t){if(!ol(e)||!ol(t))return!1;for(var n,r=[0,0,0,0,0,0],a=0;a<3;a++)if(n=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(n=!0,r[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(n=!0,r[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(n=!0,r[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(n=!0,r[2*a+1]=e[2*a+1]),!n)return!1;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],!0}function xl(e,t){if(!ol(e)||!ol(t))return!1;for(var n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function Tl(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Jl(e,t,n){for(var r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],o=0,i=0;i<2;i++)for(var l=2;l<4;l++)for(var s=4;s<6;s++){var c=[e[i],e[l],e[s]];a[o++]=tl.a.evaluate(n,t,c)}for(var g=2;g--&&!(Gl(a[r[g][0]],a[r[g][4]])&&Gl(a[r[g][1]],a[r[g][5]])&&Gl(a[r[g][2]],a[r[g][6]])&&Gl(a[r[g][3]],a[r[g][7]])););if(g<0)return!1;for(var u=Math.sign(n[g]),d=Math.abs((e[2*g+1]-e[2*g])*n[g]),m=u>0?1:0,f=0;f<4;f++)if(0!==d){var p=Math.abs(a[r[g][f]])/d;u>0&&pm&&(m=p)}var C=(1-m)*e[2*g]+m*e[2*g+1];return u>0?e[2*g]=C:e[2*g+1]=C,!0}var Xl=function(){function e(t){Object($i.a)(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),il(this.bounds,rl))}return Object(el.a)(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return al(this.bounds,e)}},{key:"isValid",value:function(){return ol(this.bounds)}},{key:"setBounds",value:function(e){return il(this.bounds,e)}},{key:"reset",value:function(){return ll(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne[1]||e[2]>e[3]||e[4]>e[5]?Pl.EMPTY:3===t?Pl.XYZ_GRID:2===t?e[0]===e[1]?Pl.YZ_PLANE:e[2]===e[3]?Pl.XZ_PLANE:Pl.XY_PLANE:1===t?e[0]1&&(n*=t[r]-1)}return n},e.getNumberOfPoints=function(){var t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=function(n){var r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return es("Requesting a point from an empty image."),null;var a=new Float64Array(3);switch(t.dataDescription){case Hl.EMPTY:return null;case Hl.SINGLE_POINT:break;case Hl.X_LINE:a[0]=n;break;case Hl.Y_LINE:a[1]=n;break;case Hl.Z_LINE:a[2]=n;break;case Hl.XY_PLANE:a[0]=n%r[0],a[1]=n/r[0];break;case Hl.YZ_PLANE:a[1]=n%r[1],a[2]=n/r[1];break;case Hl.XZ_PLANE:a[0]=n%r[0],a[2]=n/r[0];break;case Hl.XYZ_GRID:a[0]=n%r[0],a[1]=n/r[0]%r[1],a[2]=n/(r[0]*r[1]);break;default:es("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(a,o),o},e.getBounds=function(){return e.extentToBounds(t.extent)},e.extentToBounds=function(t){var n=[t[0],t[2],t[4],t[1],t[2],t[4],t[0],t[3],t[4],t[1],t[3],t[4],t[0],t[2],t[5],t[1],t[2],t[5],t[0],t[3],t[5],t[1],t[3],t[5]],r=new Float64Array([n[0],n[1],n[2]]),a=new Float64Array(3);e.indexToWorld(r,a);for(var o=[a[0],a[0],a[1],a[1],a[2],a[2]],i=3;i<24;i+=3)Object(Fo.p)(r,n[i],n[i+1],n[i+2]),e.indexToWorld(r,a),a[0]o[1]&&(o[1]=a[0]),a[1]>o[3]&&(o[3]=a[1]),a[2]>o[5]&&(o[5]=a[2]);return o},e.computeTransforms=function(){Object(Yo.e)(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],Object(Yo.r)(t.indexToWorld,t.indexToWorld,t.spacing),Object(Yo.g)(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return es("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.indexToWorld),Object(Fo.q)(i,a,t.indexToWorld),Object(Xo.p)(o,i,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.worldToIndex),Object(Fo.q)(i,a,t.worldToIndex),Object(Xo.p)(o,i,n),n},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=function(){for(var t=e.getBounds(),n=[],r=0;r<3;r++)n[r]=(t[2*r+1]+t[2*r])/2;return n},e.computeHistogram=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);var a=[0,0,0],o=[0,0,0];Ol.computeCornerPoints(r,a,o),Object(Xo.o)(a,a),Object(Xo.o)(o,o);var i=e.getDimensions();Object(Xo.r)(a,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],a),Object(Xo.r)(o,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],o);for(var l=i[0],s=i[0]*i[1],c=e.getPointData().getScalars().getData(),g=-1/0,u=1/0,d=0,m=0,f=0,p=a[2];p<=o[2];p++)for(var C=a[1];C<=o[1];C++)for(var I=a[0]+C*l+p*s,h=a[0];h<=o[0];h++){if(!n||n([h,C,p],r)){var b=c[I];b>g&&(g=b),b0?m/f:0,v=d-y*y,Z=Math.sqrt(v);return{minimum:u,maximum:g,average:y,variance:v,sigma:Z}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,a=0;a<3;++a)n[a]=r,r*=e[2*a+1]-e[2*a]+1;return n},e.computeOffsetIndex=function(t){var n=Object(a.a)(t,3),r=n[0],o=n[1],i=n[2],l=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),c=e.computeIncrements(l,s);return Math.floor((Math.round(r)-l[0])*c[0]+(Math.round(o)-l[2])*c[1]+(Math.round(i)-l[4])*c[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),a=0;a<3;++a)if(r[a]n[2*a+1])return es("GetScalarPointer: Pixel ".concat(r," is not in memory. Current extent = ").concat(n)),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return es("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,n)}}var ns={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:Hl.EMPTY};function rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ns,n),Nl.a.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=El(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),ln.c.get(e,t,["direction","indexToWorld","worldToIndex"]),ln.c.setGetArray(e,t,["origin","spacing"],3),ln.c.getArray(e,t,["extent"],6),ts(e,t)}var as={newInstance:ln.c.newInstance(rs,"vtkImageData"),extend:rs};function os(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=function(e,n,r,a,o){for(var i=e.getElementsByTagName(t.dataType)[0],l=i.getAttribute("Origin").split(" ").map((function(e){return Number(e)})),s=i.getAttribute("Spacing").split(" ").map((function(e){return Number(e)})),c=i.getElementsByTagName("Piece"),g=c.length,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,is,n),Qi.extend(e,t,n),os(e,t)}),"vtkXMLImageDataReader");function ls(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,a,o){var i=e.getElementsByTagName(t.dataType)[0],l=i.getElementsByTagName("FieldData")[0],s=i.getElementsByTagName("Piece"),c=s.length,g=[];l&&(g=Object(Ao.a)(l.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,a){var o=Number(e.getAttribute("NumberOfTuples"));return Bo.a.newInstance(Qi.processDataArray(o,e,t,n,r,a))}(e,r,a,o,t.binaryBuffer)})));for(var u=function(e){var n=Go.a.newInstance(),i=s[e],l=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],c=Qi.processDataArray(l,s,r,a,o,i),g=c.values,u=c.numberOfComponents;e["get".concat(t)]().setData(g,u)}return l}(n,"Points",i,r,a,o,t.binaryBuffer),c=0;["Verts","Lines","Strips","Polys"].forEach((function(e){c+=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=Qi.processCells(l,n.getElementsByTagName(t)[0],r,a,o,i);e["get".concat(t)]().setData(s)}return l}(n,e,i,r,a,o,t.binaryBuffer)})),Qi.processFieldData(l,i.getElementsByTagName("PointData")[0],n.getPointData(),r,a,o,t.binaryBuffer),Qi.processFieldData(c,i.getElementsByTagName("CellData")[0],n.getCellData(),r,a,o,t.binaryBuffer);for(var u=n.getFieldData(),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ss,n),Qi.extend(e,t,n),ls(e,t)}),"vtkXMLPolyDataReader");var cs=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return Xs[e]&&Xs[e](t)}function Hs(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=function(n){e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=function(n){t.renderers=t.renderers.filter((function(e){return e!==n})),e.modified()},e.hasRenderer=function(e){return-1!==t.renderers.indexOf(e)},e.newAPISpecificView=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ns(e||t.defaultViewAPI,n)},e.addView=function(n){e.hasView(n)||(n.setRenderable(e),t.views.push(n),e.modified())},e.removeView=function(n){t.views=t.views.filter((function(e){return e!==n})),e.modified()},e.hasView=function(e){return-1!==t.views.indexOf(e)},e.render=function(){t.interactor?t.interactor.render():t.views.forEach((function(e){return e.traverseAllPasses()}))},e.getStatistics=function(){var e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((function(t){t.getViewProps().forEach((function(t){if(t.getVisibility()){e.propCount+=1;var n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){var r=n.getPrimitiveCount();Object.keys(r).forEach((function(t){e[t]||(e[t]=0),e[t]+=r[t]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n"),e},e.captureImages=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return ln.c.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n):void 0})).filter((function(e){return!!e}))}}var Ys={defaultViewAPI:Js,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function Fs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),ln.c.obj(e,t),ln.c.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),ln.c.get(e,t,["neverRendered"]),ln.c.getArray(e,t,["renderers"]),ln.c.event(e,t,"completion"),Hs(e,t)}var Ps={newInstance:ln.c.newInstance(Fs,"vtkRenderWindow"),extend:Fs,registerViewConstructor:Os,listViewAPIs:function(){return Object.keys(Xs)},newAPISpecificView:Ns},Ks={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},Ms={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},Ls={Wrap:Ks,Filter:Ms},Ds=ln.c.vtkErrorMacro;function Es(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),a=e[r];if(a)a(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Us,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),t.renderableChildMap=new Map,ln.c.get(e,t,["visited"]),ln.c.setGet(e,t,["parent","renderable","myFactory"]),ln.c.getArray(e,t,["children"]),Es(e,t)}var _s={newInstance:ln.c.newInstance(zs,"vtkViewNode"),extend:zs,PASS_TYPES:["Build","Render"]};function js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qs=Ls.Wrap,qs=Ls.Filter,$s=Bo.a.VtkDataTypes,ec=ln.c.vtkDebugMacro,tc=ln.c.vtkErrorMacro,nc=ln.c.vtkWarningMacro;function rc(e,t){var n=this;function r(e,n){var r=[];if(e!==$s.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=t.width*t.height*t.components,o=0;o=a&&(I=a-1);var h=p-C,b=1-h;C=C*r*o,I=I*r*o;for(var y=0;y=r&&(G=r-1);var S=Z-A;A*=o,G*=o;for(var B=0;Ba[s]&&(a[s]=n[i]),i++;for(var c=[],g=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null;if(n?t.openGLRenderWindow=n:(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent()),t.context=t.openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qs.LINEAR),e.setMagnificationFilter(qs.LINEAR)):(e.setMinificationFilter(qs.NEAREST),e.setMagnificationFilter(qs.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(Qs.REPEAT),e.setWrapS(Qs.REPEAT),e.setWrapT(Qs.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified()));var r=t.renderable.getInputData(0);if(r&&r.getPointData().getScalars()){for(var a=r.getExtent(),o=r.getPointData().getScalars(),i=[],l=0;lt.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;switch(t.target){case t.context.TEXTURE_2D:n=t.context.TEXTURE_BINDING_2D;break;default:nc("impossible case")}e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=function(){t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t.openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=function(n,r){return t.internalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||ec("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var a=0;return(a=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(a=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(ec("Unsupported internal texture type!"),ec("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),a},e.setInternalFormat=function(n){n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=function(n,r){return t.format=e.getDefaultFormat(n,r),t.format},e.getDefaultFormat=function(e,n){if(t.openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}},e.resetFormatAndType=function(){t.format=0,t.internalFormat=0,t.openGLDataType=0},e.getDefaultDataType=function(e){if(t.openGLRenderWindow.getWebgl2())switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.FLOAT}switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear")?t.context.FLOAT:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){return t.openGLDataType=e.getDefaultDataType(n),t.openGLDataType},e.getShiftAndScale=function(){var e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:e=(n=127.5)-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:e=(n=32767.5)-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:e=(n=2147483647.5)-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;break;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case qs.NEAREST:return t.context.NEAREST;case qs.LINEAR:return t.context.LINEAR;case qs.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qs.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qs.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qs.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case Qs.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case Qs.REPEAT:return t.context.REPEAT;case Qs.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=a(r(l,[s]));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=s.length/6-1,e.createTexture(),e.bind();for(var c=a(r(l,s)),g=[],u=t.width,d=t.height,m=0;m=1&&y>=1;){var v=null;h<=t.maxLevel&&(v=g[6*h+I]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+I,h,t.internalFormat,b,y,0,t.format,t.openGLDataType,v),h++,b/=2,y/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,a,o){return e.getOpenGLDataType(a),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?a===$s.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType($s.UNSIGNED_CHAR),e.getInternalFormat($s.UNSIGNED_CHAR,4),e.getFormat($s.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.width=n.width,t.height=n.height,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);var r=!Object(Xo.m)(n.width)||!Object(Xo.m)(n.height),a=document.createElement("canvas");a.width=r?Object(Xo.h)(n.width):n.width,a.height=r?Object(Xo.h)(n.height):n.height;var o=a.getContext("2d");o.translate(0,a.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,a.width,a.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var i=a;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,i),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,a,o,i,l){return e.getOpenGLDataType(i),e.getInternalFormat(i,o),e.getFormat(i,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,l),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,a,i,l,s){for(var c=n*r*a,g=[],u=[],d=0;d4096&&(G===$s.FLOAT||i>=3)&&(B=4096);var V=1,R=1;c>B*B&&(R=V=Math.ceil(Math.sqrt(c/(B*B))));var w=Math.sqrt(c)/V;w=Object(Xo.h)(w);var k,W=Math.floor(w*V/n),x=Math.ceil(a/W),T=Object(Xo.h)(r*x/R);t.width=w,t.height=T,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=W,t.volumeInfo.yreps=x,t.volumeInfo.xstride=V,t.volumeInfo.ystride=R,t.volumeInfo.offset=Z.offset,t.volumeInfo.scale=Z.scale;var J=w*T*i;k=G===$s.FLOAT?new Float32Array(J):new Uint8Array(J);for(var X=0,O=Math.floor(n/V),N=Math.floor(r/R),H=0;H2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ac,n),_s.extend(e,t,n),t.sendParametersTime={},ln.c.obj(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},ln.c.obj(t.textureBuildTime,{mtime:0}),ln.c.set(e,t,["format","openGLDataType"]),ln.c.setGet(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ln.c.get(e,t,["width","height","volumeInfo","components","handle","target"]),rc(e,t)}var ic=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,a=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");a+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,a,r.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.context,r=n.COLOR_ATTACHMENT0;if(e>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");r+=e}n.framebufferTexture2D(n.FRAMEBUFFER,r,n.TEXTURE_2D,null,0)},e.setDepthBuffer=function(e){if(t.openGLRenderWindow.getWebgl2()){var n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else Object(ln.m)("Attaching depth buffer textures to fbo requires WebGL 2")},e.removeDepthBuffer=function(){if(t.openGLRenderWindow.getWebgl2()){var e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else Object(ln.m)("Attaching depth buffer textures to framebuffers requires WebGL 2")},e.getGLFramebuffer=function(){return t.glFramebuffer},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))},e.releaseGraphicsResources=function(){t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer),t.colorTexture&&t.colorTexture.releaseGraphicsResources()},e.getSize=function(){var e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=function(){e.bind();var n=t.context,r=ic.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(Ms.LINEAR),r.setMagnificationFilter(Ms.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,cn.b.UNSIGNED_CHAR,null),e.setColorBuffer(r),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)}}var sc={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function cc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Object(ln.h)(e,t),Object(ln.j)(e,t,["colorTexture"]),lc(e,t)}var gc={newInstance:Object(ln.g)(cc,"vtkFramebuffer"),extend:cc};function uc(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(ln.c.capitalize(t.currentOperation))},e.getTraverseOperation=function(){return t.currentTraverseOperation},e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t.currentParent=r,t.preDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((function(t){t.traverse(n,e)})),t.postDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})))}}var dc={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dc,n),ln.c.obj(e,t),ln.c.get(e,t,["currentOperation"]),ln.c.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),uc(e,t)}var fc={newInstance:ln.c.newInstance(mc,"vtkRenderPass"),extend:mc};function pc(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.deleted){t.currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);for(var a=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),i=0;i0&&t.volumeCount>0||t.depthRequested){var g=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=gc.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var u=t.framebuffer.getSize();null!==u&&u[0]===g[0]&&u[1]===g[1]||(t.framebuffer.create(g[0],g[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),s.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),s.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),s.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),s.traverse(e))}}}},e.getZBufferTexture=function(){return t.framebuffer?t.framebuffer.getColorTexture():null},e.requestDepth=function(){t.depthRequested=!0},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.incrementVolumeCount=function(){return t.volumeCount++}}var Cc={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cc,n),fc.extend(e,t,n),ln.c.get(e,t,["framebuffer"]),pc(e,t)}var hc={newInstance:ln.c.newInstance(Ic,"vtkForwardPass"),extend:Ic};function bc(e,t){t.classHierarchy.push("vtkGenericWidgetRepresentation")}var yc={};function vc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yc,n),_s.extend(e,t,n),bc(0,t)}var Zc={newInstance:ln.c.newInstance(vc),extend:vc};function Ac(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=function(n){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(var r=0;rt.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?El(t.keyMatrices.normalMatrix):(Dl(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Ul(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var Gc={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gc,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Ac(e,t)}var Bc={newInstance:ln.c.newInstance(Sc),extend:Sc};function Vc(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.activateTextures=function(){t.activeTextures=[],t.children.forEach((function(e){e.isA("vtkOpenGLTexture")&&(e.render(),e.getHandle()&&t.activeTextures.push(e))}))},e.opaquePass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}var Rc={context:null,activeTextures:[]};function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rc,n),_s.extend(e,t,n),Object(ln.j)(e,t,["context"]),Object(ln.e)(e,t,["activeTextures"]),Vc(e,t)}var kc={newInstance:Object(ln.g)(wc),extend:wc};function Wc(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=function(n){n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext())},e.opaquePass=function(e){if(e){var n=t.openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize),t.context.scissor(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)}},e.translucentPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=function(n){if(n!==t.lastRenderer||t.openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){Object(Yo.d)(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),Dl(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Object(Yo.i)(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Object(Yo.d)(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Object(Yo.i)(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Object(Yo.l)(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var xc={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function Tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),_s.extend(e,t,n),t.keyMatrixTime={},Object(ln.h)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Object(ln.j)(e,t,["context","keyMatrixTime"]),Wc(e,t)}var Jc={newInstance:Object(ln.g)(Tc),extend:Tc},Xc={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Oc={ObjectType:Xc};function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pc,n),ln.c.obj(e,t),ln.c.get(e,t,["openGLRenderWindow"]),Fc(e,t)}var Mc=Hc(Hc({newInstance:ln.c.newInstance(Kc),extend:Kc},{}),Oc),Lc={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}},Dc={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zc,n),ln.c.obj(e,t),t.properties={},ln.c.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Uc(e,t)}var jc=function(e){for(var t=1;t0&&(--o in t.hitProps||(t.hitProps[o]=!0))}},e.renderProp=function(n){t.currentPass===qc.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+t.idOffset),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===qc.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+t.idOffset)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.getPropFromID=function(e){return e>=0&&et.area[2]||n[1]t.area[3])return null;var i=[n[0]-t.area[0],n[1]-t.area[1]],l=e.convert(i[0],i[1],t.pixBuffer[qc.ACTOR_PASS]);if(l<=0)return null;var s={valid:!0};s.propID=l-t.idOffset,s.prop=e.getPropFromID(s.propID);var c=e.convert(i[0],i[1],t.pixBuffer[qc.COMPOSITE_INDEX_PASS]);if((c<0||c>16777215)&&(c=0),s.compositeID=c-t.idOffset,t.captureZValues){var g=4*(i[1]*(t.area[2]-t.area[0]+1)+i[0]);s.zValue=(256*t.zBuffer[g]+t.zBuffer[g+1])/65535,s.displayPosition=n}return s}var u=[n[0],n[1]],d=[0,0],m=e.getPixelInformation(n,0,a);if(m&&m.valid)return m;for(var f=1;ff?u[1]-f:0;p<=u[1]+f;++p){if(d[1]=p,u[0]>=f&&(d[0]=u[0]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[0]=u[0]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}for(var C=u[0]>=f?u[0]-(f-1):0;C<=u[0]+(f-1);++C){if(d[0]=C,u[1]>=f&&(d[1]=u[1]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[1]=u[1]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}}return a[0]=n[0],a[1]=n[1],null},e.convertSelection=function(e,n){var r=[],a=0;return n.forEach((function(n,o){var i=jc.newInstance();switch(i.setContentType($c.INDICES),e){case tg.FIELD_ASSOCIATION_CELLS:i.setFieldType(eg.CELL);break;case tg.FIELD_ASSOCIATION_POINTS:i.setFieldType(eg.POINT);break;default:ng("Unknown field association")}i.getProperties().propID=n.info.propID,i.getProperties().prop=n.info.prop,i.getProperties().compositeID=n.info.compositeID,i.getProperties().pixelCount=n.pixelCount,t.captureZValues&&(i.getProperties().displayPosition=[n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue],i.getProperties().worldPosition=t.openGLRenderWindow.displayToWorld(n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue,t.renderer)),i.setSelectionList(n.attributeIDs),r[a]=i,a++})),r},e.getInfoHash=function(e){return"".concat(e.propID," ").concat(e.compositeID)},e.generateSelection=function(n,r,a,o){for(var i=Math.floor(n),l=Math.floor(r),s=Math.floor(a),c=Math.floor(o),g=new Map,u=[0,0],d=l;d<=c;d++)for(var m=i;m<=s;m++){var f=[m,d],p=e.getPixelInformation(f,0,u);if(p&&p.valid){var C=e.getInfoHash(p);if(g.has(C)){var I=g.get(C);I.pixelCount++,t.captureZValues&&p.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ag,n),ln.c.obj(e,t),t.area=[0,0,0,0],t.propColorValue=[0,0,0],t.props=[],ln.c.setGet(e,t,["fieldAssociation","renderer","currentPass","captureZValues"]),ln.c.setGetArray(e,t,["area"],4),ln.c.setGetArray(e,t,["propColorValue"],3),ln.c.event(e,t,"event"),rg(e,t)}var ig=function(e){for(var t=1;t0&&(e=1/(t.ambient+t.diffuse+t.specular));for(var n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.addShaderVariable=mg("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(dg.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(dg.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(dg.PHONG)},e.getInterpolationAsString=function(){return ln.c.enumToString(dg,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ug.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ug.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ug.POINTS)},e.getRepresentationAsString=function(){return ln.c.enumToString(ug,t.representation)}}var pg={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,specular:0,specularPower:1,opacity:1,interpolation:dg.GOURAUD,representation:ug.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),ln.c.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),fg(e,t)}var Ig,hg=function(e){for(var t=1;t2)for(var r=0;r2){for(var r=0;r1?2*(e-1):0},polysToWireframe:function(e,t){return e>2?2*e:0},stripsToWireframe:function(e,t){return e>2?4*e-6:0},polysToSurface:function(e,t){return e>2?3*(e-2):0},stripsToSurface:function(e,t,n){return e>2?3*(e-2):0}},v=null,Z=null;a===sg.POINTS||"verts"===r?(v=b.anythingToPoints,Z=y.anythingToPoints):a===sg.WIREFRAME||"lines"===r?(v=b["".concat(r,"ToWireframe")],Z=y["".concat(r,"ToWireframe")]):(v=b["".concat(r,"ToSurface")],Z=y["".concat(r,"ToSurface")]);for(var A=n.getData(),G=A.length,S=0,B=0;B0&&(Math.abs(x)/W>1e6||Math.abs(Math.log10(W))>3||0===W&&x>1e6)){for(var N=new Float64Array(3),H=new Float64Array(3),Y=0;Y<3;++Y){var F=o.points.getRange(Y),P=F[1]-F[0];N[Y]=.5*(F[1]+F[0]),H[Y]=P>0?1/P:1}e.setCoordShiftAndScale(N,H)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);d=function(e){if(m=3*e,t.coordShiftAndScaleEnabled?(R[w++]=(i[m++]-t.coordShift[0])*t.coordScale[0],R[w++]=(i[m++]-t.coordShift[1])*t.coordScale[1],R[w++]=(i[m++]-t.coordShift[2])*t.coordScale[2]):(R[w++]=i[m++],R[w++]=i[m++],R[w++]=i[m++]),null!==l&&(f=o.haveCellNormals?3*(h+o.cellOffset):3*e,R[w++]=l[f++],R[w++]=l[f++],R[w++]=l[f++]),t.customData.forEach((function(t){I=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bg,n),Mc.extend(e,t,n),ln.c.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),ln.c.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),Sg(e,t)}var Rg={newInstance:ln.c.newInstance(Vg),extend:Vg},wg=ln.c.vtkErrorMacro;function kg(e,t){t.classHierarchy.push("vtkShader"),e.compile=function(){var e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;switch(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),t.shaderType){case"Fragment":e=t.context.FRAGMENT_SHADER;break;case"Vertex":default:e=t.context.VERTEX_SHADER}if(t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle),!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){var n=t.context.getShaderInfoLog(t.handle);return wg("Error compiling shader '".concat(t.source,"': ").concat(n)),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}var Wg={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["shaderType","source","error","handle","context"]),kg(e,t)}var Tg={newInstance:ln.c.newInstance(xg,"vtkShader"),extend:xg},Jg=ln.c.vtkErrorMacro;function Xg(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=function(){return t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(Jg("Links failed: ".concat(t.error)),0):(Jg(t.error),0):(Jg(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.fragmentShader.getError()),0):(Jg(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.vertexShader.getError()),0)},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=function(){return!(!t.linked&&!e.link()||(t.context.useProgram(t.handle),e.setBound(!0),0))},e.isBound=function(){return!!t.bound},e.release=function(){t.context.useProgram(null),e.setBound(!1)},e.setContext=function(e){t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=function(){if(t.inked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;if(t.uniformLocs={},t.context.linkProgram(t.handle),!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){var n=t.context.getProgramInfoLog(t.handle);return Jg("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(a,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(a,!1,o),!0},e.setUniformf=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(a,r),!0)},e.setUniformfv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(a,r),!0)},e.setUniformi=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(a,r),!0)},e.setUniformiv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(a,r),!0)},e.setUniform2f=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,a),!0},e.setUniform2fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(a,r),!0)},e.setUniform2i=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,a),!0},e.setUniform2iv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(a,r),!0)},e.setUniform3f=function(n,r,a,o){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r,a,o),!0},e.setUniform3fArray=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(a,r),!0)},e.setUniform3i=function(n){var r=e.findUniform(n);if(-1===r)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i1?a-1:0),i=1;i1?a-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=Tg.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=Tg.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=Tg.newInstance(),t.geometryShader.setShaderType("Geometry"),ln.c.obj(e,t),ln.c.get(e,t,["lastCameraMTime"]),ln.c.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),Xg(e,t)}var Hg={newInstance:ln.c.newInstance(Ng,"vtkShaderProgram"),extend:Ng,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var i="";r&&(i="g");var l=new RegExp(t,i),s=e.replace(l,a);return{replace:o,result:s}}};function Yg(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=function(){},e.initialize=function(){t.instancingExtension=null,t.openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t.openGLRenderWindow&&t.openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=function(){return 0!==t.handleVAO||!1===t.supported},e.bind=function(){if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,1):n.vertexAttribDivisor(i.index+s,1))}},e.release=function(){if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,0):n.vertexAttribDivisor(i.index+s,0)),n.disableVertexAttribArray(i.index+s)}},e.shaderProgramChanged=function(){e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=function(){e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=function(t,n,r,a,o,i,l,s){return e.addAttributeArrayWithDivisor(t,n,r,a,o,i,l,s,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,a,o,i,l,s,c,g,u){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Xc.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;var d=t.context,m={};if(m.name=a,m.index=d.getAttribLocation(t.handleProgram,a),m.offset=o,m.stride=i,m.type=l,m.size=s,m.normalize=c,m.isMatrix=u,m.divisor=g,-1===m.Index)return!1;if(r.bind(),d.enableVertexAttribArray(m.index),d.vertexAttribPointer(m.index,m.size,m.type,m.normalize,m.stride,m.offset),g>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m.index,1):d.vertexAttribDivisor(m.index,1)),m.buffer=r.getHandle(),!t.supported){for(var f=!1,p=0;p0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m+f,1):d.vertexAttribDivisor(m+f,1));return!0},e.removeAttributeArray=function(n){if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fg,n),t.buffers=[],ln.c.obj(e,t),ln.c.get(e,t,["supported"]),ln.c.setGet(e,t,["forceEmulation"]),Yg(e,t)}var Kg={newInstance:ln.c.newInstance(Pg,"vtkOpenGLVertexArrayObject"),extend:Pg};function Mg(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=function(e){t.program.setContext(e.getContext()),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=function(e){t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)}}var Lg={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lg,n),ln.c.obj(e,t),t.shaderSourceTime={},ln.c.obj(t.shaderSourceTime),t.attributeUpdateTime={},ln.c.obj(t.attributeUpdateTime),ln.c.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=Hg.newInstance(),t.VAO=Kg.newInstance(),t.CABO=Rg.newInstance(),Mg(e,t)}var Eg={newInstance:ln.c.newInstance(Dg),extend:Dg};function Ug(e,t){e.update=function(){e.getInputData()},e.addClippingPlane=function(e){"vtkPlane"===e.getClassName()&&t.clippingPlanes.push(e)},e.getNumberOfClippingPlanes=function(){return t.clippingPlanes.length},e.removeAllClippingPlanes=function(){t.clippingPlanes.length=0},e.removeClippingPlane=function(e){e<0||e>=6||t.clippingPlanes.splice(e,1)},e.getClippingPlanes=function(){return t.clippingPlanes},e.setClippingPlanes=function(t){if(t)if(Array.isArray(t))for(var n=t.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Ug(e,t)}};function jg(e,t){e.getBounds=function(){return 0},e.getBounds=function(n){e.getBounds();for(var r=0;r<6;r++)n[r]=t.bounds[r]},e.getCenter=function(){e.getBounds();for(var n=0;n<3;n++)t.center[n]=(t.bounds[2*n+1]+t.bounds[2*n])/2;return t.center.slice()},e.getLength=function(){var n=0,r=0;e.getBounds();for(var a=0;a<3;a++)r+=(n=t.bounds[2*a+1]-t.bounds[2*a])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var a=t.clippingPlanes,o=e;if(a){var i=a.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qg,n),_g.extend(e,t,n),t.bounds||Object(Xo.D)(t.bounds),t.center||(t.center=[0,0,0]),jg(e,t)}},$g={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},eu={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:$g},tu={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ru=eu.ScalarMappingTarget,au=eu.VectorMode,ou=Bo.a.VtkDataTypes,iu=tu.ColorMode,lu=ln.c.vtkErrorMacro;function su(e){return e}function cu(e){return Math.floor(255*e+.5)}function gu(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(au.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(au.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(au.RGBCOLORS)},e.build=function(){},e.isOpaque=function(){return!0},e.setAnnotations=function(n,r){if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)lu("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var a=r.length,o=0;o=0?t.annotationArray[a].annotation!==r&&(t.annotationArray[a].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),a=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=function(){return t.annotationArray.length},e.getAnnotatedValue=function(e){return e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value},e.getAnnotation=function(e){return void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation},e.getAnnotatedValueIndex=function(n){return t.annotationArray.length?e.checkForAnnotatedValue(n):-1},e.removeAnnotation=function(n){var r=e.checkForAnnotatedValue(n),a=r>=0;return a&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var a=e.getAnnotatedValueIndex(n);e.getIndexedColor(a,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=function(t){return e.getAnnotatedValueIndexInternal(t)},e.getAnnotatedValueIndexInternal=function(e){if(void 0!==t.annotatedValueMap[e]){var n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=function(e,t){t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=function(){t.annotatedValueMap=[];for(var e=t.annotationArray.length,n=0;n1?e.mapVectorsThroughTable(t,o,ru.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,o,ru.RGBA,s))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),a=e.getNumberOfComponents(),o=t.getData(),i=e.getData(),l=0;l=c&&(s=c-1)):(-1===l&&(l=e.getVectorSize()),l<=0?(s=0,l=c):(s<0&&(s=0),s>=c&&(s=c-1),s+l>c&&(l=c-s)),i!==au.MAGNITUDE||1!==c&&1!==l||(i=au.COMPONENT));var g=0;switch(s>0&&(g=s),i){case au.COMPONENT:e.mapScalarsThroughTable(t,n,r,g);break;default:case au.MAGNITUDE:var u=Bo.a.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,u,l),e.mapScalarsThroughTable(u,n,r,0);break;case au.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var a=r(n),o=t.getData(),i=e.getData(),l=o.length,s=0,c=0;c=1&&n.getDataType()===ou.UNSIGNED_CHAR)return n;var i=Bo.a.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:ou.UNSIGNED_CHAR});if(a<=0)return i;o=(o=o>0?o:0)<1?o:1;var l=su;switch(n.getDataType()!==ou.FLOAT&&n.getDataType()!==ou.DOUBLE||(l=cu),r){case 1:e.luminanceToRGBA(i,n,o,l);break;case 2:e.luminanceAlphaToRGBA(i,n,l);break;case 3:e.rGBToRGBA(i,n,o,l);break;case 4:e.rGBAToRGBA(i,n,o,l);break;default:return lu("Cannot convert colors"),null}return i},e.usingLogScale=function(){return!1},e.getNumberOfAvailableColors=function(){return 16777216},e.setRange=function(t,n){return e.setMappingRange(t,n)},e.getRange=function(t,n){return e.getMappingRange()}}var uu={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:au.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uu,n),ln.c.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],ln.c.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),ln.c.setArray(e,t,["mappingRange"],2),ln.c.getArray(e,t,["mappingRange"]),gu(e,t)}var mu=function(e){for(var t=1;tt.range[1]?t.maxIndex+1+1.5:(n=(e+t.shift)*t.scale)e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=function(n,r,a,o){var i=e.linearLookup;t.indexedLookup&&(i=e.indexedLookupFunction);var l=e.getMappingRange(),s={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,s);var c=e.getAlpha(),g=n.getNumberOfTuples(),u=n.getNumberOfComponents(),d=r.getData(),m=n.getData();if(c>=1){if(a===$g.RGBA)for(var f=0;ft.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Cu={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),mu.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},ln.c.obj(t.buildTime),t.opaqueFlagBuildTime={},ln.c.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},ln.c.obj(t.insertTime,{mtime:0}),ln.c.get(e,t,["buildTime"]),ln.c.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),ln.c.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),pu(e,t)}var hu={newInstance:ln.c.newInstance(Iu,"vtkLookupTable"),extend:Iu},bu=1,yu=0,vu=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Zu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;yu=e}var Au={getResolveCoincidentTopologyAsString:function(){return vu[yu]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bu},getResolveCoincidentTopology:function(){return yu},setResolveCoincidentTopology:Zu,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bu=e},setResolveCoincidentTopologyToDefault:function(){Zu(0)},setResolveCoincidentTopologyToOff:function(){Zu(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Zu(1)}};function Gu(e,t,n){n.forEach((function(n){e["get".concat(n.method)]=function(){return t[n.key]},e["set".concat(n.method)]=function(e,r){t[n.key]={factor:e,offset:r}}}))}var Su=["Polygon","Line","Point"],Bu={};Gu(Bu,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Su.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Vu={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),ln.c.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Au).forEach((function(t){e[t]=Au[t]})),Object.keys(Bu).forEach((function(t){e[t]=Bu[t]})),Gu(e,t.topologyOffset,Su.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Bu.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Bu,otherStaticMethods:Au,CATEGORIES:Su};function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:a}},e.createColorTextureCoordinates=function(t,n,r,a,o,i,l,s,c){var g=(i[1]-i[0])/s,u=[];u[0]=i[0]-g,u[1]=i[1]+g;var d=1/(u[1]-u[0]),m=n.getData(),f=t.getData(),p=0,C=0;if(o<0||o>=a)for(var I=0;It.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var l=t.lookupTable.getNumberOfAvailableColors();l>4094&&(l=4094),l+=2;for(var s=(a[1]-a[0])/(l-1-2),c=new Float64Array(2*l),g=0;gt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var m=n.getNumberOfComponents(),f=n.getNumberOfTuples();t.colorCoordinates=Bo.a.newInstance({numberOfComponents:2,values:new Float32Array(2*f)});var p=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Xu.MAGNITUDE&&n.getNumberOfComponents()>1&&(p=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,f,m,p,a,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,o)}},e.getIsOpaque=function(){var t=e.getLookupTable();return!t||(t.build(),t.isOpaque())},e.canUseTextureMapForColoring=function(n){if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;var r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),a=r.scalars;return!(!a||r.cellFlag||t.colorMode===xu.DEFAULT&&a.getDataType()===Ou.UNSIGNED_CHAR||t.colorMode===xu.DIRECT_SCALARS)},e.clearColorArrays=function(){t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=function(){return t.lookupTable||e.createDefaultLookupTable(),t.lookupTable},e.getMTime=function(){var e=t.mtime;if(null!==t.lookupTable){var n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=function(){var t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells()}},e.acquireInvertibleLookupTable=Nu("AcquireInvertibleLookupTable"),e.valueToColor=Nu("ValueToColor"),e.colorToValue=Nu("ColorToValue"),e.useInvertibleColorFor=Nu("UseInvertibleColorFor"),e.clearInvertibleColor=Nu("ClearInvertibleColor")}var Yu={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,viewSpecificProperties:null,customShaderAttributes:[]};function Fu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),qg.extend(e,t,n),ln.c.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),ln.c.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),ln.c.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Vu.implementCoincidentTopologyMethods(e,t),Hu(e,t)}var Pu=wu(wu(wu({newInstance:ln.c.newInstance(Fu,"vtkMapper"),extend:Fu},ku),Wu),tu),Ku="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",Mu="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n",Lu={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,a){var o=e.getCoincidentParameters(r,a);if(o&&(0!==o.factor||0!==o.offset)){var i=n.Fragment;i=Hg.substitute(i,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=i}}}},Du={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Eu=hg.Representation,Uu=hg.Shading,zu=Pu.ScalarMode,_u=ic.Filter,ju=ic.Wrap,Qu=ln.c.vtkErrorMacro,qu={type:"StartEvent"},$u={type:"EndEvent"};function ed(e,t){function n(e,t,n){return t.identity(n),e.reduce((function(e,n,r){return 0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e}),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=function(n){n&&(t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t.openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.openGLCamera=t.openGLRenderer.getViewNodeFor(t.openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.render=function(){var n=t.openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(var r=Du.Start;r= cos(radians(lightConeAngle".concat(u,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(u,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(u,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(u,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(u,");")," }"]);l=l.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),a=Hg.substitute(a,"//VTK::Light::Impl",l,!1).result;break;default:Qu("bad light complexity")}e.Fragment=a},e.replaceShaderNormal=function(n,r,a){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,i=n.Geometry,l=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Hg.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,l=Hg.substitute(l,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(a.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));"," vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," fdx = normalize(fdx);"," fdy = normalize(fdy);"," if (abs(fdx.x) > 0.0)"," { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),n.Vertex=o,n.Geometry=i,n.Fragment=l}},e.replaceShaderPositionVC=function(e,n,r){var a=e.Vertex,o=e.Geometry,i=e.Fragment;r.getProperty().getRepresentation()!==Eu.POINTS&&t.lastBoundBO.getPrimitiveType()!==Du.Points||(a=Hg.substitute(a,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(a=Hg.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=a,e.Geometry=o,e.Fragment=i},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var a=e.Vertex,o=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;a=Hg.substitute(a,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var l=t.openGLActor.getActiveTextures(),s=2,c=2;if(l&&l.length>0&&(s=l[0].getComponents(),l[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(c=3)),t.renderable.getColorTextureMap()&&(s=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),c=2),2===c){if(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,l&&l.length>=1)switch(s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=a,e.Geometry=o,e.Fragment=i}},e.replaceShaderClip=function(e,n,r){var a=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6),a=Hg.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,a=Hg.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Hg.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=Hg.substitute(o,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=a,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,a=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||a.getEdgeVisibility()&&a.getRepresentation()===Eu.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Du.Points||a.getRepresentation()===Eu.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Du.Lines||a.getRepresentation()===Eu.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Du.Tris&&o!==Du.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Du.TrisEdges&&o!==Du.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=Hg.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Hg.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderValues=function(n,r,a){if(e.replaceShaderColor(n,r,a),e.replaceShaderNormal(n,r,a),e.replaceShaderLight(n,r,a),e.replaceShaderTCoord(n,r,a),e.replaceShaderPicking(n,r,a),e.replaceShaderClip(n,r,a),e.replaceShaderCoincidentOffset(n,r,a),e.replaceShaderPositionVC(n,r,a),t.haveSeenDepthRequest){var o=n.Fragment;o=Hg.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=Hg.substitute(o,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=o}},e.getNeedToRebuildShaders=function(n,r,a){var o=0,i=0,l=n.getPrimitiveType(),s=t.currentInput,c=!1,g=s.getPointData().getNormals(),u=s.getCellData().getNormals(),d=a.getProperty().getInterpolation()===Uu.FLAT,m=a.getProperty().getRepresentation(),f=e.getOpenGLMode(m,l);if(f===t.context.TRIANGLES||u&&!g||!d&&g?c=!0:d||f!==t.context.LINES||(c=!0),a.getProperty().getLighting()&&c){o=0;for(var p=r.getLightsByReference(),C=0;C0&&(i++,0===o&&(o=1)),1===o&&(i>1||1!==I.getIntensity()||!I.lightTypeIsHeadLight())&&(o=2),o<3&&I.getPositional()&&(o=3)}}var h=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),y=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&y===i||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:i},!0),h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===n.getProgram()||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){var o=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&o>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach((function(e,r){n.getProgram().isAttributeUsed("".concat(e,"MC"))&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"".concat(e,"MC"),n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||Qu("Error setting ".concat(e,"MC in shader VAO.")))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||Qu("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||Qu("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6);for(var l=[],s=0;s0){var g=c.getColorByReference(),u=c.getIntensity();t.lightColor[0]=g[0]*u,t.lightColor[1]=g[1]*u,t.lightColor[2]=g[2]*u;var d=c.getDirection(),m=n.getActiveCamera().getViewMatrix(),f=Object(Ao.a)(d);c.lightTypeIsSceneLight()&&(f[0]=m[0]*d[0]+m[1]*d[1]+m[2]*d[2],f[1]=m[4]*d[0]+m[5]*d[1]+m[6]*d[2],f[2]=m[8]*d[0]+m[9]*d[1]+m[10]*d[2],Object(Xo.y)(f)),t.lightDirection[0]=f[0],t.lightDirection[1]=f[1],t.lightDirection[2]=f[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],Object(Xo.y)(t.lightDirection),o.setUniform3fArray("lightColor".concat(i),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(i),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(i),t.lightHalfAngle),i++}}if(!(a<3)){var p=n.getActiveCamera().getViewMatrix();Object(Yo.i)(p,p),i=0;for(var C=0;C0){var h=I.getTransformedPosition(),b=new Float64Array(3);Object(Fo.q)(b,h,p),o.setUniform3fArray("lightAttenuation".concat(i),I.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(i),I.getPositional()),o.setUniformf("lightExponent".concat(i),I.getExponent()),o.setUniformf("lightConeAngle".concat(i),I.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(i),[b[0],b[1],b[2]]),i++}}}}},e.setCameraShaderParameters=function(e,r,a){var o=e.getProgram(),i=t.openGLCamera.getKeyMatrices(r),l=r.getActiveCamera(),s=t.openGLCamera.getKeyMatrixTime().getMTime(),c=o.getLastCameraMTime(),g=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,u=a.getIsIdentity(),d=u?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();o.setUniformMatrix("MCPCMatrix",n([i.wcpc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("MCVCMatrix")&&o.setUniformMatrix("MCVCMatrix",n([i.wcvc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("normalMatrix")&&o.setUniformMatrix3x3("normalMatrix",n([i.normalMatrix,d.normalMatrix],$l,t.tmpMat3)),c!==s&&(o.isUniformUsed("cameraParallel")&&o.setUniformi("cameraParallel",l.getParallelProjection()),o.setLastCameraMTime(s)),u||o.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram(),o=r.getProperty(),i=o.getOpacity(),l=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),s=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),c=t.drawingEdges?1:o.getAmbient(),g=t.drawingEdges?0:o.getDiffuse(),u=t.drawingEdges?0:o.getSpecular(),d=o.getSpecularPower();a.setUniformf("opacityUniform",i),a.setUniform3fArray("ambientColorUniform",l),a.setUniform3fArray("diffuseColorUniform",s),a.setUniformf("ambient",c),a.setUniformf("diffuse",g);var m=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(m<1)){var f=o.getSpecularColorByReference();if(a.setUniform3fArray("specularColorUniform",f),a.setUniformf("specularPowerUniform",d),a.isUniformUsed("ambientIntensityBF")){if(i=(o=r.getBackfaceProperty()).getOpacity(),l=o.getAmbientColor(),c=o.getAmbient(),s=o.getDiffuseColor(),g=o.getDiffuse(),f=o.getSpecularColor(),u=o.getSpecular(),a.setUniformf("ambientIntensityBF",c),a.setUniformf("diffuseIntensityBF",g),a.setUniformf("opacityUniformBF",i),a.setUniform3fArray("ambientColorUniformBF",l),a.setUniform3fArray("diffuseColorUniformBF",s),m<1)return;a.setUniformf("specularIntensityBF",u),a.setUniform3fArray("specularColorUniformBF",f),a.setUniformf("specularPowerUniformBF",d)}}},e.renderPieceStart=function(n,r){t.primitiveIDOffset=0,t.openGLRenderer.getSelector()&&(t.openGLRenderer.getSelector().getCurrentPass(),t.openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===Eu.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var l=Du.Start;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,td,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=Du,t.tmpMat3=El(new Float64Array(9)),t.tmpMat4=Object(Yo.h)(new Float64Array(16));for(var r=Du.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,a)},e.replaceShaderColor=function(e,r,a){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,i=e.Geometry,l=e.Fragment,s=t.lastBoundBO.getReferenceByName("lastLightComplexity"),c=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];s&&(c=c.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var g=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(g=g.concat([" vec3 specularColor;"," float specularPower;"])),g=g.concat([" opacity = opacityUniform;"]),s&&(g=g.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(c=c.concat(["varying vec4 vertexColorVSOutput;"]),o=Hg.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,i=Hg.substitute(i,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,g=g.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),l=Hg.substitute(l,"//VTK::Color::Impl",g).result,l=Hg.substitute(l,"//VTK::Color::Dec",c).result,e.Vertex=o,e.Geometry=i,e.Fragment=l}n.replaceShaderColor(e,r,a)},e.replaceShaderPositionVC=function(e,r,a){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,a)},e.replaceShaderPicking=function(e,r,a){if(t.hardwareSupport){var o=e.Fragment,i=e.Vertex;i=Hg.substitute(i,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,i=Hg.substitute(i,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=i,o=Hg.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=Hg.substitute(o,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=o}else n.replaceShaderPicking(e,r,a)},e.updateGlyphShaderParameters=function(n,r,a,o,i,l,s,c){var g=a.getProgram();if(n){var u=t.normalMatrix,d=l,m=9*s,f=t.tmpMat3,p=u[0],C=u[1],I=u[2],h=u[3],b=u[4],y=u[5],v=u[6],Z=u[7],A=u[8],G=d[m],S=d[m+1],B=d[m+2],V=d[m+3],R=d[m+4],w=d[m+5],k=d[m+6],W=d[m+7],x=d[m+8];f[0]=G*p+S*h+B*v,f[1]=G*C+S*b+B*Z,f[2]=G*I+S*y+B*A,f[3]=V*p+R*h+w*v,f[4]=V*C+R*b+w*Z,f[5]=V*I+R*y+w*A,f[6]=k*p+W*h+x*v,f[7]=k*C+W*b+x*Z,f[8]=k*I+W*y+x*A,g.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,i,16*s),g.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,i,16*s),g.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var T=o.getData();t.tmpColor[0]=T[4*s]/255,t.tmpColor[1]=T[4*s+1]/255,t.tmpColor[2]=T[4*s+2]/255,g.setUniform3fArray("ambientColorUniform",t.tmpColor),g.setUniform3fArray("diffuseColorUniform",t.tmpColor)}c&&g.setUniform3fArray("mapperIndex",c.getPropColorValue())},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===id.SURFACE,l=t.openGLCamera.getKeyMatrices(n),s=t.openGLActor.getKeyMatrices();_l(t.normalMatrix,l.normalMatrix,s.normalMatrix),Object(Yo.l)(t.mcpcMatrix,l.wcpc,s.mcwc),Object(Yo.l)(t.mcvcMatrix,l.wcvc,s.mcwc);var c=t.renderable.getMatrixArray(),g=t.renderable.getNormalArray(),u=t.renderable.getColorArray(),d=c.length/16,m=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===sd.COMPOSITE_INDEX_PASS&&(m=!0);for(var f=t.primTypes.Start;fe.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||od("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||od("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,a),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,a)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(a,ld.ARRAY_BUFFER),t.normalBuffer.upload(o,ld.ARRAY_BUFFER),i?t.colorBuffer.upload(i.getData(),ld.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var l=a.length/16,s=new Uint8Array(4*l),c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),rd.extend(e,t,n),t.tmpMat3=El(new Float64Array(9)),t.normalMatrix=El(new Float64Array(9)),t.mcpcMatrix=Object(Yo.h)(new Float64Array(16)),t.mcvcMatrix=Object(Yo.h)(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},ln.c.obj(t.glyphBOBuildTime,{mtime:0}),ud(e,t)}var fd={newInstance:ln.c.newInstance(md,"vtkOpenGLGlyph3DMapper"),extend:md},pd={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}},Cd={NEAREST:0,LINEAR:1},Id={InterpolationType:Cd},hd=ln.c.vtkErrorMacro,bd=pd.SlicingMode;function yd(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function vd(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=function(n){if(n){t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera()),t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(r.getActiveCamera())}},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.getCoincidentParameters=function(e,n){return t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null},e.render=function(){var n=t.openGLImageSlice.getRenderable(),r=t.openGLRenderer.getRenderable();e.renderPiece(r,n)},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=Ku,e.Fragment=Mu,e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Vertex,i=n.Fragment;o=Hg.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var l=t.openGLTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(s){for(var g=1;gn.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||hd("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||hd("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var i=t.openGLTexture.getComponents(),l=a.getProperty().getIndependentComponents();if(l)for(var s=0;s1?1:0;var M=o.getData(),L=null;if(T===bd.I){L=new M.constructor(H[2]*H[1]*s);for(var D=0,E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zd,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=Eg.newInstance(),t.openGLTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.pwfTexture=ic.newInstance(),t.imagemat=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,[]),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime),vd(e,t)}var Gd={newInstance:ln.c.newInstance(Ad,"vtkOpenGLImageMapper"),extend:Ad};function Sd(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.opaqueZBufferPass=function(t,n){return e.opaquePass(t,n)},e.opaquePass=function(n,r){n&&(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}var Bd={context:null,keyMatrixTime:null,keyMatrices:null};function Vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bd,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),Sd(e,t)}var Rd={newInstance:ln.c.newInstance(Vd,"vtkOpenGLImageSlice"),extend:Vd},wd=ln.c.vtkDebugMacro;function kd(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var a=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,i=t.openGLRenderer.getTiledSizeAndOrigin(),l=null;if(t.renderable.getUseZValues()){var s=r.getZBufferTexture(),c=Math.floor(s.getWidth()),g=Math.floor(s.getHeight()),u=t.openGLRenderWindow.getContext();s.bind();var d=r.getFramebuffer();d?d.saveCurrentBindingsAndBuffers():wd("No framebuffer to save/restore");var m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.getHandle(),0),u.checkFramebufferStatus(u.FRAMEBUFFER)===u.FRAMEBUFFER_COMPLETE&&(l=new Uint8Array(c*g*4),u.viewport(0,0,c,g),u.readPixels(0,0,c,g,u.RGBA,u.UNSIGNED_BYTE,l)),d&&d.restorePreviousBindingsAndBuffers(),u.deleteFramebuffer(m)}t.renderable.invokeCallback(t.renderable.getInputData(),o,a,i,l)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var Wd={};function xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),_s.extend(e,t,n),kd(e,t)}var Td={newInstance:ln.c.newInstance(xd,"vtkOpenGLPixelSpaceCallbackMapper"),extend:xd},Jd=ln.c.vtkDebugMacro;function Xd(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.renderable.isActiveCameraCreated()||t.renderable.resetCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=function(){for(var e=0,n=t.renderable.getLightsByReference(),r=0;r0&&e++;return e||(Jd("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,a=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=a.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(a.clearDepth(1),r|=a.DEPTH_BUFFER_BIT,a.depthMask(!0));var o=e.getTiledSizeAndOrigin();a.enable(a.SCISSOR_TEST),a.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.colorMask(!0,!0,!0,!0),a.clear(r),a.enable(a.DEPTH_TEST)}},e.cameraPass=function(t){t&&e.clear()},e.getAspectRatio=function(){var e=t.parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=function(){var e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=Object(Xo.a)(e[0]-n[0],0,1),a=Object(Xo.a)(e[1]-n[1],0,1),o=t.parent.normalizedDisplayToDisplay(r,a),i=Math.round(o[0]),l=Math.round(o[1]),s=Object(Xo.a)(e[2]-n[0],0,1),c=Object(Xo.a)(e[3]-n[1],0,1);s>n[2]-n[0]&&(s=n[2]-n[0]),c>n[3]-n[1]&&(c=n[3]-n[1]);var g=t.parent.normalizedDisplayToDisplay(s,c),u=Math.round(g[0])-i,d=Math.round(g[1])-l;return u<0&&(u=0),d<0&&(d=0),{usize:u,vsize:d,lowerLeftU:i,lowerLeftV:l}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var a=t.renderable.getBackgroundByReference();t.context.clearColor(a[0],a[1],a[2],a[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,r.depthMask(!0)),r.colorMask(!0,!0,!0,!0);var o=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=function(){null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))}}var Od={context:null,openGLRenderWindow:null,selector:null};function Nd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),_s.extend(e,t,n),ln.c.get(e,t,["shaderCache"]),ln.c.setGet(e,t,["selector"]),Xd(e,t)}var Hd={newInstance:ln.c.newInstance(Nd,"vtkOpenGLRenderer"),extend:Nd},Yd=ln.c.vtkErrorMacro;function Fd(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=function(n){if(n){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera())}},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=function(n,r){if(n&&!t.openGLRenderer.getSelector()){e.updateBufferObjects(),t.openGLRenderWindow.enableDepthMask(),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var a=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",a);var o=t.openGLRenderer.getRenderable(),i=t.openGLCamera.getKeyMatrices(o),l=new Float64Array(16);if(Object(Yo.g)(l,i.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",l),"box"===t.lastFormat){var s=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",s[0],s[1],s[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=function(){if(!t.tris.getCABO().getElementCount()){for(var e=new Float32Array(12),n=0;n<4;n++)e[3*n]=n%2*2-1,e[3*n+1]=n>1?1:-1,e[3*n+2]=1;var r=Bo.a.newInstance({numberOfComponents:3,values:e});r.setName("points");var a=new Uint16Array(8);a[0]=3,a[1]=0,a[2]=1,a[3]=3,a[4]=3,a[5]=0,a[6]=3,a[7]=2;var o=Bo.a.newInstance({numberOfComponents:1,values:a});t.tris.getCABO().createVBO(o,"polys",sg.SURFACE,{points:r,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Yd("Error setting vertexMC in shader VAO."));var i=t.renderable.getTextures();i.length||Yd("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==i[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(i[0]))}}var Pd={context:null};function Kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),_s.extend(e,t,n),t.openGLTexture=ic.newInstance(),t.tris=Eg.newInstance(),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Fd(e,t)}var Md={newInstance:ln.c.newInstance(Kd),extend:Kd};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dd=ln.c.vtkErrorMacro;function Ed(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||Dd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),a.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())a.setUniformMatrix("MCVCMatrix",i.wcvc);else{var l=t.openGLActor.getKeyMatrices(),s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(g=i.getArray(t.renderable.getScaleArray()).getData());var u=null,d=0,m=null;a?(d=a.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),u=a.getData(),m=new Uint8Array(3*s*4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(d);var f=new Float32Array(5*s*3);o.setStride(20);for(var p=Math.cos(Object(Xo.B)(30)),C=0,I=0,h=0,b=0,y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ud,n),rd.extend(e,t,n),Ed(e,t)}var _d={newInstance:ln.c.newInstance(zd,"vtkOpenGLSphereMapper"),extend:zd};function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qd=ln.m;function qd(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||Qd("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||Qd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||Qd("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),r.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",i.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",i.normalMatrix);else{var l=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){var s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}if(a.isUniformUsed("normalMatrix")){var c=new Float64Array(9);_l(c,i.normalMatrix,l.normalMatrix),a.setUniformMatrix3x3("normalMatrix",c)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null,u=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),a&&(u=a.getNumberOfComponents(),o.setColorOffset(4),g=a.getData(),o.setColorBOStride(8)),o.setColorComponents(u),o.setStride(28);var d=new Float32Array(7*s*12),m=new Uint8Array(12*s*(g?8:4)),f=null,p=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(f=i.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&i.hasArray(t.renderable.getOrientationArray())?p=i.getArray(t.renderable.getOrientationArray()).getData():Qd(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var C=[0,1,3,0,3,2,2,3,5,2,5,4],I=0,h=0,b=0,y=0,v=0;v=4?255:0,m[y++]=C[G]>=2?255:0,m[y++]=255,h=v*u,g&&(m[y++]=g[h],m[y++]=g[h+1],m[y++]=g[h+2],m[y++]=g[h+3])}o.setElementCount(b/7),o.upload(d,Xc.ARRAY_BUFFER),o.getColorBO().upload(m,Xc.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var $d={};function em(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),rd.extend(e,t,n),qd(e,t)}var tm={newInstance:Object(ln.g)(em,"vtkOpenGLStickMapper"),extend:em},nm="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n",rm=hg.Representation;function am(e,t,n,r){var o=Object(a.a)(t,2),i=o[0],l=o[1],s=e.getContext(),c=ic.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:s.FLOAT,baseLevel:0,maxLevel:0});return c.setOpenGLRenderWindow(e),c.setInternalFormat(s.RGBA32F),c.create2DFromRaw(i,l,4,"Float32Array",null),c.activate(),c.sendParameters(),c.deactivate(),c}function om(e,t){return am(e,t,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE)}function im(e,t){t.classHierarchy.push("vtkLICPingPongBufferManager"),t.openGLRenderWindow?(t.quad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",rm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow),t.context=t.openGLRenderWindow.getContext(),t.licTexture0=om(t.openGLRenderWindow,t.size),t.seedTexture0=om(t.openGLRenderWindow,t.size),t.licTexture1=om(t.openGLRenderWindow,t.size),t.seedTexture1=om(t.openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?am(t.openGLRenderWindow,t.size,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE):null,t.imageVectorTexture=t.doVTPass?function(e,t){return am(e,t,ic.Filter.LINEAR,ic.Wrap.CLAMP_TO_EDGE)}(t.openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=function(){t.readIndex=1-t.readIndex},e.renderQuad=function(e,n){var r=t.quad,a=t.context,o=t.quadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=function(){return 0===t.readIndex?t.licTexture0:t.licTexture1},e.getLastSeedBuffer=function(){return 0===t.readIndex?t.seedTexture0:t.seedTexture1},e.getLICBuffer=function(){return 1-t.readIndex==0?t.licTexture0:t.licTexture1},e.getSeedBuffer=function(){return 1-t.readIndex==0?t.seedTexture0:t.seedTexture1},e.getLICTextureUnit=function(){var e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=function(){var e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=function(){return t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()},e.getImageVectorTextureUnit=function(){return t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit()},e.getMaskVectorTextureUnit=function(){return t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit()},e.clearBuffers=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);var a=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),a.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(a),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=function(e){var n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,a=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1])},e.detachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=function(){var e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=function(){var e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=function(){t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);var e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=function(){var e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]),t.textures[t.readIndex][0].deactivate()},e.detachBuffers=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);var r=t.textures[t.readIndex],a=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),a[0]&&a[0].deactivate(),a[1]&&a[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=function(){return 1-t.readIndex},e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}var lm={openGLRenderWindow:null,vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lm,n),ln.c.obj(e,t),ln.c.get(e,t,["readIndex"]),ln.c.setGet(e,t,["doEEPass","doVTPass","openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),im(e,t)}var cm={newInstance:ln.c.newInstance(sm,"vtkLICPingPongBufferManager"),extend:sm},gm=0,um=1,dm=2,mm=3,fm=0,pm=1;function Cm(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.dumpTextureValues=function(e,n){var r=Object(a.a)(n,2),o=r[0],i=r[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,g=gc.newInstance(),u=l,d=null;return g.setOpenGLRenderWindow(s),g.saveCurrentBindingsAndBuffers(),g.create(o,i),g.populateFramebuffer(),g.setColorBuffer(e),d=new Float32Array(o*i*c),u.readPixels(0,0,o,i,4===c?u.RGBA:u.RGB,u.FLOAT,d),g.restorePreviousBindingsAndBuffers(),d},e.getTextureMinMax=function(n,r){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,i=e.dumpTextureValues(n,r,a,o,4),l=Number.MAX_VALUE,s=Number.MIN_VALUE,c=0;cs&&(s=g)}return{min:l,max:s}},e.getComponentSelectionProgram=function(e){var t="xyzw";return".".concat(t[e[0]]).concat(t[e[1]])},e.buildShaders=function(){t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");var n=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl","vec2 V = texture2D(texVectors, tcoordVC.st)".concat(e.getComponentSelectionProgram(t.componentIds),";")).result;t.VTProgram=e.buildAShader(n);var r=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){var e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=function(a,o,i,l,s,c){if(t.openGLRenderWindow=s,t.context=s.getContext(),Object.assign(t,c),a[0]<=0||a[1]<=0)return null;var g=[1/a[0],1/a[1]],u=t.stepSize*Math.sqrt(g[0]*g[0]+g[1]*g[1]);u<=0&&(u=1e-10);var d,m=t.context,f=t.framebuffer;f&&a[0]===f.getSize()[0]&&a[1]===f.getSize()[1]||((f=gc.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),(d=f).create.apply(d,Object(Ao.a)(a)),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),m.viewport.apply(m,[0,0].concat(Object(Ao.a)(a))),m.scissor.apply(m,[0,0].concat(Object(Ao.a)(a))),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(i),t.bufs.setNoiseTexture(l)):t.bufs=cm.newInstance({openGLRenderWindow:s,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:i,noiseTexture:l,framebuffer:f,size:a});var p=[(l.getWidth()+1)/a[0],(l.getHeight()+1)/a[1]],C=1/a[0],I=1/a[1],h=t.openGLRenderWindow.getShaderCache();if(t.transformVectors){var b=t.VTProgram;h.readyShaderProgram(b),t.bufs.attachImageVectorBuffer(),b.setUniform2f.apply(b,["uTexSize"].concat(Object(Ao.a)(a))),b.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),t.bufs.renderQuad(a,b),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);var y=t.LIC0ShaderProgram;h.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f.apply(y,["uNoiseBoundsPt1"].concat(p)),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,a,y);var v=t.LICIShaderProgram;h.readyShaderProgram(v),v.setUniformi("uPassNo",0),v.setUniformf("uStepSize",-u),v.setUniform2f.apply(v,["uNoiseBoundsPt1"].concat(p)),v.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),v.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(var Z=0;Z1||l<0)&&(console.error("Invalid color range: ",l,s),l=0,s=1);var c=s-l;n&&(l+=c*t.lowLICContrastEnhancementFactor,c=(s-=c*t.highLICContrastEnhancementFactor)-l);var g=t.CEProgram;o.readyShaderProgram(g),g.setUniformi("texLIC",t.bufs.getLICTextureUnit()),g.setUniformf("uMin",l),g.setUniformf("uMaxMinDiff",c),r(t.bufs,a,g)}}var Im={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Im,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),Cm(e,t)}var bm={newInstance:ln.c.newInstance(hm,"vtkLineIntegralConvolution2D"),extend:hm},ym=n(53);function vm(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}var Zm={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:gm,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:0,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:pm,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function Am(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),ln.c.obj(e,t),ln.c.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),vm(0,t)}var Gm={newInstance:ln.c.newInstance(Am,"vtkSurfaceLICInterface"),extend:Am},Sm=hg.Representation;function Bm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=function(e,n){var r=t.licQuad,a=t.context,o=t.licQuadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=function(e){if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Object(ym.a)(t.noiseGeneratorSeed,{global:!0});var n=[],r=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue"),o=r.noiseTextureType,i=r.noiseGrainSize,l=r.numberOfNoiseLevels,s=r.noiseImpulseProbability,c=r.noiseImpulseBackgroundValue,g=r.minNoiseValue,u=r.maxNoiseValue;switch(o){case pm:n=function(e,t,n,r,a,o){var i=Math.max(0,Math.min(1,n)),l=Float32Array.from({length:e*e},(function(){var e=0;if(1===i||Math.random()>1-i)for(var t=0;t<2048;++t)e+=Math.random();return e})),s=0,c=2049;l.forEach((function(e){c=1===i?e0?e:c,s=e>s?e:s}));var g=s-c;0===g&&(c=0,g=0===s?1:s);var u=t-1,d=0!==u?1/u:0,m=o-a;return l.map((function(e){var n=e=c?1===t?o:a+(i>u?u:i)*d*m:r}))}(Math.floor(e/i),l,s,c,g,u);break;case fm:default:n=function(e,t,n,r){var o=Object(a.a)(e,2),i=o[0],l=o[1],s=r-n;return Float32Array.from({length:i*l},(function(){var e=Math.random();return(e=(e=Math.floor(e*t)/t)*s+n)>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],l,g,u)}var d=1/i,m=Float32Array.from({length:e*e*4},(function(t,r){var a=r/4;if(r%4==0){var o=Math.floor(a%e*d),l=Math.floor(a/e*d);return n[l*(e/i)+o]}return r%4==1||r%4==3?1:0})),f=ic.newInstance({wrapS:ic.Wrap.REPEAT,wrapT:ic.Wrap.REPEAT,minificationFilter:ic.Filter.NEAREST,magnificationFilter:ic.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});f.setOpenGLRenderWindow(t.openGLRenderWindow),f.create2DFromRaw(e,e,4,"Float32Array",m),f.activate(),f.sendParameters(),f.deactivate(),t.noiseTexture=f}},e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.allocateTextures=function(){var n=ic.Filter.NEAREST,r=ic.Filter.LINEAR,a=t.openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(a,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(a,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(a,r)),t.LICImage||(t.LICImage=e.allocateTexture(a,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(a,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(a,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(a))},e.allocateTexture=function(e,n){var r=t.context,a=ic.newInstance({wrapS:ic.Wrap.CLAMP_TO_EDGE,wrapT:ic.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return a.setOpenGLRenderWindow(e),a.setInternalFormat(r.RGBA32F),a.create2DFromRaw.apply(a,Object(Ao.a)(t.size).concat([4,"Float32Array",null])),a.activate(),a.sendParameters(),a.deactivate(),a},e.allocateDepthTexture=function(e){var n=t.context,r=ic.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw.apply(r,Object(Ao.a)(t.size).concat(["Float32Array",null])),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=function(){if(!t.framebuffer){t.licHelper=null;var e=gc.newInstance();e.setOpenGLRenderWindow(t.openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create.apply(e,Object(Ao.a)(t.size)),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=function(){t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=function(){e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",Sm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow)),t.licHelper||(t.licHelper=bm.newInstance())},e.prepareForGeometry=function(){var e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(1),e.removeColorBuffer(2),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,1),e.setColorBuffer(t.maskVectorImage,2),e.setDepthBuffer(t.depthTexture);var n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1,n.COLOR_ATTACHMENT2]),n.viewport.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.scissor.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=function(n){t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();var r=t.licCopyPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(r);var a=t.context;a.viewport.apply(a,[0,0].concat(Object(Ao.a)(n))),a.scissor.apply(a,[0,0].concat(Object(Ao.a)(n))),a.disable(a.BLEND),a.enable(a.DEPTH_TEST),a.disable(a.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=function(){var n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create.apply(r,Object(Ao.a)(t.size)),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();var a=t.licColorPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(a),a.setUniformi("texVectors",t.vectorImage.getTextureUnit()),a.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());var o=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor"),i=o.colorMode,l=o.LICIntensity,s=o.mapModeBias,c=o.maskIntensity,g=o.maskColor,u=o.enhanceContrast,d=o.lowColorContrastEnhancementFactor,m=o.highColorContrastEnhancementFactor;if(a.setUniformi("texLIC",t.LICImage.getTextureUnit()),a.setUniformi("uScalarColorMode",i),a.setUniformf("uLICIntensity",l),a.setUniformf("uMapBias",s),a.setUniformf("uMaskIntensity",c),a.setUniform3f.apply(a,["uMaskColor"].concat(Object(Ao.a)(g))),e.renderQuad(t.size,a),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),u===dm||u===mm){var f=0,p=1,C=p-f;C=(p-=C*m)-(f+=C*d),r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();var I=t.enhanceContrastPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(I),I.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),I.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),I.setUniformi("texLIC",t.LICImage.getTextureUnit()),I.setUniformf("uLMin",f),I.setUniformf("uLMaxMinDiff",C),e.renderQuad(t.size,I),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=function(){var e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t.openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=function(n){Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=function(){t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}var Vm={context:null,openGLRenderWindow:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vm,n),Gm.extend(e,t,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","reallocateTextures","licInterface","size"]),Bm(e,t)}var wm={newInstance:ln.c.newInstance(Rm,"vtkSurfaceLICInterface"),extend:Rm};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=ln.c.vtkErrorMacro;function xm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");var n=function(e){for(var t=1;t1&&t.renderable.setCustomShaderAttributes([a.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=function(e){var n;t.stateCache=(Object(qi.a)(n={},e.BLEND,e.isEnabled(e.BLEND)),Object(qi.a)(n,e.DEPTH_TEST,e.isEnabled(e.DEPTH_TEST)),Object(qi.a)(n,e.SCISSOR_TEST,e.isEnabled(e.SCISSOR_TEST)),n)},e.popState=function(e){var n=function(n){return t.stateCache[n]?e.enable(n):e.disable(n)};n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST)},e.renderPiece=function(r,a){var o=!0;t.openGLRenderWindow.getWebgl2()||(Wm("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(Wm("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(Wm("No input"),o=!1);var i=t.renderable.getLicInterface();i||(i=Gm.newInstance(),t.renderable.setLicInterface(i)),t.openGLLicInterface||(t.openGLLicInterface=wm.newInstance()),i!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(i);var l=t.renderable.getInputArrayToProcess(0);if(i.getEnableLIC()&&(!l||l.getNumberOfComponents()<2)&&(Wm("No vector input array"),o=!1),i.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,o&&i.getEnableLIC()){var s=t.openGLRenderWindow.getSize(),c=s.map((function(e){return Math.round(e*i.getViewPortScale())}));t.openGLLicInterface.setSize(c),t.openGLLicInterface.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,a),n.renderPieceDraw(r,a),n.renderPieceFinish(r,a),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(s),e.popState(t.context)}else n.renderPiece(r,a)}}var Tm={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tm,n),rd.extend(e,t,n),xm(e,t),ln.c.setGet(e,t,["openGLLicInterface"])}var Xm={newInstance:ln.c.newInstance(Jm,"vtkOpenGLSurfaceLICMapper"),extend:Jm};function Om(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0))},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.MCWCMatrix,t.renderable.getMatrix()),Object(Yo.i)(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?El(t.normalMatrix):(Dl(t.normalMatrix,t.MCWCMatrix),zl(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}var Nm={};function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nm,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),ln.c.setGet(e,t,["context"]),Om(e,t)}var Ym={newInstance:ln.c.newInstance(Hm,"vtkOpenGLVolume"),extend:Hm},Fm={NEAREST:0,LINEAR:1,FAST_LINEAR:2},Pm={FRACTIONAL:0,PROPORTIONAL:1},Km={InterpolationType:Fm,OpacityMode:Pm},Mm={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3},Lm={BlendMode:Mm};function Dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Em=ln.c.vtkWarningMacro,Um=ln.c.vtkErrorMacro;function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n// Lighting values\n//VTK::Light::Dec\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing triliear values from multiple z slices\n#ifdef vtkTriliearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)).a - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)).a - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)).a - scalar;\n\n // divide by spacing\n result.xyz /= vSpacing;\n\n result.w = length(result.xyz);\n\n // rotate to View Coords\n result.xyz =\n result.x * vPlaneNormal0 +\n result.y * vPlaneNormal2 +\n result.z * vPlaneNormal4;\n\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - 0.5) * 2.0,\n (fragCoord.y / vpHeight - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n return (vWCtoIDX * vertex).xyz / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\n//\nfloat computeGradientOpacityFactor(\n vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n#if vtkLightComplexity > 0\nvoid applyLighting(inout vec3 tColor, vec4 normal)\n{\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n //VTK::Light::Impl\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n}\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = 1.0;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normal0 = computeNormal(posIS, tValue.a, tstep);\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n applyLighting(tColor.rgb, normal0);\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n#endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\n\n\n\n\n\n\n\nreturn tColor;\n}\n\n\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, float sampleDistanceIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 //AVERAGE_INTENSITY_BLEND\n vec4 averageIPScalarRangeMin = vec4 (\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n 1.0);\n vec4 averageIPScalarRangeMax = vec4(\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n 1.0);\n\n vec4 sum = vec4(0.);\n\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n // - We are setting the alpha channel for averageIPScalarRangeMin and\n // averageIPScalarRangeMax so that we do not trigger this 'continue'\n // based on the alpha channel comparison.\n // - There might be a better way to do this. I'm not sure if there is an\n // equivalent of 'any' which only operates on RGB, though I suppose\n // we could write an 'anyRGB' function and see if that is faster.\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n if (any(lessThan(tValue, averageIPScalarRangeMin)) ||\n any(greaterThan(tValue, averageIPScalarRangeMax))) {\n continue;\n }\n\n // Sum the values across each step in the path\n sum += tValue;\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (result == 0.0)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*(tdims - 1.0);\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, out float sampleDistanceIS, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n}\n\nvoid main()\n{\n\n vec3 rayDirVC;\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n float sampleDistanceIS;\n computeIndexSpaceValues(posIS, endIS, sampleDistanceIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, sampleDistanceIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Fragment;a.getProperty().getInterpolationType()===Fm.LINEAR&&(o=Hg.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===a.getProperty().getUseLabelOutline()&&(o=Hg.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var i=t.scalarTexture.getComponents();o=Hg.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(i)).result;var l=a.getProperty().getIndependentComponents();if(l){o=Hg.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var s=[],c=0;c0&&(o=Hg.substitute(o,"//VTK::vtkProportionalComponents",s.join("\n")).result)}var g=t.currentInput.getExtent(),u=t.currentInput.getSpacing(),d=new Float64Array(3);Object(Fo.p)(d,(g[1]-g[0])*u[0],(g[3]-g[2])*u[1],(g[5]-g[4])*u[2]);var m=Object(Fo.j)(d)/t.renderable.getSampleDistance();o=Hg.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(m))).result,o=Hg.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=a.getProperty().getUseGradientOpacity(0);for(var f=1;l&&!t.gopacity&&f0&&(a=Hg.substitute(a,"//VTK::Light::Dec",["uniform vec3 lightColor".concat(o,";"),"uniform vec3 lightDirectionVC".concat(o,"; // normalized"),"uniform vec3 lightHalfAngleVC".concat(o,"; // normalized"),"//VTK::Light::Dec"],!1).result,a=Hg.substitute(a,"//VTK::Light::Impl",[" float df = abs(dot(normal.rgb, -lightDirectionVC".concat(o,"));")," diffuse += ((df".concat("",") * lightColor").concat(o,");")," float sf = pow( abs(dot(lightHalfAngleVC".concat(o,",normal.rgb)), vSpecularPower);")," specular += ((sf".concat("",") * lightColor").concat(o,");")," //VTK::Light::Impl"],!1).result,o++)}))}e.Fragment=a},e.replaceShaderClippingPlane=function(e,n,r){var a=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;a=Hg.substitute(a,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,a=Hg.substitute(a,"//VTK::ClipPlane::Impl",["for(int i = 0; i < ".concat(o,"; i++) {")," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=a},e.getNeedToRebuildShaders=function(n,r,a){var o=0;a.getProperty().getShade()&&t.renderable.getBlendMode()===Mm.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((function(e){e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));var i=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,i=!0);var l=t.scalarTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=!1,g=[];if(s){for(var u=0;u0&&(c=!0)}var d=t.currentInput.getExtent(),m=t.currentInput.getSpacing(),f=new Float64Array(3);Object(Fo.p)(f,(d[1]-d[0])*m[0],(d[3]-d[2])*m[1],(d[5]-d[4])*m[2]);var p=Object(Fo.j)(f)/t.renderable.getSampleDistance(),C={interpolationType:a.getProperty().getInterpolationType(),useLabelOutline:a.getProperty().getUseLabelOutline(),numComp:l,usesProportionalComponents:c,iComps:s,maxSamples:p,useGradientOpacity:a.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),averageIPScalarMode:t.renderable.getAverageIPScalarRange(),proportionalComponents:g};return t.previousState&&t.previousState.interpolationType===C.interpolationType&&t.previousState.useLabelOutline===C.useLabelOutline&&t.previousState.numComp===C.numComp&&t.previousState.usesProportionalComponents===C.usesProportionalComponents&&t.previousState.iComps===C.iComps&&t.previousState.maxSamples===C.maxSamples&&t.previousState.useGradientOpacity===C.useGradientOpacity&&t.previousState.blendMode===C.blendMode&&zm(t.previousState.averageIPScalarMode,C.averageIPScalarMode)&&zm(t.previousState.proportionalComponents,C.proportionalComponents)?!!(0===n.getProgram()||i||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||!!t.lastZBufferTexture!=!!t.zBufferTexture||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance()),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var i=e.getRenderTargetSize();o.setUniformf("vpWidth",i[0]),o.setUniformf("vpHeight",i[1])}},e.setCameraShaderParameters=function(n,r,a){var o=t.openGLCamera.getKeyMatrices(r),i=t.openGLVolume.getKeyMatrices();Object(Yo.l)(t.modelToView,o.wcvc,i.mcwc);var l=n.getProgram(),s=t.openGLCamera.getRenderable(),c=s.getClippingRange();l.setUniformf("camThick",c[1]-c[0]),l.setUniformf("camNear",c[0]),l.setUniformf("camFar",c[1]);for(var g=t.currentInput.getBounds(),u=t.currentInput.getDimensions(),d=new Float64Array(3),m=new Float64Array(3),f=1,p=-1,C=1,I=-1,h=0;h<8;++h){if(Object(Fo.p)(d,g[h%2],g[2+Math.floor(h/2)%2],g[4+Math.floor(h/4)]),Object(Fo.q)(d,d,t.modelToView),!s.getParallelProjection()){Object(Fo.l)(m,d);var b=-c[0]/d[2];Object(Fo.b)(d,m,b)}Object(Fo.q)(d,d,o.vcpc),f=Math.min(d[0],f),p=Math.max(d[0],p),C=Math.min(d[1],C),I=Math.max(d[1],I)}l.setUniformf("dcxmin",f),l.setUniformf("dcxmax",p),l.setUniformf("dcymin",C),l.setUniformf("dcymax",I),l.isUniformUsed("cameraParallel")&&l.setUniformi("cameraParallel",s.getParallelProjection());var y=t.currentInput.getExtent(),v=t.currentInput.getSpacing(),Z=new Float64Array(3);Object(Fo.p)(Z,(y[1]-y[0]+1)*v[0],(y[3]-y[2]+1)*v[1],(y[5]-y[4]+1)*v[2]),l.setUniform3f("vSpacing",v[0],v[1],v[2]),Object(Fo.p)(d,y[0],y[2],y[4]),t.currentInput.indexToWorldVec3(d,d),Object(Fo.q)(d,d,t.modelToView),l.setUniform3f("vOriginVC",d[0],d[1],d[2]);var A=t.currentInput.getIndexToWorld();Object(Yo.l)(t.idxToView,t.modelToView,A),_l(t.idxNormalMatrix,o.normalMatrix,i.normalMatrix),_l(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var G=Object(Fo.j)(Z)/t.renderable.getSampleDistance();G>t.renderable.getMaximumSamplesPerRay()&&Em("The number of steps required ".concat(Math.ceil(G)," is larger than the\n specified maximum number of steps ").concat(t.renderable.getMaximumSamplesPerRay(),".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));var S=new Float64Array(3);if(Object(Fo.p)(S,1,1,1),Object(Fo.k)(S,S,Z),l.setUniform3f("vVCToIJK",S[0],S[1],S[2]),l.setUniform3i("volumeDimensions",u[0],u[1],u[2]),!t.openGLRenderWindow.getWebgl2()){var B=t.scalarTexture.getVolumeInfo();l.setUniformf("texWidth",t.scalarTexture.getWidth()),l.setUniformf("texHeight",t.scalarTexture.getHeight()),l.setUniformi("xreps",B.xreps),l.setUniformi("xstride",B.xstride),l.setUniformi("ystride",B.ystride)}for(var V=new Float64Array(3),R=new Float64Array(3),w=0;w<6;++w){switch(w){default:case 0:Object(Fo.p)(V,1,0,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 1:Object(Fo.p)(V,-1,0,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 2:Object(Fo.p)(V,0,1,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 3:Object(Fo.p)(V,0,-1,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 4:Object(Fo.p)(V,0,0,1),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 5:Object(Fo.p)(V,0,0,-1),Object(Fo.p)(R,y[0],y[2],y[4])}Object(Fo.m)(V,V,t.idxNormalMatrix),Object(Fo.q)(R,R,t.idxToView);var k=-1*Object(Fo.d)(R,V);if(l.setUniform3f("vPlaneNormal".concat(w),V[0],V[1],V[2]),l.setUniformf("vPlaneDistance".concat(w),k),a.getProperty().getUseLabelOutline()){var W=t.currentInput.getWorldToIndex();l.setUniformMatrix("vWCtoIDX",W),Object(Yo.g)(t.projectionToWorld,o.wcpc),l.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var x=e.getRenderTargetSize();l.setUniformf("vpWidth",x[0]),l.setUniformf("vpHeight",x[1])}}switch(Object(Yo.g)(t.projectionToView,o.vcpc),l.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var T=0,J=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();J[0]=t[0]*n,J[1]=t[1]*n,J[2]=t[2]*n,l.setUniform3fArray("lightColor".concat(T),J);var r=e.getDirection();Object(Fo.p)(V,r[0],r[1],r[2]),Object(Fo.m)(V,V,o.normalMatrix),l.setUniform3f("lightDirectionVC".concat(T),V[0],V[1],V[2]);var a=[-.5*V[0],-.5*V[1],-.5*(V[2]-1)];l.setUniform3fArray("lightHalfAngleVC".concat(T),a),T++}}))}},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram();a.setUniformi("ctexture",t.colorTexture.getTextureUnit()),a.setUniformi("otexture",t.opacityTexture.getTextureUnit()),a.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),i=r.getProperty(),l=t.scalarTexture.getComponents(),s=r.getProperty().getIndependentComponents();if(s&&l>=2)for(var c=0;c0&&(a.setUniformf("vAmbient",i.getAmbient()),a.setUniformf("vDiffuse",i.getDiffuse()),a.setUniformf("vSpecular",i.getSpecular()),a.setUniformf("vSpecularPower",i.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var a=t.openGLCamera.getKeyMatrices(n),o=[],i=[],l=t.renderable.getClippingPlanes(),s=l.length,c=0;c1.43){var e=t.framebuffer.getSize();return[t.fvp[0]*e[0],t.fvp[1]*e[1]]}return t.openGLRenderWindow.getFramebufferSize()},e.renderPieceStart=function(n,r){if(t.renderable.getAutoAdjustSampleDistances()){var a=n.getVTKWindow().getInteractor(),o=a.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var i=Math.sqrt(t.avgFrameTime*a.getDesiredUpdateRate()/t.avgWindowArea);i>10&&(i=10),t.targetXYF=i}else t.targetXYF=Math.sqrt(t.avgFrameTime*a.getStillUpdateRate()/t.avgWindowArea);t.targetXYF<1.53&&t.targetXYF>1.33&&(t.targetXYF=t.lastXYF),Math.abs(1-t.targetXYF/t.lastXYF)<.1&&(t.targetXYF=t.lastXYF),t.lastXYF=t.targetXYF}else t.lastXYF=t.renderable.getImageSampleDistance();t.lastXYF<=1.43&&(t.lastXYF=1);var l=t.lastXYF,s=t.openGLRenderWindow.getFramebufferSize();if(l>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer();else{var c=t.framebuffer.getSize();c[0]===Math.floor(.7*s[0])&&c[1]===Math.floor(.7*s[1])||(t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var g=t.context;g.clearColor(0,0,0,0),g.colorMask(!0,!0,!0,!0),g.clear(g.COLOR_BUFFER_BIT),g.viewport(0,0,s[0]/l,s[1]/l),t.fvp=[Math.floor(s[0]/l)/Math.floor(.7*s[0]),Math.floor(s[1]/l)/Math.floor(.7*s[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===Fm.NEAREST?(t.scalarTexture.setMinificationFilter(Ms.NEAREST),t.scalarTexture.setMagnificationFilter(Ms.NEAREST)):(t.scalarTexture.setMinificationFilter(Ms.LINEAR),t.scalarTexture.setMagnificationFilter(Ms.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var a=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),a.drawArrays(a.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=function(e,n){if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t.lastXYF>1.43){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");var r=t.copyShader;t.copyVAO=Kg.newInstance(),t.copyVAO.setOpenGLRenderWindow(t.openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(r,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var a=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,a[0],a[1]);var o=t.framebuffer.getColorTexture();o.activate(),t.copyShader.setUniformi("texture",o.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);var i=t.context;i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=function(n,r){e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Um("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():Object(Xo.D)(t.Bounds)},e.updateBufferObjects=function(t,n){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=function(n,r){return t.VBOBuildTime.getMTime()1?1:-1,k[3*W+2]=-1;var x=new Uint16Array(8);x[0]=3,x[1]=0,x[2]=1,x[3]=3,x[4]=3,x[5]=0,x[6]=3,x[7]=2;var T=Bo.a.newInstance({numberOfComponents:3,values:k});T.setName("points");var J=Bo.a.newInstance({numberOfComponents:1,values:x});t.tris.getCABO().createVBO(J,"polys",sg.SURFACE,{points:T,cellOffset:0})}t.VBOBuildTime.modified()}}}}var jm={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function Qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jm,n),_s.extend(e,t,n),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime,{mtime:0}),t.tris=Eg.newInstance(),t.scalarTexture=ic.newInstance(),t.opacityTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.jitterTexture=ic.newInstance(),t.jitterTexture.setWrapS(Ks.REPEAT),t.jitterTexture.setWrapT(Ks.REPEAT),t.framebuffer=gc.newInstance(),t.idxToView=Object(Yo.h)(new Float64Array(16)),t.idxNormalMatrix=El(new Float64Array(9)),t.modelToView=Object(Yo.h)(new Float64Array(16)),t.projectionToView=Object(Yo.h)(new Float64Array(16)),t.projectionToWorld=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,["context"]),_m(e,t)}var qm={newInstance:ln.c.newInstance(Qm,"vtkOpenGLVolumeMapper"),extend:Qm};function $m(e,t){t.overrides={},t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,a=n.getClassName(r++),o=!1,i=Object.keys(t.overrides);a&&!o;)-1!==i.indexOf(a)?o=!0:a=n.getClassName(r++);if(!o)return null;var l=t.overrides[a]();return l.setMyFactory(e),l},e.registerOverride=function(e,n){t.overrides[e]=n}}var ef={};function tf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ef,n),ln.c.obj(e,t),$m(e,t)}var nf={newInstance:ln.c.newInstance(tf,"vtkViewNodeFactory"),extend:tf};function rf(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var af={};function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,af,n),nf.extend(e,t,n),rf(0,t),e.registerOverride("vtkActor",Bc.newInstance),e.registerOverride("vtkActor2D",kc.newInstance),e.registerOverride("vtkCamera",Jc.newInstance),e.registerOverride("vtkGlyph3DMapper",fd.newInstance),e.registerOverride("vtkImageMapper",Gd.newInstance),e.registerOverride("vtkImageSlice",Rd.newInstance),e.registerOverride("vtkMapper",rd.newInstance),e.registerOverride("vtkPixelSpaceCallbackMapper",Td.newInstance),e.registerOverride("vtkRenderer",Hd.newInstance),e.registerOverride("vtkSkybox",Md.newInstance),e.registerOverride("vtkSphereMapper",_d.newInstance),e.registerOverride("vtkStickMapper",tm.newInstance),e.registerOverride("vtkTexture",ic.newInstance),e.registerOverride("vtkSurfaceLICMapper",Xm.newInstance),e.registerOverride("vtkVolume",Ym.newInstance),e.registerOverride("vtkVolumeMapper",qm.newInstance),e.registerOverride("vtkWidgetRepresentation",Zc.newInstance)}var lf={newInstance:ln.c.newInstance(of,"vtkOpenGLViewNodeFactory"),extend:of},sf=Object(Cn.d)((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,a,o,i){return n((l=n(n(t,e),n(a,i)))<<(s=o)|l>>>32-s,r);var l,s}function a(e,t,n,a,o,i,l){return r(t&n|~t&a,e,t,o,i,l)}function o(e,t,n,a,o,i,l){return r(t&a|n&~a,e,t,o,i,l)}function i(e,t,n,a,o,i,l){return r(t^n^a,e,t,o,i,l)}function l(e,t,n,a,o,i,l){return r(n^(t|~a),e,t,o,i,l)}function s(e,t){var r,s,c,g,u;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,m=-271733879,f=-1732584194,p=271733878;for(r=0;r>5]>>>t%32&255);return n}function g(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function d(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return c(s(g(e),8*e.length))}(d(e))}function f(e,t){return function(e,t){var n,r,a=g(e),o=[],i=[];for(o[15]=i[15]=void 0,a.length>16&&(a=s(a,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^a[n],i[n]=1549556828^a[n];return r=s(o.concat(g(t)),512+8*t.length),c(s(i.concat(r),640))}(d(e),d(t))}function p(e,t,n){return t?n?f(t,e):u(f(t,e)):n?m(e):u(m(e))}e.exports?e.exports=p:t.md5=p}(Cn.b)}),"/$$rollup_base$$/node_modules/blueimp-md5/js"),cf=["lastShaderBound","context","openGLRenderWindow"];function gf(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var a=n;r.length>0&&(a=Hg.substitute(a,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),i="\n",l="#version 100\n";o?l="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(i="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),a=Hg.substitute(a,"//VTK::System::Dec",["".concat(l,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",i,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var s=Hg.substitute(e,"//VTK::System::Dec",["".concat(l,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(s=Hg.substitute(s,"varying","out").result,a=Hg.substitute(a,"varying","in").result,a=Hg.substitute(a,"gl_FragData\\[0\\]","fragOutput0").result,a=Hg.substitute(a,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:s,FSSource:a,GSSource:Hg.substitute(r,"//VTK::System::Dec",l).result}},e.readyShaderProgramArray=function(t,n,r){var a=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(a.VSSource,a.FSSource,a.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=function(t){return t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null},e.getShaderProgram=function(e,n,r){var a="".concat(e).concat(n).concat(r),o=sf(a);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var i=Hg.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=function(n){e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((function(e){return t.shaderPrograms[e]})).forEach((function(e){return e.releaseGraphicsResources(n)}))},e.releaseGraphicsResources=function(){t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=function(e){return t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1}}var uf={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign(t,uf,n),t.shaderPrograms={},ln.c.obj(e,t),ln.c.setGet(e,t,cf),gf(e,t),Object.freeze(e)}var mf={newInstance:ln.c.newInstance(df,"vtkShaderCache"),extend:df},ff=ln.c.vtkErrorMacro;function pf(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),ln.c.obj(e,t),t.textureUnits=[],ln.c.get(e,t,["numberOfTextureUnits"]),ln.c.setGet(e,t,["context"]),pf(e,t)}var hf={newInstance:ln.c.newInstance(If,"vtkOpenGLTextureUnitManager"),extend:If},bf=ln.c.vtkDebugMacro,yf=ln.c.vtkErrorMacro,vf=-1!==navigator.userAgent.indexOf("Chrome");function Zf(e,t,n){var r=e.createFramebuffer(),a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}var Af=0,Gf=[];function Sf(){Af++,Gf.forEach((function(e){return e(Af)}))}function Bf(){Af--,Gf.forEach((function(e){return e(Af)}))}function Vf(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");var n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=function(n){if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((function(t){t.setOpenGLRenderWindow(e)}))}},e.initialize=function(){if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=hf.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);var n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=function(){t.context.makeCurrent()},e.setContainer=function(n){t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&yf("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=function(){return t.el},e.getContainerSize=function(){if(!t.containerSize&&t.el){var e=t.el.getBoundingClientRect(),n=e.width,r=e.height;t.containerSize=[n,r]}return t.containerSize||t.size},e.getFramebufferSize=function(){return t.activeFramebuffer?t.activeFramebuffer.getSize():t.size},e.isInViewport=function(t,n,r){var a=r.getViewportByReference(),o=e.getFramebufferSize();return a[0]*o[0]<=t&&a[2]*o[0]>=t&&a[1]*o[1]<=n&&a[3]*o[1]>=n},e.getViewportSize=function(t){var n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=function(t){var n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t/a[0],n/a[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t*a[0],n*a[1],r]},e.worldToView=function(e,t,n,r){return r.worldToView(e,t,n)},e.viewToWorld=function(e,t,n,r){return r.viewToWorld(e,t,n)},e.worldToDisplay=function(t,n,r,a){var o=a.worldToView(t,n,r),i=e.getViewportSize(a),l=a.viewToProjection(o[0],o[1],o[2],i[0]/i[1]),s=a.projectionToNormalizedDisplay(l[0],l[1],l[2]);return e.normalizedDisplayToDisplay(s[0],s[1],s[2])},e.displayToWorld=function(t,n,r,a){var o=e.displayToNormalizedDisplay(t,n,r),i=a.normalizedDisplayToProjection(o[0],o[1],o[2]),l=e.getViewportSize(a),s=a.projectionToView(i[0],i[1],i[2],l[0]/l[1]);return a.viewToWorld(s[0],s[1],s[2])},e.normalizedDisplayToViewport=function(t,n,r,a){var o=a.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var i=e.normalizedDisplayToDisplay(t,n,r);return[i[0]-o[0]-.5,i[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,a){var o=e.getViewportSize(a);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=function(t,n,r){var a=e.getFramebufferSize();return[t*(a[0]-1),n*(a[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,a){var o=a.getViewportByReference(),i=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,l=n+o[1]+.5;return e.displayToNormalizedDisplay(i,l,r)},e.getPixelData=function(e,n,r,a){var o=new Uint8Array((r-e+1)*(a-n+1)*4);return t.context.readPixels(e,n,r-e+1,a-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,a="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&a&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bf("using webgl2")),r||(bf("using webgl1"),r=t.canvas.getContext("webgl",n)||t.canvas.getContext("experimental-webgl",n)),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(n){n.length>0&&(t.vrDisplay=n[0],t.vrDisplay.depthNear=.01,t.vrDisplay.depthFar=100,e.invokeHaveVRDisplay())})),t.canvas.addEventListener("webglcontextlost",(function(e){e.preventDefault()}),!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1),r},e.startVR=function(){t.oldCanvasSize=t.size.slice(),t.vrDisplay.capabilities.canPresent?t.vrDisplay.requestPresent([{source:t.canvas}]).then((function(){if(t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&t.hideCanvasInVR&&(t.el.style.display="none"),t.queryVRSize){var n=t.vrDisplay.getEyeParameters("left"),r=t.vrDisplay.getEyeParameters("right"),a=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(a,o)}else e.setSize(t.vrResolution);t.renderable.getRenderers()[0].resetCamera(),t.vrFrameData=new VRFrameData,t.renderable.getInteractor().switchToVRAnimation(),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),vf&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):yf("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,Object(Ao.a)(t.oldCanvasSize)),t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&(t.el.style.display="block");var n=t.renderable.getRenderers()[0];n.getActiveCamera().setProjectionMatrix(null),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.vrRender=function(){if(t.vrDisplay.isPresenting){t.renderable.getInteractor().updateGamepads(t.vrDisplay.displayId),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),t.vrDisplay.getFrameData(t.vrFrameData);var n=t.renderable.getRenderers()[0];n.setViewport(0,0,.5,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.leftViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.leftProjectionMatrix),e.traverseAllPasses(),n.setViewport(.5,0,1,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.rightViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.rightProjectionMatrix),e.traverseAllPasses(),t.vrDisplay.submitFrame()}},e.restoreContext=function(){var t=fc.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t.textureResourceIds.get(n);if(void 0===r){var a=e.getTextureUnitManager().allocate();a<0?yf("Hardware does not support the number of textures defined."):(t.textureResourceIds.set(n,a),t.context.activeTexture(t.context.TEXTURE0+a))}else t.context.activeTexture(t.context.TEXTURE0+r)},e.deactivateTexture=function(n){var r=t.textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t.textureResourceIds.delete(n))},e.getTextureUnitForTexture=function(e){var n=t.textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n,r){if(t.webgl2)switch(e){case cn.b.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;case 4:default:return t.context.RGBA8}default:case cn.b.FLOAT:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;case 4:default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:default:return t.context.RGBA}},e.setBackgroundImage=function(e){t.bgImage.src=e.src},e.setUseBackgroundImage=function(e){t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(t.deleted)return null;t.imageFormat=n;var r=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,new Promise((function(n,a){var o=e.onImageReady((function(e){t.notifyStartCaptureImage=r,o.unsubscribe(),n(e)}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),o=n.getExtension("OES_texture_half_float"),i=n.getExtension("WEBGL_debug_renderer_info"),l=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),c=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&Zf(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[o&&Zf(n,n.RGBA,o.HALF_FLOAT_OES)?"RGBA":"",o&&Zf(n,n.RGB,o.HALF_FLOAT_OES)?"RGB":"",o&&Zf(n,n.LUMINANCE,o.HALF_FLOAT_OES)?"LUMINANCE":"",o&&Zf(n,n.ALPHA,o.HALF_FLOAT_OES)?"ALPHA":"",o&&Zf(n,n.LUMINANCE_ALPHA,o.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&Zf(n,n.RGB,n.FLOAT)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",l?n.getParameter(l.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",i&&n.getParameter(i.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",i&&n.getParameter(i.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],g={};c.length;){var u=c.pop(),d=Object(a.a)(u,3),m=d[0],f=d[1],p=d[2];f&&(g[f]={label:m,value:p})}return g},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,a.drawImage(t.canvas,0,0);var o=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rf,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",Sf(),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t.textureResourceIds=new Map,_s.extend(e,t,n),t.myFactory=lf.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",kf),t.shaderCache=mf.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hc.newInstance(),ln.c.event(e,t,"imageReady"),ln.c.event(e,t,"haveVRDisplay"),ln.c.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),ln.c.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),ln.c.setGetArray(e,t,["size","vrResolution"],2),Vf(e,t)}var kf=ln.c.newInstance(wf,"vtkOpenGLRenderWindow");Os("WebGL",kf);var Wf={newInstance:kf,extend:wf,pushMonitorGLContextCount:function(e){Gf.push(e)},popMonitorGLContextCount:function(e){return Gf.pop()}},xf={Device:{Unknown:0,LeftController:1,RightController:2},Input:{Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4}};function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,i=n?"addEventListener":"removeEventListener",l=n?"removeEventListener":"addEventListener";!a&&!n&&r>0&&--r,r&&!a||(r=0,t.container&&t.container[l]("mousemove",e.handleMouseMove),o[i]("mouseup",e.handleMouseUp),o[i]("mousemove",e.handleMouseMove),o[i]("touchend",e.handleTouchEnd,!1),o[i]("touchcancel",e.handleTouchEnd,!1),o[i]("touchmove",e.handleTouchMove,!1)),!a&&n&&++r}function g(){t.view&&t.enabled&&t.enableRender&&(t.inRender=!0,t.view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.start=function(){(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=function(e){Hf("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=function(n){t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=function(){t.initialized=!0,e.enable(),e.render()},e.enable=function(){return e.setEnabled(!0)},e.disable=function(){return e.setEnabled(!1)},e.startEventLoop=function(){return Nf("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||a(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Mf),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("mouseenter",e.handleMouseEnter),n.addEventListener("mouseleave",e.handleMouseLeave),n.addEventListener("mousemove",e.handleMouseMove),n.addEventListener("mousedown",e.handleMouseDown),document.querySelector("body").addEventListener("keypress",e.handleKeyPress),document.querySelector("body").addEventListener("keydown",e.handleKeyDown),document.querySelector("body").addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){c(!1,!0),t.container.removeEventListener("contextmenu",Mf),t.container.removeEventListener("wheel",e.handleWheel),t.container.removeEventListener("DOMMouseScroll",e.handleWheel),t.container.removeEventListener("mouseenter",e.handleMouseEnter),t.container.removeEventListener("mouseleave",e.handleMouseLeave),t.container.removeEventListener("mousemove",e.handleMouseMove),t.container.removeEventListener("mousedown",e.handleMouseDown),document.querySelector("body").removeEventListener("keypress",e.handleKeyPress),document.querySelector("body").removeEventListener("keydown",e.handleKeyDown),document.querySelector("body").removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=s(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=s(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=s(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){c(!0),t.stopPropagation(),t.preventDefault();var n=Jf(Jf({},l(t)),{},{position:o(t)});switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:Hf("Unknown mouse button pressed: ".concat(t.button))}}},e.requestPointerLock=function(){e.getView().getCanvas().requestPointerLock()},e.exitPointerLock=function(){return document.exitPointerLock()},e.isPointerLocked=function(){return!!document.pointerLockElement},e.handlePointerLockChange=function(){e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=function(r){void 0!==r?n.has(r)?Nf("requester is already registered for animating"):(n.add(r),1===n.size&&(t.lastFrameTime=.1,t.lastFrameStart=Date.now(),t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):Hf("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!a){var o=r&&r.getClassName?r.getClassName():r;Nf("".concat(o," did not request an animation"))}},e.switchToVRAnimation=function(){t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.vrAnimation=!0},e.returnFromVRAnimation=function(){t.vrAnimation=!1,0!==n.size&&(t.FrameTime=-1,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateGamepads=function(n){for(var r=navigator.getGamepads(),a=0;a1){var r=i(n.touches);if(2===n.touches.length){var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(a)}e.recognizeGesture("TouchStart",r)}else{var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}},e.handleTouchMove=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures&&n.touches.length>1){var r=i(n.touches);e.recognizeGesture("TouchMove",r)}else{var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(a)}},e.handleTouchEnd=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures)if(0===n.touches.length)if(1===n.changedTouches.length){var r={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(r),c(!1)}else{var a=i(n.changedTouches);e.recognizeGesture("TouchEnd",a),c(!1)}else if(1===n.touches.length){var l=i(n.changedTouches);e.recognizeGesture("TouchEnd",l);var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}else{var g=i(n.touches);e.recognizeGesture("TouchMove",g)}else{var u={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(u),c(!1)}},e.setView=function(n){t.view!==n&&(t.view=n,t.view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=function(){return t.view.getRenderable().getRenderersByReference()[0]},e.findPokedRenderer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.view)return null;var r=t.view.getRenderable().getRenderers();r.sort((function(e,t){return e.getLayer()-t.getLayer()}));for(var a=null,o=null,i=null,l=r.length;l--;){var s=r[l];if(t.view.isInViewport(e,n,s)&&s.getInteractive()){i=s;break}null===a&&s.getInteractive()&&(a=s),null===o&&t.view.isInViewport(e,n,s)&&(o=s)}return null===i&&(i=a),null===i&&(i=o),null==i&&(i=r[0]),i},e.render=function(){null!==t.animationRequest||t.inRender||g()},Kf.forEach((function(n){var r=n.charAt(0).toLowerCase()+n.slice(1);e["".concat(r,"Event")]=function(r){if(t.enabled)if(e.getCurrentRenderer()){var a=Jf({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](a)}else Ff("\n Can not forward events without a current renderer on the interactor.\n ")}})),e.recognizeGesture=function(n,r){if(!(Object.keys(r).length>2)){if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((function(e){t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});var a=0,o=[],i=[];Object.keys(r).forEach((function(e){o[a]=r[e],i[a]=t.startingEventPositions[e],a++}));var l=Math.sqrt((i[0].x-i[1].x)*(i[0].x-i[1].x)+(i[0].y-i[1].y)*(i[0].y-i[1].y)),s=Math.sqrt((o[0].x-o[1].x)*(o[0].x-o[1].x)+(o[0].y-o[1].y)*(o[0].y-o[1].y)),c=Object(Xo.F)(Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)),g=Object(Xo.F)(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),u=g-c;g=g+180>=360?g-180:g+180,c=c+180>=360?c-180:c+180,Math.abs(g-c)m&&f>p&&f>C){t.currentGesture="Pinch";var I={scale:1,touches:r};e.startPinchEvent(I)}else if(p>m&&p>C){t.currentGesture="Rotate";var h={rotation:0,touches:r};e.startRotateEvent(h)}else if(C>m){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var y={rotation:u,touches:r};e.rotateEvent(y)}if("Pinch"===t.currentGesture){var v={scale:s/l,touches:r};e.pinchEvent(v)}if("Pan"===t.currentGesture){var Z={translation:d,touches:r};e.panEvent(Z)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()};var u=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),u()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Df={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,view:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{}};function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Df,n),ln.c.obj(e,t),ln.c.event(e,t,"RenderEvent"),Kf.forEach((function(n){return ln.c.event(e,t,n)})),ln.c.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),ln.c.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Lf(e,t)}var Uf=Jf({newInstance:ln.c.newInstance(Ef,"vtkRenderWindowInteractor"),extend:Ef,handledEvents:Kf},xf),zf=ln.c.vtkDebugMacro;function _f(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),o=Object(Yo.h)(new Float64Array(16)),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3),c=Object(Yo.h)(new Float64Array(16)),g=Object(Yo.h)(new Float64Array(16)),u=new Float64Array(3),d=new Float64Array(3);function m(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=function(){var n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=function(n,r,a){n===t.position[0]&&r===t.position[1]&&a===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,a){n===t.focalPoint[0]&&r===t.focalPoint[1]&&a===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,zf("Distance is set to minimum."));var r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()}},e.computeDistance=function(){var e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,zf("Distance is set to minimum.");var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,m()},e.dolly=function(n){if(!(n<=0)){var r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])}},e.roll=function(n){var r=t.position,a=t.focalPoint,o=t.viewUp,i=new Float64Array([o[0],o[1],o[2],0]);Object(Yo.h)(c);var l=new Float64Array([a[0]-r[0],a[1]-r[1],a[2]-r[2]]);Object(Yo.q)(c,c,Object(Xo.B)(n),l),bg(i,i,c),t.viewUp[0]=i[0],t.viewUp[1]=i[1],t.viewUp[2]=i[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.yaw=function(n){var r=t.position;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint(d[0],d[1],d[2])},e.elevation=function(n){var r=t.focalPoint,a=e.getViewMatrix(),o=[-a[0],-a[1],-a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.pitch=function(n){var r=t.position,a=e.getViewMatrix(),o=[a[0],a[1],a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint.apply(e,Object(Ao.a)(d))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,a){var o=[n,r,a];Object(Xo.x)(t.position,o,t.position),Object(Xo.x)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(Object(Ao.a)(t.viewUp),[1]),a=[],o=[],i=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],bg(a,[].concat(Object(Ao.a)(t.position),[1]),n),bg(o,[].concat(Object(Ao.a)(t.focalPoint),[1]),n),bg(i,r,n),i[0]-=a[0],i[1]-=a[1],i[2]-=a[2],e.setPosition.apply(e,Object(Ao.a)(a.slice(0,3))),e.setFocalPoint.apply(e,Object(Ao.a)(o.slice(0,3))),e.setViewUp.apply(e,Object(Ao.a)(i.slice(0,3)))},e.getThickness=function(){return t.clippingRange[1]-t.clippingRange[0]},e.setThickness=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=function(e){},e.getRoll=function(){},e.setObliqueAngles=function(e,t){},e.getOrientation=function(){},e.getOrientationWXYZ=function(){},e.getFrustumPlanes=function(e){},e.getCameraLightTransformMatrix=function(){},e.deepCopy=function(e){},e.physicalOrientationToWorldDirection=function(e){var t,n,r=Ag(e[0],e[1],e[2],e[3]),a=yg(),o=Ag(0,0,1,0);return n=r,(t=a)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Zg(o,r,o),Zg(o,o,a),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Object(Yo.g)(t,t)},e.getWorldToPhysicalMatrix=function(e){Object(Yo.h)(e);var n=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Object(Yo.i)(e,e),Object(Fo.p)(i,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Object(Yo.r)(e,e,i),Object(Yo.s)(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(c){Object(Yo.g)(o,c),Object(Fo.q)(i,n,o),e.computeDistance();var g=t.distance;e.setPosition(i[0],i[1],i[2]),Object(Fo.q)(l,r,o),Object(Fo.a)(l,l,i),Object(Fo.l)(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),Object(Fo.q)(s,a,o),Object(Fo.a)(s,s,i),Object(Fo.l)(s,s),e.setViewUp(s[0],s[1],s[2]),e.setDistance(g)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Object(Yo.l)(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Object(Yo.d)(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Object(Yo.i)(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;Object(Yo.k)(o,t.position,t.focalPoint,t.viewUp),Object(Yo.i)(o,o);var e=new Float64Array(16);return Object(Yo.d)(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var a=new Float64Array(16);if(Object(Yo.h)(a),t.projectionMatrix){var l=1/t.physicalScale;return Object(Fo.p)(i,l,l,l),Object(Yo.d)(a,t.projectionMatrix),Object(Yo.r)(a,a,i),Object(Yo.i)(a,a),a}Object(Yo.h)(o);var s=t.clippingRange[1]-t.clippingRange[0],c=[t.clippingRange[0]+(n+1)*s/2,t.clippingRange[0]+(r+1)*s/2];if(t.parallelProjection){var g=t.parallelScale*e,u=t.parallelScale,d=(t.windowCenter[0]-1)*g,m=(t.windowCenter[0]+1)*g,f=(t.windowCenter[1]-1)*u,p=(t.windowCenter[1]+1)*u;Object(Yo.n)(o,d,m,f,p,c[0],c[1]),Object(Yo.i)(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var C,I,h=Math.tan(Object(Xo.B)(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(C=t.clippingRange[0]*h,I=t.clippingRange[0]*h/e):(C=t.clippingRange[0]*h*e,I=t.clippingRange[0]*h);var b=(t.windowCenter[0]-1)*C,y=(t.windowCenter[0]+1)*C,v=(t.windowCenter[1]-1)*I,Z=(t.windowCenter[1]+1)*I,A=c[0],G=c[1];o[0]=2*A/(y-b),o[5]=2*A/(Z-v),o[2]=(b+y)/(y-b),o[6]=(v+Z)/(Z-v),o[10]=-(A+G)/(G-A),o[14]=-1,o[11]=-2*A*G/(G-A),o[15]=0}return Object(Yo.d)(a,o),a},e.getCompositeProjectionMatrix=function(t,n,r){var a=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Object(Yo.l)(o,a,o),o},e.setDirectionOfProjection=function(e,n,r){if(t.directionOfProjection[0]!==e||t.directionOfProjection[1]!==n||t.directionOfProjection[2]!==r){t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,m()}},e.setDeviceAngles=function(n,r,a,o){var i=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,i);var l=Object(Yo.h)(new Float64Array(16));Object(Yo.q)(l,l,Object(Xo.B)(n),t.physicalViewUp),Object(Yo.q)(l,l,Object(Xo.B)(r),i),Object(Yo.q)(l,l,Object(Xo.B)(a),t.physicalViewNorth),Object(Yo.q)(l,l,Object(Xo.B)(-o),t.physicalViewUp);var s=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),c=new Float64Array(t.physicalViewNorth);Object(Fo.q)(s,s,l),Object(Fo.q)(c,c,l),e.setDirectionOfProjection(s[0],s[1],s[2]),e.setViewUp(c[0],c[1],c[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,a){var o=Object(Yo.h)(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==a)){var i=Object(Xo.B)(t),l=yg();vg(l,[n,r,a],i),Object(Yo.j)(o,l)}var s=new Float64Array(3);Object(Fo.q)(s,[0,0,-1],o);var c=new Float64Array(3);Object(Fo.q)(c,[0,1,0],o),e.setDirectionOfProjection.apply(e,Object(Ao.a)(s)),e.setViewUp.apply(e,Object(Ao.a)(c)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var a=-n[0],o=-n[1],i=-n[2],l=-(a*r[0]+o*r[1]+i*r[2]),s=[a*e[0]+o*e[2]+i*e[4]+l,1e-18],c=0;c<2;c++)for(var g=0;g<2;g++)for(var u=0;u<2;u++){var d=a*e[u]+o*e[2+g]+i*e[4+c]+l;s[0]=ds[1]?d:s[1]}return s}}var jf={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function Qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jf,n),ln.c.obj(e,t),ln.c.get(e,t,["distance"]),ln.c.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),ln.c.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),ln.c.setGetArray(e,t,["clippingRange","windowCenter"],2),ln.c.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),_f(e,t)}var qf={newInstance:ln.c.newInstance(Qf,"vtkCamera"),extend:Qf};function $f(e,t){t.classHierarchy.push("vtkLight"),e.getTransformedPosition=function(){return t.transformMatrix?[]:[].concat(t.position)},e.getTransformedFocalPoint=function(){return t.transformMatrix?[]:[].concat(t.focalPoint)},e.getDirection=function(){return t.directionMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ep,n),ln.c.obj(e,t),ln.c.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),ln.c.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),$f(e,t)}var np={newInstance:ln.c.newInstance(tp,"vtkLight"),extend:tp,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},rp=ln.c.vtkErrorMacro;function ap(e,t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);var r=e.getNestedProps();if(r&&r.length)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,op,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),ln.c.setGetArray(e,t,["viewport"],4),ln.c.setGetArray(e,t,["background","background2"],3),ap(e,t)}var lp={newInstance:ln.c.newInstance(ip,"vtkViewport"),extend:ip},sp=ln.l,cp=ln.m,gp=ln.n;function up(e){return function(){return cp("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function dp(e,t){for(t.classHierarchy.push("vtkRenderer"),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1);var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},a={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(sp("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0},e.updateLightsGeometryToFollowCamera=function(){var n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((function(e){e.lightTypeIsSceneLight()||e.lightTypeIsCameraLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):cp("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=up("allocateTime"),e.updateGeometry=up("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){sp(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=function(n){return t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0)},e.makeCamera=function(){var t=qf.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=function(){return t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera},e.getActiveCameraAndResetIfCreated=function(){return t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera},e.getActors=function(){return t.actors=[],t.props.forEach((function(e){t.actors=t.actors.concat(e.getActors())})),t.actors},e.addActor=e.addViewProp,e.removeActor=function(n){t.actors=t.actors.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllActors=function(){e.getActors().forEach((function(t){e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=function(){return t.volumes=[],t.props.forEach((function(e){t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes},e.addVolume=e.addViewProp,e.removeVolume=function(n){t.volumes=t.volumes.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllVolumes=function(){e.getVolumes().forEach((function(t){e.removeViewProp(t)})),t.volumes=[],e.modified()},e.addLight=function(n){t.lights=[].concat(t.lights,n),e.modified()},e.removeLight=function(n){t.lights=t.lights.filter((function(e){return e!==n})),e.modified()},e.removeAllLights=function(){t.lights=[],e.modified()},e.setLightCollection=function(n){t.lights=n,e.modified()},e.makeLight=np.newInstance,e.createLight=function(){t.automaticLightCreation&&(t.createdLight&&(e.removeLight(t.createdLight),t.createdLight.delete(),t.createdLight=null),t.createdLight=e.makeLight(),e.addLight(t.createdLight),t.createdLight.setLightTypeToHeadLight(),t.createdLight.setPosition(e.getActiveCamera().getPosition()),t.createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=function(t,n,r,a){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],a),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,a){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],a),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return cp("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.g)(a,a),Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.projectionToView=function(e,n,r,a){if(null===t.activeCamera)return cp("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.g)(o,o),Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.worldToView=function(e,n,r){if(null===t.activeCamera)return cp("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.viewToProjection=function(e,n,r,a){if(null===t.activeCamera)return cp("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.computeVisiblePropBounds=function(){t.allBounds[0]=Ol.INIT_BOUNDS[0],t.allBounds[1]=Ol.INIT_BOUNDS[1],t.allBounds[2]=Ol.INIT_BOUNDS[2],t.allBounds[3]=Ol.INIT_BOUNDS[3],t.allBounds[4]=Ol.INIT_BOUNDS[4],t.allBounds[5]=Ol.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var a=0;at.allBounds[1]&&(t.allBounds[1]=i[1]),i[2]t.allBounds[3]&&(t.allBounds[3]=i[3]),i[4]t.allBounds[5]&&(t.allBounds[5]=i[5]))}}return r&&(Object(Xo.D)(t.allBounds),sp("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!Object(Xo.l)(r))return sp("Cannot reset camera!"),!1;var i=null;if(!e.getActiveCamera())return cp("Trying to reset non-existent camera"),!1;i=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;var l=r[1]-r[0],s=r[3]-r[2],c=r[5]-r[4],g=(l*=l)+(s*=s)+(c*=c);g=0===g?1:g,g=.5*Math.sqrt(g);var u=Object(Xo.B)(t.activeCamera.getViewAngle()),d=g,m=g/Math.sin(.5*u),f=t.activeCamera.getViewUp();return Math.abs(Object(Xo.q)(f,i))>.999&&(gp("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-f[2],f[0],f[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+m*i[0],o[1]+m*i[1],o[2]+m*i[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(d),t.activeCamera.setPhysicalScale(g),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(a),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=n||e.computeVisiblePropBounds();if(!Object(Xo.l)(a))return sp("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return cp("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(a),i=0;if(t.activeCamera.getParallelProjection())i=.1*t.activeCamera.getParallelScale();else{var l=Object(Xo.B)(t.activeCamera.getViewAngle());i=.2*Math.tan(l/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]e&&(e=n);var r=t.createdLight?t.createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=function(){return!!t.preserveColorBuffer},e.isActiveCameraCreated=function(){return!!t.activeCamera}}var mp={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,createdLight:null,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:Object(Xo.j)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,pass:0};function fp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mp,n),lp.extend(e,t,n),Object(ln.e)(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Object(ln.j)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Object(ln.f)(e,t,["actors","volumes","lights"]),Object(ln.k)(e,t,["background"],4,1),dp(e,t)}var pp={newInstance:Object(ln.g)(fp,"vtkRenderer"),extend:fp};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),ln.c.obj(e,t),ln.c.event(e,t,"InteractionEvent"),ln.c.event(e,t,"StartInteractionEvent"),ln.c.event(e,t,"EndInteractionEvent"),ln.c.get(e,t,["interactor","enabled"]),ln.c.setGet(e,t,["priority","processEvents"]),yp(e,t)}var Ap=Ip({newInstance:ln.c.newInstance(Zp,"vtkInteractorObserver"),extend:Zp},{computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}}),Gp={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}};function Sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bp=Gp.States,Vp={Rotate:Bp.IS_ROTATE,Pan:Bp.IS_PAN,Spin:Bp.IS_SPIN,Dolly:Bp.IS_DOLLY,CameraPose:Bp.IS_CAMERA_POSE,WindowLevel:Bp.IS_WINDOW_LEVEL,Slice:Bp.IS_SLICE};function Rp(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Vp).forEach((function(n){ln.c.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===Bp.IS_NONE&&(t.state=Vp[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},ln.c.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Vp[n]&&(t.state=Bp.IS_NONE,t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e["invokeEnd".concat(n,"Event")]({type:"End".concat(n,"Event")}),t.interactor.render())}})),e.handleKeyPress=function(e){var n=t.interactor;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}var wp={state:Bp.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function kp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wp,n),Ap.extend(e,t,n),Rp(e,t)}var Wp=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pp,n),Wp.extend(e,t,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),ln.c.setGetArray(e,t,["centerOfRotation"],3),Fp(e,t)}var Mp=function(e){for(var t=1;te&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Lp("pick"),e.hasKey=Lp("hasKey"),e.getRedrawMTime=function(){return t.mtime},e.setEstimatedRenderTime=function(e){t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=function(){t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=function(e){t.estimatedRenderTime+=e},e.setAllocatedRenderTime=function(e){t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=function(){return!1},e.getTextures=function(){return t.textures},e.hasTexture=function(e){return-1!==t.textures.indexOf(e)},e.addTexture=function(n){n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=function(n){var r=t.textures.filter((function(e){return e!==n}));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=function(){t.textures=[],e.modified()}}var Ep={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ep,n),ln.c.obj(e,t),ln.c.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),ln.c.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Dp(e,t)}var zp={newInstance:ln.c.newInstance(Up,"vtkProp"),extend:Up};function _p(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=function(n){t.position=t.position.map((function(e,t){return e+n[t]})),e.modified()},e.getOrientationWXYZ=function(){var e=yg();Object(Yo.m)(e,t.rotation);var n=new Float64Array(3),r=function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ml.b?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}(n,e);return[Object(Xo.F)(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Object(Yo.a)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateY=function(n){0!==n&&(Object(Yo.b)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Object(Yo.c)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateWXYZ=function(n,r,a,o){if(0!==n&&(0!==r||0!==a||0!==o)){var i=Object(Xo.B)(n),l=yg();vg(l,[r,a,o],i);var s=new Float64Array(16);Object(Yo.j)(s,l),Object(Yo.l)(t.rotation,t.rotation,s),e.modified()}},e.setOrientation=function(n,r,a){return(n!==t.orientation[0]||r!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[n,r,a],Object(Yo.h)(t.rotation),e.rotateZ(a),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Object(Yo.d)(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Object(Yo.h)(t.matrix),t.userMatrix&&Object(Yo.l)(t.matrix,t.matrix,t.userMatrix),Object(Yo.s)(t.matrix,t.matrix,t.origin),Object(Yo.s)(t.matrix,t.matrix,t.position),Object(Yo.l)(t.matrix,t.matrix,t.rotation),Object(Yo.r)(t.matrix,t.matrix,t.scale),Object(Yo.s)(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Object(Yo.i)(t.matrix,t.matrix),t.isIdentity=!0;for(var n=0;n<4;++n)for(var r=0;r<4;++r)(n===r?1:0)!==t.matrix[n+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=function(){return Ol.getCenter(t.bounds)},e.getLength=function(){return Ol.getLength(t.bounds)},e.getXRange=function(){return Ol.getXRange(t.bounds)},e.getYRange=function(){return Ol.getYRange(t.bounds)},e.getZRange=function(){return Ol.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var jp={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Qp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jp,n),zp.extend(e,t,n),t.matrixMTime={},ln.c.obj(t.matrixMTime),ln.c.get(e,t,["bounds","isIdentity"]),ln.c.getArray(e,t,["orientation"]),ln.c.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Object(Yo.h)(new Float64Array(16)),t.rotation=Object(Yo.h)(new Float64Array(16)),t.userMatrix=Object(Yo.h)(new Float64Array(16)),t.transform=null,_p(e,t)}var qp={newInstance:ln.c.newInstance(Qp,"vtkProp3D"),extend:Qp};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var eC=ln.c.vtkDebugMacro;function tC(e,t){t.classHierarchy.push("vtkActor");var n=function(e){for(var t=1;t=1;return(n=n&&(!t.texture||!t.texture.isTranslucent()))&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque())},e.makeProperty=hg.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){eC("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Ol.getCorners(n,r),e.computeMatrix();var a=new Float64Array(16);Object(Yo.i)(a,t.matrix),r.forEach((function(e){return Object(Fo.q)(e,e,a)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?r.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):r.reduce((function(e,n){return ee?r:e}if(null!==t.backfaceProperty){var a=t.backfaceProperty.getMTime();e=a>e?a:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var nC={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nC,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),tC(e,t)}var aC={newInstance:ln.c.newInstance(rC,"vtkActor"),extend:rC};function oC(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,a,o){if(t.callback){var i=n.getCompositeProjectionMatrix(r,-1,1);Object(Yo.i)(i,i);for(var l=e.getPoints(),s=new Float64Array(3),c=a.usize,g=a.vsize,u=c/2,d=g/2,m=[],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iC,n),Pu.extend(e,t,n),ln.c.setGet(e,t,["callback","useZValues"]),oC(e,t)}var sC={newInstance:ln.c.newInstance(lC,"vtkPixelSpaceCallbackMapper"),extend:lC};function cC(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=function(){t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setImage=function(n){t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null)),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())}}var gC={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function uC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gC,n),ln.c.obj(e,t),ln.c.algo(e,t,6,0),ln.c.get(e,t,["imageLoaded"]),ln.c.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),cC(e,t)}var dC={newInstance:ln.c.newInstance(uC,"vtkTexture"),extend:uC};function mC(e){return+e}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var CC=e=>()=>e;function IC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):CC(isNaN(e)?t:e)}function hC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yC(){}var vC="\\s*([+-]?\\d+)\\s*",ZC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GC=/^#([0-9a-f]{3,8})$/,SC=new RegExp("^rgb\\("+[vC,vC,vC]+"\\)$"),BC=new RegExp("^rgb\\("+[AC,AC,AC]+"\\)$"),VC=new RegExp("^rgba\\("+[vC,vC,vC,ZC]+"\\)$"),RC=new RegExp("^rgba\\("+[AC,AC,AC,ZC]+"\\)$"),wC=new RegExp("^hsl\\("+[ZC,AC,AC]+"\\)$"),kC=new RegExp("^hsla\\("+[ZC,AC,AC,ZC]+"\\)$"),WC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xC(){return this.rgb().formatHex()}function TC(){return this.rgb().formatRgb()}function JC(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XC(t):3===n?new YC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?OC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?OC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SC.exec(e))?new YC(t[1],t[2],t[3],1):(t=BC.exec(e))?new YC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VC.exec(e))?OC(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?OC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wC.exec(e))?MC(t[1],t[2]/100,t[3]/100,1):(t=kC.exec(e))?MC(t[1],t[2]/100,t[3]/100,t[4]):WC.hasOwnProperty(e)?XC(WC[e]):"transparent"===e?new YC(NaN,NaN,NaN,0):null}function XC(e){return new YC(e>>16&255,e>>8&255,255&e,1)}function OC(e,t,n,r){return r<=0&&(e=t=n=NaN),new YC(e,t,n,r)}function NC(e){return e instanceof yC||(e=JC(e)),e?new YC((e=e.rgb()).r,e.g,e.b,e.opacity):new YC}function HC(e,t,n,r){return 1===arguments.length?NC(e):new YC(e,t,n,null==r?1:r)}function YC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FC(){return"#"+KC(this.r)+KC(this.g)+KC(this.b)}function PC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function KC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function MC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DC(e,t,n,r)}function LC(e){if(e instanceof DC)return new DC(e.h,e.s,e.l,e.opacity);if(e instanceof yC||(e=JC(e)),!e)return new DC;if(e instanceof DC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-a,s=(o+a)/2;return l?(i=t===o?(n-r)/l+6*(n0&&s<1?0:i,new DC(i,l,s,e.opacity)}function DC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function EC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hC(yC,JC,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xC,formatHex:xC,formatHsl:function(){return LC(this).formatHsl()},formatRgb:TC,toString:TC}),hC(YC,HC,bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FC,formatHex:FC,formatRgb:PC,toString:PC})),hC(DC,(function(e,t,n,r){return 1===arguments.length?LC(e):new DC(e,t,n,null==r?1:r)}),bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new YC(EC(e>=240?e-240:e+120,a,r),EC(e,a,r),EC(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var UC=function e(t){var n=function(e){return 1==(e=+e)?IC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):CC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=HC(e)).r,(t=HC(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=IC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function zC(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;ni&&(a=t.slice(i,a),s[l]?s[l]+=a:s[++l]=a),(n=n[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,c.push({i:l,x:fC(n,r)})),i=qC.lastIndex;return it?1:e>=t?0:NaN}function rI(e){let t=e,n=e;function r(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)<0?r=o+1:a=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>nI(e(t),n)}(e)),{left:r,center:function(e,n,a,o){null==a&&(a=0),null==o&&(o=e.length);const i=r(e,n,a,o-1);return i>a&&t(e[i-1],n)>-t(e[i],n)?i-1:i},right:function(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)>0?a=o:r=o+1}return r}}}const aI=rI(nI).right;rI((function(e){return null===e?NaN:+e})).center;var oI=[0,1];function iI(e){return e}function lI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function sI(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return at&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=s>2?cI:sI,a=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),l,s)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(l,i.map(e),fC)))(n)))},u.domain=function(e){return arguments.length?(i=Array.from(e,mC),g()):i.slice()},u.range=function(e){return arguments.length?(l=Array.from(e),g()):l.slice()},u.rangeRound=function(e){return l=Array.from(e),s=pC,g()},u.clamp=function(e){return arguments.length?(c=!!e||iI,g()):c!==iI},u.interpolate=function(e){return arguments.length?(s=e,g()):s},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,g()}}()(iI,iI)}function dI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mI,fI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pI(e){if(!(t=fI.exec(e)))throw new Error("invalid format: "+e);var t;return new CI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CI(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hI(e){return(e=II(Math.abs(e)))?e[1]:NaN}function bI(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}pI.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bI(100*e,t),r:bI,s:function(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(mI=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+II(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vI(e){return e}var ZI,AI,GI,SI=Array.prototype.map,BI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ZI=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?vI:(t=SI.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?vI:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(SI.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=pI(e)).fill,n=e.align,u=e.sign,d=e.symbol,m=e.zero,f=e.width,p=e.comma,C=e.precision,I=e.trim,h=e.type;"n"===h?(p=!0,h="g"):yI[h]||(void 0===C&&(C=12),I=!0,h="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===d?o:/[%p]/.test(h)?s:"",v=yI[h],Z=/[defgprs%]/.test(h);function A(e){var a,o,s,d=b,A=y;if("c"===h)A=v(e)+A,e="";else{var G=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:v(Math.abs(e),C),I&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),G&&0==+e&&"+"!==u&&(G=!1),d=(G?"("===u?u:c:"-"===u||"("===u?"":u)+d,A=("s"===h?BI[8+mI/3]:"")+A+(G&&"("===u?")":""),Z)for(a=-1,o=e.length;++a(s=e.charCodeAt(a))||s>57){A=(46===s?i+e.slice(a+1):e.slice(a))+A,e=e.slice(0,a);break}}p&&!m&&(e=r(e,1/0));var S=d.length+e.length+A.length,B=S>1)+d+e+A+B.slice(S);break;default:e=B+d+e+A}return l(e)}return C=void 0===C?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=u(((e=pI(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hI(t)/3))),a=Math.pow(10,-r),o=BI[8+r/3];return function(e){return n(a*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),AI=ZI.format,GI=ZI.formatPrefix;var VI=Math.sqrt(50),RI=Math.sqrt(10),wI=Math.sqrt(2);function kI(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=VI?10:o>=RI?5:o>=wI?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=VI?10:o>=RI?5:o>=wI?2:1)}function WI(e,t,n,r){var a,o,i,l,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=VI?a*=10:o>=RI?a*=5:o>=wI&&(a*=2),t0)return[e];if((r=t0){let n=Math.round(e/i),r=Math.round(t/i);for(n*it&&--r,o=new Array(a=r-n+1);++lt&&--r,o=new Array(a=r-n+1);++l0;){if((a=kI(s,c,n))===r)return o[i]=s,o[l]=c,t(o);if(a>0)s=Math.floor(s/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function TI(){var e=uI();return e.copy=function(){return gI(e,TI())},dI.apply(e,arguments),xI(e)}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XI(e){for(var t=1;ta,t.camera.getParallelProjection()||(Object(Fo.l)(LI,LI),i=Object(Fo.d)(LI,MI)>a)),i!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=i,n=!0)}return n},e.updatePolyData=function(e,n,r){var a=0,o=0;a+=8;for(var i=0,l=0;l<12;l++)n[l]>0&&i++;if(o+=i,t.gridLines)for(var s=0;s<6;s++)e[s]&&(a+=2*r[FI[s][0]].length+2*r[FI[s][1]].length,o+=r[FI[s][0]].length+r[FI[s][1]].length);for(var c=new Float64Array(3*a),g=new Uint32Array(3*o),u=0,d=0,m=0;m<2;m++)for(var f=0;f<2;f++)for(var p=0;p<2;p++)c[3*u]=t.dataBounds[p],c[3*u+1]=t.dataBounds[2+f],c[3*u+2]=t.dataBounds[4+m],u++;for(var C=0;C<12;C++)n[C]>0&&(g[3*d]=2,g[3*d+1]=HI[C][0],g[3*d+2]=HI[C][1],d++);if(t.gridLines)for(var I=0;I<6;I++)if(e[I]){for(var h=Math.floor(I/2),b=r[FI[I][0]],y=0;y.5?Object(Fo.b)(MI,DI,i[0]*l):Object(Fo.b)(MI,DI,i[0]*l-c.width/2),Object(Fo.g)(PI,PI,MI),Object(Fo.b)(MI,EI,i[1]*l-c.height/2),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[0],s.tcoords[2*m+1]=c.tcoords[1],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[2],s.tcoords[2*m+1]=c.tcoords[3],m++,Object(Fo.b)(MI,EI,c.height),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[4],s.tcoords[2*m+1]=c.tcoords[5],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.a)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[6],s.tcoords[2*m+1]=c.tcoords[7],m++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-3,s.polys[4*f+3]=m-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-2,s.polys[4*f+3]=m-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n);var r=t.textValues.length,a=4*r,o=2*r,i=new Float64Array(3*a),l=new Uint16Array(4*o),s=new Float32Array(2*a);Object(Yo.g)(UI,n);for(var c={ptIdx:0,cellIdx:0,polys:l,points:i,tcoords:s},g=0,u=0,d=0,m=t.textPolyData.getPoints().getData();g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jI(n)),aC.extend(e,t,n),t.lastSize=[800,800],t.lastAspectRatio=1,t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.mapper=Pu.newInstance(),t.polyData=Go.a.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,a,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=aC.newInstance(),t.pixelActor.setMapper(t.pixelMapper),ln.c.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),ln.c.setGetArray(e,t,["dataBounds"],6),ln.c.setGetArray(e,t,["axisLabels"],3),ln.c.get(e,t,["axisTextStyle","tickTextStyle","camera"]),_I(e,t)}var qI={newInstance:ln.c.newInstance(QI,"vtkCubeAxesActor"),extend:QI};function $I(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=function(e,n){var r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}var eh={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var th={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eh,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.setGetArray(e,t,["displayCenter"],2),ln.c.setGetArray(e,t,["center"],3),$I(e,t)}};function nh(e,t){t.classHierarchy.push("vtkCompositeMouseManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onButtonDown=function(e,t,n){},e.onButtonUp=function(e){},e.onMouseMove=function(e,t,n){},e.onStartScroll=function(e,t,n){},e.onScroll=function(e,t,n){},e.onEndScroll=function(e){},e.isDragEnabled=function(){return t.dragEnabled},e.isScrollEnabled=function(){return t.scrollEnabled}}var rh={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var ah={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rh,n),ln.c.setGet(e,t,["button","shift","control","alt"]),ln.c.set(e,t,["dragEnabled","scrollEnabled"]),nh(e,t)}};function oh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,c,g){if(g){var u=c.getActiveCamera(),d=u.getPosition(),m=u.getFocalPoint();Object(Yo.h)(o);var f=t.center,p=t.rotationFactor;Object(Yo.s)(o,o,f);var C=t.previousPosition.x-g.x,I=t.previousPosition.y-g.y,h=e.getView().getSize(),b=u.getViewUp();Object(Yo.q)(o,o,Object(Xo.B)(360*C/h[0]*p),b),Object(Xo.w)(u.getDirectionOfProjection(),b,i),Object(Yo.q)(o,o,Object(Xo.B)(-360*I/h[1]*p),i),l[0]=-f[0],l[1]=-f[1],l[2]=-f[2],Object(Yo.s)(o,o,l),Object(Fo.q)(n,d,o),Object(Fo.q)(r,m,o),s[0]=b[0]+d[0],s[1]=b[1]+d[1],s[2]=b[2]+d[2],Object(Fo.q)(a,s,o),u.setPosition(n[0],n[1],n[2]),u.setFocalPoint(r[0],r[1],r[2]),u.setViewUp(a[0]-n[0],a[1]-n[1],a[2]-n[2]),u.orthogonalizeViewUp(),c.resetCameraClippingRange(),e.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=g}}}var ih={};function lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ih,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),oh(e,t)}var sh={newInstance:ln.c.newInstance(lh,"vtkMouseCameraTrackballRotateManipulator"),extend:lh};function ch(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(c,g,u){if(u){var d=g.getActiveCamera(),m=d.getPosition(),f=d.getFocalPoint(),p=d.getViewUp();n[0]=f[0]-m[0],n[1]=f[1]-m[1],n[2]=f[2]-m[2],e.computeDisplayCenter(c.getInteractorStyle(),g);var C=t.previousPosition.x-t.displayCenter[0],I=u.x-t.displayCenter[0],h=t.previousPosition.y-t.displayCenter[1],b=u.y-t.displayCenter[1];if(!(0===I&&0===b||0===C&&0===h)){var y=Object(Xo.F)((C*b-h*I)/(Math.sqrt(C*C+h*h)*Math.sqrt(I*I+b*b))),v=t.center;Object(Yo.h)(o),a[0]=-v[0],a[1]=-v[1],a[2]=-v[2],Object(Yo.s)(o,o,v),Object(Yo.q)(o,o,Object(Xo.B)(y),n),Object(Yo.s)(o,o,a),Object(Fo.q)(i,m,o),Object(Fo.q)(l,f,o),r[0]=p[0]+m[0],r[1]=p[1]+m[1],r[2]=p[2]+m[2],Object(Fo.q)(s,r,o),d.setPosition(i[0],i[1],i[2]),d.setFocalPoint(l[0],l[1],l[2]),d.setViewUp(s[0]-i[0],s[1]-i[1],s[2]-i[2]),d.orthogonalizeViewUp(),g.resetCameraClippingRange(),c.getLightFollowCamera()&&g.updateLightsGeometryToFollowCamera(),t.previousPosition=u}}}}var gh={};function uh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),ch(e,t)}var dh={newInstance:ln.c.newInstance(uh,"vtkMouseCameraTrackballRollManipulator"),extend:uh};function mh(e){return e*e}function fh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=sh.newInstance(),r=dh.newInstance(),a=null;e.onButtonDown=function(t,o,i){var l,s,c=t.getView().getSize(),g=[.5*c[0],.5*c[1]],u=.9*((l=g[0])<(s=g[1])?s:l),d=mh(g[0]-i.x)+mh(g[1]-i.y);(a=u*u>d?n:r).setButton(e.getButton()),a.setShift(e.getShift()),a.setControl(e.getControl()),a.setCenter(e.getCenter()),a.onButtonDown(t,i)},e.onButtonUp=function(e){a&&a.onButtonUp(e)},e.onMouseMove=function(e,t,n){a&&a.onMouseMove(e,t,n)}}var ph={};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ph,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),fh(e,t)}var Ih={newInstance:ln.c.newInstance(Ch,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ch};function hh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var a=r,o=t.previousPosition;t.previousPosition=r;var i=n.getActiveCamera(),l=i.getPosition(),s=i.getFocalPoint();if(i.getParallelProjection()){i.orthogonalizeViewUp();var c=i.getViewUp(),g=i.getViewPlaneNormal(),u=[0,0,0];Object(Xo.w)(g,c,u);var d=e.getView().getSize()[1],m=(a.x-o.x)/d,f=(o.y-a.y)/d,p=i.getParallelScale();f*=2*p;var C=u[0]*(m*=2*p)+c[0]*f;l[0]+=C,s[0]+=C,C=u[1]*m+c[1]*f,l[1]+=C,s[1]+=C,C=u[2]*m+c[2]*f,l[2]+=C,s[2]+=C,i.setPosition(l[0],l[1],l[2]),i.setFocalPoint(s[0],s[1],s[2])}else{var I=t.center,h=e.getInteractorStyle(),b=h.computeWorldToDisplay(n,I[0],I[1],I[2])[2],y=h.computeDisplayToWorld(n,a.x,a.y,b),v=h.computeDisplayToWorld(n,o.x,o.y,b),Z=[l[0]+(v[0]-y[0]),l[1]+(v[1]-y[1]),l[2]+(v[2]-y[2])],A=[s[0]+(v[0]-y[0]),s[1]+(v[1]-y[1]),s[2]+(v[2]-y[2])];i.setPosition(Z[0],Z[1],Z[2]),i.setFocalPoint(A[0],A[1],A[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var bh={};function yh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),hh(e,t)}var vh={newInstance:ln.c.newInstance(yh,"vtkMouseCameraTrackballPanManipulator"),extend:yh};function Zh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var a=e.getView().getSize(),o=n.getActiveCamera(),i=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/a[1]*i;else{var l=o.getClippingRange();t.zoomScale=l[1]/a[1]*1.5*i}},e.onMouseMove=function(e,n,r){if(r){var a=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var i=a*t.zoomScale;o.setParallelScale((1-i)*o.getParallelScale())}else{var l=o.getPosition(),s=o.getFocalPoint(),c=o.getDirectionOfProjection(),g=a*t.zoomScale,u=g*c[0];l[0]+=u,s[0]+=u,u=g*c[1],l[1]+=u,s[1]+=u,u=g*c[2],l[2]+=u,s[2]+=u,o.getFreezeFocalPoint()||o.setFocalPoint(s[0],s[1],s[2]),o.setPosition(l[0],l[1],l[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),a=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/a):(r.dolly(a),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Ah={zoomScale:0,flipDirection:!1};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ah,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),ln.c.setGet(e,t,["flipDirection"]),Zh(e,t)}var Sh={newInstance:ln.c.newInstance(Gh,"vtkMouseCameraTrackballZoomManipulator"),extend:Gh};function Bh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,a){n(e,r,a),t.zoomPosition=a},e.onMouseMove=function(e,n,r){if(r){var a=(t.previousPosition.y-r.y)*t.zoomScale;Mp.dollyToPosition(1-a,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var a=1-.1*n;Mp.dollyToPosition(a,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Vh={zoomPosition:null};function Rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vh,n),Sh.extend(e,t,n),Bh(e,t)}var wh={newInstance:ln.c.newInstance(Rh,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Rh};function kh(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onStartPinch=function(e,t){},e.onStartRotate=function(e,t){},e.onStartPan=function(e,t){},e.onPinch=function(e,t,n){},e.onRotate=function(e,t,n){},e.onPan=function(e,t,n){},e.onEndPinch=function(e){},e.onEndRotate=function(e){},e.onEndPan=function(e){},e.isPinchEnabled=function(){return t.pinchEnabled},e.isPanEnabled=function(){return t.panEnabled},e.isRotateEnabled=function(){return t.rotateEnabled}}var Wh={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var xh={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wh,n),ln.c.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),ln.c.setGet(e,t,["interactorStyle"]),kh(e,t)}};function Th(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=function(e,n){t.previousScale=n},e.onStartRotate=function(e,n){t.previousRotation=n},e.onStartPan=function(e,n){t.previousTranslation=n},e.onPinch=function(e,n,r){Mp.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=function(e,n,r){var a=n.getActiveCamera(),o=e.getInteractorStyle(),i=a.getFocalPoint(),l=(i=o.computeWorldToDisplay(n,i[0],i[1],i[2]))[2],s=r,c=t.previousTranslation,g=o.computeDisplayToWorld(n,i[0]+s[0]-c[0],i[1]+s[1]-c[1],l),u=o.computeDisplayToWorld(n,i[0],i[1],l),d=[];d[0]=u[0]-g[0],d[1]=u[1]-g[1],d[2]=u[2]-g[2],i=a.getFocalPoint();var m=a.getPosition();a.setFocalPoint(d[0]+i[0],d[1]+i[1],d[2]+i[2]),a.setPosition(d[0]+m[0],d[1]+m[1],d[2]+m[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=function(e,n,r){var a=n.getActiveCamera();a.roll(r-t.previousRotation),a.orthogonalizeViewUp(),t.previousRotation=r}}var Jh={};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jh,n),ln.c.obj(e,t),xh.extend(e,t,n),th.extend(e,t,n),Th(e,t)}var Oh={newInstance:ln.c.newInstance(Xh,"vtkGestureCameraManipulator"),extend:Xh};function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh(n)),Object(ln.h)(e,t),ah.extend(e,t,n),Object(ln.d)(e,t,"BoxSelectChange"),Object(ln.d)(e,t,"BoxSelectInput"),Object(ln.j)(e,t,["renderSelection","selectionStyle"]),Ph(e,t)}var Lh={newInstance:Object(ln.g)(Mh,"vtkMouseBoxSelectionManipulator"),extend:Mh},Dh=n(38);function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uh(e){for(var t=1;t.001?Math.acos(n/o):0,l=i>.001?Math.atan2(a,r):0;t[0]=o,t[1]=i,t[2]=l}function db(e,t){if(e[0]>=t-.1)return e[2];var n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function mb(e,t,n,r){var a=[],o=[];Object(Xo.e)(t,a),Object(Xo.e)(n,o);var i=[],l=[];ub(a,i),ub(o,l);var s=e;if(i[1]>.05&&l[1]>.05&&function(e,t){var n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(i[2],l[2])>.33*Math.PI){var c=Math.max(i[0],l[0]);c=Math.max(88,c),e<.5?(l[0]=c,l[1]=0,l[2]=0,s*=2):(i[0]=c,i[1]=0,i[2]=0,s=2*s-1)}i[1]<.05&&l[1]>.05?i[2]=db(l,i[0]):l[1]<.05&&i[1]>.05&&(l[2]=db(i,l[0]));var g=[];g[0]=(1-s)*i[0]+s*l[0],g[1]=(1-s)*i[1]+s*l[1],g[2]=(1-s)*i[2]+s*l[2];var u=[];!function(e,t){var n=e[0],r=e[1],a=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(a),t[2]=n*Math.sin(r)*Math.sin(a)}(g,u),Object(Xo.f)(u,r)}function fb(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,a){return e.addRGBPointLong(t,n,r,a,.5,0)},e.addRGBPointLong=function(n,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i<0||i>1)return cb("Midpoint outside range [0.0, 1.0]"),-1;if(l<0||l>1)return cb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var s={x:n,r:r,g:a,b:o,midpoint:i,sharpness:l};t.nodes.push(s),e.sortAndUpdateRange();for(var c=0;c4&&void 0!==arguments[4]?arguments[4]:.5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=[],s=[n,r,a];return Object(Xo.u)(s,l),e.addRGBPoint(t,l[0],l[1],l[2],o,i)},e.setNodes=function(n){t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=function(){t.nodes.sort((function(e,t){return e.x-t.x})),e.updateRange()||e.modified()},e.updateRange=function(){var n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];var r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=function(n){for(var r=0;r=t.nodes.length)return-1;var o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var a=0;a=n&&t.nodes[g].x<=i?t.nodes.splice(g,1):g++;e.addRGBPointLong(n,r,a,o,.5,0),e.addRGBPointLong(i,l,s,c,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,a,o,i,l,s){var c=[i,l,s],g=[],u=[];Object(Xo.u)([n,r,a],g),Object(Xo.u)(c,u),e.addRGBSegment(t,g[0],g[1],g[2],o,u[0],u[1],u[2])},e.mapValue=function(t){var n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=function(n,r){if(t.indexedLookup){var a=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===a)e.getNanColor(r);else{var i=[];e.getNodeValue(o%a,i),r[0]=i.r,r[1]=i.g,r[2]=i.b}}else e.getTable(n,n,1,r)},e.getRedValue=function(t){var n=[];return e.getColor(t,n),n[0]},e.getGreenValue=function(t){var n=[];return e.getColor(t,n),n[1]},e.getBlueValue=function(t){var n=[];return e.getColor(t,n),n[2]},e.getTable=function(n,r,a,o){if(Object(Xo.v)(n)||Object(Xo.v)(r))for(var i=0;i0);var v=0,Z=0,A=0;y&&(v=Math.log10(n),Z=Math.log10(r));for(var G=0;G1?y?(A=v+G/(a-1)*(Z-v),d=Math.pow(10,A)):d=n+G/(a-1)*(r-n):y?(A=.5*(v+Z),d=Math.pow(10,A)):d=.5*(n+r),t.discretize){var B=t.mappingRange;if(d>=B[0]&&d<=B[1]){var V=t.numberOfValues,R=B[1]-B[0];if(V<=1)d=B[0]+R/2;else{var w=(d-B[0])/R,k=Object(Xo.g)(V*w);d=B[0]+k/(V-1)*R}}}for(;lt.nodes[l].x;)++l.99999&&(I=.99999));if(d>t.mappingRange[1])o[S]=0,o[S+1]=0,o[S+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[S]=t.aboveRangeColor[0],o[S+1]=t.aboveRangeColor[1],o[S+2]=t.aboveRangeColor[2]):(o[S]=c,o[S+1]=g,o[S+2]=u));else if(d0&&(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b));else if(0===l&&(Math.abs(d-n)<1e-6||t.discretize))s>0?(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b):(o[S]=0,o[S+1]=0,o[S+2]=0);else{var W=0;if(W=(W=y?(A-m)/(f-m):(d-m)/(f-m)).99){if(W<.5){o[S]=p[0],o[S+1]=p[1],o[S+2]=p[2];continue}o[S]=C[0],o[S+1]=C[1],o[S+2]=C[2];continue}if(h<.01){if(t.colorSpace===ob.RGB)o[S]=(1-W)*p[0]+W*C[0],o[S+1]=(1-W)*p[1]+W*C[1],o[S+2]=(1-W)*p[2]+W*C[2];else if(t.colorSpace===ob.HSV){var x=[],T=[];Object(Xo.d)(p,x),Object(Xo.d)(C,T),t.hSVWrap&&(x[0]-T[0]>.5||T[0]-x[0]>.5)&&(x[0]>T[0]?x[0]-=1:T[0]-=1);var J=[];J[0]=(1-W)*x[0]+W*T[0],J[0]<0&&(J[0]+=1),J[1]=(1-W)*x[1]+W*T[1],J[2]=(1-W)*x[2]+W*T[2],Object(Xo.u)(J,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var X=[],O=[];Object(Xo.e)(p,X),Object(Xo.e)(C,O);var N=[];N[0]=(1-W)*X[0]+W*O[0],N[1]=(1-W)*X[1]+W*O[1],N[2]=(1-W)*X[2]+W*O[2],Object(Xo.f)(N,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.",t.colorSpace);continue}W<.5?W=.5*Math.pow(2*W,1+10*h):W>.5&&(W=1-.5*Math.pow(2*(1-W),1+10*h));var H=W*W,Y=H*W,F=2*Y-3*H+1,P=-2*Y+3*H,K=Y-2*H+W,M=Y-H,L=void 0;if(t.colorSpace===ob.RGB)for(var D=0;D<3;D++)L=(1-h)*(C[D]-p[D]),o[S+D]=F*p[D]+P*C[D]+K*L+M*L;else if(t.colorSpace===ob.HSV){var E=[],U=[];Object(Xo.d)(p,E),Object(Xo.d)(C,U),t.hSVWrap&&(E[0]-U[0]>.5||U[0]-E[0]>.5)&&(E[0]>U[0]?E[0]-=1:U[0]-=1);for(var z=[],_=0;_<3;_++)L=(1-h)*(U[_]-E[_]),z[_]=F*E[_]+P*U[_]+K*L+M*L,0===_&&z[_]<0&&(z[_]+=1);Object(Xo.u)(z,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var j=[],Q=[];Object(Xo.e)(p,j),Object(Xo.e)(C,Q);for(var q=[],$=0;$<3;$++)L=(1-h)*(Q[$]-j[$]),q[$]=F*j[$]+P*Q[$]+K*L+M*L;Object(Xo.f)(q,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[S+ee]=o[S+ee]<0?0:o[S+ee],o[S+ee]=o[S+ee]>1?1:o[S+ee]}}}},e.getUint8Table=function(n,r,a){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return cb("Attempting to lookup a value with no points in the function"),t.table;var i=o?4:3;t.tableSize===a&&t.tableWithAlpha===o||(t.table=new Uint8Array(a*i),t.tableSize=a,t.tableWithAlpha=o);var l=[];e.getTable(n,r,a,l);for(var s=0;s1&&(i=(r-n)/(a-1));for(var l=0;l=t.nodes.length?(cb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){if(n<0||n>=t.nodes.length)return cb("Index out of range!"),-1;var a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=function(){return t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216},e.getIndexedColor=function(t,n){var r=e.getSize();if(r>0&&t>=0){var a=[];e.getNodeValue(t%r,a);for(var o=0;o<3;++o)n[o]=a[o+1];n[3]=1}else e.getNanColor(n),n[3]=1},e.fillFromDataPointer=function(t,n){if(!(t<=0)&&n){e.removeAllPoints();for(var r=0;rn[1]?(e.getColor(n[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])):(e.getColor(r[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])),e.sortAndUpdateRange();for(var o=0;o=n[0]&&t.nodes[o].x<=n[1]?t.nodes.splice(o,1):++o;return 1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){if(t.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pb,n),mu.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},ln.c.obj(t.buildTime),ln.c.get(e,t,["buildTime","mappingRange"]),ln.c.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),fb(e,t)}var Ib=function(e){for(var t=1;t0&&(n=t.nodes[0].y);for(var a=1;an)switch(r){case 0:case 1:r=1;break;default:case 2:r=3}else switch(r){case 0:case 2:r=2;break;default:case 1:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:case 3:return"Varied"}},e.getDataPointer=function(){var e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(var n=0;n0?t.nodes[n-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=function(e,n){var r=t.nodes.length;return e<0||e>=r?(hb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){var a=t.nodes.length;if(n<0||n>=a)return hb("Index out of range!"),-1;var o=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],o!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=function(t,n){return e.addPointLong(t,n,.5,0)},e.addPointLong=function(n,r,a,o){if(a<0||a>1)return hb("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return hb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var i,l={x:n,y:r,midpoint:a,sharpness:o};for(t.nodes.push(l),e.sortAndUpdateRange(),i=0;i=t.nodes.length)return-1;var a=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,a,o){e.sortAndUpdateRange();for(var i=0;i=n&&t.nodes[i].x<=a?t.nodes.splice(i,1):i++;e.addPoint(n,r,.5,0),e.addPoint(a,o,.5,0)},e.getValue=function(t){var n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=function(n){if(n.length<2)return 0;var r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(var a=0;a=n[0]&&t.nodes[a].x<=n[1]?t.nodes.splice(a,1):++a;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){var e=t.nodes.length;if(e<2)return-1;for(var n=t.nodes[1].x-t.nodes[0].x,r=0;r4&&void 0!==arguments[4]?arguments[4]:1,l=0,s=t.nodes.length,c=0;0!==s&&(c=t.nodes[s-1].y);var g=0,u=0,d=0,m=0,f=0,p=0,C=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);lt.nodes[l].x;)++l.99999&&(p=.99999));if(l>=s)a[I]=t.clamping?c:0;else if(0===l)a[I]=t.clamping?t.nodes[0].y:0;else{var h=(g-u)/(d-u);if(h=h.99){if(h<.5){a[I]=m;continue}a[I]=f;continue}if(C<.01){a[I]=(1-h)*m+h*f;continue}h<.5?h=.5*Math.pow(2*h,1+10*C):h>.5&&(h=1-.5*Math.pow(2*(1-h),1+10*C));var b=h*h,y=b*h,v=2*y-3*b+1,Z=-2*y+3*b,A=y-2*b+h,G=y-b,S=f-m,B=(1-C)*S;a[I]=v*m+Z*f+A*B+G*B;var V=mf?m:f;a[I]=a[I]R?R:a[I]}}}}var yb={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yb,n),ln.c.obj(e,t),t.nodes=[],ln.c.setGet(e,t,["allowDuplicateScalars","clamping"]),ln.c.setArray(e,t,["range"],2),ln.c.getArray(e,t,["range"]),bb(e,t)}var Zb={newInstance:ln.c.newInstance(vb,"vtkPiecewiseFunction"),extend:vb};function Ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Gb=Km.InterpolationType,Sb=Km.OpacityMode,Bb=ln.c.vtkErrorMacro;function Vb(e,t){t.classHierarchy.push("vtkVolumeProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(n=n>(e=t.componentData[r].grayTransferFunction.getMTime())?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].scalarOpacity&&(n=n>(e=t.componentData[r].scalarOpacity.getMTime())?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(n=n>(e=t.componentData[r].gradientOpacity.getMTime())?n:e));return n},e.getColorChannels=function(e){return e<0||e>3?(Bb("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var a=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,a=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,a=!0),a&&e.modified(),a},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Zb.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction},e.setRGBTransferFunction=function(n,r){var a=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,a=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,a=!0),a&&e.modified(),a},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=Ib.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction},e.setScalarOpacity=function(n,r){return t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0)},e.getScalarOpacity=function(n){return null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=Zb.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Bb("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Bb("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Gb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Gb.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(Gb.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Gb,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["set".concat(r)]=function(r,a){return t.componentData[r]["".concat(n)]!==a&&(t.componentData[r]["".concat(n)]=a,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var Rb={independentComponents:!0,interpolationType:Gb.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function wb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rb,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;++r)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:Sb.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),Vb(e,t)}var kb=function(e){for(var t=1;tr[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){Wb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e}}var Tb={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function Jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tb,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),xb(e,t)}var Xb={newInstance:ln.c.newInstance(Jb,"vtkVolume"),extend:Jb},Ob=Lm.BlendMode;function Nb(e,t){t.classHierarchy.push("vtkVolumeMapper"),e.getBounds=function(){var n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=Object(Xo.j)(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(Ob.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(Ob.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(Ob.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(Ob.AVERAGE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return ln.c.enumToString(Ob,t.blendMode)}}var Hb={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:Ob.COMPOSITE_BLEND,averageIPScalarRange:[-1e6,1e6]};function Yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),_g.extend(e,t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),ln.c.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),ln.c.setGetArray(e,t,["averageIPScalarRange"],2),ln.c.event(e,t,"lightingActivated"),Nb(e,t)}var Fb={newInstance:ln.c.newInstance(Yb,"vtkVolumeMapper"),extend:Yb},Pb=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Pb[e.Name]=e}));var Kb=Object.keys(Pb);Kb.sort();var Mb={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Pb[e.Name]||(Kb.push(e.Name),Kb.sort()),Pb[e.Name]=e)},removePresetByName:function(e){var t=Kb.indexOf(e);t>-1&&Kb.splice(t,1),delete Pb[e]},getPresetByName:function(e){return Pb[e]},rgbPresetNames:Kb};var Lb=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.volume=Xb.newInstance({visibility:!1}),t.mapper=Fb.newInstance(),t.volume.setMapper(t.mapper),t.volume.getProperty().setRGBTransferFunction(0,t.lookupTable),t.volume.getProperty().setScalarOpacity(0,t.piecewiseFunction),t.volume.getProperty().setInterpolationTypeToLinear(),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addVolume(e.volume),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&(this.view.renderer.removeVolume(this.volume),this.view=null),this.volume.delete(),this.volume=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.volume,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange;if(!r||t&&r===t.volume||this.volume.set(r),!a||t&&a===t.property||this.volume.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var s,c=Mb.getPresetByName(i);this.lookupTable.applyColorMap(c),(s=this.lookupTable).setMappingRange.apply(s,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?(console.log("from update"),this.dataChanged()):(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.volume.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.volume.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();Lb.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},Lb.propTypes={id:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Db=Lb,Eb=Id.InterpolationType,Ub=ln.c.vtkErrorMacro;function zb(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].piecewiseFunction&&(n=n>(e=t.componentData[r].piecewiseFunction.getMTime())?n:e);return n},e.setRGBTransferFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].rGBTransferFunction!==o&&(t.componentData[a].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].piecewiseFunction!==o&&(t.componentData[a].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=function(t,n){var r=t,a=n;return Number.isInteger(t)||(a=t,r=0),e.setPiecewiseFunction(r,a)},e.getScalarOpacity=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Ub("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Ub("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Eb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Eb.LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Eb,t.interpolationType)}}var _b={independentComponents:!1,interpolationType:Eb.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,_b,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),zb(e,t)}var Qb={newInstance:ln.c.newInstance(jb,"vtkImageProperty"),extend:jb},qb=ln.c.vtkDebugMacro;function $b(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=function(){return e},e.getImages=function(){return e},e.getIsOpaque=function(){if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=Qb.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n,r=t.mapper.getBounds();if(!r||6!==r.length)return r;if(r[0]>r[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){qb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,a=t.mapper.getBoundsForSlice(n,r);if(!a||6!==a.length)return a;if(a[0]>a[1])return a;var o=[];Ol.getCorners(a,o),e.computeMatrix();var i=new Float64Array(16);Object(Yo.i)(i,t.matrix),o.forEach((function(e){return Object(Fo.q)(e,e,i)}));var l=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return l.map((function(e,t){return t%2==0?o.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):o.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}if(null!==t.property){var r=t.property.getMTime();e=r>e?r:e,null!==t.property.getRGBTransferFunction()&&(e=(r=t.property.getRGBTransferFunction().getMTime())>e?r:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var ey={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ey,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),$b(e,t)}var ny={newInstance:ln.c.newInstance(ty,"vtkImageSlice"),extend:ty};function ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ay(e){for(var t=1;ti&&(i=g,s=r[c]<0,l=c)}if(1!==i){var u="IJKXYZ"[t.slicingMode],d="IJKXYZ"[l];ly("Unaccurate slicing along ".concat(u," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(i,"% aligned). ")+"Necessitates slice reformat that is not yet implemented. You can switch the slicing mode on your mapper to do IJK slicing instead.")}t.closestIJKAxis={ijkMode:l,flip:s}}function r(n,r){var a=e.getInputData(),o=a.getExtent(),i=[o[0],o[2],o[4]],l=e.getClosestIJKAxis().ijkMode,s=t.slice;l!==t.slicingMode&&(s=e.getSliceAtPosition(s)),i[l]+=s;var c=[0,0,0];a.indexToWorld(i,c),i[l]+=1;var g=[0,0,0];a.indexToWorld(i,g),g[0]-=c[0],g[1]-=c[1],g[2]-=c[2],Object(Fo.l)(g,g);var u=tl.a.intersectWithLine(n,r,c,g);if(u.intersection){var d=u.x,m=[0,0,0];return a.worldToIndex(d,m),{t:u.t,absoluteIJK:m}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,a=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=a.getBounds();switch(t.slicingMode){case sy.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case sy.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case sy.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var i=[0,0,0];a.worldToIndex(r,i);var l=a.getExtent(),s=0;switch(e.getClosestIJKAxis().ijkMode){case sy.I:s=Object(Xo.a)(i[0],l[0],l[1]),s=Math.round(s);break;case sy.J:s=Object(Xo.a)(i[1],l[2],l[3]),s=Math.round(s);break;case sy.K:s=Object(Xo.a)(i[2],l[4],l[5]),s=Math.round(s);break;default:return 0}return s},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case sy.I:case sy.J:case sy.K:var a=e.getSliceAtPosition(r);e.setSlice(a);break;case sy.X:e.setSlice(r[0]);break;case sy.Y:e.setSlice(r[1]);break;case sy.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(sy.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(sy.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(sy.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(sy.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(sy.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(sy.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),a=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case sy.X:n[0]=1;break;case sy.Y:n[1]=1;break;case sy.Z:n[2]=1;break;case sy.I:Object(Xo.k)(a,[1,0,0],n);break;case sy.J:Object(Xo.k)(a,[0,1,0],n);break;case sy.K:Object(Xo.k)(a,[0,0,1],n)}return n},e.setSlicingMode=function(r){t.slicingMode!==r&&(t.slicingMode=r,e.getInputData()&&n(),e.modified())},e.getClosestIJKAxis=function(){return void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==sy.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return Object(Xo.j)();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),a=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(a!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),a){case sy.I:r[0]=o,r[1]=o;break;case sy.J:r[2]=o,r[3]=o;break;case sy.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getInputData();if(!a)return Object(Xo.j)();var o=a.getExtent(),i=e.getClosestIJKAxis(),l=i.ijkMode,s=n;switch(l!==t.slicingMode&&(s=e.getSliceAtPosition(n)),l){case sy.I:o[0]=s-r,o[1]=s+r;break;case sy.J:o[2]=s-r,o[3]=s+r;break;case sy.K:o[4]=s-r,o[5]=s+r}return a.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=[Math.round(a.absoluteIJK[0]),Math.round(a.absoluteIJK[1]),Math.round(a.absoluteIJK[2])];return i[0]o[1]||i[1]o[3]||i[2]o[5]?null:{t:a.t,ijk:i}}return null},e.intersectWithLineForCellPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=a.absoluteIJK,l=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])];if(l[0]o[1]-1||l[1]o[3]-1||l[2]o[5]-1)return null;var s=[i[0]-l[0],i[1]-l[1],i[2]-l[2]];return{t:a.t,ijk:l,pCoords:s}}return null}}var gy={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:sy.NONE,closestIJKAxis:{ijkMode:sy.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gy,n),_g.extend(e,t,n),ln.c.get(e,t,["slicingMode"]),ln.c.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),ln.c.setGetArray(e,t,["customDisplayExtent"],4),Vu.implementCoincidentTopologyMethods(e,t),cy(e,t)}var dy=ay(ay(ay({newInstance:ln.c.newInstance(uy,"vtkImageMapper"),extend:uy},oy),iy),pd);var my=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.actor=ny.newInstance({visibility:!1}),t.mapper=dy.newInstance(),t.actor.setMapper(t.mapper),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addActor(e.actor),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&this.view.renderer.removeActor(this.actor),this.actor.delete(),this.actor=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.actor,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange,s=e.iSlice,c=e.jSlice,g=e.kSlice,u=e.xSlice,d=e.ySlice,m=e.zSlice;if(!r||t&&r===t.actor||this.actor.set(r),!a||t&&a===t.property||this.actor.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var f,p=Mb.getPresetByName(i);this.lookupTable.applyColorMap(p),(f=this.lookupTable).setMappingRange.apply(f,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?this.dataChanged():(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),!s||t&&s===t.iSlice||this.mapper.setISlice(s),!c||t&&c===t.jSlice||this.mapper.setJSlice(c),!g||t&&g===t.kSlice||this.mapper.setKSlice(g),!u||t&&u===t.xSlice||this.mapper.setXSlice(u),!d||t&&d===t.ySlice||this.mapper.setYSlice(d),!m||t&&m===t.zSlice||this.mapper.setZSlice(m),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.actor.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.actor.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();my.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},my.propTypes={id:Rs.a.string,mapper:Rs.a.object,actor:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),iSlice:Rs.a.number,jSlice:Rs.a.number,kSlice:Rs.a.number,xSlice:Rs.a.number,ySlice:Rs.a.number,zSlice:Rs.a.number,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var fy=my,py=Object.create(null);[{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){py[e.Name]=e}));var Cy=Object.keys(py);Cy.sort();var Iy={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(py[e.Name]||(Cy.push(e.Name),Cy.sort()),py[e.Name]=e)},removePresetByName:function(e){var t=Cy.indexOf(e);t>-1&&Cy.splice(t,1),delete py[e]},getPresetByName:function(e){return py[e]},rgbPresetNames:Cy},hy=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments[3];return new Promise((function(o,i){var l=n._messageId++;n._messages.set(l,[o,i,a]),n._worker.postMessage([l,t,e],r||[])}))}},{key:"postMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return new Promise((function(a,o){var i=t._messageId++;t._messages.set(i,[a,o,r]),t._worker.postMessage([i,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+l||uo+s?d===s?o:o+d/(d-s)*(u-o-s):-d===s?o:o-d/(d+s)*(u-o-s))-o)/d,f=Math.exp(-4*m*m),p=1-m*m,C=1,I=i*(c<1?c*p+(1-c)*f:(2-c)*p+(c-1)*C);I>n[g]&&(n[g]=I)}}return n}function Xy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},a=t[3],o=t[2]/(n.length-1),i=!!r.fillStyle,l=a+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var s=0;s3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function Ny(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,Object(Ao.a)(n));return n.indexOf(r)}function Hy(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,a=n.offsetY;t&&n.preventDefault(),e(r,a)}}function Yy(){xy.filter((function(e){return e.ready})).forEach((function(e){e.callbacks.forEach((function(t){t.touches===e.touches&&t.clicks===e.count&&t.action.apply(t,Object(Ao.a)(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(a){var o=a.target.getBoundingClientRect(),i=Array.prototype.map.call(a.touches,(function(e){return[e.pageX-o.left,e.pageY-o.top]})).reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]).map((function(e){return e/a.touches.length}));"touchstart"===a.type?(clearTimeout(xy[e].timeout),xy[e].ts=a.timeStamp,xy[e].singleTouche=i,xy[e].touches=a.touches.length):"touchmove"===a.type?(xy[e].ts=0,xy[e].count=0,xy[e].ready=!1):"touchend"===a.type&&(a.timeStamp-xy[e].ts1&&void 0!==arguments[1]?arguments[1]:{},o=r.numberOfBinToConsiders,i=void 0===o?1:o,l=r.numberOfBinsToSkip,s=void 0===l?1:l,c=r.numberOfComponents,g=void 0===c?1:c,u=r.component,d=void 0===u?0:u;t.histogram=null,t.histogramArray=n,t.dataRange=Object(Xo.b)(n,d,g);var m=Object(a.a)(t.dataRange,2),f=m[0],p=m[1],C=4,I=Math.floor(n.length/C)||1;I+=I%g;for(var h=0,b=[],y=[];hr;)a.shift();for(var l=a.reduce((function(e,t){return e+t}),0)/r,c=0,g=t.histogram.length;c1){for(var c=t.style.iconSize+t.style.padding,g=c,u=0;r>g;)u+=1,g+=c;switch(u){case 0:var d=e.addGaussian(0,1,.1,0,0),m=t.gaussians[d],f=ky({},m),p=Ty.adjustPosition;t.activeGaussian=d,t.selectedGaussian=d,ln.c.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:p,gaussian:m,originalGaussian:f}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(l<0||l>1||s<0||s>1)t.selectedGaussian=-1,t.dragAction=null;else{var C=Ny(l,t.gaussians);C!==t.selectedGaussian&&(t.selectedGaussian=C,e.modified())}return!0},e.onHover=function(n,r){var o=20/t.canvas.height,i=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),l=Object(a.a)(i,2),s=l[0],c=l[1],g=Oy(n,r,t.graphArea),u=Object(a.a)(g,1)[0],d=s<0?t.selectedGaussian:Ny(s,t.gaussians);t.canvas.style.cursor="default";var m=t.gaussians[d];if(t.enableRangeZoom&&u>=0&&rt.rangeZoom[1]-f?t.canvas.style.cursor=Wy.adjustZoom:t.canvas.style.cursor=Wy.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:Ty.adjustZoom}}else if(m&&u>=0){var p,C=1-c;p=C>m.height+o?"adjustPosition":C>m.height-o?Math.abs(s-m.position).5*m.height+o?"adjustPosition":C>.5*m.height-o?Math.abs(s-m.position)o?"adjustPosition":"adjustWidth",t.canvas.style.cursor=Wy[p];var I=Ty[p],h=ky({},m);t.dragAction={originalXY:[s,c],action:I,gaussian:m,originalGaussian:h}}return d!==t.activeGaussian&&(t.activeGaussian=d,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);t.gaussianSide=0;var i=t.gaussians[o];return i&&(t.gaussianSide=i.position-a),o!==t.selectedGaussian&&a>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];(0,t.dragAction.action)(l,s,ky({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=Jy(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=function(n,r){return t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0},e.onLeave=function(n,r){return e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0},e.onAddGaussian=function(n,r){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];return l>=0&&e.addGaussian(l,1-s,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);return a>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=xy.length,t=arguments.length,n=new Array(t),r=0;r1){var c=Math.round(t.style.iconSize/2-t.style.strokeWidth),g=Math.round(c+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(g-i/2,g,c,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g),e.stroke(),e.moveTo(g-i/2,g-c+t.style.strokeWidth+2),e.lineTo(g-i/2,g+c-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(g-i/2,g+i/2+t.style.iconSize,c,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g+i/2+t.style.iconSize),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&Xy(e,l,Ky(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),Xy(e,l,Ky(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var u=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){var a=r||document.createElement("canvas");a.setAttribute("width",t),a.setAttribute("height",256);for(var o=a.getContext("2d"),i=e.getUint8Table(n[0],n[1],t,4),l=o.getImageData(0,0,t,256),s=0;s<256;s++)l.data.set(i,4*s*t);for(var c=256*t*4,g=4*t,u=3;u0&&(a=Math.min(a,i)),t.opacities[i]>0&&(o=Math.max(o,i));return[n[0]+a*r,n[0]+o*r]};var n=e.setEnableRangeZoom;e.setEnableRangeZoom=function(e){var r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};var r=e.setRangeZoom;e.setRangeZoom=function(){var e=r.apply(void 0,arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((function(){return e.render()})),e.setSize.apply(e,Object(Ao.a)(t.size))}var Dy={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),ln.c.obj(e,t),ln.c.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),ln.c.setGetArray(e,t,["rangeZoom"],2),ln.c.get(e,t,["size","canvas","gaussians"]),ln.c.event(e,t,"opacityChange"),ln.c.event(e,t,"animation"),ln.c.event(e,t,"zoomChange"),Ly(e,t)}var Uy=ky({newInstance:ln.c.newInstance(Ey,"vtkPiecewiseGaussianWidget"),extend:Ey},My),zy='',_y='',jy='';var Qy={container:"VolumeController-module_container__2HNSO",line:"VolumeController-module_line__3rtqL",button:"VolumeController-module_button__2T-xL",sliderEntry:"VolumeController-module_sliderEntry__27XSC",sliderIcon:"VolumeController-module_sliderIcon__U8YAZ VolumeController-module_button__2T-xL",slider:"VolumeController-module_slider__3PS68",piecewiseEditor:"VolumeController-module_piecewiseEditor__2_jav",select:"VolumeController-module_select__7mbfS",presets:"VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadow:"VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonDarkBG:"VolumeController-module_buttonDarkBG__3W1zO VolumeController-module_button__2T-xL",presetsDarkBG:"VolumeController-module_presetsDarkBG__2ZI2W VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowDarkBG:"VolumeController-module_shadowDarkBG__WHYZ- VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonBrightBG:"VolumeController-module_buttonBrightBG__2dstz VolumeController-module_button__2T-xL",presetsBrightBG:"VolumeController-module_presetsBrightBG__3_VRC VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowBrightBG:"VolumeController-module_shadowBrightBG__YCHpe VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".VolumeController-module_container__2HNSO {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n justify-content: space-between;\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(128, 128, 128, 0.5);\n border-radius: 5px;\n padding: 2px;\n border: 0.5px solid black;\n box-sizing: border-box;\n}\n\n.VolumeController-module_line__3rtqL {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.VolumeController-module_button__2T-xL {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module_button__2T-xL svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module_sliderEntry__27XSC {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module_sliderIcon__U8YAZ {\n height: 1rem;\n}\n\n.VolumeController-module_slider__3PS68 {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module_piecewiseEditor__2_jav {\n flex: 1;\n}\n\n.VolumeController-module_select__7mbfS {\n flex: 1;\n border: none;\n background: transparent;\n color: white;\n border: none;\n -moz-appearance: none;\n width: 5px;\n}\n\n.VolumeController-module_select__7mbfS select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module_presets__1h4j5 {\n}\n\n.VolumeController-module_shadow__29K9t {\n}\n\n.VolumeController-module_buttonDarkBG__3W1zO {\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W {\n color: white;\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W option {\n color: black;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- {\n color: white;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- option {\n color: black;\n}\n\n.VolumeController-module_buttonBrightBG__2dstz {\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC {\n color: black;\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC option {\n color: white;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe {\n color: black;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe option {\n color: white;\n}\n");var qy=Iy.rgbPresetNames.map((function(e){return'")}));function $y(e,t){function n(){var e=!!Number(t.el.querySelector(".js-shadow").value);t.actor.getProperty().setShade(e),t.renderWindow.render()}function r(){var e=t.actor.getMapper().getInputData();if(e){var n=e.getPointData().getScalars()||e.getPointData().getArrays()[0],r=t.rescaleColorMap?t.colorDataRange:n.getRange(),a=Iy.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(a),o.setMappingRange.apply(o,Object(Ao.a)(r)),o.updateRange(),t.renderWindow.render()}}function a(){var e=Number(t.el.querySelector(".js-spacing").value),n=t.actor.getMapper().getInputData(),r=.7*Math.sqrt(n.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.actor.getMapper().setSampleDistance(r*Math.pow(2,3*e-1.5)),t.renderWindow.render()}function o(){var e=Number(t.el.querySelector(".js-edge").value);if(0===e)t.actor.getProperty().setUseGradientOpacity(0,!1);else{var n=t.actor.getMapper().getInputData(),r=(n.getPointData().getScalars()||n.getPointData().getArrays()[0]).getRange();t.actor.getProperty().setUseGradientOpacity(0,!0);var a=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*a*a),t.actor.getProperty().setGradientOpacityMaximumValue(0,1*(r[1]-r[0])*e*e)}t.renderWindow.render()}t.classHierarchy.push("vtkVolumeController"),t.el=document.createElement("div"),t.el.setAttribute("class",Qy.container),t.widget=Uy.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(i,l,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(l),e.setRenderWindow(i);var u=t.actor.getMapper().getInputData(),d=u.getPointData().getScalars()||u.getPointData().getArrays()[0],m=t.actor.getProperty().getRGBTransferFunction(0),f=t.actor.getProperty().getScalarOpacity(0),p=s?"DarkBG":"BrightBG",C={};["button","presets","shadow"].forEach((function(e){C[e]=Qy["".concat(e).concat(p)]})),t.el.innerHTML='\n
\n
').concat(zy,'
\n \n \n
\n
\n
\n
').concat(jy,'
\n \n
\n
\n
').concat(_y,'
\n \n
\n
\n
\n ');var I=t.el.querySelector(".js-button"),h=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),y=t.el.querySelector(".js-spacing"),v=t.el.querySelector(".js-edge"),Z=t.el.querySelector(".js-pwf");t.widget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),t.widget.addGaussian(.5,1,.5,.5,.4),t.widget.setDataArray(d.getData()),t.widget.setColorTransferFunction(m),t.widget.applyOpacity(f),t.widget.setContainer(Z),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),I.addEventListener("click",e.toggleVisibility),h.addEventListener("change",n),b.addEventListener("change",r),y.addEventListener("input",a),v.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(f),t.colorDataRange=t.widget.getOpacityRange(),t.rescaleColorMap&&r(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),t.widget.onAnimation((function(e){e?t.renderWindow.getInteractor().requestAnimation(t.widget):(t.renderWindow.getInteractor().cancelAnimation(t.widget),t.renderWindow.render())})),m.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),h.value=Number(c)?"1":"0",b.value=g,n(),r(),a(),o()},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.el),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.el),e.modified())};var i=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!i(e)&&(r(),!0)},e.toggleVisibility=function(){e.setExpanded(!e.getExpanded())},e.setExpanded=function(e){var n=t.el.querySelectorAll(".js-toggle"),r=n.length;if(t.expanded=e,t.expanded)for(;r--;)n[r].style.display="flex";else for(;r--;)n[r].style.display="none"},e.getExpanded=function(){return t.expanded},e.setSize=t.widget.setSize,e.render=t.widget.render,e.onAnimation=t.widget.onAnimation,e.onModified(e.render),e.setSize.apply(e,Object(Ao.a)(t.size))}var ev={size:[600,300],expanded:!0,rescaleColorMap:!1};function tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ev,n),ln.c.obj(e,t),ln.c.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),ln.c.get(e,t,["widget"]),$y(e,t)}var nv={newInstance:ln.c.newInstance(tv,"vtkVolumeController"),extend:tv};var rv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;ps(this,n),(r=t.call(this,e)).subscriptions=[],r.containerRef=Bs.a.createRef();var a=e.size,o=e.rescaleColorMap;return r.controller=nv.newInstance({size:a,rescaleColorMap:o}),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return Bs.a.createElement(_h.Consumer,null,(function(n){return e.view=t,e.representation=n,Bs.a.createElement("div",{ref:e.containerRef})}))}))}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t,n){var r;(r=this.controller).setSize.apply(r,fs(this.props.size)),this.controller.render()}},{key:"componentWillUnmount",value:function(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.controller.setContainer(null),this.controller.delete(),this.controller=null}},{key:"init",value:function(){var e=this,t=this.containerRef.current,n=this.view,r=n.renderWindow,a=n.props,o=this.representation.volume,i=a.background[0]+a.background[1]+a.background[2]<1.5;if(o&&o.getMapper()&&o.getMapper().getInputData()){var l=o.getMapper().getInputData();this.controller.setContainer(t),this.controller.setupContent(r,o,i),this.controller.render(),this.view.resetCamera(),this.view.renderView(),this.subscriptions.push(l.onModified((function(){return e.onDataChange()}),-1))}else setTimeout((function(){return e.init()}),100)}},{key:"onDataChange",value:function(){var e=this.controller.getWidget();if(this.representation&&this.representation.volume){var t=this.representation.volume.getMapper().getInputData(),n=t.getPointData().getScalars()||t.getPointData().getArrays()[0];e.setDataArray(n.getData())}}}]),n}();rv.defaultProps={size:[400,150],rescaleColorMap:!0},rv.propTypes={id:Rs.a.string,size:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool};var av=rv;function ov(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getPointData()},e.children)}))}ov.defaultProps={},ov.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var iv=ov,lv={int32:Int32Array,int16:Int16Array,int8:Int8Array,uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array,float32:Float32Array,float64:Float64Array};function sv(e,t){if(!e)return null;if(Array.isArray(e))return t.from(e);if(e.dtype){var n=e.bvals,r=e.dtype,a=Ki.toArrayBuffer(n);return new lv[r](a)}return e}var cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).polydata=Go.a.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(jh.Provider,{value:e},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.polydata.delete(),this.polydata=null}},{key:"update",value:function(e,t){var n=e.connectivity,r=e.points,a=e.verts,o=e.lines,i=e.polys,l=e.strips,s=!1,c=Uint32Array;if(r&&(!t||r!==t.points)){var g=sv(r,Float64Array);this.polydata.getPoints().setData(g,3),s=!0,c=g.length>196608?Uint32Array:Uint16Array}if(!a||t&&a===t.verts||(this.polydata.getVerts().setData(sv(a,c)),s=!0),!o||t&&o===t.lines||(this.polydata.getLines().setData(sv(o,c)),s=!0),!i||t&&i===t.polys||(this.polydata.getPolys().setData(sv(i,c)),s=!0),!l||t&&l===t.strips||(this.polydata.getStrips().setData(sv(l,c)),s=!0),n&&(n||!t||n!==t.connectivity)){var u=r.length/3;switch(n){case"points":var d=new Uint32Array(u+1);d[0]=u;for(var m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.event(e,t,"DataAvailable"),mv(e,t)}),"vtkTrivialProducer"),pv={},Cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(){return ps(this,n),t.apply(this,arguments)}return Is(n,[{key:"getTrivialProducer",value:function(){var e=pv[this.props.name];return e||(e=fv(),pv[this.props.name]=e),e}},{key:"render",value:function(){var e=this;return this.update(),Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.getTrivialProducer()},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}))}},{key:"update",value:function(){var e=this;this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.subscription=this.getTrivialProducer().onDataAvailable((function(){e.dataAvailable()}))}},{key:"dataAvailable",value:function(){this.downstream&&this.downstream.setInputConnection(this.getTrivialProducer().getOutputPort(),this.props.port),this.validData||(this.validData=!0,this.getTrivialProducer().invokeDataAvailable()),this.representation&&this.representation.dataAvailable()}},{key:"dataChanged",value:function(){this.representation&&this.representation.dataChanged()}}]),n}();Cv.defaultProps={port:0,name:"shared"},Cv.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Iv=Cv;function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*a,10):t.tickTextStyle.fontSize=Math.max(16*a,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var i=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var l=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];i+.4*l>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=i+.4*l,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=i+1.4*l,t.boxPosition=[.99-t.boxSize[0],-.92]),t.boxSize[1]=Math.max(1.2,Math.min(1.84/r,1.84))}else{t.axisTitlePixelOffset=2*t.tickTextStyle.fontSize,t.tickLabelPixelOffset=.5*t.tickTextStyle.fontSize;var s=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],c=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],g=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*g*(t.ticks.length+3))),t.boxSize[1]=s+c,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)},e.update=function(){if(t.scalarsToColors&&t.visibility){if(t.barMapper.setLookupTable(t.scalarsToColors),t.forceUpdate||Math.max(t.scalarsToColors.getMTime(),e.getMTime())>t.lastRebuildTime.getMTime()){var n=t.scalarsToColors.getMappingRange();t.lastTickBounds=Object(Ao.a)(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=TI().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var a=r.tickFormat(5);if(t.tickStrings=t.ticks.map(a),t.automated)e.computeAndApplyAutomatedSettings();else{var o=e.updateTextureAtlas();e.recomputeBarSegments(o)}t.forceViewUpdate=!0,t.lastRebuildTime.modified(),t.forceUpdate=!1}(t.forceViewUpdate||t.camera.getMTime()>t.lastRedrawTime.getMTime())&&(e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRedrawTime.modified(),t.forceViewUpdate=!1)}},e.completedImage=function(r){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,n=t.nextAtlas,t.nextAtlas=null,r&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,a=0,o=1;Rv(t.tmContext,t.axisTextStyle);var i=t.tmContext.measureText(t.axisLabel),l={height:i.actualBoundingBoxAscent+2,startingHeight:o,width:i.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,l),o+=l.height,a=l.width,n.titleWidth=l.width,n.titleHeight=l.height,n.tickWidth=0,n.tickHeight=0,Rv(t.tmContext,t.tickTextStyle);for(var s=[].concat(Object(Ao.a)(t.tickStrings),["NaN","Below","Above"]),c=0;ct.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var a=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){var o=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-a,t.barSize[1]=t.boxSize[1]-o}else{var i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-i-a,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+a,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var l=(2*e.tickWidth-8)/t.lastSize[0],s=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-s-n,t.barPosition[1]=t.boxPosition[1],r[0]=l}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var a=[0,0],o=t.vertical?1:0,i=t.vertical?.01:.02;function l(e,n){t.barSegments.push({corners:[[].concat(a),[a[0]+r[0],a[1]],[a[0]+r[0],a[1]+r[1]],[a[0],a[1]+r[1]]],scalars:n,title:e}),a[o]+=r[o]+i}"function"==typeof t.scalarsToColors.getNanColor&&l("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&l("Below",[-.1,-.1,-.1,-.1]);var s="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();a[o]+=i;var c=r[o];r[o]=s?1-2*i-r[o]-a[o]:1-i-a[o],l("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),s&&(r[o]=c,a[o]+=i,l("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,t,r,a,o,i,l){var s=n.get(e);if(s){var c=l.ptIdx,g=l.cellIdx;vv[0]=t[0],vv[1]=t[1],vv[2]=t[2],o[0]<-.5?Object(Fo.b)(Av,r,o[0]*i-s.width):o[0]>.5?Object(Fo.b)(Av,r,o[0]*i):Object(Fo.b)(Av,r,o[0]*i-s.width/2),Object(Fo.g)(vv,vv,Av),Object(Fo.b)(Av,a,o[1]*i-s.height/2),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[0],l.tcoords[2*c+1]=s.tcoords[1],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[2],l.tcoords[2*c+1]=s.tcoords[3],c++,Object(Fo.b)(Av,a,s.height),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[4],l.tcoords[2*c+1]=s.tcoords[5],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.a)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[6],l.tcoords[2*c+1]=s.tcoords[7],c++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-3,l.polys[4*g+3]=c-2,g++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-2,l.polys[4*g+3]=c-1,l.ptIdx+=4,l.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n),Object(Yo.g)(Vv,n);var r=t.lastSize;Av[0]=0,Av[1]=0,Av[2]=-.99,Object(Fo.q)(vv,Av,Vv),Av[0]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Sv,Zv,vv),Av[0]-=.1,Av[1]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Bv,Zv,vv);for(var a=0;a<3;a++)Sv[a]/=.05*r[0],Bv[a]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,i=4*o,l=2*o,s=new Float64Array(3*i),c=new Uint16Array(4*l),g=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:c,points:s,tcoords:g},d=t.vertical?0:1,m=t.vertical?1:0,f=[0,1];t.vertical?(t.topTitle?(Av[0]=t.boxPosition[0]+.5*t.boxSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,[0,1],t.axisTitlePixelOffset,u)):(Av[0]=t.barPosition[0]+t.barSize[0],Av[1]=t.barPosition[1]+.5*t.barSize[1],Object(Fo.q)(vv,Av,Vv),Object(Fo.b)(Sv,Sv,-1),e.createPolyDataForOneLabel(t.axisLabel,vv,Bv,Sv,[0,-1],t.axisTitlePixelOffset,u),Object(Fo.b)(Sv,Sv,-1)),f=[-1,0]):(Av[0]=t.barPosition[0]+.5*t.barSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,f,t.axisTitlePixelOffset,u)),Gv[2]=-.99,Gv[d]=t.barPosition[d]+(.5*f[d]+.5)*t.barSize[d],Gv[m]=t.barPosition[m]+.5*t.barSize[m];for(var p=null,C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kv(n)),aC.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=Pu.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=Go.a.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=aC.newInstance(),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},ln.c.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},ln.c.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmActor.setProperty(e.getProperty()),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.mapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,a,o,i){t.camera=r,t.lastSize[0]===i[0]&&t.lastSize[1]===i[1]||(t.lastSize[0]=i[0],t.lastSize[1]=i[1],t.lastAspectRatio=i[0]/i[1],t.forceUpdate=!0),e.update()})),ln.c.setGet(e,t,["automated","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),ln.c.get(e,t,["axisTextStyle","tickTextStyle"]),ln.c.getArray(e,t,["boxPosition","boxSize"]),ln.c.setArray(e,t,["boxPosition","boxSize"],2),wv(e,t)}var xv={newInstance:ln.c.newInstance(Wv,"vtkScalarBarActor"),extend:Wv};var Tv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).validData=!1,r.currentVisibility=!0,r.actor=aC.newInstance({visibility:!1,representationId:e.id}),r.lookupTable=Ib.newInstance(),r.mapper=Pu.newInstance({lookupTable:r.lookupTable,useLookupTableScalarRange:!0}),r.actor.setMapper(r.mapper),r.cubeAxes=qI.newInstance({visibility:!1,dataBounds:[-1,1,-1,1,-1,1]}),r.cubeAxes.getActors().forEach((function(e){return(0,e.setVisibility)(!1)})),r.scalarBar=xv.newInstance(),r.scalarBar.setScalarsToColors(r.lookupTable),r.scalarBar.setVisibility(!1),r.subscriptions=[],r.subscriptions.push(r.mapper.onModified((function e(){if(r.mapper.getInputData()){1===r.subscriptions.length&&r.subscriptions.push(r.mapper.getInputData().onModified(e));var t=r.mapper.getInputData().getBounds();t[0]t.bounds[1]&&(t.bounds[1]=g[0]),g[1]>t.bounds[3]&&(t.bounds[3]=g[1]),g[2]>t.bounds[5]&&(t.bounds[5]=g[2]);var R=new Float32Array(I,36*b,9);Dl(R,y),zl(R,R),Ul(R,R)}var w=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),t.colorArray=null;var k=e.getLookupTable();k&&w&&(k.build(),t.colorArray=k.mapScalars(w,t.colorMode,0)),t.buildTime.modified()}},e.getPrimitiveCount=function(){var t=e.getInputData(1),n=e.getInputData().getPoints().getNumberOfValues()/3;return{points:n*t.getPoints().getNumberOfValues()/3,verts:n*(t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells()),lines:n*(t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells()),triangles:n*(t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells())}}}var Pv={orient:!0,orientationMode:Nv.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:Hv.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function Kv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pv,n),Pu.extend(e,t,n),ln.c.algo(e,t,2,0),t.buildTime={},ln.c.obj(t.buildTime,{mtime:0}),t.boundsTime={},ln.c.obj(t.boundsTime,{mtime:0}),ln.c.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),ln.c.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),Fv(e,t)}var Mv=function(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};return{getArrays:function(){return{input:e.augmentInputArrays(t,n.map((function(e){return{location:t,name:e}}))),output:[{location:t,name:r,attribute:"outputAttributeType"in o?o.outputAttributeType:ti.a.SCALARS,numberOfComponents:"numberOfOutputComponents"in o?o.numberOfOutputComponents:1}]}},evaluate:function(e,t){var n=new Array(e.length),r=e.map((function(e,t){var r=e.getNumberOfComponents(),a=e.getData();return 1===r?function(e){return a[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],i=o.getData(),l=o.getNumberOfComponents(),s=new Array(l);if(1===l)i.forEach((function(e,t){i[t]=a.apply(void 0,Object(Ao.a)(r.map((function(e){return e(t)}))).concat([t,s]))}));else for(var c=o.getNumberOfTuples(),g=function(e){s=a.apply(void 0,Object(Ao.a)(r.map((function(t){return t(e)}))).concat([e,s])),o.setTuple(e,s)},u=0;u4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,a,o))},e.prepareArrays=function(e,t,n){var r=[],a=[];return e.input.forEach((function(e){if(e.location===Dh.b.COORDINATE)r.push(t.getPoints());else{var n=[[Dh.b.UNIFORM,function(e){return e.getFieldData()}],[Dh.b.POINT,function(e){return e.getPointData()}],[Dh.b.CELL,function(e){return e.getCellData()}],[Dh.b.VERTEX,function(e){return e.getVertexData()}],[Dh.b.EDGE,function(e){return e.getEdgeData()}],[Dh.b.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),a="location"in e&&e.location in n?n[e.location](t):null;a?e.name?r.push(a.getArrayByName(e.name)):"index"in e?r.push(a.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Dh.b.UNIFORM?r.push(a.getActiveAttribute(e.attribute)):(rZ('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rZ('Specifier "'.concat(JSON.stringify(e),'" did not provide a usable location.')),r.push(null))}})),e.output.forEach((function(e){var r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),aZ(e,t)}var lZ={newInstance:ln.c.newInstance(iZ,"vtkCalculator"),extend:iZ};var sZ=Nl.a.FieldDataTypes,cZ=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).calculator=lZ.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.arrays,a=t.location,o=t.formula;return this.calculator.setFormulaSimple(sZ[a],r,n,o),Bs.a.createElement(qh.Consumer,null,(function(t){return e.downstream||(t.setInputConnection(e.calculator.getOutputPort(),e.props.port),e.downstream=t),Bs.a.createElement(qh.Provider,{value:e.calculator},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}},{key:"componentWillUnmount",value:function(){this.calculator.delete(),this.calculator=null}}]),n}();cZ.defaultProps={port:0,name:"scalars",location:"POINT",arrays:[],formula:function(e){return e[0]}},cZ.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,location:Rs.a.string,arrays:Rs.a.arrayOf(Rs.a.string),formula:Rs.a.func,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var gZ=cZ;function uZ(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getCellData()},e.children)}))}uZ.defaultProps={},uZ.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var dZ={VolumeRepresentation:Db,SliceRepresentation:fy,VolumeController:av,PointData:iv,PolyData:gv,Reader:dv,ShareDataSet:Iv,View:nb,GeometryRepresentation:Jv,GlyphRepresentation:Dv,ImageData:Uv,DataArray:_v,FieldData:Qv,Algorithm:tZ,Calculator:gZ,CellData:uZ};function mZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r="Float32Array"),console.log("nbComponents",t),Bs.a.createElement(Jv,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,showCubeAxes:e.showCubeAxes,cubeAxesStyle:e.cubeAxesStyle,showScalarBar:e.showScalarBar,scalarBarTitle:e.scalarBarTitle,scalarBarStyle:e.scalarBarStyle},Bs.a.createElement(gv,{points:e.xyz,connectivity:"points"},t&&Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}mZ.defaultProps={xyz:[0,0,0],colorMapPreset:"erdc_rainbow_bright",colorDataRange:[0,1],showCubeAxes:!1,showScalarBar:!1,scalarBarTitle:""},mZ.propTypes={id:Rs.a.string,xyz:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),colorMapPreset:Rs.a.string,colorDataRange:Rs.a.arrayOf(Rs.a.number),property:Rs.a.object,showCubeAxes:Rs.a.bool,cubeAxesStyle:Rs.a.object,showScalarBar:Rs.a.bool,scalarBarTitle:Rs.a.string,scalarBarStyle:Rs.a.object};var fZ=mZ;function pZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r=e.scalarsType),Bs.a.createElement(Db,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,mapper:e.mapper,volume:e.volume},e.volumeController&&Bs.a.createElement(av,{rescaleColorMap:e.rescaleColorMap,size:e.controllerSize}),Bs.a.createElement(Uv,{dimensions:e.dimensions,origin:e.origin,spacing:e.spacing},Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}pZ.defaultProps={scalarsType:"Float32Array",colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto",volumeController:!0,rescaleColorMap:!0,controllerSize:[400,150]},pZ.propTypes={id:Rs.a.string,dimensions:Rs.a.arrayOf(Rs.a.number),spacing:Rs.a.arrayOf(Rs.a.number),origin:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),scalarsType:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,volumeController:Rs.a.bool,controllerSize:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string])};var CZ={PointCloudRepresentation:fZ,VolumeDataRepresentation:pZ},IZ=dZ.VolumeRepresentation,hZ=dZ.SliceRepresentation,bZ=dZ.VolumeController,yZ=dZ.PointData,vZ=dZ.PolyData,ZZ=dZ.Reader,AZ=dZ.ShareDataSet,GZ=dZ.View,SZ=dZ.GeometryRepresentation,BZ=dZ.GlyphRepresentation,VZ=dZ.ImageData,RZ=dZ.DataArray,wZ=dZ.FieldData,kZ=dZ.Algorithm,WZ=dZ.Calculator,xZ=dZ.CellData,TZ=CZ.PointCloudRepresentation,JZ=CZ.VolumeDataRepresentation,XZ={ViewContext:zh,RepresentationContext:_h,DataSetContext:jh,FieldsContext:Qh,DownstreamContext:qh},OZ={Core:dZ,Representations:CZ,Contexts:XZ};t.default=r}]]); //# sourceMappingURL=async-ReactVTK.js.map //# sourceMappingURL=async-ReactVTK.js.map \ No newline at end of file diff --git a/deps/dash_vtk.min.js b/deps/dash_vtk.min.js index 4fb614a..d7cb529 100644 --- a/deps/dash_vtk.min.js +++ b/deps/dash_vtk.min.js @@ -1,3 +1,3 @@ -window.dash_vtk=function(e){function a(a){for(var r,n,o=a[0],l=a[1],i=0,c=[];i0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(t);var n=[];function r(e){n[e]=null}function a(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++g),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?C("instance deleted - cannot call any method"):r&&r0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(l){var s=a?null:e["set".concat(y(l))];s&&Array.isArray(n[l])&&s.length>1?o=s.apply(void 0,Object(i.a)(n[l]))||o:s?o=s(n[l])||o:(-1!==["mtime"].indexOf(l)||r||I("Warning: Set value to model directly ".concat(l,", ").concat(n[l])),t[l]=n[l],o=!0)})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error("Cannot ShallowCopy ".concat(n.getClassName()," into ").concat(e.getClassName()));var a=n.get(),o=Object.keys(t).sort(),i=Object.keys(a).sort();i.forEach((function(e){var n=o.indexOf(e);-1===n?r&&p("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=a[e]})),o.length&&r&&p("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function B(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["get".concat(y(n.name))]=function(){return t[n.name]}:e["get".concat(y(n))]=function(){return t[n]}}))}var V={enum:function(e,t,n){return function(r){if("string"==typeof r){if(void 0!==n.enum[r])return t[n.name]!==n.enum[r]&&(t[n.name]=n.enum[r],e.modified(),!0);throw C("Set Enum with invalid argument ".concat(n,", ").concat(r)),new RangeError("Set Enum with invalid string argument")}if("number"==typeof r){if(t[n.name]!==r){if(-1!==Object.keys(n.enum).map((function(e){return n.enum[e]})).indexOf(r))return t[n.name]=r,e.modified(),!0;throw C("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw C("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function R(e){if("object"===Object(a.a)(e)){var t=V[e.type];if(t)return function(n,r){return t(n,r,e)};throw C("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(C("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function w(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["set".concat(y(n.name))]=R(n)(e,t):e["set".concat(y(n))]=R(n)(e,t)}))}function k(e,t,n){B(e,t,n),w(e,t,n)}function W(e,t,n){n.forEach((function(n){e["get".concat(y(n))]=function(){return[].concat(t[n])},e["get".concat(y(n),"ByReference")]=function(){return t[n]}}))}function x(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(y(n))]=function(){if(t.deleted)return C("instance deleted - cannot call any method"),!1;for(var o=arguments.length,i=new Array(o),l=0;l4&&void 0!==arguments[4]?arguments[4]:void 0;W(e,t,n),x(e,t,n,r,a)}var J=Symbol("Event abort");function X(e,t,n){var a=[],o=e.delete,i=1;function l(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return C("instance deleted - cannot call any method"),null;var o=i++;return a.push([o,e,r]),a.sort((function(e,t){return t[2]-e[2]})),s(o)},e.delete=function(){o(),a.forEach((function(e){return l(Object(r.a)(e,1)[0])}))}}function O(e,t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return e(r,n,t),Object.freeze(r)};return t&&l.a.register(t,n),n}function N(e){return e&&e.isA&&e.isA("vtkObject")}function H(e,t,n){var r,a=this;return function(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=function(e,n){t.keystore[e]=n},e.getKey=function(e){return t.keystore[e]},e.getAllKeys=function(){return Object.keys(t.keystore)},e.deleteKey=function(e){return delete t.keystore[e]},e.clearKeystore=function(){return e.getAllKeys().forEach((function(e){return delete t.keystore[e]}))}}var F=1;var P={algo:function(e,t,n,r){function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?C("instance deleted - cannot call any method"):r>=t.numberOfInputs?C("algorithm ".concat(e.getClassName()," only has ").concat(t.numberOfInputs," input ports. To add more input ports, use addInputData()")):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)C("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var a="algorithm ".concat(e.getClassName()," only has ");return a+="".concat(t.numberOfInputs),void C(a+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(C("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(l.a):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(l.a):t.inputConnection=[],t.output?t.output=t.output.map(l.a):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(l.a):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),a=r,o=1/0;a--;){if(!t.output[a])return!0;var i=t.output[a].getMTime();if(io)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=o,e.addInputData=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,a(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,o(e,t.numberOfInputs-1))},e.getInputData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=i,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return i(t)};return n.filter=e,n}),e.update=function(){var n=[];if(t.numberOfInputs)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:"Scalars";t.inputArrayToProcess.length1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],a=Number(e),o="B";a>n;)a/=n,o=r.pop();return"".concat(a.toFixed(t)," ").concat(o)},formatNumbersWithThousandSeparator:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=[],r=e;r>1e3;)n.push("000".concat(r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)},get:B,getArray:W,getCurrentGlobalMTime:function(){return g},getStateArrayMapFunc:A,isVtkObject:N,keystore:Y,newInstance:O,normalizeWheel:function(e){var t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}},obj:S,proxy:function(e,t){Y(e,t);var n=e.delete;t.proxyId="".concat(F++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),B(e,t,["proxyId","proxyGroup","proxyName"]),k(e,t,["proxyManager"]);var r={},a={};function i(e,t){a[t]||(a[t]=[]);for(var n=a[t],o=0;o0&&void 0!==arguments[0]?arguments[0]:"__root__";return a[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__root__",r=[],a=t.proxyId,o=l(n)||[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,a=[],i=0,l=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l)return null;var c=[],g=null;for(i=a.length;i--;){var u=a[i];u.instance===n?g=u:c.push(u)}if(!g)return null;var d=g.instance["get".concat(y(g.propertyName))]();if(!Z(d,r)||s){for(r=d,l=!0;c.length;){var m=c.pop();m.instance.set(Object(o.a)({},m.propertyName,r))}l=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function c(e,t){var n=[];for(i=a.length;i--;){var r=a[i];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(i))}for(;n.length;)a.splice(n.pop(),1)}function g(n,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.onModified(s),g=a[0];return a.push({instance:n,propertyName:r,subscription:l}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(Object(o.a)({},r,t.propertyLinkMap[e].value)):g&&s(g.instance,!0)),{unsubscribe:function(){return c(n,r)}}}function u(){for(;a.length;)a.pop().subscription.unsubscribe()}var d={bind:g,unbind:c,unsubscribe:u,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=function(){return s().map((function(e){return e.name}))},e.getPropertyByName=function(e){return s().find((function(t){return t.name===e}))},e.getPropertyDomainByName=function(e){return(r[e]||{}).domain},e.getProxySection=function(){return{id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}},e.delete=function(){for(var r=Object.keys(t.propertyLinkMap),a=r.length;a--;)t.propertyLinkMap[r[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},G((function(){if(t.links)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function a(e){for(var n=Object.keys(e),r=n.length;r--;){var a=n[r];t[a].set(e[a])}}t.this=e;for(var o=Object.keys(r),i=o.length,l=function(){var l=o[i];t[l]=r[l];var s=n[l];e["set".concat(y(l))]=function(n){n!==t[l]&&(t[l]=n,a(s[n]),e.modified())}};i--;)l();o.length&&B(e,t,o)},safeArrays:v,set:w,setArray:x,setGet:k,setGetArray:T,setImmediate:G,setLoggerFunction:function(e,t){f[e]&&(f[e]=t||m)},throttle:function(e,t){var n=!1,r=null;function a(){n=!1,null!==r&&(o.apply(void 0,Object(i.a)(r)),r=null)}function o(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(N(t)){if(a.indexOf(t)>=0)return r;a.push(t);var o=n(t);void 0!==o&&r.push(o);var i=t.get();Object.keys(i).forEach((function(t){var o=i[t];Array.isArray(o)?o.forEach((function(t){e(t,n,r,a)})):e(o,n,r,a)}))}return r},TYPED_ARRAYS:b,uncapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},VOID:u,vtkDebugMacro:p,vtkErrorMacro:C,vtkInfoMacro:function(){f.info.apply(f,arguments)},vtkLogMacro:function(){f.log.apply(f,arguments)},vtkOnceErrorMacro:function(e){h[e]||(f.error(e),h[e]=!0)},vtkWarningMacro:I};t.c=P}).call(this,n(20))},function(e,t,n){"use strict";t.a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return Y})),n.d(t,"k",(function(){return Z})),n.d(t,"l",(function(){return T})),n.d(t,"m",(function(){return u})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return J})),n.d(t,"q",(function(){return p})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return b})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return h})),n.d(t,"z",(function(){return v})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return i})),n.d(t,"C",(function(){return V})),n.d(t,"D",(function(){return x})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return l}));var r=n(14),a=(n(3),n(53),n(4).c.vtkWarningMacro);function o(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[];t.length1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,a=-1/0,o=t,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t-e;return e+n*Math.random()}function m(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function f(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){var r=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=a,n[2]=o,n}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:for(var n=0,r=0;r2&&void 0!==arguments[2]?arguments[2]:1e-6;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!"".concat(e).includes("e"))return+"".concat(Math.round("".concat(e,"e+").concat(t)),"e-").concat(t);var n="".concat(e).split("e"),r="";return+n[1]+t>0&&(r="+"),+"".concat(Math.round("".concat(+n[0],"e").concat(r).concat(+n[1]+t)),"e-").concat(t)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=G(e[0],n),t[1]=G(e[1],n),t[2]=G(e[2],n),t}function B(e,t,n){var r,i,l,s,c,g,u,d=0,m=o(n);for(r=0;rs&&(s=u);if(0===s)return a("Unable to factor linear system"),0;m[r]=1/s}for(i=0;i=s&&(s=g,d=r)}if(i!==d){for(l=0;l=0)for(o=i;o<=a-1;o++)s-=e[a][o]*n[o];else 0!==s&&(i=a);n[a]=s}for(a=r-1;a>=0;a--){for(s=n[a],o=a+1;oc?c=l:lc?c=s:s0?(c-g)/c:0)>0?(n=i===c?1/6*(l-s)/(c-g):l===c?1/3+1/6*(s-i)/(c-g):2/3+1/6*(i-l)/(c-g))<0&&(n+=1):n=0,t[0]=n,t[1]=a,t[2]=u}function w(e,t){var n,a,o,i=Object(r.a)(e,3),l=i[0],s=i[1],c=i[2],g=1/3,u=1/6,d=2/3;l>u&&l<=g?(a=1,n=(g-l)/u,o=0):l>g&&l<=.5?(a=1,o=(l-g)/u,n=0):l>.5&&l<=d?(o=1,a=(d-l)/u,n=0):l>d&&l<=5/6?(o=1,n=(l-d)/u,a=0):l>5/6&&l<=1?(n=1,o=(1-l)/u,a=0):(n=1,a=l/u,o=0),n=s*n+(1-s),a=s*a+(1-s),o=s*o+(1-s),n*=c,a*=c,o*=c,t[0]=n,t[1]=a,t[2]=o}function k(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2];a>.04045?a=Math.pow((a+.055)/1.055,2.4):a/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,t[0]=.4124*a+.3576*o+.1805*i,t[1]=.2126*a+.7152*o+.0722*i,t[2]=.0193*a+.1192*o+.9505*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0]/.9505,o=n[1]/1,i=n[2]/1.089;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t[0]=116*o-16,t[1]=500*(a-o),t[2]=200*(o-i)}(n,t)}function W(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=(n[0]+16)/116,o=n[1]/500+a,i=a-n[2]/200;a=Math.pow(a,3)>.008856?Math.pow(a,3):(a-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,t[0]=.9505*o,t[1]=1*a,t[2]=1.089*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2],l=3.2406*a+-1.5372*o+-.4986*i,s=-.9689*a+1.8758*o+.0415*i,c=.0557*a+-.204*o+1.057*i;l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,c>.0031308?c=1.055*Math.pow(c,1/2.4)-.055:c*=12.92;var g=l;g1&&(l/=g,s/=g,c/=g),l<0&&(l=0),s<0&&(s=0),c<0&&(c=0),t[0]=l,t[1]=s,t[2]=c}(n,t)}function x(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function T(e){return!(e[1]-e[0]<0)}function J(e,t,n){n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2])}function X(e,t,n){return en?n:e}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=X(e[0],t[0],n[0]),r[1]=X(e[1],t[1],n[1]),r[2]=X(e[2],t[2],n[2]),r}var N=function(e){return!Number.isFinite(e)},H=Number.isNaN;function Y(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(15)),o=n(4),i=n(6);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ta&&(e=a),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=u(),a=e.length,o=0;if(t<0&&n>1){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}var p={computeRange:d,createRangeHelper:u,getDataType:f,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=a)}return n}};function C(e,t){function n(){t.ranges=null,e.modified()}t.classHierarchy.push("vtkDataArray"),e.getElementComponentSize=function(){return t.values.BYTES_PER_ELEMENT},e.getComponent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=function(e,r,a){a!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=a,n())},e.getData=function(){return t.values},e.getRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=e<0?t.numberOfComponents:e,r=null;return t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=d(t.values,e,t.numberOfComponents),t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple)},e.setRange=function(e,n){t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents));var r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=function(e,n){for(var r=e*t.numberOfComponents,a=0;a1&&void 0!==arguments[1]?arguments[1]:g,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var a=e*r;if(1===r)n[0]=t.values[a];else if(2===r)n[0]=t.values[a],n[1]=t.values[a+1];else if(3===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2];else if(4===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2],n[3]=t.values[a+3];else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=function(){return t.numberOfComponents},e.getNumberOfValues=function(){return t.values.length},e.getNumberOfTuples=function(){return t.values.length/t.numberOfComponents},e.getDataType=function(){return t.dataType},e.newClone=function(){return b({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkDataArray".concat(e.getMTime())),t.name},e.setData=function(e,r){t.values=e,t.size=e.length,t.dataType=f(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=s(s({},t),{},{vtkClass:e.getClassName()});n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((function(e){n[e]||delete n[e]}));var r={};return Object.keys(n).sort().forEach((function(e){r[e]=n[e]})),r.mtime&&delete r.mtime,r}}var I={name:"",numberOfComponents:1,size:0,dataType:c,rangeTuple:[0,0]};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,I,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=window[t.dataType].from(t.values)):t.values=new window[t.dataType](t.size),t.values&&(t.size=t.values.length,t.dataType=f(t.values)),Object(o.h)(e,t),Object(o.i)(e,t,["name","numberOfComponents"]),C(e,t)}var b=Object(o.g)(h,"vtkDataArray"),y=s(s({newInstance:b,extend:h},p),a.c);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return Z})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return u})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return c}));var r=n(24);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],o=t[6],i=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],s=t[6],c=t[7],g=t[8],u=t[9],d=t[10],m=t[11],f=t[12],p=t[13],C=t[14],I=t[15],h=n*l-r*i,b=n*s-a*i,y=n*c-o*i,v=r*s-a*l,Z=r*c-o*l,A=a*c-o*s,G=g*p-u*f,S=g*C-d*f,B=g*I-m*f,V=u*C-d*p,R=u*I-m*p,w=d*I-m*C,k=h*w-b*R+y*V+v*B-Z*S+A*G;return k?(k=1/k,e[0]=(l*w-s*R+c*V)*k,e[1]=(a*R-r*w-o*V)*k,e[2]=(p*A-C*Z+I*v)*k,e[3]=(d*Z-u*A-m*v)*k,e[4]=(s*B-i*w-c*S)*k,e[5]=(n*w-a*B+o*S)*k,e[6]=(C*y-f*A-I*b)*k,e[7]=(g*A-d*y+m*b)*k,e[8]=(i*R-l*B+c*G)*k,e[9]=(r*B-n*R-o*G)*k,e[10]=(f*Z-p*y+I*h)*k,e[11]=(u*y-g*Z-m*h)*k,e[12]=(l*S-i*V-s*G)*k,e[13]=(n*V-r*S+a*G)*k,e[14]=(p*b-f*v-C*h)*k,e[15]=(g*v-u*b+d*h)*k,e):null}function s(e,t,n){var r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],p=t[12],C=t[13],I=t[14],h=t[15],b=n[0],y=n[1],v=n[2],Z=n[3];return e[0]=b*r+y*l+v*u+Z*p,e[1]=b*a+y*s+v*d+Z*C,e[2]=b*o+y*c+v*m+Z*I,e[3]=b*i+y*g+v*f+Z*h,b=n[4],y=n[5],v=n[6],Z=n[7],e[4]=b*r+y*l+v*u+Z*p,e[5]=b*a+y*s+v*d+Z*C,e[6]=b*o+y*c+v*m+Z*I,e[7]=b*i+y*g+v*f+Z*h,b=n[8],y=n[9],v=n[10],Z=n[11],e[8]=b*r+y*l+v*u+Z*p,e[9]=b*a+y*s+v*d+Z*C,e[10]=b*o+y*c+v*m+Z*I,e[11]=b*i+y*g+v*f+Z*h,b=n[12],y=n[13],v=n[14],Z=n[15],e[12]=b*r+y*l+v*u+Z*p,e[13]=b*a+y*s+v*d+Z*C,e[14]=b*o+y*c+v*m+Z*I,e[15]=b*i+y*g+v*f+Z*h,e}function c(e,t,n){var r,a,o,i,l,s,c,g,u,d,m,f,p=n[0],C=n[1],I=n[2];return t===e?(e[12]=t[0]*p+t[4]*C+t[8]*I+t[12],e[13]=t[1]*p+t[5]*C+t[9]*I+t[13],e[14]=t[2]*p+t[6]*C+t[10]*I+t[14],e[15]=t[3]*p+t[7]*C+t[11]*I+t[15]):(r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=s,e[6]=c,e[7]=g,e[8]=u,e[9]=d,e[10]=m,e[11]=f,e[12]=r*p+l*C+u*I+t[12],e[13]=a*p+s*C+d*I+t[13],e[14]=o*p+c*C+m*I+t[14],e[15]=i*p+g*C+f*I+t[15]),e}function g(e,t,n){var r=n[0],a=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u(e,t,n,a){var o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B,V,R,w=a[0],k=a[1],W=a[2],x=Math.hypot(w,k,W);return x0?(I=2*Math.sqrt(C+1),e[3]=.25*I,e[0]=(d-f)/I,e[1]=(m-c)/I,e[2]=(s-g)/I):l>u&&l>p?(I=2*Math.sqrt(1+l-u-p),e[3]=(d-f)/I,e[0]=.25*I,e[1]=(s+g)/I,e[2]=(m+c)/I):u>p?(I=2*Math.sqrt(1+u-l-p),e[3]=(m-c)/I,e[0]=(s+g)/I,e[1]=.25*I,e[2]=(d+f)/I):(I=2*Math.sqrt(1+p-l-u),e[3]=(s-g)/I,e[0]=(m+c)/I,e[1]=(d+f)/I,e[2]=.25*I),e}function y(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=t[3],s=a+a,c=o+o,g=i+i,u=a*s,d=a*c,m=a*g,f=o*c,p=o*g,C=i*g,I=l*s,h=l*c,b=l*g,y=r[0],v=r[1],Z=r[2];return e[0]=(1-(f+C))*y,e[1]=(d+b)*y,e[2]=(m-h)*y,e[3]=0,e[4]=(d-b)*v,e[5]=(1-(u+C))*v,e[6]=(p+I)*v,e[7]=0,e[8]=(m+h)*Z,e[9]=(p-I)*Z,e[10]=(1-(u+f))*Z,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function v(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=n+n,l=r+r,s=a+a,c=n*i,g=r*i,u=r*l,d=a*i,m=a*l,f=a*s,p=o*i,C=o*l,I=o*s;return e[0]=1-u-f,e[1]=g+I,e[2]=d-C,e[3]=0,e[4]=g-I,e[5]=1-c-f,e[6]=m+p,e[7]=0,e[8]=d+C,e[9]=m-p,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Z(e,t,n,r,a,o,i){var l=1/(t-n),s=1/(r-a),c=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(i+o)*c,e[15]=1,e}function A(e,t,n,a){var i,l,s,c,g,u,d,m,f,p,C=t[0],I=t[1],h=t[2],b=a[0],y=a[1],v=a[2],Z=n[0],A=n[1],G=n[2];return Math.abs(C-Z)0?(n[0]=2*(s*l+u*a+c*i-g*o)/d,n[1]=2*(c*l+u*o+g*a-s*i)/d,n[2]=2*(g*l+u*i+s*o-c*a)/d):(n[0]=2*(s*l+u*a+c*i-g*o),n[1]=2*(c*l+u*o+g*a-s*i),n[2]=2*(g*l+u*i+s*o-c*a)),I(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:h,getRotation:b,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(e,t,n,r,a){var o=t[0],i=t[1],l=t[2],s=t[3],c=o+o,g=i+i,u=l+l,d=o*c,m=o*g,f=o*u,p=i*g,C=i*u,I=l*u,h=s*c,b=s*g,y=s*u,v=r[0],Z=r[1],A=r[2],G=a[0],S=a[1],B=a[2],V=(1-(p+I))*v,R=(m+y)*v,w=(f-b)*v,k=(m-y)*Z,W=(1-(d+I))*Z,x=(C+h)*Z,T=(f+b)*A,J=(C-h)*A,X=(1-(d+p))*A;return e[0]=V,e[1]=R,e[2]=w,e[3]=0,e[4]=k,e[5]=W,e[6]=x,e[7]=0,e[8]=T,e[9]=J,e[10]=X,e[11]=0,e[12]=n[0]+G-(V*G+k*S+T*B),e[13]=n[1]+S-(R*G+W*S+J*B),e[14]=n[2]+B-(w*G+x*S+X*B),e[15]=1,e},fromQuat:v,frustum:function(e,t,n,r,a,o,i){var l=1/(n-t),s=1/(a-r),c=1/(o-i);return e[0]=2*o*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(i+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*c,e[15]=0,e},perspective:function(e,t,n,r,a){var o,i=1/Math.tan(t/2);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(o=1/(r-a),e[10]=(a+r)*o,e[14]=2*a*r*o):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(i+l),c=2/(a+o);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(i-l)*s*.5,e[9]=(a-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:Z,lookAt:A,targetTo:function(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=r[0],s=r[1],c=r[2],g=a-n[0],u=o-n[1],d=i-n[2],m=g*g+u*u+d*d;m>0&&(g*=m=1/Math.sqrt(m),u*=m,d*=m);var f=s*d-c*u,p=c*g-l*d,C=l*u-s*g;return(m=f*f+p*p+C*C)>0&&(f*=m=1/Math.sqrt(m),p*=m,C*=m),e[0]=f,e[1]=p,e[2]=C,e[3]=0,e[4]=u*C-d*p,e[5]=d*f-g*C,e[6]=g*p-u*f,e[7]=0,e[8]=g,e[9]=u,e[10]=d,e[11]=0,e[12]=a,e[13]=o,e[14]=i,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:G,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var n=e[0],a=e[1],o=e[2],i=e[3],l=e[4],s=e[5],c=e[6],g=e[7],u=e[8],d=e[9],m=e[10],f=e[11],p=e[12],C=e[13],I=e[14],h=e[15],b=t[0],y=t[1],v=t[2],Z=t[3],A=t[4],G=t[5],S=t[6],B=t[7],V=t[8],R=t[9],w=t[10],k=t[11],W=t[12],x=t[13],T=t[14],J=t[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-y)<=r.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(o-v)<=r.b*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-Z)<=r.b*Math.max(1,Math.abs(i),Math.abs(Z))&&Math.abs(l-A)<=r.b*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(s-G)<=r.b*Math.max(1,Math.abs(s),Math.abs(G))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(g-B)<=r.b*Math.max(1,Math.abs(g),Math.abs(B))&&Math.abs(u-V)<=r.b*Math.max(1,Math.abs(u),Math.abs(V))&&Math.abs(d-R)<=r.b*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(m-w)<=r.b*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(f-k)<=r.b*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-W)<=r.b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(C-x)<=r.b*Math.max(1,Math.abs(C),Math.abs(x))&&Math.abs(I-T)<=r.b*Math.max(1,Math.abs(I),Math.abs(T))&&Math.abs(h-J)<=r.b*Math.max(1,Math.abs(h),Math.abs(J))},mul:S,sub:B})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return p(e,null==t?n.path:t)}},n.exports),n.exports}function i(e,t){l[e]=t}const l=Object.create(null),s=Object.create(null),c={id:"",exports:{},parent:void 0,filename:null,loaded:!1,children:[],paths:[]},g=["",".js",".json"];function u(e){const t=(e=e.replace(/\\/g,"/")).split("/"),n=""===t[0];for(let e=1;e0&&".."!==t[e-1]&&"."!==t[e-1]&&(t.splice(--e,2),e--);return e=t.join("/"),n&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}function d(){if(0===arguments.length)return".";let e;for(let t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":e}function m(e){if(0===e.length)return".";let t=e.length-1;for(;t>0;){const n=e.charCodeAt(t);if((47===n||92===n)&&t!==e.length-1)break;t--}return t>0?e.substr(0,t):47===e.chartCodeAt(0)||92===e.chartCodeAt(0)?e.charAt(0):"."}function f(e,t,n){const r=function(e){let t=e[0];if("/"===t||"\\"===t)return!1;let n=e[1],r=e[2];return!(!("."!==t||n&&"/"!==n&&"\\"!==n)||!("."!==t||"."!==n||r&&"/"!==r&&"\\"!==r))&&(":"!==n||"/"!==r&&"\\"!==r)}(e);let a;for("/"===(e=u(e))[0]&&(t="/");a=r?u(t?t+"/node_modules/"+e:d("node_modules",e)):t?u(t+"/"+e):e,!a.endsWith("/..");){for(let e=0;e1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function u(e,t){for(var n=0;n0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[0],l=n[1],s=n[2];return e[0]=a*s-o*l,e[1]=o*i-r*s,e[2]=r*l-a*i,e}function v(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[3]*r+n[7]*a+n[11]*o+n[15];return i=i||1,e[0]=(n[0]*r+n[4]*a+n[8]*o+n[12])/i,e[1]=(n[1]*r+n[5]*a+n[9]*o+n[13])/i,e[2]=(n[2]*r+n[6]*a+n[10]*o+n[14])/i,e}function Z(e,t,n){var r=t[0],a=t[1],o=t[2];return e[0]=r*n[0]+a*n[3]+o*n[6],e[1]=r*n[1]+a*n[4]+o*n[7],e[2]=r*n[2]+a*n[5]+o*n[8],e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function G(e,t){var n=e[0],a=e[1],o=e[2],i=t[0],l=t[1],s=t[2];return Math.abs(n-i)<=r.b*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-s)<=r.b*Math.max(1,Math.abs(o),Math.abs(s))}var S,B=c,V=g,R=u,w=m,k=f,W=o,x=p,T=(S=a(),function(e,t,n,r,a,o){var i,l;for(t||(t=3),n||(n=0),l=r?Math.min(r*t+n,e.length):e.length,i=n;i1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=new(window[e.getDataType()])(3*t.pointsIds.length));var a=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=a[n],r[++o]=a[++n],r[++o]=a[++n]})),t.points.setData(r)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(var o=e.getNumberOfPoints()-1;o>=0;--o)t.pointsIds[o]=o}},e.getBounds=function(){var e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(var r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else Object(s.D)(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,a=0;a<3;a++)n+=(r=t.bounds[2*a+1]-t.bounds[2*a])*r;return n},e.getParametricDistance=function(e){for(var t,n=0,r=0;r<3;r++)(t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0)>n&&(n=t);return n},e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.deepCopy=function(e){e.initialize(t.points,t.pointsIds)},e.getCellDimension=function(){},e.intersectWithLine=function(e,t,n,r,a,o,i){},e.evaluatePosition=function(e,t,n,r,a,o){}}var u={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.c.obj(e,t),t.points||(t.points=c.a.newInstance()),a.c.get(e,t,["points","pointsIds"]),g(e,t)}var m={newInstance:a.c.newInstance(d,"vtkCell"),extend:d};function f(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),a=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((function(){return{ncells:0,cells:null}})),t.extend=n,t.maxId=-1},e.initialize=function(){t.array=null},e.getLink=function(e){return t.array[e]},e.getNcells=function(e){return t.array[e].ncells},e.getCells=function(e){return t.array[e].cells},e.insertNextPoint=function(e){t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=function(e,n){t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=function(e){t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=function(e,n){t.array[n].cells=t.array[n].cells.filter((function(t){return t!==e})),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=function(e,n){t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=function(e,n){t.array[e].cells.length=n},e.squeeze=function(){!function(e,t){var n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=function(){t.maxId=-1},e.deepCopy=function(e){t.array=Object(l.a)(e.array),t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=function(e){++t.array[e].ncells},e.allocateLinks=function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.c.obj(e,t),f(e,t)}var I={newInstance:a.c.newInstance(C,"vtkCellLinks"),extend:C},h=0,b=1,y=2,v=3,Z=4,A=5,G=6,S=7,B=9,V=21,R=41,w=42,k=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=function(e,n,r){t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=function(n,r){return e.insertCell(++t.maxId,n,r),t.maxId},e.setCellTypes=function(e,n,r){t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=function(e){return t.locationArray[e]},e.deleteCell=function(e){t.typeArray[e]=h},e.getNumberOfTypes=function(){return t.maxId+1},e.isType=function(t){for(var n=e.getNumberOfTypes(),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J,n),a.c.obj(e,t),a.c.get(e,t,["size","maxId","extend"]),a.c.getArray(e,t,["typeArray","locationArray"]),T(e,t)}var O=function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},i=[];i[0]=n[0]-t[0],i[1]=n[1]-t[1],i[2]=n[2]-t[2];var l=i[0]*(e[0]-t[0])+i[1]*(e[1]-t[1])+i[2]*(e[2]-t[2]),c=Object(s.q)(i,i),g=1e-5*l;return 0!==c&&(o.t=l/c),g<0&&(g=-g),-g1?r=n:(r=i,i[0]=t[0]+o.t*i[0],i[1]=t[1]+o.t*i[1],i[2]=t[2]+o.t*i[2]),a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2]),o.distance=Object(s.s)(r,e),o}function K(e,t,n,r,a,o){var i=[],l=[],c=[];a[0]=0,o[0]=0,i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],l[0]=r[0]-n[0],l[1]=r[1]-n[1],l[2]=r[2]-n[2],c[0]=n[0]-e[0],c[1]=n[1]-e[1],c[2]=n[2]-e[2];var g=[];g[0]=[Object(s.q)(i,i),-Object(s.q)(i,l)],g[1]=[g[0][1],Object(s.q)(l,l)];var u=[];if(u[0]=Object(s.q)(i,c),u[1]=-Object(s.q)(l,c),0===Object(s.C)(g,u,2)){for(var d,m=Number.MAX_VALUE,f=[e,t,n,r],p=[n,n,e,e],C=[r,r,t,t],I=[o[0],o[0],a[0],a[0]],h=[a[0],a[0],o[0],o[0]],b=0;b<4;b++)(d=P(f[b],p[b],C[b])).distance=0&&a[0]<=1&&o[0]>=0&&o[0]<=1?F.YES_INTERSECTION:F.NO_INTERSECTION}var M={distanceToLine:P,intersection:K};function L(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,a,o){var i={intersect:0,t:Number.MIN_VALUE,subId:0};o[1]=0,o[2]=0;var l=[],c=[],g=[];t.points.getPoint(0,c),t.points.getPoint(1,g);var u=[],d=[],m=K(e,n,c,g,u,d);if(i.t=u[0],o[0]=d[0],m===F.YES_INTERSECTION){for(var f=0;f<3;f++)a[f]=c[f]+o[0]*(g[f]-c[f]),l[f]=e[f]+i.t*(n[f]-e[f]);if(Object(s.s)(a,l)<=r*r)return i.intersect=1,i}else{var p;if(i.t<0)return i.t=0,p=P(e,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(i.t>1)return i.t=1,p=P(n,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[0]<0)return o[0]=0,p=P(c,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[1]>1)return o[1]=1,p=P(g,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i}return i},e.evaluatePosition=function(e,t,n,r,a,o){}}var D={};function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),m.extend(e,t,n),L(e,t)}var U=Y(Y({newInstance:a.c.newInstance(E,"vtkLine"),extend:E},M),N),z=n(30);function _(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=Object(o.a)(t.points):t.points=c.a.newInstance(),e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.getBounds=function(){return t.points.getBounds()},e.computeBounds=function(){e.getBounds()};var n=e.shallowCopy;e.shallowCopy=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=c.a.newInstance(),t.points.shallowCopy(e.getPoints())}}var j={};function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),z.a.extend(e,t,n),a.c.setGet(e,t,["points"]),_(e,t)}var q={newInstance:a.c.newInstance(Q,"vtkPointSet"),extend:Q},$=n(39);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n,r){var a=n[0]-t[0],o=n[1]-t[1],i=n[2]-t[2],l=e[0]-t[0],s=e[1]-t[1],c=e[2]-t[2];r[0]=o*c-i*s,r[1]=i*l-a*c,r[2]=a*s-o*l}function ne(e,t,n,r){te(e,t,n,r);var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==a&&(r[0]/=a,r[1]/=a,r[2]/=a)}var re={computeNormalDirection:te,computeNormal:ne};function ae(e,t){t.classHierarchy.push("vtkTriangle"),e.getCellDimension=function(){return 2},e.intersectWithLine=function(n,r,a,o,i){var l={subId:0,t:0,intersect:-1};i[2]=0;var c=a*a,g=[],u=[],d=[];t.points.getPoint(0,g),t.points.getPoint(1,u),t.points.getPoint(2,d);var m=[];if(ne(g,u,d,m),0!==m[0]||0!==m[1]||0!==m[2]){var f=$.a.intersectWithLine(n,r,g,m);if(l.t=f.t,o[0]=f.x[0],o[1]=f.x[1],o[2]=f.x[2],!f.intersection)return i[0]=0,i[1]=0,l.intersect=0,l;var p=e.evaluatePosition(o,[],i,[]);if(p.evaluation>=0)return p.dist2<=c?(l.intersect=1,l):(l.intersect=p.evaluation,l)}var C=Object(s.s)(g,u),I=Object(s.s)(u,d),h=Object(s.s)(d,g);if(t.line||(t.line=U.newInstance()),C>I&&C>h?(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,u)):I>h&&I>C?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,g)),t.line.intersectWithLine(n,r,a,o,i).intersect){for(var b=[],y=[],v=[],Z=0;Z<3;Z++)b[Z]=g[Z]-d[Z],y[Z]=u[Z]-d[Z],v[Z]=o[Z]-d[Z];return i[0]=Object(s.q)(v,b)/h,i[1]=Object(s.q)(v,y)/I,l.evaluation=1,l}return i[0]=0,i[1]=0,l.evaluation=0,l},e.evaluatePosition=function(e,n,r,a){var o,i,l,c,g,u,d,m={subId:0,dist2:0,evaluation:-1},f=[],p=[],C=[],I=[],h=[],b=[],y=[],v=0,Z=[],A=[],G=[],S=[],B=[];m.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,p),t.points.getPoint(0,C),te(f,p,C,I),$.a.generalizedProjectPoint(e,f,I,B);var V=0;for(o=0;o<3;o++)(l=I[o]<0?-I[o]:I[o])>V&&(V=l,v=o);for(i=0,o=0;o<3;o++)o!==v&&(Z[i++]=o);for(o=0;o<2;o++)h[o]=B[Z[o]]-C[Z[o]],b[o]=f[Z[o]]-C[Z[o]],y[o]=p[Z[o]]-C[Z[o]];if(0===(c=Object(s.z)(b,y)))return r[0]=0,r[1]=0,m.evaluation=-1,m;if(r[0]=Object(s.z)(h,y)/c,r[1]=Object(s.z)(b,h)/c,a[0]=1-(r[0]+r[1]),a[1]=r[0],a[2]=r[1],a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&a[2]>=0&&a[2]<=1)n&&(m.dist2=Object(s.s)(B,e),n[0]=B[0],n[1]=B[1],n[2]=B[2]),m.evaluation=1;else{var R;if(n)if(a[1]<0&&a[2]<0)for(g=Object(s.s)(e,C),u=U.distanceToLine(e,f,C,R,G),d=U.distanceToLine(e,C,p,R,S),g1?r[a]-1:0)>n&&(n=t);return n}}var oe={};function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oe,n),m.extend(e,t,n),ae(e,t)}var le,se=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),ce.forEach((function(n){t[n]=i.a.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),a=e.getNumberOfPolys(),o=e.getNumberOfStrips(),i=n+r+a+o,l=new Uint8Array(i),s=l,c=new Uint32Array(i),g=c;if(n){var u=0;t.verts.getCellSizes().forEach((function(e,t){g[t]=u,s[t]=e>1?y:b,u+=e+1})),g=g.subarray(n),s=s.subarray(n)}if(r){var d=0;t.lines.getCellSizes().forEach((function(e,t){g[t]=d,s[t]=e>2?Z:v,1===e&&ge("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),d+=e+1})),g=g.subarray(r),s=s.subarray(r)}if(a){var m=0;t.polys.getCellSizes().forEach((function(e,t){switch(g[t]=m,e){case 3:s[t]=A;break;case 4:s[t]=B;break;default:s[t]=S}e<3&&ge("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),m+=e+1})),g+=g.subarray(a),s+=s.subarray(a)}if(o){var f=0;s.fill(G,0,o),t.strips.getCellSizes().forEach((function(e,t){g[t]=f,f+=e+1}))}t.cells=O.newInstance(),t.cells.setCellTypes(i,l,c)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=I.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellPoints=function(e){var n=t.cells.getCellType(e),r=null;switch(n){case b:case y:r=t.verts;break;case v:case Z:r=t.lines;break;case A:case B:case S:r=t.polys;break;case G:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var a=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(a)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var a=t.links.getLink(n),o=t.links.getLink(r);return a.cells.filter((function(t){return t!==e&&-1!==o.cells.indexOf(t)}))},e.getCell=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.getCellPoints(t),a=n||ue[r.cellType].newInstance();return a.initialize(e.getPoints(),r.cellPointIds),a}}var me={};function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,me,n),q.extend(e,t,n),a.c.get(e,t,["cells","links"]),a.c.setGet(e,t,["verts","lines","polys","strips"]),de(e,t)}var pe={newInstance:a.c.newInstance(fe,"vtkPolyData"),extend:fe};t.a=pe},function(e,t,n){"use strict";var r=function(e){if(Array.isArray(e))return e};var a=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}},o=n(41);var i=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};t.a=function(e,t){return r(e)||a(e,t)||Object(o.a)(e,t)||i()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},a={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"},o={DefaultDataType:a.FLOAT,DataTypeByteSize:r,VtkDataTypes:a};t.c=o},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.d(t,"a",(function(){return a})),r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}};var a=r},function(e,t,n){"use strict";(function(e){var r=n(48),a=n(5);n(3);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i={vtkObject:function(){return null}};function l(t){if(null==t)return t;if(t.isA)return t;if(!t.vtkClass)return e.console&&e.console.error&&e.console.error("Invalid VTK object"),null;var n=i[t.vtkClass];if(!n)return e.console&&e.console.error&&e.console.error("No vtk class found for Object of type ".concat(t.vtkClass)),null;var s=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:a,registerType:o};t.a=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),a=n(54),o=Object(r.d)((function(t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!a.a.Readable}catch(t){n.nodestream=!1}}),"/$$rollup_base$$/node_modules/jszip/lib")}).call(this,n(35).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],g=!1,u=-1;function d(){g&&s&&(g=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!g){var e=l(d);g=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,a,i;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+".".length>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var i={codes:r}},function(e,t,n){"use strict";var r=n(11),a=n(51),o=n(52),i=(n(3),n(24)),l=n(8),s=n(12),c=n(6),g=function(e){return e},u=Object(l.h)(new Float64Array(16)),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(a.a)(this,e),this.matrix=Object(l.h)(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?i.d:g}return Object(o.a)(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(16);Object(s.p)(n,e[0],e[1],e[2]),Object(s.p)(r,t[0],t[1],t[2]),Object(s.l)(n,n),Object(s.l)(r,r);var o=Object(s.d)(n,r);return o>=1||(Object(s.c)(this.tmp,n,r),Object(s.j)(this.tmp)<1e-6&&(Object(s.c)(this.tmp,[1,0,0],e),Object(s.j)(this.tmp)<1e-6&&Object(s.c)(this.tmp,[0,1,0],e)),Object(l.f)(a,Math.acos(o),this.tmp),Object(l.l)(this.matrix,this.matrix,a)),this}},{key:"rotate",value:function(e,t){return s.p.apply(s.r,[this.tmp].concat(Object(r.a)(t))),Object(s.l)(this.tmp,this.tmp),Object(l.q)(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Object(l.a)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return Object(l.b)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Object(l.c)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.s)(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.r)(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Object(l.l)(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Object(l.h)(this.matrix),this}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Object(c.n)(u,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,a=t;a2&&void 0!==arguments[2]?arguments[2]:{},a=new XMLHttpRequest;return a.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return a.setRequestHeader(n,o)})),n.progressCallback&&a.addEventListener("progress",n.progressCallback),a}var m={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r&&r.compression?g():n.ref&&!n.ref.pending?new Promise((function(a,l){var g=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);g.onreadystatechange=function(t){1===g.readyState&&(n.ref.pending=!0,1==++u&&e.invokeBusy&&e.invokeBusy(!0)),4===g.readyState&&(n.ref.pending=!1,200===g.status||0===g.status?(n.buffer=g.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.a.ENDIANNESS!==n.ref.encode&&o.a.ENDIANNESS&&(c("Swap bytes of ".concat(n.name)),o.a.swapBytes(n.buffer,i.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&s("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--u&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):l({xhr:g,e:t}))},g.responseType="string"!==n.dataType?"arraybuffer":"text",g.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=d("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(l.b)("http")||Object(l.c)("http",(function(e){return m}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),a=Object(r.d)((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),"/$$rollup_base$$/node_modules/inherits")},function(e,t,n){"use strict";n(3);var r=n(4),a=n(7),o=n(15),i=r.c.vtkErrorMacro,l=[1,-1,1,-1,1,-1];function s(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=new window[t.dataType](t.size),e.setNumberOfComponents(r),e.modified())},e.setPoint=function(e){for(var n=e*t.numberOfComponents,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.a.extend(e,t,n),s(e,t)}var u={newInstance:r.c.newInstance(g,"vtkPoints"),extend:g};t.a=u},function(e,t,n){"use strict";var r,a,o=n(9),i=o.b.MutationObserver||o.b.WebKitMutationObserver;if(i){var l=0,s=new i(d),c=o.b.document.createTextNode("");s.observe(c,{characterData:!0}),r=function(){c.data=l=++l%2}}else if(o.b.setImmediate||void 0===o.b.MessageChannel)r="document"in o.b&&"onreadystatechange"in o.b.document.createElement("script")?function(){var e=o.b.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},o.b.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var g=new o.b.MessageChannel;g.port1.onmessage=d,r=function(){g.port2.postMessage(0)}}var u=[];function d(){var e,t;a=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e=0&&e=0},e.getArrayName=function(e){var n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=function(){return t.copyFieldFlags},e.getFlag=function(e){return t.copyFieldFlags[e]},e.passData=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((function(n){var o=e.getFlag(n.getName());if(!1!==o&&(!t.doCopyAllOff||!0===o)&&n){var l=e.getArrayByName(n.getName());if(l){if(n.getNumberOfComponents()===l.getNumberOfComponents())if(r>-1&&r-1?a:r;l.setTuple(s,n.getTuple(r))}else for(var c=0;cn.getNumberOfTuples())e.addArray(n);else{var g=n.getNumberOfComponents(),u=n.getNumberOfValues(),d=a>-1?a:r;ue?t.data.getMTime():e}),t.mtime)},e.getNumberOfComponents=function(){return t.arrays.reduce((function(e,t){return e+t.data.getNumberOfComponents()}),0)},e.getNumberOfTuples=function(){return t.arrays.length>0?t.arrays[0].getNumberOfTuples():0},e.getState=function(){var e=n();return e.arrays=t.arrays.map((function(e){return{data:e.data.getState()}})),e}}var s={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),a.c.obj(e,t),l(e,t)}var g={newInstance:a.c.newInstance(c,"vtkFieldData"),extend:c},u=n(37);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=u.c.AttributeTypes,f=u.c.AttributeCopyOperations,p=a.c.vtkWarningMacro;function C(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return m[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()}));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes"),e.checkNumberOfComponents=function(e){return!0},e.setAttribute=function(n,a){var o=r(a);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return p("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return p("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var i=t["active".concat(o)];if(i>=0&&i=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),g.extend(e,t,n),a.c.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),C(e,t)}var b=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Z.forEach((function(n){t[n]=b.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var G={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,G,n),a.c.obj(e,t),a.c.setGet(e,t,Z),A(e,t)}var B=function(e){for(var t=1;t0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,i=[],l=t;l>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var d=function(e){var t,n,r=g(e),a=r[0],l=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,u=l>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===l&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[c++]=255&t),1===l&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},m=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,l=0,s=n-r;ls?s:l+i));return 1===r?(t=e[n-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")},f=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},p=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p};n.d(t,"a",(function(){return C}));var C=Object(r.d)((function(e,t){const n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;const r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|C(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return o.from(r,t,n);const i=function(e){if(o.isBuffer(e)){const t=0|u(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),a(e<0?0:0|u(e))}function c(e){const t=e.length<0?0:0|u(e.length),n=a(t);for(let r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function C(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return r?-1:U(e).length;t=(""+t).toLowerCase(),a=!0}}function I(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){let o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){let r=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;ra&&(r=a):r=a;const o=t.length;let i;for(r>o/2&&(r=o/2),i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function V(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a239?4:t>223?3:t>191?2:1;if(a+i<=n){let n,r,l,s;switch(i){case 1:t<128&&(o=t);break;case 2:n=e[a+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[a+1],r=e[a+2],l=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&l)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},o.byteLength=C,o.prototype._isBuffer=!0,o.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,n,r,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0);const s=Math.min(i,l),c=this.slice(r,a),g=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return Z(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return G(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;ar)&&(n=r);let a="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function X(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function O(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function N(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,4),p(e,t,n,r,23,4),n+4}function Y(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,8),p(e,t,n,r,52,8),n+8}o.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o=a&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);let r=t,a=1,o=this[e+--r];for(;r>0&&(a*=256);)o+=this[e+--r]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||T(e,4,this.length),f(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),f(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=0,o=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=n-1,o=1,i=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/o>>0)-i&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return Y(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Y(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||D(t,e.length-(n+1))}(r,a,o)}function L(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function D(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=K(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=K(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const E=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;const r=e.length;let a=null;const o=[];for(let i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function $(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}),"/$$rollup_base$$/node_modules/buffer")},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r,a="object"==typeof Reflect?Reflect:null,o=a&&"function"==typeof a.apply?a.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=a&&"function"==typeof a.ownKeys?a.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function l(){l.init.call(this)}var s=l;l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var c=10;function g(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?l.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var a,o,i,l;if(g(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),i=o[t]),void 0===i)i=o[t]=n,++e._eventsCount;else if("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(a=u(e))>0&&i.length>a&&!i.warned){i.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=i.length,l=s,console&&console.warn&&console.warn(l)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=m.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,g=I(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},l.prototype.listenerCount=C,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},s.once=function(e,t){return new Promise((function(n,r){function a(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,a),r(n)},e.once("error",o)),e.once(t,a)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22).a.codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}var o=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function I(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:h(e,t,n,r,a);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):h(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,n,r,a){var o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var g=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){for(var u=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+u<=n)switch(u){case 1:c<128&&(g=c);break;case 2:128==(192&(o=e[a+1]))&&(s=(31&c)<<6|63&o)>127&&(g=s);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(s=(15&c)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:o=e[a+1],i=e[a+2],l=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&l)&&(s=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&l)>65535&&s<1114112&&(g=s)}null===g?(g=65533,u=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),a+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,a){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),l=Math.min(o,i),c=this.slice(r,a),g=e.slice(t,n),u=0;ua)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return Z(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,a,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function J(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function X(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||X(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||X(e,0,n,8),a.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},s.prototype.readUInt8=function(e,t){return t||W(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||W(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||W(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||W(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||W(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):J(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=0,i=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=n-1,i=1,l=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/i>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):J(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(7),i=n(15);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};o.a.extend(e,t,d(n)),u(e,t)}var f=s({newInstance:a.c.newInstance(m,"vtkCellArray"),extend:m},g);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},a={DEFAULT:0,SINGLE:1,DOUBLE:2},o={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:r,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:a,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};t.c=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));n(3);var r={UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},a={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7},o={FieldDataTypes:r,FieldAssociations:a};t.c=o},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(6)),o=n(4);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){var r=n[0]*(e[0]-t[0])+n[1]*(e[1]-t[1])+n[2]*(e[2]-t[2]);return Math.abs(r)}function s(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o);r[0]=e[0]-i*n[0],r[1]=e[1]-i*n[1],r[2]=e[2]-i*n[2]}function c(e,t,n){var r=Object(a.q)(e,t),o=Object(a.q)(t,t);return 0===o&&(o=1),n[0]=e[0]-r*t[0]/o,n[1]=e[1]-r*t[1]/o,n[2]=e[2]-r*t[2]/o,n}function g(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o),l=Object(a.q)(n,n);0!==l?(r[0]=e[0]-i*n[0]/l,r[1]=e[1]-i*n[1]/l,r[2]=e[2]-i*n[2]/l):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function u(e,t,n,r){var o={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],l=[];Object(a.t)(t,e,i),Object(a.t)(n,e,l);var s=Object(a.q)(r,l),c=Object(a.q)(r,i);return(c<0?-c:c)<=(s<0?1e-6*-s:1e-6*s)||(o.t=s/c,o.x[0]=e[0]+o.t*i[0],o.x[1]=e[1]+o.t*i[1],o.x[2]=e[2]+o.t*i[2],o.intersection=!0,o.betweenPoints=o.t>=0&&o.t<=1),o}function d(e,t,n,r){var o={intersection:!1,l0:[],l1:[],error:null},i=[];Object(a.w)(t,r,i);var l,s=i.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<1e-6){var c=[];return Object(a.t)(e,n,c),0===Object(a.q)(t,c)?o.error="coincide":o.error="disjoint",o}l=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var g=[],u=-Object(a.q)(t,e),d=-Object(a.q)(r,n);switch(l){case"x":g[0]=0,g[1]=(d*t[2]-u*r[2])/i[0],g[2]=(u*r[1]-d*t[1])/i[0];break;case"y":g[0]=(u*r[2]-d*t[2])/i[1],g[1]=0,g[2]=(d*t[0]-u*r[0])/i[1];break;case"z":g[0]=(d*t[1]-u*r[1])/i[2],g[1]=(u*r[0]-d*t[0])/i[2],g[2]=0}return o.l0=g,Object(a.x)(g,i,o.l1),o.intersection=!0,o}var m={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:s,projectVector:c,generalizedProjectPoint:g,intersectWithLine:u,intersectWithPlane:d,DISJOINT:"disjoint",COINCIDE:"coincide"};function f(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return l(e,t.origin,t.normal)},e.projectPoint=function(e,n){s(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return c(e,t.normal,n)},e.push=function(e){if(0!==e)for(var n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=function(e,n){g(e,t.origin,t.normal,n)},e.evaluateFunction=function(e,n,r){return Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2])},e.evaluateGradient=function(e){return[t.normal[0],t.normal[1],t.normal[2]]},e.intersectWithLine=function(e,n){return u(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return d(e,n,t.origin,t.normal)}}var p={normal:[0,0,1],origin:[0,0,0]};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.c.obj(e,t),o.c.setGetArray(e,t,["normal","origin"],3),f(e,t)}var I=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,a=r(e),o=t.exec(a);if(!o)return{text:a};var i=o.index+o[0].length,l=a.substring(0,i),s=null,c=n?n.exec(a):null;if(c){var g=a.substr(c.index);s={text:l+g,binaryBuffer:e.slice(i,c.index)}}else s={text:l,binaryBuffer:e.slice(i)};return s}};t.a=a},function(e,t,n){"use strict";var r=n(42);t.a=function(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===b.prototype||(t=function(e){return b.from(e)}(t)),r)i.endEmitted?k(e,new w):X(e,i,t,!0);else if(i.ended)k(e,new V);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):Y(e,i)):X(e,i,t,!1)}else r||(i.reading=!1,Y(e,i));return!i.ended&&(i.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(t){var n=t._readableState;I("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(I("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(H,t))}function H(e){var t=e._readableState;I("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function Y(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(F,t,n))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){I("readable nexttick read 0"),e.read(0)}function M(e,t){I("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function E(t){var n=t._readableState;I("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(U,n,t))}function U(e,t){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):N(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&E(this),null;var r,a=t.needReadable;return I("need readable",a),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){k(this,new R("_read()"))},T.prototype.pipe=function(t,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,I("pipe count=%d opts=%j",a.pipesCount,n);var o=n&&!1===n.end||t===e.stdout||t===e.stderr?m:i;function i(){I("onend"),t.end()}a.endEmitted?e.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){I("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,I("cleanup"),t.removeListener("close",u),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),s=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(e,"data")&&(t.flowing=!0,L(e))}}(r);t.on("drain",l);var s=!1;function c(e){I("ondata");var n=t.write(e);I("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==z(a.pipes,t))&&!s&&(I("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function g(e){I("onerror",e),m(),t.removeListener("error",g),0===h(t,"error")&&k(t,e)}function u(){t.removeListener("finish",d),m()}function d(){I("onfinish"),t.removeListener("close",u),m()}function m(){I("unpipe"),r.unpipe(t)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",u),t.once("finish",d),t.emit("pipe",r),a.flowing||(I("pipe resume"),r.resume()),t},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==a.flowing&&this.resume()):"readable"===t&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,I("on readable",a.length,a.reading),a.length?N(this):a.reading||e.nextTick(K,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,n){var r=o.a.prototype.removeListener.call(this,t,n);return"readable"===t&&e.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var n=o.a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||e.nextTick(P,this),n},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!t.readableListening,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(M,t,n))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(I("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){I("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new V(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),W.prototype._write=function(e,t,n){n(new v("_write()"))},W.prototype._writev=null,W.prototype.end=function(t,n,r){var a=this._writableState;return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),a.corked&&(a.corked=1,this.uncork()),a.ending||function(t,n,r){n.ending=!0,N(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,a,r),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),W.prototype.destroy=s.a.destroy,W.prototype._undestroy=s.a.undestroy,W.prototype._destroy=function(e,t){t(e)}}).call(this,n(21))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),a=n(19),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){for(var t,n,a,i,l,s,c,g=[],u=0,d=e.length,m=d,f="string"!==r.a.getTypeOf(e);u>2,l=(3&t)<<4|n>>4,s=m>1?(15&n)<<2|a>>6:64,c=m>2?63&a:64,g.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(c));return g.join("")},decode:function(e){var t,n,r,i,l,s,c=0,g=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,m=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&m--,e.charAt(e.length-2)===o.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.a.uint8array?new Uint8Array(0|m):new Array(0|m);c>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(c++)))>>2,r=(3&l)<<6|(s=o.indexOf(e.charAt(c++))),d[g++]=t,64!==l&&(d[g++]=n),64!==s&&(d[g++]=r);return d}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(67),o=n(16),i=n(49),l=n(19),s=n(28),c=n(68),g=null;if(l.a.nodestream)try{g=c.a}catch(e){}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,r.a.checkSupport(i),this._worker=e.pipe(new a.a(i)),e.lock()}catch(e){this._worker=new o.a("error"),this._worker.error(e)}}u.prototype={accumulate:function(t){return n=this,a=t,new s.a.Promise((function(t,o){var l=[],s=n._internalType,c=n._outputType,g=n._mimeType;n.on("data",(function(e,t){l.push(e),a&&a(t)})).on("error",(function(e){l=[],o(e)})).on("end",(function(){try{var n=function(e,t,n){switch(e){case"blob":return r.a.newBlob(r.a.transformTo("arraybuffer",t),n);case"base64":return i.a.encode(t);default:return r.a.transformTo(e,t)}}(c,function(t,n){var r,a=0,o=null,i=0;for(r=0;r>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new r(e),o=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.alea=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),o=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor128=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),i=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorwow=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),l=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,a=t.i;return e=r[a],n=(e^=e>>>7)^e<<24,n^=(e=r[a+1&7])^e>>>10,n^=(e=r[a+3&7])^e>>>3,n^=(e=r[a+4&7])^e<<7,e=r[a+7&7],n^=(e^=e<<13)^e<<9,r[a]=n,t.i=a+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.x&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorshift7=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),s=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,a=t.X,o=t.i;return t.w=r=r+1640531527|0,n=a[o+34&127],e=a[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=a[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,a,o,i,l=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),a=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(i=i+1640531527|0,a=0==(n=l[127&o]^=r+i)?a+1:0);for(a>=128&&(l[127&(t&&t.length||0)]=-1),a=127,o=512;o>0;--o)r=l[a+34&127],n=l[a=a+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,l[a]=r^n;e.w=i,e.X=l,e.i=a}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.X&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor4096=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),c=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,a=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^a,a=a-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^a,t.a=a-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.tychei=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),g=Object.freeze({__proto__:null,default:{}}),u=Object(r.e)(g),d=Object(r.d)((function(e){!function(t,n,r){var a,o=256,i=r.pow(o,6),l=r.pow(2,52),s=2*l,c=255;function g(e,c,g){var u=[],C=f(function e(t,n){var r,a=[],o=typeof t;if(n&&"object"==o)for(r in t)try{a.push(e(t[r],n-1))}catch(t){}return a.length?a:"string"==o?t:t+"\0"}((c=1==c?{entropy:!0}:c||{}).entropy?[e,p(n)]:null==e?function(){try{var e;return a&&(e=a.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),p(e)}catch(e){var r=t.navigator,i=r&&r.plugins;return[+new Date,t,i,t.screen,p(n)]}}():e,3),u),I=new d(u),h=function(){for(var e=I.g(6),t=i,n=0;e=s;)e/=2,t/=2,n>>>=1;return(e+n)/t};return h.int32=function(){return 0|I.g(4)},h.quick=function(){return I.g(4)/4294967296},h.double=h,f(p(I.S),n),(c.pass||g||function(e,t,n,a){return a&&(a.S&&m(a,I),e.state=function(){return m(I,{})}),n?(r.random=e,t):e})(h,C,"global"in c?c.global:this==r,c.state)}function d(e){var t,n=e.length,r=this,a=0,i=r.i=r.j=0,l=r.S=[];for(n||(e=[n++]);a0,(function(e){r||(r=e),e&&o.forEach(k),i||(o.forEach(k),a(r))}))}));return t.reduce(W)},X.Stream=X,X.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",i),n.on("close",l));var o=!1;function i(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===J.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e},n.d(t,"a",(function(){return O}));var O=T},function(e,t,n){"use strict";var r=Object.freeze({__proto__:null,default:{}}),a=n(9);n.d(t,"a",(function(){return o}));var o=Object(a.e)(r)},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=56},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(31),a=n(55);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=r.a.Buffer,s=a.a.inspect,c=s&&s.custom||"inspect",g=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,a=l.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,n=a,r=i,l.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return a},t.consume=function(e,t){var n;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++r}return this.length-=r,t},t[c]=function(e,t){return s(this,function(e){for(var t=1;t0?i-4:i;for(n=0;n>16&255,s[g++]=t>>8&255,s[g++]=255&t;2===l&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,s[g++]=255&t);1===l&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,s[g++]=t>>8&255,s[g++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,l=n-a;il?l:i+16383));1===a?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],a=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=i.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var a,o,i=[],l=t;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},t.write=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,n(65).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,l,s=1,c={},g=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=a.compression,o=a.progressCallback;return t.binary?a.dataAccessHelper.fetchBinary(e,{compression:r,progressCallback:o}):a.dataAccessHelper.fetchText(n,e,{compression:r,progressCallback:o})}a.classHierarchy.push("vtkSTLReader"),a.dataAccessHelper||(a.dataAccessHelper=r.a.get("http")),n.setUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};a.url=e;var r=e.split("/");return r.pop(),a.baseURL=r.join("/"),a.compression=t.compression,n.loadData({progressCallback:t.progressCallback,binary:!!t.binary})},n.loadData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(a.url,e);return t.then(n.parse),t},n.parse=function(e){"string"==typeof e?n.parseAsText(e):n.parseAsArrayBuffer(e)},n.parseAsArrayBuffer=function(r){if(r&&r!==a.parseData)if(n.modified(),a.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var c=r.slice(0,80),g=function(e){for(var t=e.split(" ").filter((function(e){return e.indexOf("=")>-1})),n={},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.c.obj(e,t),a.c.get(e,t,["url","baseURL"]),a.c.setGet(e,t,["dataAccessHelper"]),a.c.algo(e,t,0,1),u(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkSTLReader")}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9),a=n(31),o=Object(r.d)((function(e,t){var n=a.a.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a.a:(r(a.a,t),t.Buffer=o),r(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof r?a.fill(t,r):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.a.SlowBuffer(e)}}),"/$$rollup_base$$/node_modules/safe-buffer");n.d(t,"a",(function(){return h}));var i=o.Buffer,l=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=c;function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===l||!l(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=C,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function g(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C(e){return e.toString(this.encoding)}function I(e){return e&&e.length?this.write(e):""}c.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(e.lastNeed=a-1),a):--r=0?(a>0&&(e.lastNeed=a-2),a):--r=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var h={StringDecoder:s}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return OZ})),n.d(r,"Algorithm",(function(){return kZ})),n.d(r,"Calculator",(function(){return WZ})),n.d(r,"CellData",(function(){return xZ})),n.d(r,"Contexts",(function(){return XZ})),n.d(r,"DataArray",(function(){return RZ})),n.d(r,"FieldData",(function(){return wZ})),n.d(r,"GeometryRepresentation",(function(){return SZ})),n.d(r,"GlyphRepresentation",(function(){return BZ})),n.d(r,"ImageData",(function(){return VZ})),n.d(r,"PointCloudRepresentation",(function(){return TZ})),n.d(r,"PointData",(function(){return yZ})),n.d(r,"PolyData",(function(){return vZ})),n.d(r,"Reader",(function(){return ZZ})),n.d(r,"ShareDataSet",(function(){return AZ})),n.d(r,"SliceRepresentation",(function(){return hZ})),n.d(r,"View",(function(){return GZ})),n.d(r,"VolumeController",(function(){return bZ})),n.d(r,"VolumeDataRepresentation",(function(){return JZ})),n.d(r,"VolumeRepresentation",(function(){return IZ}));var a=n(14);n(3);function o(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);o(g);const u=new Array(60);o(u);const d=new Array(512);o(d);const m=new Array(256);o(m);const f=new Array(29);o(f);const p=new Array(30);function C(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let I,h,b;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}o(p);const v=e=>e<256?d[e]:d[256+(e>>>7)],Z=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},A=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{A(e,n[2*t],n[2*t+1])},S=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},B=(e,t,n)=>{const r=new Array(16);let a,o,i=0;for(a=1;a<=15;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=S(r[t]++,t))}},V=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},R=e=>{e.bi_valid>8?Z(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},w=(e,t,n,r)=>{const a=2*t,o=2*n;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],a=e.pending_buf[e.l_buf+c],c++,0===r?G(e,a,t):(o=m[a],G(e,o+256+1,t),s=i[o],0!==s&&(a-=f[o],A(e,a,s)),r--,o=v(r),G(e,o,n),s=l[o],0!==s&&(r-=p[o],A(e,r,s)))}while(c{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)k(e,n,i);s=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,n[2*s]=n[2*i]+n[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,n[2*i+1]=n[2*l+1]=s,e.heap[1]=s++,k(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,g,u,d,m,f,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)g=e.heap[c],d=n[2*n[2*g+1]+1]+1,d>s&&(d=s,p++),n[2*g+1]=d,g>r||(e.bl_count[d]++,m=0,g>=l&&(m=i[g-l]),f=n[2*g],e.opt_len+=f*(d+m),o&&(e.static_len+=f*(a[2*g+1]+m)));if(0!==p){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;0!==d;d--)for(g=e.bl_count[d];0!==g;)u=e.heap[--c],u>r||(n[2*u+1]!==d&&(e.opt_len+=(d-n[2*u+1])*n[2*u],n[2*u+1]=d),g--)}})(e,t),B(n,c,e.bl_count)},T=(e,t,n)=>{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),r=0;r<=n;r++)if(a=i,i=t[2*(r+1)+1],!(++l{A(e,0+(r?1:0),3),((e,t,n,r)=>{R(e),Z(e,n),Z(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var N={_tr_init:e=>{X||((()=>{let e,t,n,r,a;const o=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<>=7;r<30;r++)for(p[r]=a<<7,e=0;e<1<{let a,o,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),x(e,e.l_desc),x(e,e.d_desc),i=(e=>{let t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?O(e,t,n,r):4===e.strategy||o===a?(A(e,2+(r?1:0),3),W(e,g,u)):(A(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),a=0;a(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{A(e,2,3),G(e,256,g),(e=>{16===e.bi_valid?(Z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},H=(e,t,n,r)=>{let a=65535&e|0,o=e>>>16&65535|0,i=0;for(;0!==n;){i=n>2e3?2e3:n,n-=i;do{a=a+t[r++]|0,o=o+a|0}while(--i);a%=65521,o%=65521}return a|o<<16|0};const Y=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var F=(e,t,n,r)=>{const a=Y,o=r+n;e^=-1;for(let n=r;n>>8^a[255&(e^t[n])];return-1^e},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:M,_tr_stored_block:L,_tr_flush_block:D,_tr_tally:E,_tr_align:U}=N,{Z_NO_FLUSH:z,Z_PARTIAL_FLUSH:_,Z_FULL_FLUSH:j,Z_FINISH:Q,Z_BLOCK:q,Z_OK:$,Z_STREAM_END:ee,Z_STREAM_ERROR:te,Z_DATA_ERROR:ne,Z_BUF_ERROR:re,Z_DEFAULT_COMPRESSION:ae,Z_FILTERED:oe,Z_HUFFMAN_ONLY:ie,Z_RLE:le,Z_FIXED:se,Z_DEFAULT_STRATEGY:ce,Z_UNKNOWN:ge,Z_DEFLATED:ue}=K,de=(e,t)=>(e.msg=P[t],t),me=e=>(e<<1)-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let pe=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ie=(e,t)=>{D(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ce(e.strm)},he=(e,t)=>{e.pending_buf[e.pending++]=t},be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ye=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=H(e.adler,t,a,n):2===e.state.wrap&&(e.adler=F(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},ve=(e,t)=>{let n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258;let m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(n=t,c[n+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead},Ze=e=>{const t=e.w_size;let n,r,a,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{a=e.head[--n],e.head[n]=a>=t?a-t:0}while(--r);r=t,n=r;do{a=e.prev[--n],e.prev[n]=a>=t?a-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=ye(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pe(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Ae=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=ve(e,n)),e.match_length>=3)if(r=E(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=pe(e,e.ins_h,e.window[e.strstart+1]);else r=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2},Ge=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=E(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ie(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=E(e,0,e.window[e.strstart-1]),r&&Ie(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=E(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2};function Se(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Be=[new Se(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ze(e),0===e.lookahead&&t===z)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ie(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Ie(e,!1),e.strm.avail_out),1)}),new Se(4,4,8,4,Ae),new Se(4,5,16,8,Ae),new Se(4,6,32,32,Ae),new Se(4,4,16,16,Ge),new Se(8,16,32,32,Ge),new Se(8,16,128,128,Ge),new Se(8,32,128,256,Ge),new Se(32,128,258,1024,Ge),new Se(32,258,258,4096,Ge)];function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Re=e=>{if(!e||!e.state)return de(e,te);e.total_in=e.total_out=0,e.data_type=ge;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=z,M(t),$},we=e=>{const t=Re(e);var n;return t===$&&((n=e.state).window_size=2*n.w_size,fe(n.head),n.max_lazy_match=Be[n.level].max_lazy,n.good_match=Be[n.level].good_length,n.nice_match=Be[n.level].nice_length,n.max_chain_length=Be[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ke=(e,t,n,r,a,o)=>{if(!e)return te;let i=1;if(t===ae&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>se)return de(e,te);8===r&&(r=9);const l=new Ve;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e&&e.state?2!==e.state.wrap?te:(e.state.gzhead=t,$):te,Te=(e,t)=>{let n,r;if(!e||!e.state||t>q||t<0)return e?de(e,te):te;const a=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===a.status&&t!==Q)return de(e,0===e.avail_out?re:te);a.strm=e;const o=a.last_flush;if(a.last_flush=t,42===a.status)if(2===a.wrap)e.adler=0,he(a,31),he(a,139),he(a,8),a.gzhead?(he(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),he(a,255&a.gzhead.time),he(a,a.gzhead.time>>8&255),he(a,a.gzhead.time>>16&255),he(a,a.gzhead.time>>24&255),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(he(a,255&a.gzhead.extra.length),he(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=F(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(he(a,0),he(a,0),he(a,0),he(a,0),he(a,0),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,3),a.status=113);else{let t=ue+(a.w_bits-8<<4)<<8,n=-1;n=a.strategy>=ie||a.level<2?0:a.level<6?1:6===a.level?2:3,t|=n<<6,0!==a.strstart&&(t|=32),t+=31-t%31,a.status=113,be(a,t),0!==a.strstart&&(be(a,e.adler>>>16),be(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending!==a.pending_buf_size));)he(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Ce(e),a.pending+2<=a.pending_buf_size&&(he(a,255&e.adler),he(a,e.adler>>8&255),e.adler=0,a.status=113)):a.status=113),0!==a.pending){if(Ce(e),0===e.avail_out)return a.last_flush=-1,$}else if(0===e.avail_in&&me(t)<=me(o)&&t!==Q)return de(e,re);if(666===a.status&&0!==e.avail_in)return de(e,re);if(0!==e.avail_in||0!==a.lookahead||t!==z&&666!==a.status){let n=a.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ze(e),0===e.lookahead)){if(t===z)return 1;break}if(e.match_length=0,n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):a.strategy===le?((e,t)=>{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=258){if(Ze(e),e.lookahead<=258&&t===z)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=E(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):Be[a.level].func(a,t);if(3!==n&&4!==n||(a.status=666),1===n||3===n)return 0===e.avail_out&&(a.last_flush=-1),$;if(2===n&&(t===_?U(a):t!==q&&(L(a,0,0,!1),t===j&&(fe(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Ce(e),0===e.avail_out))return a.last_flush=-1,$}return t!==Q?$:a.wrap<=0?ee:(2===a.wrap?(he(a,255&e.adler),he(a,e.adler>>8&255),he(a,e.adler>>16&255),he(a,e.adler>>24&255),he(a,255&e.total_in),he(a,e.total_in>>8&255),he(a,e.total_in>>16&255),he(a,e.total_in>>24&255)):(be(a,e.adler>>>16),be(a,65535&e.adler)),Ce(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$:ee)},Je=e=>{if(!e||!e.state)return te;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?de(e,te):(e.state=null,113===t?de(e,ne):$)},Xe=(e,t)=>{let n=t.length;if(!e||!e.state)return te;const r=e.state,a=r.wrap;if(2===a||1===a&&42!==r.status||r.lookahead)return te;if(1===a&&(e.adler=H(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(fe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ze(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=pe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ze(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=i,e.input=l,e.avail_in=o,r.wrap=a,$};const Oe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ne=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Oe(n,t)&&(e[t]=n[t])}}return e},He=e=>{let t=0;for(let n=0,r=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Pe=e=>{let t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Ke=(e,t)=>{let n,r;const a=t||e.length,o=new Array(2*a);for(r=0,n=0;n4)o[r++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fe[e[n]]>t?n:t},Le=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const De=Object.prototype.toString,{Z_NO_FLUSH:Ee,Z_SYNC_FLUSH:Ue,Z_FULL_FLUSH:ze,Z_FINISH:_e,Z_OK:je,Z_STREAM_END:Qe,Z_DEFAULT_COMPRESSION:qe,Z_DEFAULT_STRATEGY:$e,Z_DEFLATED:et}=K;function tt(e){this.options=Ne({level:qe,method:et,chunkSize:16384,windowBits:15,memLevel:8,strategy:$e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=We(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==je)throw new Error(P[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Pe(t.dictionary):"[object ArrayBuffer]"===De.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Xe(this.strm,e),n!==je)throw new Error(P[n]);this._dict_set=!0}}function nt(e,t){const n=new tt(t);if(n.push(e,!0),n.err)throw n.msg||P[n.err];return n.result}tt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?_e:Ee,"string"==typeof e?n.input=Pe(e):"[object ArrayBuffer]"===De.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Ue||o===ze)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Te(n,o),a===Qe)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Je(this.strm),this.onEnd(a),this.ended=!0,a===je;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},tt.prototype.onData=function(e){this.chunks.push(e)},tt.prototype.onEnd=function(e){e===je&&(this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:tt,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:K},at=function(e,t){let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S;const B=e.state;n=e.next_in,G=e.input,r=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),i=a+(e.avail_out-257),l=B.dmax,s=B.wsize,c=B.whave,g=B.wnext,u=B.window,d=B.hold,m=B.bits,f=B.lencode,p=B.distcode,C=(1<>>24,d>>>=b,m-=b,b=h>>>16&255,0===b)S[a++]=65535&h;else{if(!(16&b)){if(0==(64&b)){h=f[(65535&h)+(d&(1<>>=b,m-=b),m<15&&(d+=G[n++]<>>24,d>>>=b,m-=b,b=h>>>16&255,!(16&b)){if(0==(64&b)){h=p[(65535&h)+(d&(1<l){e.msg="invalid distance too far back",B.mode=30;break e}if(d>>>=b,m-=b,b=a-o,v>b){if(b=v-b,b>c&&B.sane){e.msg="invalid distance too far back",B.mode=30;break e}if(Z=0,A=u,0===g){if(Z+=s-b,b2;)S[a++]=A[Z++],S[a++]=A[Z++],S[a++]=A[Z++],y-=3;y&&(S[a++]=A[Z++],y>1&&(S[a++]=A[Z++]))}else{Z=a-v;do{S[a++]=S[Z++],S[a++]=S[Z++],S[a++]=S[Z++],y-=3}while(y>2);y&&(S[a++]=S[Z++],y>1&&(S[a++]=S[Z++]))}break}}break}}while(n>3,n-=y,m-=y<<3,d&=(1<{const s=l.bits;let c,g,u,d,m,f,p=0,C=0,I=0,h=0,b=0,y=0,v=0,Z=0,A=0,G=0,S=null,B=0;const V=new Uint16Array(16),R=new Uint16Array(16);let w,k,W,x=null,T=0;for(p=0;p<=15;p++)V[p]=0;for(C=0;C=1&&0===V[h];h--);if(b>h&&(b=h),0===h)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==h))return-1;for(R[1]=0,p=1;p<15;p++)R[p+1]=R[p]+V[p];for(C=0;C852||2===e&&A>592)return 1;for(;;){w=p-v,i[C]f?(k=x[T+i[C]],W=S[B+i[C]]):(k=96,W=0),c=1<>v)+g]=w<<24|k<<16|W|0}while(0!==g);for(c=1<>=1;if(0!==c?(G&=c-1,G+=c):G=0,C++,0==--V[p]){if(p===h)break;p=t[n+i[C]]}if(p>b&&(G&d)!==u){for(0===v&&(v=b),m+=I,y=p-v,Z=1<852||2===e&&A>592)return 1;u=G&d,a[u]=b<<24|y<<16|m-o|0}}return 0!==G&&(a[m+G]=p-v<<24|64<<16|0),l.bits=b,0};const{Z_FINISH:gt,Z_BLOCK:ut,Z_TREES:dt,Z_OK:mt,Z_STREAM_END:ft,Z_NEED_DICT:pt,Z_STREAM_ERROR:Ct,Z_DATA_ERROR:It,Z_MEM_ERROR:ht,Z_BUF_ERROR:bt,Z_DEFLATED:yt}=K,vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Zt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const At=e=>{if(!e||!e.state)return Ct;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,mt},Gt=e=>{if(!e||!e.state)return Ct;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,At(e)},St=(e,t)=>{let n;if(!e||!e.state)return Ct;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ct:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gt(e))},Bt=(e,t)=>{if(!e)return Ct;const n=new Zt;e.state=n,n.window=null;const r=St(e,t);return r!==mt&&(e.state=null),r};let Vt,Rt,wt=!0;const kt=e=>{if(wt){Vt=new Int32Array(512),Rt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ct(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ct(2,e.lens,0,32,Rt,0,e.work,{bits:5}),wt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=Rt,e.distbits=5},Wt=(e,t,n,r)=>{let a;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),(r-=a)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G=0;const S=new Uint8Array(4);let B,V;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ct;n=e.state,12===n.mode&&(n.mode=13),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,u=l,d=s,A=mt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&c)!==yt){e.msg="unknown compression method",n.mode=30;break}if(c>>>=4,g-=4,Z=8+(15&c),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=F(n.check,S,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m=n.length,m>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+m),Z)),512&n.flags&&(n.check=F(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1,g-=1,3&c){case 0:n.mode=14;break;case 1:if(kt(n),n.mode=20,t===dt){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,t===dt)break e;case 15:n.mode=16;case 16:if(m=n.length,m){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;a.set(r.subarray(o,o+m),i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},A=ct(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(V=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(V=C+3;g>>=C,g-=C,Z=0,m=3+(7&c),c>>>=3,g-=3}else{for(V=C+7;g>>=C,g-=C,Z=0,m=11+(127&c),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},A=ct(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},A=ct(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===dt)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,at(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;G=n.lencode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=n.distcode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<{if(!e||!e.state)return Ct;let t=e.state;return t.window&&(t.window=null),e.state=null,mt},Ot=(e,t)=>{if(!e||!e.state)return Ct;const n=e.state;return 0==(2&n.wrap)?Ct:(n.head=t,t.done=!1,mt)},Nt=(e,t)=>{const n=t.length;let r,a,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?Ct:11===r.mode&&(a=1,a=H(a,t,n,0),a!==r.check)?It:(o=Wt(e,t,n,n),o?(r.mode=31,ht):(r.havedict=1,mt))):Ct},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Yt=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_FINISH:Pt,Z_OK:Kt,Z_STREAM_END:Mt,Z_NEED_DICT:Lt,Z_STREAM_ERROR:Dt,Z_DATA_ERROR:Et,Z_MEM_ERROR:Ut}=K;function zt(e){this.options=Ne({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=Tt(this.strm,t.windowBits);if(n!==Kt)throw new Error(P[n]);if(this.header=new Ht,Ot(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Pe(t.dictionary):"[object ArrayBuffer]"===Yt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Nt(this.strm,t.dictionary),n!==Kt)))throw new Error(P[n])}function _t(e,t){const n=new zt(t);if(n.push(e),n.err)throw n.msg||P[n.err];return n.result}zt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Pt:Ft,"[object ArrayBuffer]"===Yt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Jt(n,i),o===Lt&&a&&(o=Nt(n,a),o===Kt?o=Jt(n,i):o===Et&&(o=Lt));n.avail_in>0&&o===Mt&&n.state.wrap>0&&0!==e[n.next_in];)xt(n),o=Jt(n,i);switch(o){case Dt:case Et:case Lt:case Ut:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(0===n.avail_out||o===Mt))if("string"===this.options.to){let e=Me(n.output,n.next_out),t=n.next_out-e,a=Ke(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Kt||0!==l){if(o===Mt)return o=Xt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},zt.prototype.onData=function(e){this.chunks.push(e)},zt.prototype.onEnd=function(e){e===Kt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jt={Inflate:zt,inflate:_t,inflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},ungzip:_t,constants:K};const{Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en}=rt,{Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an}=jt;var on={Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en,Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an,constants:K},ln=n(4),sn=n(34),cn=n(15),gn=n(18),un=ln.c.vtkErrorMacro,dn=ln.c.vtkDebugMacro,mn=0;function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(a.a)(e,2),n=t[0],o=t[1];return r.setRequestHeader(n,o)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var pn={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise((function(a,o){var i=fn("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);i.onreadystatechange=function(t){1===i.readyState&&(n.ref.pending=!0,1==++mn&&e.invokeBusy&&e.invokeBusy(!0)),4===i.readyState&&(n.ref.pending=!1,200===i.status||0===i.status?(n.buffer=i.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=on.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=on.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sn.a.ENDIANNESS!==n.ref.encode&&sn.a.ENDIANNESS&&(dn("Swap bytes of ".concat(n.name)),sn.a.swapBytes(n.buffer,cn.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&un("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--mn&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):o({xhr:i,e:t}))},i.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",i.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(on.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(un("Supported algorithms are: [gz]"),un("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(on.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=fn("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(gn.c)("http",(function(e){return pn}));var Cn=n(9),In=n(10),hn=n(19),bn=n(29),yn=n(16),vn=Object(Cn.d)((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;function a(){yn.a.call(this,"utf-8 decode"),this.leftOver=null}function o(){yn.a.call(this,"utf-8 encode")}n[254]=n[254]=1,t.utf8encode=function(e){return hn.a.nodebuffer?bn.a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},t.utf8decode=function(e){return hn.a.nodebuffer?In.a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,a,o,i=e.length,l=new Array(2*i);for(r=0,t=0;t4)l[r++]=65533,t+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),In.a.applyFromCharCode(l)}(e=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e))},In.a.inherits(a,yn.a),a.prototype.processChunk=function(e){var r=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(hn.a.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),i=r;o!==r.length&&(hn.a.uint8array?(i=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(i=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=a,In.a.inherits(o,yn.a),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o}),"/$$rollup_base$$/node_modules/jszip/lib"),Zn=n(50),An={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},Gn=n(28);function Sn(e){yn.a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=In.a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}In.a.inherits(Sn,yn.a),Sn.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this.data=null},Sn.prototype.resume=function(){return!!yn.a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,In.a.delay(this._tickAndRepeat,[],this)),!0)},Sn.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(In.a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sn.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Bn=Sn;function Vn(e){yn.a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}In.a.inherits(Vn,yn.a),Vn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}yn.a.prototype.processChunk.call(this,e)};var Rn=Vn,wn=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),kn=function(e,t){return void 0!==e&&e.length?"string"!==In.a.getTypeOf(e)?function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t[i])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t.charCodeAt(i))];return-1^e}(0|t,e,e.length):0};function Wn(){yn.a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}In.a.inherits(Wn,yn.a),Wn.prototype.processChunk=function(e){this.streamInfo.crc32=kn(e.data,this.streamInfo.crc32||0),this.push(e)};var xn=Wn;function Tn(e,t,n,r,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=a}Tn.prototype={getContentWorker:function(){var e=new Bn(Gn.a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Rn("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Bn(Gn.a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Tn.createWorkerFrom=function(e,t,n){return e.pipe(new xn).pipe(new Rn("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Rn("compressedSize")).withStreamInfo("compression",t)};var Jn=Tn,Xn=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Xn.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new vn.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new vn.Utf8DecodeWorker))}catch(e){(t=new yn.a("error")).error(e)}return new Zn.a(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Jn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new vn.Utf8EncodeWorker)),Jn.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Jn?this._data.getContentWorker():this._data instanceof yn.a?this._data:new Bn(this._data)}};for(var On=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Nn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Hn=0;Hn=0;)e[t]=0}var Kn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ln=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Dn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=new Array(576);Pn(En);var Un=new Array(60);Pn(Un);var zn=new Array(512);Pn(zn);var _n=new Array(256);Pn(_n);var jn=new Array(29);Pn(jn);var Qn,qn,$n,er=new Array(30);function tr(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function nr(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function rr(e){return e<256?zn[e]:zn[256+(e>>>7)]}function ar(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function or(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function sr(e,t,n){var r,a,o=new Array(16),i=0;for(r=1;r<=15;r++)o[r]=i=i+n[r-1]<<1;for(a=0;a<=t;a++){var l=e[2*a+1];0!==l&&(e[2*a]=lr(o[l]++,l))}}function cr(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function gr(e){e.bi_valid>8?ar(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ur(e,t,n,r){var a=2*t,o=2*n;return e[a]>1;n>=1;n--)dr(e,o,n);a=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],dr(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*a]=o[2*n]+o[2*r],e.depth[a]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=a,e.heap[1]=a++,dr(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,o,i,l,s=t.dyn_tree,c=t.max_code,g=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,p=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,p++),s[2*r+1]=o,r>c||(e.bl_count[o]++,i=0,r>=m&&(i=d[r-m]),l=s[2*r],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(g[2*r+1]+i)));if(0!==p){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,p-=2}while(p>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(a=e.heap[--n])>c||(s[2*a+1]!==o&&(e.opt_len+=(o-s[2*a+1])*s[2*a],s[2*a+1]=o),r--)}}(e,t),sr(o,c,e.bl_count)}function pr(e,t,n){var r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l>=7;r<30;r++)for(er[r]=a<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),fr(e,e.l_desc),fr(e,e.d_desc),i=function(e){var t;for(pr(e,e.dyn_ltree,e.l_desc.max_code),pr(e,e.dyn_dtree,e.d_desc.max_code),fr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Dn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?hr(e,t,n,r):4===e.strategy||o===a?(or(e,2+(r?1:0),3),mr(e,En,Un)):(or(e,4+(r?1:0),3),function(e,t,n,r){var a;for(or(e,t-257,5),or(e,n-1,5),or(e,r-4,4),a=0;a>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(_n[n]+256+1)]++,e.dyn_dtree[2*rr(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){or(e,2,3),ir(e,256,En),function(e){16===e.bi_valid?(ar(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},vr=function(e,t,n,r){for(var a=65535&e|0,o=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{o=o+(a=a+t[r++]|0)|0}while(--i);a%=65521,o%=65521}return a|o<<16|0},Zr=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),Ar=function(e,t,n,r){var a=Zr,o=r+n;e^=-1;for(var i=r;i>>8^a[255&(e^t[i])];return-1^e},Gr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Sr(e,t){return e.msg=Gr[t],t}function Br(e){return(e<<1)-(e>4?9:0)}function Vr(e){for(var t=e.length;--t>=0;)e[t]=0}function Rr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Fn.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function wr(e,t){yr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rr(e.strm)}function kr(e,t){e.pending_buf[e.pending++]=t}function Wr(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function xr(e,t){var n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258,m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(c[(n=t)+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead}function Tr(e){var t,n,r,a,o,i,l,s,c,g,u=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){Fn.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);a+=u}if(0===e.strm.avail_in)break;if(i=e.strm,l=e.window,s=e.strstart+e.lookahead,c=a,g=void 0,(g=i.avail_in)>c&&(g=c),n=0===g?0:(i.avail_in-=g,Fn.arraySet(l,i.input,i.next_in,g,s),1===i.state.wrap?i.adler=vr(i.adler,l,g,s):2===i.state.wrap&&(i.adler=Ar(i.adler,l,g,s)),i.next_in+=g,i.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=yr._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=yr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<15&&(i=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return Sr(e,-2);8===r&&(r=9);var l=new Nr;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tr(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wr(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wr(e,!1),e.strm.avail_out),1)})),new Or(4,4,8,4,Jr),new Or(4,5,16,8,Jr),new Or(4,6,32,32,Jr),new Or(4,4,16,16,Xr),new Or(8,16,32,32,Xr),new Or(8,16,128,128,Xr),new Or(8,32,128,256,Xr),new Or(32,128,258,1024,Xr),new Or(32,258,258,4096,Xr)];var Pr={deflateInit:function(e,t){return Fr(e,t,8,15,8,0)},deflateInit2:Fr,deflateReset:Yr,deflateResetKeep:Hr,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,a,o;if(!e||!e.state||t>5||t<0)return e?Sr(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Sr(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kr(r,31),kr(r,139),kr(r,8),r.gzhead?(kr(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kr(r,255&r.gzhead.time),kr(r,r.gzhead.time>>8&255),kr(r,r.gzhead.time>>16&255),kr(r,r.gzhead.time>>24&255),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kr(r,255&r.gzhead.extra.length),kr(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ar(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,3),r.status=113);else{var i=8+(r.w_bits-8<<4)<<8;i|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),i+=31-i%31,r.status=113,Wr(r,i),0!==r.strstart&&(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending!==r.pending_buf_size));)kr(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rr(e),r.pending+2<=r.pending_buf_size&&(kr(r,255&e.adler),kr(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rr(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Br(t)<=Br(n)&&4!==t)return Sr(e,-5);if(666===r.status&&0!==e.avail_in)return Sr(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var l=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Tr(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,a,o,i=e.window;;){if(e.lookahead<=258){if(Tr(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=i[a=e.strstart-1])===i[++a]&&r===i[++a]&&r===i[++a]){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=yr._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):br[r.level].func(r,t);if(3!==l&&4!==l||(r.status=666),1===l||3===l)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===t?yr._tr_align(r):5!==t&&(yr._tr_stored_block(r,0,0,!1),3===t&&(Vr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rr(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(kr(r,255&e.adler),kr(r,e.adler>>8&255),kr(r,e.adler>>16&255),kr(r,e.adler>>24&255),kr(r,255&e.total_in),kr(r,e.total_in>>8&255),kr(r,e.total_in>>16&255),kr(r,e.total_in>>24&255)):(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),Rr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Sr(e,-2):(e.state=null,113===t?Sr(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,a,o,i,l,s,c,g=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=vr(e.adler,t,g,0)),n.wrap=0,g>=n.w_size&&(0===o&&(Vr(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new Fn.Buf8(n.w_size),Fn.arraySet(c,t,g-n.w_size,n.w_size,0),t=c,g=n.w_size),i=e.avail_in,l=e.next_in,s=e.input,e.avail_in=g,e.next_in=0,e.input=t,Tr(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<=252?6:Dr>=248?5:Dr>=240?4:Dr>=224?3:Dr>=192?2:1;function Er(e,t){if(t<65534&&(e.subarray&&Mr||!e.subarray&&Kr))return String.fromCharCode.apply(null,Fn.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},zr=function(e){return Er(e,e.length)},_r=function(e){for(var t=new Fn.Buf8(e.length),n=0,r=t.length;n4)l[r++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return Er(l,r)},Qr=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Lr[e[n]]>t?n:t},qr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$r=Object.prototype.toString;function ea(e){if(!(this instanceof ea))return new ea(e);this.options=Fn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=Pr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(Gr[n]);if(t.header&&Pr.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ur(t.dictionary):"[object ArrayBuffer]"===$r.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Pr.deflateSetDictionary(this.strm,r)))throw new Error(Gr[n]);this._dict_set=!0}}function ta(e,t){var n=new ea(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}ea.prototype.push=function(e,t){var n,r,a=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=Ur(e):"[object ArrayBuffer]"===$r.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new Fn.Buf8(o),a.next_out=0,a.avail_out=o),1!==(n=Pr.deflate(a,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(zr(Fn.shrinkBuf(a.output,a.next_out))):this.onData(Fn.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===r?(n=Pr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),a.avail_out=0,!0)},ea.prototype.onData=function(e){this.chunks.push(e)},ea.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var na={Deflate:ea,deflate:ta,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ta(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ta(e,t)}},ra=function(e,t){var n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B;n=e.state,r=e.next_in,S=e.input,a=r+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,c=n.wsize,g=n.whave,u=n.wnext,d=n.window,m=n.hold,f=n.bits,p=n.lencode,C=n.distcode,I=(1<>>=y=b>>>24,f-=y,0==(y=b>>>16&255))B[o++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<>>=y,f-=y),f<15&&(m+=S[r++]<>>=y=b>>>24,f-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=C[(65535&b)+(m&(1<s){e.msg="invalid distance too far back",n.mode=30;break e}if(m>>>=y,f-=y,Z>(y=o-i)){if((y=Z-y)>g&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,G=d,0===u){if(A+=c-y,y2;)B[o++]=G[A++],B[o++]=G[A++],B[o++]=G[A++],v-=3;v&&(B[o++]=G[A++],v>1&&(B[o++]=G[A++]))}else{A=o-Z;do{B[o++]=B[A++],B[o++]=B[A++],B[o++]=B[A++],v-=3}while(v>2);v&&(B[o++]=B[A++],v>1&&(B[o++]=B[A++]))}break}}break}}while(r>3,m&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===k[v];v--);if(Z>v&&(Z=v),0===v)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(y=1;y0&&(0===e||1!==v))return-1;for(W[1]=0,h=1;h<15;h++)W[h+1]=W[h]+k[h];for(b=0;b852||2===e&&B>592)return 1;for(;;){f=h-G,i[b]m?(p=x[T+i[b]],C=R[w+i[b]]):(p=96,C=0),s=1<>G)+(c-=s)]=f<<24|p<<16|C|0}while(0!==c);for(s=1<>=1;if(0!==s?(V&=s-1,V+=s):V=0,b++,0==--k[h]){if(h===v)break;h=t[n+i[b]]}if(h>Z&&(V&u)!==g){for(0===G&&(G=Z),d+=y,S=1<<(A=h-G);A+G852||2===e&&B>592)return 1;a[g=V&u]=Z<<24|A<<16|d-o|0}}return 0!==V&&(a[d+V]=h-G<<24|64<<16|0),l.bits=Z,0};function ca(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fn.Buf16(320),this.work=new Fn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ua(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fn.Buf32(852),t.distcode=t.distdyn=new Fn.Buf32(592),t.sane=1,t.back=-1,0):-2}function da(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ua(e)):-2}function ma(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,da(e))):-2}function fa(e,t){var n,r;return e?(r=new ga,e.state=r,r.window=null,0!==(n=ma(e,t))&&(e.state=null),n):-2}var pa,Ca,Ia=!0;function ha(e){if(Ia){var t;for(pa=new Fn.Buf32(512),Ca=new Fn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sa(1,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sa(2,e.lens,0,32,Ca,0,e.work,{bits:5}),Ia=!1}e.lencode=pa,e.lenbits=9,e.distcode=Ca,e.distbits=5}function ba(e,t,n,r){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(Fn.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>r&&(a=r),Fn.arraySet(o.window,t,n-r,a,o.wnext),(r-=a)?(Fn.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ar(n.check,V,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,Z=8+(15&(c>>>=4)),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=Ar(n.check,V,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((m=n.length)>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Fn.arraySet(n.head.extra,r,o,m,Z)),512&n.flags&&(n.check=Ar(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(ha(n),n.mode=20,6===t){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(m=n.length){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;Fn.arraySet(a,r,o,m,i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},A=sa(0,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(S=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(S=C+3;g>>=C)),c>>>=3,g-=3}else{for(S=C+7;g>>=C)),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,G={bits:n.lenbits},A=sa(1,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},A=sa(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,ra(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=ya.inflateInit2(this.strm,t.windowBits);if(n!==va.Z_OK)throw new Error(Gr[n]);if(this.header=new Za,ya.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ur(t.dictionary):"[object ArrayBuffer]"===Aa.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ya.inflateSetDictionary(this.strm,t.dictionary))!==va.Z_OK))throw new Error(Gr[n])}function Sa(e,t){var n=new Ga(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}Ga.prototype.push=function(e,t){var n,r,a,o,i,l=this.strm,s=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?va.Z_FINISH:va.Z_NO_FLUSH,"string"==typeof e?l.input=_r(e):"[object ArrayBuffer]"===Aa.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new Fn.Buf8(s),l.next_out=0,l.avail_out=s),(n=ya.inflate(l,va.Z_NO_FLUSH))===va.Z_NEED_DICT&&c&&(n=ya.inflateSetDictionary(this.strm,c)),n===va.Z_BUF_ERROR&&!0===g&&(n=va.Z_OK,g=!1),n!==va.Z_STREAM_END&&n!==va.Z_OK)return this.onEnd(n),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&n!==va.Z_STREAM_END&&(0!==l.avail_in||r!==va.Z_FINISH&&r!==va.Z_SYNC_FLUSH)||("string"===this.options.to?(a=Qr(l.output,l.next_out),o=l.next_out-a,i=jr(l.output,a),l.next_out=o,l.avail_out=s-o,o&&Fn.arraySet(l.output,l.output,a,o,0),this.onData(i)):this.onData(Fn.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(g=!0)}while((l.avail_in>0||0===l.avail_out)&&n!==va.Z_STREAM_END);return n===va.Z_STREAM_END&&(r=va.Z_FINISH),r===va.Z_FINISH?(n=ya.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===va.Z_OK):r!==va.Z_SYNC_FLUSH||(this.onEnd(va.Z_OK),l.avail_out=0,!0)},Ga.prototype.onData=function(e){this.chunks.push(e)},Ga.prototype.onEnd=function(e){e===va.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ba={Inflate:Ga,inflate:Sa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Sa(e,t)},ungzip:Sa},Va={};(0,Fn.assign)(Va,na,Ba,va);var Ra=Va,wa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function ka(e,t){yn.a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}In.a.inherits(ka,yn.a),ka.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(In.a.transformTo(wa,e.data),!1)},ka.prototype.flush=function(){yn.a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},ka.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this._pako=null},ka.prototype._createPako=function(){this._pako=new Ra[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Wa={STORE:{magic:"\0\0",compressWorker:function(e){return new yn.a("STORE compression")},uncompressWorker:function(){return new yn.a("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new ka("Deflate",e)},uncompressWorker:function(){return new ka("Inflate",{})}}},xa="PK",Ta="PK",Ja="PK",Xa="PK",Oa="PK",Na="PK\b",Ha=function(e,t){var n,r="";for(n=0;n>>=8;return r},Ya=function(e,t,n,r,a,o){var i,l,s=e.file,c=e.compression,g=o!==vn.utf8encode,u=In.a.transformTo("string",o(s.name)),d=In.a.transformTo("string",vn.utf8encode(s.name)),m=s.comment,f=In.a.transformTo("string",o(m)),p=In.a.transformTo("string",vn.utf8encode(m)),C=d.length!==s.name.length,I=p.length!==m.length,h="",b="",y="",v=s.dir,Z=s.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var G=0;t&&(G|=8),g||!C&&!I||(G|=2048);var S,B,V=0,R=0;v&&(V|=16),"UNIX"===a?(R=798,V|=(B=S=s.unixPermissions,S||(B=v?16893:33204),(65535&B)<<16)):(R=20,V|=63&(s.dosPermissions||0)),i=Z.getUTCHours(),i<<=6,i|=Z.getUTCMinutes(),i<<=5,i|=Z.getUTCSeconds()/2,l=Z.getUTCFullYear()-1980,l<<=4,l|=Z.getUTCMonth()+1,l<<=5,l|=Z.getUTCDate(),C&&(b=Ha(1,1)+Ha(kn(u),4)+d,h+="up"+Ha(b.length,2)+b),I&&(y=Ha(1,1)+Ha(kn(f),4)+p,h+="uc"+Ha(y.length,2)+y);var w="";return w+="\n\0",w+=Ha(G,2),w+=c.magic,w+=Ha(i,2),w+=Ha(l,2),w+=Ha(A.crc32,4),w+=Ha(A.compressedSize,4),w+=Ha(A.uncompressedSize,4),w+=Ha(u.length,2),w+=Ha(h.length,2),{fileRecord:xa+w+u+h,dirRecord:Ta+Ha(R,2)+w+Ha(f.length,2)+"\0\0\0\0"+Ha(V,4)+Ha(r,4)+u+h+f}},Fa=function(e){return Na+Ha(e.crc32,4)+Ha(e.compressedSize,4)+Ha(e.uncompressedSize,4)};function Pa(e,t,n,r){yn.a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}In.a.inherits(Pa,yn.a),Pa.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,yn.a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Pa.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ya(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Pa.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ya(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Fa(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Pa.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},za=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_a=function(e,t){return t=void 0!==t?t:An.createFolders,e=za(e),this.files[e]||Ea.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function ja(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Qa={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(ja(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,Ea.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(ja(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=_a.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return In.a.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var $a=qa;function eo(e){$a.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===a)return o-this.zero;return-1},eo.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),a=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&a===o[3]},eo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var to=eo;function no(e){$a.call(this,e)}In.a.inherits(no,$a),no.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},no.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},no.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},no.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ro=no;function ao(e){to.call(this,e)}In.a.inherits(ao,to),ao.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var oo=ao;function io(e){oo.call(this,e)}In.a.inherits(io,oo),io.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var lo=io,so=function(e){var t=In.a.getTypeOf(e);return In.a.checkSupport(t),"string"!==t||hn.a.uint8array?"nodebuffer"===t?new lo(e):hn.a.uint8array?new oo(In.a.transformTo("uint8array",e)):new to(In.a.transformTo("array",e)):new ro(e)};function co(e,t){this.options=e,this.loadOptions=t}co.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Wa)if(Wa.hasOwnProperty(t)&&Wa[t].magic===e)return Wa[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+In.a.pretty(this.compressionMethod)+" unknown (inner file : "+In.a.transformTo("string",this.fileName)+")");this.decompressed=new Jn(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=so(this.extraFields[1].value);this.uncompressedSize===In.a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===In.a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===In.a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===In.a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,a=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,Ta)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=so(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var mo=uo;function fo(e){return new Gn.a.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new xn);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function po(){if(!(this instanceof po))return new po;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new po;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}po.prototype=Qa,po.prototype.loadAsync=function(e,t){var n=this;return t=In.a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:vn.utf8decode}),bn.a.isNode&&bn.a.isStream(e)?Gn.a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):In.a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new mo(t);return n.load(e),n})).then((function(e){var n=[Gn.a.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a1;){var i=o.shift();a=a.folder(i)}e.callback&&e.callback(r)})),{fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(l,s){t||Io("ERROR!!! zip not ready...");var c=vo([r,o.ref.basepath,i.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var g="string"!==o.dataType||i.compression?"uint8array":"string",u=yo[g](o,i.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),l(o)}));a.file(c).async(g).then(u)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(JSON.parse(e))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=vo(e);return t||Io("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,a.file(n).async("base64").then((function(e){r.src="data:image/".concat(bo(n),";base64,").concat(e)}))}))},fetchBinary:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).then((function(e){var t=on.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};Object(gn.c)("zip",(function(e){return Zo.create(e)}));var Ao=n(11),Go=n(13),So=n(23),Bo=n(7);function Vo(e,t){function n(){for(;t.cellFields.length0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=function(n,r){t.radius[n]=r,e.modified()},e.setCellField=function(n,r){t.cellFields[n]=r,e.modified()},e.removeMask=function(){t.mask=null,e.modified()},e.setMaskLayer=function(n,r){var a=!1;!t.mask&&r&&(a=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(a=!0),t.mask[n]=r),a&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var a;if(!t.deleted&&t.radius.length){n();var o=r[0],i=t.radius.length,l=t.height/2,s=0,c=0,g=t.startThetat.startTheta?t.endTheta:t.startTheta;u*=Math.PI/180;var d=t.resolution,m=!1;u>=g+2*Math.PI?u=g+2*Math.PI:(++d,m=!0);var f=(u-g)/t.resolution,p=d*i*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(s+=2*(d+1)+5*d+(m?10:0),c+=2+d+(m?2:0));for(var C=1;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.getArray(e,t,["cellFields"]),ln.c.algo(e,t,0,1),Vo(e,t)}),"vtkConcentricCylinderSource");function wo(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var a=n[0],o=2*Math.PI/t.resolution,i=-t.height/2,l=t.resolution+1,s=4*t.resolution+1+t.resolution,c=0,g=new window[t.pointType](3*l),u=0,d=new Uint32Array(s);g[0]=t.height/2,g[1]=0,g[2]=0,t.capping&&(d[u++]=t.resolution);for(var m=0;mt.resolution?1:f+2;(r=So.a.buildFromRadian()).translate.apply(r,Object(Ao.a)(t.center)).rotateFromDirections([1,0,0],t.direction).apply(g),(a=Go.a.newInstance()).getPoints().setData(g,3),a.getPolys().setData(d,1),n[0]=a}}}var ko={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ko,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),wo(e,t)}),"vtkConeSource");function Wo(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){var e=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))e=arguments.length<=0?void 0:arguments[0];else for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),ln.c.setGetArray(e,t,["center","rotations"],3),ln.c.algo(e,t,0,1),Wo(e,t)}),"vtkCubeSource");function To(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,a;if(!t.deleted){var o=n[0],i=2*Math.PI/t.resolution,l=2*t.resolution,s=5*t.resolution;t.capping&&(l=4*t.resolution,s=7*t.resolution+2);for(var c=new window[t.pointType](3*l),g=0,u=new Uint32Array(s),d=new Float32Array(3*l),m=Bo.a.newInstance({numberOfComponents:3,values:d,name:"Normals"}),f=new Float32Array(2*l),p=Bo.a.newInstance({numberOfComponents:2,values:f,name:"TCoords"}),C=[0,0,0],I=[0,0,0],h=[0,0,0],b=[0,0,0],y=[0,0],v=[0,0],Z=0;Z2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),To(e,t)}),"vtkCylinderSource");var Xo=n(6),Oo=ln.c.vtkWarningMacro;function No(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=new Float32Array(3);if(Object(Xo.t)(t.point2,t.point1,i),Object(Xo.A)(i)<=0)Oo("Zero-length line definition");else{var l=t.resolution,s=l+1,c=new window[a](3*s);o.getPoints().setData(c,3);var g=new Uint32Array(s+1);o.getLines().setData(g,1);for(var u=0,d=0,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),ln.c.obj(e,t),ln.c.setGet(e,t,["resolution"]),ln.c.setGetArray(e,t,["point1","point2"],3),ln.c.algo(e,t,0,1),No(e,t)}),"vtkLineSource");var Yo=n(8),Fo=n(12),Po=ln.c.vtkWarningMacro;function Ko(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var a=r[0],o=a?a.getPoints().getDataType():"Float32Array",i=Go.a.newInstance(),l=new Float32Array(3),s=new Float32Array(3);if(Object(Xo.t)(t.point1,t.origin,l),Object(Xo.t)(t.point2,t.origin,s),e.updatePlane(l,s)){var c=t.xResolution,g=t.yResolution,u=(c+1)*(g+1),d=c*g,m=new window[o](3*u);i.getPoints().setData(m,3);var f=new Uint32Array(5*d);i.getPolys().setData(f,1);var p=new Float32Array(3*u),C=Bo.a.newInstance({numberOfComponents:3,values:p,name:"Normals"});i.getPointData().setNormals(C);var I=new Float32Array(2*u),h=Bo.a.newInstance({numberOfComponents:2,values:I,name:"TextureCoordinates"});i.getPointData().setTCoords(h);for(var b=new Float32Array(2),y=0,v=0;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mo,n),t.normal=[0,0,1],t.center=[0,0,0],ln.c.obj(e,t),ln.c.setGet(e,t,["xResolution","yResolution"]),ln.c.setGetArray(e,t,["origin"],3),ln.c.getArray(e,t,["point1","point2","normal","center"],3),ln.c.algo(e,t,0,1),Ko(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}),"vtkPlaneSource");function Lo(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=t.numberOfPoints,l=new window[a](3*i);o.getPoints().setData(l,3);var s,c,g,u,d,m=new Uint32Array(i+1);o.getVerts().setData(m,1);for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Do,n),ln.c.obj(e,t),ln.c.setGet(e,t,["numberOfPoints","radius"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Lo(e,t)}),"vtkPointSource");function Eo(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array";r=Go.a.newInstance();var o=0,i=t.thetaResolution,l=t.startThetat.startTheta?t.endTheta:t.startTheta;s*=Math.PI/180;var c=t.startPhit.startPhi?t.endPhi:t.startPhi;g*=Math.PI/180,Math.abs(l-s)<2*Math.PI&&++i;var u=(s-l)/t.thetaResolution,d=t.startPhi<=0?1:0,m=t.phiResolution+(t.endPhi>=180?-1:0),f=t.phiResolution*i+2,p=2*t.phiResolution*t.thetaResolution,C=0,I=new window[a](3*f),h=new Float32Array(3*f),b=0,y=new Uint32Array(5*p);t.startPhi<=0&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]+t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=1,C++,o++),t.endPhi>=180&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]-t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=-1,C++,o++);for(var v=t.phiResolution-o,Z=(g-c)/(t.phiResolution-1),A=0;A=180)for(var W=v-1+o,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Eo(e,t)}),"vtkSphereSource");var zo=n(17),_o=n(27),jo=ln.c.vtkDebugMacro,Qo=ln.c.vtkErrorMacro;function qo(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var a=n[0];if(!a)return Qo("Invalid or missing input"),1;var o=a.getPoints(),i=a.getPointData().getNormals(),l=e.getInputArrayToProcess(0);if(!o||!l)return jo("No data to warp",!!o,!!l),r[0]=n[0],1;var s=o.getNumberOfPoints(),c=null,g=[0,0,1];i&&!t.useNormal?(c=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},jo("Using data normals")):e.getXyPlane()?(c=function(e,t){return g},jo("Using x-y plane normal")):(c=function(e,n){return t.normal},jo("Using Normal instance variable"));for(var u=new Float32Array(3*s),d=o.getData(),m=0,f=[0,0,1],p=1,C=l.getData(),I=l.getNumberOfComponents(),h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$o,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),ln.c.setGetArray(e,t,["normal"],3),qo(e,t)}),"vtkWarpScalar");var ei=n(36),ti=n(37),ni={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}},ri=ni.VaryRadius,ai=ni.GenerateTCoords,oi=ln.c.vtkDebugMacro,ii=ln.c.vtkErrorMacro,li=ln.c.vtkWarningMacro;function si(e,t){function n(e,n){var r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){for(var r=t[n],a=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],i=t,l=i[0],s=0;s1){var c=0,g=[0,0,0],u=[0,0,0],d=i.slice(s+1,s+1+l);if((c=r(e,d,0))!==l)!function(){var t=d[c],i=e.slice(3*t,3*(t+1)),s=d[c+1],m=e.slice(3*s,3*(s+1));if(g=m.map((function(e,t){return e-i[t]})),Object(Xo.y)(g),a)o=a;else{for(;++c.001){o=p,g=u;break}}if(c>=l)for(var C=0;C<3;++C)if(0!==g[C]){o[(C+2)%3]=0,o[(C+1)%3]=1,o[C]=-g[(C+1)%3]/g[C];break}}Object(Xo.y)(o);for(var I=0;++c0?Math.sqrt(Z):0;for(var A=[0,0,0],G=0;G<3;++G)A[G]=u[G]+g[G];Object(Xo.y)(A),Object(Xo.w)(A,y,b),Object(Xo.w)(g,y,A),Object(Xo.q)(o,A)*Object(Xo.q)(b,A)<0&&(Z*=-1);for(var S=I;St.radiusFactor&&(B=t.radiusFactor);else if(c&&t.varyRadius===ri.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(B=c.getComponent(r[R],0))<0)return li("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var X=0;X1&&k){var q=Z.slice(j,j+A+1);a(u.getData(),q,R)}o(z,A,Q,u.getData(),I.getData(),g.getPointData(),L,b,H,F,P,K,w,U)?(V=i(z,A,_,V,g.getCellData(),M,B),D&&l(z,A,Q,u.getData(),H,D.getData())):li("Could not generate points"),z=n(z,A),_++}c.setPoints(I),c.setStrips(B),c.setPointData(L),L.setNormals(y),s[0]=c}}}}}else ii("Invalid or missing input")}}var ci={outputPointsPrecision:ti.b.DEFAULT,radius:.5,varyRadius:ri.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:ai.TCOORDS_OFF,textureLength:1};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),ln.c.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),ln.c.obj(e,t),ln.c.algo(e,t,1,1),si(e,t)}),"vtkTubeFilter");var gi=n(40),ui=(n(25),{diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"}),di={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function mi(e){var t="",n=0,r=di.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var a,o,i,l={comments:[],elements:[],headerLength:n},s=t.split("\n"),c=0;c0,u=e.uvs.length>0,d=e.normals.length>0,m=e.faceVertexUvs.length>0,f=0;f0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(a)}}function hi(e,t,n,r){var a;switch(n){case"int8":case"char":a=[e.getInt8(t),1];break;case"uint8":case"uchar":a=[e.getUint8(t),1];break;case"int16":case"short":a=[e.getInt16(t,r),2];break;case"uint16":case"ushort":a=[e.getUint16(t,r),2];break;case"int32":case"int":a=[e.getInt32(t,r),4];break;case"uint32":case"uint":a=[e.getUint32(t,r),4];break;case"float32":case"float":a=[e.getFloat32(t,r),4];break;case"float64":case"double":a=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return a}function bi(e,t,n,r){for(var a,o={},i=0,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},a=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:a,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:a,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n(t.url,r);return a.then(e.parse),a},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified();var r=mi(gi.a.arrayBufferToString(n));if("ascii"!==r.format){t.parseData=n;for(var a,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},i="binary_little_endian"===r.format,l=n instanceof ArrayBuffer?n:n.buffer,s=new DataView(l,r.headerLength),c=0,g=0;g=a.elements[c].count&&(c++,g=0);var m=Ci(a.elements[c].properties,d);Ii(o,a.elements[c].name,m),g++}}var f=fi(o,a.elements);t.output[0]=f}}},e.requestData=function(n,r){e.parse(t.parseData)}}var vi={};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),yi(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkPLYReader"),n(69);function Zi(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){return t.url=n,e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then((function(t){return e.parseAsText(t),!0}))},e.parseAsText=function(n){t.csv=n,t.elevation=[],t.csv.split("\n").forEach((function(e,n){t.elevation.push(e.split(",").map((function(e){return Number(e)})))})),e.modified()},e.requestData=function(e,n){var r=Go.a.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var a=t.elevation.length,o=t.elevation[0].length,i=r.getPoints();i.setNumberOfPoints(o*a,3);var l=i.getData(),s=ei.a.newInstance({size:5*(o-1)*(a-1)});r.setPolys(s);var c=s.getData(),g=0,u=new Float32Array(o*a*2),d=Bo.a.newInstance({numberOfComponents:2,values:u,name:"TextureCoordinates"});r.getPointData().setTCoords(d);for(var m=0;m0&&m>0&&(c[g++]=4,c[g++]=p,c[g++]=p-1,c[g++]=p-1-o,c[g++]=p-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Ai={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ai,n),ln.c.obj(e,t),ln.c.get(e,t,["url"]),ln.c.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Zi(e,t)}),"vtkElevationReader");var Gi={};function Si(e,t,n,r){for(var a=0;a0&&"\r"!==e})),i=o.length;a.push(i);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.obj");return e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=function(n){return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,Gi.splitOn=r,Gi.pieces=[],Gi.v=[],Gi.vt=[],Gi.vn=[],Gi.f=[[]],Gi.size=0,n.split("\n").forEach(Bi),function(e){var t=!!Gi.vt.length,n=!!Gi.vn.length;if(e.splitMode){e.numberOfOutputs=Gi.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper","splitMode"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Vi(e,t)}),"vtkOBJReader");var wi=["chemical json","name","inchi","formula","atoms","bonds","properties"];function ki(e,t){t.classHierarchy.push("vtkMolecule")}var Wi={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function xi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),ln.c.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),ln.c.setGet(e,t,wi),ki(0,t)}var Ti={newInstance:ln.c.newInstance(xi,"vtkMolecule"),extend:xi},Ji={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};function Xi(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}return e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText)},e.parseAsText=function(n){return t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0},e.requestData=function(e,n){var r=Ti.newInstance();if(t.molecule){var o=t.molecule.length,i=[],l=[];t.numberOfAtoms=0;for(var s=0;s=78&&(C=g.substr(76,2).replace(/\s+/g,"")),""===C&&(C=d.substr(0,2).replace(/\d/g,"")),i.push(m),i.push(f),i.push(p);var I=Object(a.a)(Ji[C],1)[0];l.push(I),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(l),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(i)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Oi={numberOfAtoms:0,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Xi(e,t)}),"vtkPDBReader");var Ni=[];Ni["-".charCodeAt(0)]=62,Ni["_".charCodeAt(0)]=63;for(var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yi=0;Yi>16&255,r[g++]=c>>8&255,r[g++]=255&c}switch(i){case 3:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<10;!Fi(e[s]);)s++;for(c|=Ni[e.charCodeAt(s++)]<<4;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>2,r[g++]=c>>8&255,r[g++]=255&c;break;case 2:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<2;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>4,r[g++]=255&c;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return g}var Ki={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();var r=function(e){return gi.a.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),a=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var i=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(a).firstChild,l=i.getAttribute("type"),s=i.getAttribute("compressor"),c=i.getAttribute("byte_order"),g=i.getAttribute("header_type")||"UInt32";if(s&&"vtkZLibDataCompressor"!==s)return console.error("Invalid compressor",s),!1;if(c&&"LittleEndian"!==c)return console.error("Only LittleEndian encoding is supported"),!1;if(l!==t.dataType)return console.error("Invalid data type",l,"expecting",t.dataType),!1;if(i.querySelector("AppendedData")){var u=i.querySelector("AppendedData"),d=u.getAttribute("encoding"),m=i.querySelectorAll("DataArray"),f=t.binaryBuffer;"base64"===d&&(f=u.textContent.trim().substr(1));for(var p=[],C=0;C0?0===Z[3]?new ArrayBuffer(Z[2]*A):new ArrayBuffer(Z[2]*(A-1)+Z[3]):new ArrayBuffer(0);for(var S=new Uint8Array(y),B={offset:0,uint8:S},V=0;V2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ji,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),_i(e,t)},processDataArray:zi,processFieldData:function(e,t,n,r,a,o,i){if(t){var l={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(l[r]=n["set".concat(e)])}));for(var s=t.getElementsByTagName("DataArray"),c=s.length,g=0;g(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=o<(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[3]=i>(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[4]=l<(arguments.length<=3?void 0:arguments[3])?l:arguments.length<=3?void 0:arguments[3],e[5]=s>(arguments.length<=3?void 0:arguments[3])?s:arguments.length<=3?void 0:arguments[3]}function cl(e,t,n,r,o,i,l){var s=Object(a.a)(e,6),c=s[0],g=s[1],u=s[2],d=s[3],m=s[4],f=s[5];void 0===l?(e[0]=Math.min(t[0],c),e[1]=Math.max(t[1],g),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],m),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,c),e[1]=Math.max(n,g),e[2]=Math.min(r,u),e[3]=Math.max(o,d),e[4]=Math.min(i,m),e[5]=Math.max(l,f))}function gl(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t,e[1]=t>l?t:l,e[2]=n,e[3]=n>c?n:c,e[4]=r,e[5]=r>u?r:u,i!==t||s!==n||g!==r}function ul(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function fl(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function pl(e,t){return e[2*t+1]-e[2*t]}function Cl(e){return[pl(e,0),pl(e,1),pl(e,2)]}function Il(e){return e.slice(0,2)}function hl(e){return e.slice(2,4)}function bl(e){return e.slice(4,6)}function yl(e){var t=Cl(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function vl(e){if(ol(e)){var t=Cl(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Zl(e){return[e[0],e[2],e[4]]}function Al(e){return[e[1],e[3],e[5]]}function Gl(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Sl(e,t){for(var n=0,r=0;r<2;r++)for(var a=2;a<4;a++)for(var o=4;o<6;o++)t[n]=[e[r],e[a],e[o]],n++}function Bl(e,t,n){t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5]}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=fl(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Rl(e,t,n,r){for(var a=[].concat(rl),o=e.getData(),i=0;ie[2*g+1]?(i[g]=0,c[g]=e[2*g+1],o=!1):i[g]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],a[0]=0,1;for(var u=0;u<3;u++)2!==i[u]&&0!==n[u]?s[u]=(c[u]-t[u])/n[u]:s[u]=-1;for(var d=0;d<3;d++)s[l]1||s[l]<0)return 0;a[0]=s[l];for(var m=0;m<3;m++)if(l!==m){if(r[m]=t[m]+s[l]*n[m],r[m]e[2*m+1])return 0}else r[m]=c[m];return 1}function kl(e,t,n){for(var r=[],a=0,o=1,i=1,l=4;l<=5;++l){r[2]=e[l];for(var s=2;s<=3;++s){r[1]=e[s];for(var c=0;c<=1;++c)if(r[0]=e[c],a=tl.a.evaluate(n,t,r),i&&(o=a>=0?1:-1,i=0),0===a||o>0&&a<0||o<0&&a>0)return 1}}return 0}function Wl(e,t){if(!ol(e)||!ol(t))return!1;for(var n,r=[0,0,0,0,0,0],a=0;a<3;a++)if(n=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(n=!0,r[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(n=!0,r[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(n=!0,r[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(n=!0,r[2*a+1]=e[2*a+1]),!n)return!1;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],!0}function xl(e,t){if(!ol(e)||!ol(t))return!1;for(var n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function Tl(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Jl(e,t,n){for(var r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],o=0,i=0;i<2;i++)for(var l=2;l<4;l++)for(var s=4;s<6;s++){var c=[e[i],e[l],e[s]];a[o++]=tl.a.evaluate(n,t,c)}for(var g=2;g--&&!(Gl(a[r[g][0]],a[r[g][4]])&&Gl(a[r[g][1]],a[r[g][5]])&&Gl(a[r[g][2]],a[r[g][6]])&&Gl(a[r[g][3]],a[r[g][7]])););if(g<0)return!1;for(var u=Math.sign(n[g]),d=Math.abs((e[2*g+1]-e[2*g])*n[g]),m=u>0?1:0,f=0;f<4;f++)if(0!==d){var p=Math.abs(a[r[g][f]])/d;u>0&&pm&&(m=p)}var C=(1-m)*e[2*g]+m*e[2*g+1];return u>0?e[2*g]=C:e[2*g+1]=C,!0}var Xl=function(){function e(t){Object($i.a)(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),il(this.bounds,rl))}return Object(el.a)(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return al(this.bounds,e)}},{key:"isValid",value:function(){return ol(this.bounds)}},{key:"setBounds",value:function(e){return il(this.bounds,e)}},{key:"reset",value:function(){return ll(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne[1]||e[2]>e[3]||e[4]>e[5]?Pl.EMPTY:3===t?Pl.XYZ_GRID:2===t?e[0]===e[1]?Pl.YZ_PLANE:e[2]===e[3]?Pl.XZ_PLANE:Pl.XY_PLANE:1===t?e[0]1&&(n*=t[r]-1)}return n},e.getNumberOfPoints=function(){var t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=function(n){var r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return es("Requesting a point from an empty image."),null;var a=new Float64Array(3);switch(t.dataDescription){case Hl.EMPTY:return null;case Hl.SINGLE_POINT:break;case Hl.X_LINE:a[0]=n;break;case Hl.Y_LINE:a[1]=n;break;case Hl.Z_LINE:a[2]=n;break;case Hl.XY_PLANE:a[0]=n%r[0],a[1]=n/r[0];break;case Hl.YZ_PLANE:a[1]=n%r[1],a[2]=n/r[1];break;case Hl.XZ_PLANE:a[0]=n%r[0],a[2]=n/r[0];break;case Hl.XYZ_GRID:a[0]=n%r[0],a[1]=n/r[0]%r[1],a[2]=n/(r[0]*r[1]);break;default:es("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(a,o),o},e.getBounds=function(){return e.extentToBounds(t.extent)},e.extentToBounds=function(t){var n=[t[0],t[2],t[4],t[1],t[2],t[4],t[0],t[3],t[4],t[1],t[3],t[4],t[0],t[2],t[5],t[1],t[2],t[5],t[0],t[3],t[5],t[1],t[3],t[5]],r=new Float64Array([n[0],n[1],n[2]]),a=new Float64Array(3);e.indexToWorld(r,a);for(var o=[a[0],a[0],a[1],a[1],a[2],a[2]],i=3;i<24;i+=3)Object(Fo.p)(r,n[i],n[i+1],n[i+2]),e.indexToWorld(r,a),a[0]o[1]&&(o[1]=a[0]),a[1]>o[3]&&(o[3]=a[1]),a[2]>o[5]&&(o[5]=a[2]);return o},e.computeTransforms=function(){Object(Yo.e)(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],Object(Yo.r)(t.indexToWorld,t.indexToWorld,t.spacing),Object(Yo.g)(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return es("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.indexToWorld),Object(Fo.q)(i,a,t.indexToWorld),Object(Xo.p)(o,i,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.worldToIndex),Object(Fo.q)(i,a,t.worldToIndex),Object(Xo.p)(o,i,n),n},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=function(){for(var t=e.getBounds(),n=[],r=0;r<3;r++)n[r]=(t[2*r+1]+t[2*r])/2;return n},e.computeHistogram=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);var a=[0,0,0],o=[0,0,0];Ol.computeCornerPoints(r,a,o),Object(Xo.o)(a,a),Object(Xo.o)(o,o);var i=e.getDimensions();Object(Xo.r)(a,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],a),Object(Xo.r)(o,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],o);for(var l=i[0],s=i[0]*i[1],c=e.getPointData().getScalars().getData(),g=-1/0,u=1/0,d=0,m=0,f=0,p=a[2];p<=o[2];p++)for(var C=a[1];C<=o[1];C++)for(var I=a[0]+C*l+p*s,h=a[0];h<=o[0];h++){if(!n||n([h,C,p],r)){var b=c[I];b>g&&(g=b),b0?m/f:0,v=d-y*y,Z=Math.sqrt(v);return{minimum:u,maximum:g,average:y,variance:v,sigma:Z}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,a=0;a<3;++a)n[a]=r,r*=e[2*a+1]-e[2*a]+1;return n},e.computeOffsetIndex=function(t){var n=Object(a.a)(t,3),r=n[0],o=n[1],i=n[2],l=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),c=e.computeIncrements(l,s);return Math.floor((Math.round(r)-l[0])*c[0]+(Math.round(o)-l[2])*c[1]+(Math.round(i)-l[4])*c[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),a=0;a<3;++a)if(r[a]n[2*a+1])return es("GetScalarPointer: Pixel ".concat(r," is not in memory. Current extent = ").concat(n)),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return es("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,n)}}var ns={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:Hl.EMPTY};function rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ns,n),Nl.a.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=El(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),ln.c.get(e,t,["direction","indexToWorld","worldToIndex"]),ln.c.setGetArray(e,t,["origin","spacing"],3),ln.c.getArray(e,t,["extent"],6),ts(e,t)}var as={newInstance:ln.c.newInstance(rs,"vtkImageData"),extend:rs};function os(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=function(e,n,r,a,o){for(var i=e.getElementsByTagName(t.dataType)[0],l=i.getAttribute("Origin").split(" ").map((function(e){return Number(e)})),s=i.getAttribute("Spacing").split(" ").map((function(e){return Number(e)})),c=i.getElementsByTagName("Piece"),g=c.length,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,is,n),Qi.extend(e,t,n),os(e,t)}),"vtkXMLImageDataReader");function ls(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,a,o){var i=e.getElementsByTagName(t.dataType)[0],l=i.getElementsByTagName("FieldData")[0],s=i.getElementsByTagName("Piece"),c=s.length,g=[];l&&(g=Object(Ao.a)(l.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,a){var o=Number(e.getAttribute("NumberOfTuples"));return Bo.a.newInstance(Qi.processDataArray(o,e,t,n,r,a))}(e,r,a,o,t.binaryBuffer)})));for(var u=function(e){var n=Go.a.newInstance(),i=s[e],l=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],c=Qi.processDataArray(l,s,r,a,o,i),g=c.values,u=c.numberOfComponents;e["get".concat(t)]().setData(g,u)}return l}(n,"Points",i,r,a,o,t.binaryBuffer),c=0;["Verts","Lines","Strips","Polys"].forEach((function(e){c+=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=Qi.processCells(l,n.getElementsByTagName(t)[0],r,a,o,i);e["get".concat(t)]().setData(s)}return l}(n,e,i,r,a,o,t.binaryBuffer)})),Qi.processFieldData(l,i.getElementsByTagName("PointData")[0],n.getPointData(),r,a,o,t.binaryBuffer),Qi.processFieldData(c,i.getElementsByTagName("CellData")[0],n.getCellData(),r,a,o,t.binaryBuffer);for(var u=n.getFieldData(),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ss,n),Qi.extend(e,t,n),ls(e,t)}),"vtkXMLPolyDataReader");var cs=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return Xs[e]&&Xs[e](t)}function Hs(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=function(n){e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=function(n){t.renderers=t.renderers.filter((function(e){return e!==n})),e.modified()},e.hasRenderer=function(e){return-1!==t.renderers.indexOf(e)},e.newAPISpecificView=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ns(e||t.defaultViewAPI,n)},e.addView=function(n){e.hasView(n)||(n.setRenderable(e),t.views.push(n),e.modified())},e.removeView=function(n){t.views=t.views.filter((function(e){return e!==n})),e.modified()},e.hasView=function(e){return-1!==t.views.indexOf(e)},e.render=function(){t.interactor?t.interactor.render():t.views.forEach((function(e){return e.traverseAllPasses()}))},e.getStatistics=function(){var e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((function(t){t.getViewProps().forEach((function(t){if(t.getVisibility()){e.propCount+=1;var n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){var r=n.getPrimitiveCount();Object.keys(r).forEach((function(t){e[t]||(e[t]=0),e[t]+=r[t]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n"),e},e.captureImages=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return ln.c.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n):void 0})).filter((function(e){return!!e}))}}var Ys={defaultViewAPI:Js,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function Fs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),ln.c.obj(e,t),ln.c.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),ln.c.get(e,t,["neverRendered"]),ln.c.getArray(e,t,["renderers"]),ln.c.event(e,t,"completion"),Hs(e,t)}var Ps={newInstance:ln.c.newInstance(Fs,"vtkRenderWindow"),extend:Fs,registerViewConstructor:Os,listViewAPIs:function(){return Object.keys(Xs)},newAPISpecificView:Ns},Ks={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},Ms={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},Ls={Wrap:Ks,Filter:Ms},Ds=ln.c.vtkErrorMacro;function Es(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),a=e[r];if(a)a(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Us,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),t.renderableChildMap=new Map,ln.c.get(e,t,["visited"]),ln.c.setGet(e,t,["parent","renderable","myFactory"]),ln.c.getArray(e,t,["children"]),Es(e,t)}var _s={newInstance:ln.c.newInstance(zs,"vtkViewNode"),extend:zs,PASS_TYPES:["Build","Render"]};function js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qs=Ls.Wrap,qs=Ls.Filter,$s=Bo.a.VtkDataTypes,ec=ln.c.vtkDebugMacro,tc=ln.c.vtkErrorMacro,nc=ln.c.vtkWarningMacro;function rc(e,t){var n=this;function r(e,n){var r=[];if(e!==$s.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=t.width*t.height*t.components,o=0;o=a&&(I=a-1);var h=p-C,b=1-h;C=C*r*o,I=I*r*o;for(var y=0;y=r&&(G=r-1);var S=Z-A;A*=o,G*=o;for(var B=0;Ba[s]&&(a[s]=n[i]),i++;for(var c=[],g=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null;if(n?t.openGLRenderWindow=n:(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent()),t.context=t.openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qs.LINEAR),e.setMagnificationFilter(qs.LINEAR)):(e.setMinificationFilter(qs.NEAREST),e.setMagnificationFilter(qs.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(Qs.REPEAT),e.setWrapS(Qs.REPEAT),e.setWrapT(Qs.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified()));var r=t.renderable.getInputData(0);if(r&&r.getPointData().getScalars()){for(var a=r.getExtent(),o=r.getPointData().getScalars(),i=[],l=0;lt.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;switch(t.target){case t.context.TEXTURE_2D:n=t.context.TEXTURE_BINDING_2D;break;default:nc("impossible case")}e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=function(){t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t.openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=function(n,r){return t.internalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||ec("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var a=0;return(a=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(a=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(ec("Unsupported internal texture type!"),ec("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),a},e.setInternalFormat=function(n){n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=function(n,r){return t.format=e.getDefaultFormat(n,r),t.format},e.getDefaultFormat=function(e,n){if(t.openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}},e.resetFormatAndType=function(){t.format=0,t.internalFormat=0,t.openGLDataType=0},e.getDefaultDataType=function(e){if(t.openGLRenderWindow.getWebgl2())switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.FLOAT}switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear")?t.context.FLOAT:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){return t.openGLDataType=e.getDefaultDataType(n),t.openGLDataType},e.getShiftAndScale=function(){var e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:e=(n=127.5)-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:e=(n=32767.5)-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:e=(n=2147483647.5)-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;break;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case qs.NEAREST:return t.context.NEAREST;case qs.LINEAR:return t.context.LINEAR;case qs.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qs.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qs.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qs.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case Qs.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case Qs.REPEAT:return t.context.REPEAT;case Qs.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=a(r(l,[s]));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=s.length/6-1,e.createTexture(),e.bind();for(var c=a(r(l,s)),g=[],u=t.width,d=t.height,m=0;m=1&&y>=1;){var v=null;h<=t.maxLevel&&(v=g[6*h+I]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+I,h,t.internalFormat,b,y,0,t.format,t.openGLDataType,v),h++,b/=2,y/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,a,o){return e.getOpenGLDataType(a),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?a===$s.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType($s.UNSIGNED_CHAR),e.getInternalFormat($s.UNSIGNED_CHAR,4),e.getFormat($s.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.width=n.width,t.height=n.height,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);var r=!Object(Xo.m)(n.width)||!Object(Xo.m)(n.height),a=document.createElement("canvas");a.width=r?Object(Xo.h)(n.width):n.width,a.height=r?Object(Xo.h)(n.height):n.height;var o=a.getContext("2d");o.translate(0,a.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,a.width,a.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var i=a;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,i),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,a,o,i,l){return e.getOpenGLDataType(i),e.getInternalFormat(i,o),e.getFormat(i,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,l),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,a,i,l,s){for(var c=n*r*a,g=[],u=[],d=0;d4096&&(G===$s.FLOAT||i>=3)&&(B=4096);var V=1,R=1;c>B*B&&(R=V=Math.ceil(Math.sqrt(c/(B*B))));var w=Math.sqrt(c)/V;w=Object(Xo.h)(w);var k,W=Math.floor(w*V/n),x=Math.ceil(a/W),T=Object(Xo.h)(r*x/R);t.width=w,t.height=T,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=W,t.volumeInfo.yreps=x,t.volumeInfo.xstride=V,t.volumeInfo.ystride=R,t.volumeInfo.offset=Z.offset,t.volumeInfo.scale=Z.scale;var J=w*T*i;k=G===$s.FLOAT?new Float32Array(J):new Uint8Array(J);for(var X=0,O=Math.floor(n/V),N=Math.floor(r/R),H=0;H2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ac,n),_s.extend(e,t,n),t.sendParametersTime={},ln.c.obj(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},ln.c.obj(t.textureBuildTime,{mtime:0}),ln.c.set(e,t,["format","openGLDataType"]),ln.c.setGet(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ln.c.get(e,t,["width","height","volumeInfo","components","handle","target"]),rc(e,t)}var ic=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,a=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");a+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,a,r.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.context,r=n.COLOR_ATTACHMENT0;if(e>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");r+=e}n.framebufferTexture2D(n.FRAMEBUFFER,r,n.TEXTURE_2D,null,0)},e.setDepthBuffer=function(e){if(t.openGLRenderWindow.getWebgl2()){var n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else Object(ln.m)("Attaching depth buffer textures to fbo requires WebGL 2")},e.removeDepthBuffer=function(){if(t.openGLRenderWindow.getWebgl2()){var e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else Object(ln.m)("Attaching depth buffer textures to framebuffers requires WebGL 2")},e.getGLFramebuffer=function(){return t.glFramebuffer},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))},e.releaseGraphicsResources=function(){t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer),t.colorTexture&&t.colorTexture.releaseGraphicsResources()},e.getSize=function(){var e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=function(){e.bind();var n=t.context,r=ic.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(Ms.LINEAR),r.setMagnificationFilter(Ms.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,cn.b.UNSIGNED_CHAR,null),e.setColorBuffer(r),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)}}var sc={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function cc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Object(ln.h)(e,t),Object(ln.j)(e,t,["colorTexture"]),lc(e,t)}var gc={newInstance:Object(ln.g)(cc,"vtkFramebuffer"),extend:cc};function uc(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(ln.c.capitalize(t.currentOperation))},e.getTraverseOperation=function(){return t.currentTraverseOperation},e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t.currentParent=r,t.preDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((function(t){t.traverse(n,e)})),t.postDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})))}}var dc={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dc,n),ln.c.obj(e,t),ln.c.get(e,t,["currentOperation"]),ln.c.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),uc(e,t)}var fc={newInstance:ln.c.newInstance(mc,"vtkRenderPass"),extend:mc};function pc(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.deleted){t.currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);for(var a=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),i=0;i0&&t.volumeCount>0||t.depthRequested){var g=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=gc.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var u=t.framebuffer.getSize();null!==u&&u[0]===g[0]&&u[1]===g[1]||(t.framebuffer.create(g[0],g[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),s.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),s.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),s.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),s.traverse(e))}}}},e.getZBufferTexture=function(){return t.framebuffer?t.framebuffer.getColorTexture():null},e.requestDepth=function(){t.depthRequested=!0},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.incrementVolumeCount=function(){return t.volumeCount++}}var Cc={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cc,n),fc.extend(e,t,n),ln.c.get(e,t,["framebuffer"]),pc(e,t)}var hc={newInstance:ln.c.newInstance(Ic,"vtkForwardPass"),extend:Ic};function bc(e,t){t.classHierarchy.push("vtkGenericWidgetRepresentation")}var yc={};function vc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yc,n),_s.extend(e,t,n),bc(0,t)}var Zc={newInstance:ln.c.newInstance(vc),extend:vc};function Ac(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=function(n){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(var r=0;rt.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?El(t.keyMatrices.normalMatrix):(Dl(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Ul(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var Gc={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gc,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Ac(e,t)}var Bc={newInstance:ln.c.newInstance(Sc),extend:Sc};function Vc(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.activateTextures=function(){t.activeTextures=[],t.children.forEach((function(e){e.isA("vtkOpenGLTexture")&&(e.render(),e.getHandle()&&t.activeTextures.push(e))}))},e.opaquePass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}var Rc={context:null,activeTextures:[]};function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rc,n),_s.extend(e,t,n),Object(ln.j)(e,t,["context"]),Object(ln.e)(e,t,["activeTextures"]),Vc(e,t)}var kc={newInstance:Object(ln.g)(wc),extend:wc};function Wc(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=function(n){n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext())},e.opaquePass=function(e){if(e){var n=t.openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize),t.context.scissor(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)}},e.translucentPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=function(n){if(n!==t.lastRenderer||t.openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){Object(Yo.d)(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),Dl(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Object(Yo.i)(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Object(Yo.d)(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Object(Yo.i)(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Object(Yo.l)(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var xc={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function Tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),_s.extend(e,t,n),t.keyMatrixTime={},Object(ln.h)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Object(ln.j)(e,t,["context","keyMatrixTime"]),Wc(e,t)}var Jc={newInstance:Object(ln.g)(Tc),extend:Tc},Xc={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Oc={ObjectType:Xc};function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pc,n),ln.c.obj(e,t),ln.c.get(e,t,["openGLRenderWindow"]),Fc(e,t)}var Mc=Hc(Hc({newInstance:ln.c.newInstance(Kc),extend:Kc},{}),Oc),Lc={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}},Dc={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zc,n),ln.c.obj(e,t),t.properties={},ln.c.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Uc(e,t)}var jc=function(e){for(var t=1;t0&&(--o in t.hitProps||(t.hitProps[o]=!0))}},e.renderProp=function(n){t.currentPass===qc.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+t.idOffset),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===qc.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+t.idOffset)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.getPropFromID=function(e){return e>=0&&et.area[2]||n[1]t.area[3])return null;var i=[n[0]-t.area[0],n[1]-t.area[1]],l=e.convert(i[0],i[1],t.pixBuffer[qc.ACTOR_PASS]);if(l<=0)return null;var s={valid:!0};s.propID=l-t.idOffset,s.prop=e.getPropFromID(s.propID);var c=e.convert(i[0],i[1],t.pixBuffer[qc.COMPOSITE_INDEX_PASS]);if((c<0||c>16777215)&&(c=0),s.compositeID=c-t.idOffset,t.captureZValues){var g=4*(i[1]*(t.area[2]-t.area[0]+1)+i[0]);s.zValue=(256*t.zBuffer[g]+t.zBuffer[g+1])/65535,s.displayPosition=n}return s}var u=[n[0],n[1]],d=[0,0],m=e.getPixelInformation(n,0,a);if(m&&m.valid)return m;for(var f=1;ff?u[1]-f:0;p<=u[1]+f;++p){if(d[1]=p,u[0]>=f&&(d[0]=u[0]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[0]=u[0]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}for(var C=u[0]>=f?u[0]-(f-1):0;C<=u[0]+(f-1);++C){if(d[0]=C,u[1]>=f&&(d[1]=u[1]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[1]=u[1]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}}return a[0]=n[0],a[1]=n[1],null},e.convertSelection=function(e,n){var r=[],a=0;return n.forEach((function(n,o){var i=jc.newInstance();switch(i.setContentType($c.INDICES),e){case tg.FIELD_ASSOCIATION_CELLS:i.setFieldType(eg.CELL);break;case tg.FIELD_ASSOCIATION_POINTS:i.setFieldType(eg.POINT);break;default:ng("Unknown field association")}i.getProperties().propID=n.info.propID,i.getProperties().prop=n.info.prop,i.getProperties().compositeID=n.info.compositeID,i.getProperties().pixelCount=n.pixelCount,t.captureZValues&&(i.getProperties().displayPosition=[n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue],i.getProperties().worldPosition=t.openGLRenderWindow.displayToWorld(n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue,t.renderer)),i.setSelectionList(n.attributeIDs),r[a]=i,a++})),r},e.getInfoHash=function(e){return"".concat(e.propID," ").concat(e.compositeID)},e.generateSelection=function(n,r,a,o){for(var i=Math.floor(n),l=Math.floor(r),s=Math.floor(a),c=Math.floor(o),g=new Map,u=[0,0],d=l;d<=c;d++)for(var m=i;m<=s;m++){var f=[m,d],p=e.getPixelInformation(f,0,u);if(p&&p.valid){var C=e.getInfoHash(p);if(g.has(C)){var I=g.get(C);I.pixelCount++,t.captureZValues&&p.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ag,n),ln.c.obj(e,t),t.area=[0,0,0,0],t.propColorValue=[0,0,0],t.props=[],ln.c.setGet(e,t,["fieldAssociation","renderer","currentPass","captureZValues"]),ln.c.setGetArray(e,t,["area"],4),ln.c.setGetArray(e,t,["propColorValue"],3),ln.c.event(e,t,"event"),rg(e,t)}var ig=function(e){for(var t=1;t0&&(e=1/(t.ambient+t.diffuse+t.specular));for(var n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.addShaderVariable=mg("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(dg.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(dg.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(dg.PHONG)},e.getInterpolationAsString=function(){return ln.c.enumToString(dg,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ug.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ug.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ug.POINTS)},e.getRepresentationAsString=function(){return ln.c.enumToString(ug,t.representation)}}var pg={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,specular:0,specularPower:1,opacity:1,interpolation:dg.GOURAUD,representation:ug.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),ln.c.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),fg(e,t)}var Ig,hg=function(e){for(var t=1;t2)for(var r=0;r2){for(var r=0;r1?2*(e-1):0},polysToWireframe:function(e,t){return e>2?2*e:0},stripsToWireframe:function(e,t){return e>2?4*e-6:0},polysToSurface:function(e,t){return e>2?3*(e-2):0},stripsToSurface:function(e,t,n){return e>2?3*(e-2):0}},v=null,Z=null;a===sg.POINTS||"verts"===r?(v=b.anythingToPoints,Z=y.anythingToPoints):a===sg.WIREFRAME||"lines"===r?(v=b["".concat(r,"ToWireframe")],Z=y["".concat(r,"ToWireframe")]):(v=b["".concat(r,"ToSurface")],Z=y["".concat(r,"ToSurface")]);for(var A=n.getData(),G=A.length,S=0,B=0;B0&&(Math.abs(x)/W>1e6||Math.abs(Math.log10(W))>3||0===W&&x>1e6)){for(var N=new Float64Array(3),H=new Float64Array(3),Y=0;Y<3;++Y){var F=o.points.getRange(Y),P=F[1]-F[0];N[Y]=.5*(F[1]+F[0]),H[Y]=P>0?1/P:1}e.setCoordShiftAndScale(N,H)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);d=function(e){if(m=3*e,t.coordShiftAndScaleEnabled?(R[w++]=(i[m++]-t.coordShift[0])*t.coordScale[0],R[w++]=(i[m++]-t.coordShift[1])*t.coordScale[1],R[w++]=(i[m++]-t.coordShift[2])*t.coordScale[2]):(R[w++]=i[m++],R[w++]=i[m++],R[w++]=i[m++]),null!==l&&(f=o.haveCellNormals?3*(h+o.cellOffset):3*e,R[w++]=l[f++],R[w++]=l[f++],R[w++]=l[f++]),t.customData.forEach((function(t){I=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bg,n),Mc.extend(e,t,n),ln.c.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),ln.c.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),Sg(e,t)}var Rg={newInstance:ln.c.newInstance(Vg),extend:Vg},wg=ln.c.vtkErrorMacro;function kg(e,t){t.classHierarchy.push("vtkShader"),e.compile=function(){var e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;switch(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),t.shaderType){case"Fragment":e=t.context.FRAGMENT_SHADER;break;case"Vertex":default:e=t.context.VERTEX_SHADER}if(t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle),!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){var n=t.context.getShaderInfoLog(t.handle);return wg("Error compiling shader '".concat(t.source,"': ").concat(n)),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}var Wg={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["shaderType","source","error","handle","context"]),kg(e,t)}var Tg={newInstance:ln.c.newInstance(xg,"vtkShader"),extend:xg},Jg=ln.c.vtkErrorMacro;function Xg(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=function(){return t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(Jg("Links failed: ".concat(t.error)),0):(Jg(t.error),0):(Jg(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.fragmentShader.getError()),0):(Jg(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.vertexShader.getError()),0)},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=function(){return!(!t.linked&&!e.link()||(t.context.useProgram(t.handle),e.setBound(!0),0))},e.isBound=function(){return!!t.bound},e.release=function(){t.context.useProgram(null),e.setBound(!1)},e.setContext=function(e){t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=function(){if(t.inked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;if(t.uniformLocs={},t.context.linkProgram(t.handle),!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){var n=t.context.getProgramInfoLog(t.handle);return Jg("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(a,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(a,!1,o),!0},e.setUniformf=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(a,r),!0)},e.setUniformfv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(a,r),!0)},e.setUniformi=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(a,r),!0)},e.setUniformiv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(a,r),!0)},e.setUniform2f=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,a),!0},e.setUniform2fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(a,r),!0)},e.setUniform2i=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,a),!0},e.setUniform2iv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(a,r),!0)},e.setUniform3f=function(n,r,a,o){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r,a,o),!0},e.setUniform3fArray=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(a,r),!0)},e.setUniform3i=function(n){var r=e.findUniform(n);if(-1===r)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i1?a-1:0),i=1;i1?a-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=Tg.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=Tg.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=Tg.newInstance(),t.geometryShader.setShaderType("Geometry"),ln.c.obj(e,t),ln.c.get(e,t,["lastCameraMTime"]),ln.c.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),Xg(e,t)}var Hg={newInstance:ln.c.newInstance(Ng,"vtkShaderProgram"),extend:Ng,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var i="";r&&(i="g");var l=new RegExp(t,i),s=e.replace(l,a);return{replace:o,result:s}}};function Yg(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=function(){},e.initialize=function(){t.instancingExtension=null,t.openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t.openGLRenderWindow&&t.openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=function(){return 0!==t.handleVAO||!1===t.supported},e.bind=function(){if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,1):n.vertexAttribDivisor(i.index+s,1))}},e.release=function(){if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,0):n.vertexAttribDivisor(i.index+s,0)),n.disableVertexAttribArray(i.index+s)}},e.shaderProgramChanged=function(){e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=function(){e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=function(t,n,r,a,o,i,l,s){return e.addAttributeArrayWithDivisor(t,n,r,a,o,i,l,s,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,a,o,i,l,s,c,g,u){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Xc.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;var d=t.context,m={};if(m.name=a,m.index=d.getAttribLocation(t.handleProgram,a),m.offset=o,m.stride=i,m.type=l,m.size=s,m.normalize=c,m.isMatrix=u,m.divisor=g,-1===m.Index)return!1;if(r.bind(),d.enableVertexAttribArray(m.index),d.vertexAttribPointer(m.index,m.size,m.type,m.normalize,m.stride,m.offset),g>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m.index,1):d.vertexAttribDivisor(m.index,1)),m.buffer=r.getHandle(),!t.supported){for(var f=!1,p=0;p0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m+f,1):d.vertexAttribDivisor(m+f,1));return!0},e.removeAttributeArray=function(n){if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fg,n),t.buffers=[],ln.c.obj(e,t),ln.c.get(e,t,["supported"]),ln.c.setGet(e,t,["forceEmulation"]),Yg(e,t)}var Kg={newInstance:ln.c.newInstance(Pg,"vtkOpenGLVertexArrayObject"),extend:Pg};function Mg(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=function(e){t.program.setContext(e.getContext()),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=function(e){t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)}}var Lg={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lg,n),ln.c.obj(e,t),t.shaderSourceTime={},ln.c.obj(t.shaderSourceTime),t.attributeUpdateTime={},ln.c.obj(t.attributeUpdateTime),ln.c.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=Hg.newInstance(),t.VAO=Kg.newInstance(),t.CABO=Rg.newInstance(),Mg(e,t)}var Eg={newInstance:ln.c.newInstance(Dg),extend:Dg};function Ug(e,t){e.update=function(){e.getInputData()},e.addClippingPlane=function(e){"vtkPlane"===e.getClassName()&&t.clippingPlanes.push(e)},e.getNumberOfClippingPlanes=function(){return t.clippingPlanes.length},e.removeAllClippingPlanes=function(){t.clippingPlanes.length=0},e.removeClippingPlane=function(e){e<0||e>=6||t.clippingPlanes.splice(e,1)},e.getClippingPlanes=function(){return t.clippingPlanes},e.setClippingPlanes=function(t){if(t)if(Array.isArray(t))for(var n=t.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Ug(e,t)}};function jg(e,t){e.getBounds=function(){return 0},e.getBounds=function(n){e.getBounds();for(var r=0;r<6;r++)n[r]=t.bounds[r]},e.getCenter=function(){e.getBounds();for(var n=0;n<3;n++)t.center[n]=(t.bounds[2*n+1]+t.bounds[2*n])/2;return t.center.slice()},e.getLength=function(){var n=0,r=0;e.getBounds();for(var a=0;a<3;a++)r+=(n=t.bounds[2*a+1]-t.bounds[2*a])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var a=t.clippingPlanes,o=e;if(a){var i=a.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qg,n),_g.extend(e,t,n),t.bounds||Object(Xo.D)(t.bounds),t.center||(t.center=[0,0,0]),jg(e,t)}},$g={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},eu={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:$g},tu={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ru=eu.ScalarMappingTarget,au=eu.VectorMode,ou=Bo.a.VtkDataTypes,iu=tu.ColorMode,lu=ln.c.vtkErrorMacro;function su(e){return e}function cu(e){return Math.floor(255*e+.5)}function gu(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(au.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(au.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(au.RGBCOLORS)},e.build=function(){},e.isOpaque=function(){return!0},e.setAnnotations=function(n,r){if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)lu("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var a=r.length,o=0;o=0?t.annotationArray[a].annotation!==r&&(t.annotationArray[a].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),a=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=function(){return t.annotationArray.length},e.getAnnotatedValue=function(e){return e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value},e.getAnnotation=function(e){return void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation},e.getAnnotatedValueIndex=function(n){return t.annotationArray.length?e.checkForAnnotatedValue(n):-1},e.removeAnnotation=function(n){var r=e.checkForAnnotatedValue(n),a=r>=0;return a&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var a=e.getAnnotatedValueIndex(n);e.getIndexedColor(a,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=function(t){return e.getAnnotatedValueIndexInternal(t)},e.getAnnotatedValueIndexInternal=function(e){if(void 0!==t.annotatedValueMap[e]){var n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=function(e,t){t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=function(){t.annotatedValueMap=[];for(var e=t.annotationArray.length,n=0;n1?e.mapVectorsThroughTable(t,o,ru.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,o,ru.RGBA,s))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),a=e.getNumberOfComponents(),o=t.getData(),i=e.getData(),l=0;l=c&&(s=c-1)):(-1===l&&(l=e.getVectorSize()),l<=0?(s=0,l=c):(s<0&&(s=0),s>=c&&(s=c-1),s+l>c&&(l=c-s)),i!==au.MAGNITUDE||1!==c&&1!==l||(i=au.COMPONENT));var g=0;switch(s>0&&(g=s),i){case au.COMPONENT:e.mapScalarsThroughTable(t,n,r,g);break;default:case au.MAGNITUDE:var u=Bo.a.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,u,l),e.mapScalarsThroughTable(u,n,r,0);break;case au.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var a=r(n),o=t.getData(),i=e.getData(),l=o.length,s=0,c=0;c=1&&n.getDataType()===ou.UNSIGNED_CHAR)return n;var i=Bo.a.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:ou.UNSIGNED_CHAR});if(a<=0)return i;o=(o=o>0?o:0)<1?o:1;var l=su;switch(n.getDataType()!==ou.FLOAT&&n.getDataType()!==ou.DOUBLE||(l=cu),r){case 1:e.luminanceToRGBA(i,n,o,l);break;case 2:e.luminanceAlphaToRGBA(i,n,l);break;case 3:e.rGBToRGBA(i,n,o,l);break;case 4:e.rGBAToRGBA(i,n,o,l);break;default:return lu("Cannot convert colors"),null}return i},e.usingLogScale=function(){return!1},e.getNumberOfAvailableColors=function(){return 16777216},e.setRange=function(t,n){return e.setMappingRange(t,n)},e.getRange=function(t,n){return e.getMappingRange()}}var uu={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:au.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uu,n),ln.c.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],ln.c.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),ln.c.setArray(e,t,["mappingRange"],2),ln.c.getArray(e,t,["mappingRange"]),gu(e,t)}var mu=function(e){for(var t=1;tt.range[1]?t.maxIndex+1+1.5:(n=(e+t.shift)*t.scale)e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=function(n,r,a,o){var i=e.linearLookup;t.indexedLookup&&(i=e.indexedLookupFunction);var l=e.getMappingRange(),s={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,s);var c=e.getAlpha(),g=n.getNumberOfTuples(),u=n.getNumberOfComponents(),d=r.getData(),m=n.getData();if(c>=1){if(a===$g.RGBA)for(var f=0;ft.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Cu={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),mu.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},ln.c.obj(t.buildTime),t.opaqueFlagBuildTime={},ln.c.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},ln.c.obj(t.insertTime,{mtime:0}),ln.c.get(e,t,["buildTime"]),ln.c.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),ln.c.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),pu(e,t)}var hu={newInstance:ln.c.newInstance(Iu,"vtkLookupTable"),extend:Iu},bu=1,yu=0,vu=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Zu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;yu=e}var Au={getResolveCoincidentTopologyAsString:function(){return vu[yu]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bu},getResolveCoincidentTopology:function(){return yu},setResolveCoincidentTopology:Zu,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bu=e},setResolveCoincidentTopologyToDefault:function(){Zu(0)},setResolveCoincidentTopologyToOff:function(){Zu(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Zu(1)}};function Gu(e,t,n){n.forEach((function(n){e["get".concat(n.method)]=function(){return t[n.key]},e["set".concat(n.method)]=function(e,r){t[n.key]={factor:e,offset:r}}}))}var Su=["Polygon","Line","Point"],Bu={};Gu(Bu,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Su.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Vu={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),ln.c.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Au).forEach((function(t){e[t]=Au[t]})),Object.keys(Bu).forEach((function(t){e[t]=Bu[t]})),Gu(e,t.topologyOffset,Su.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Bu.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Bu,otherStaticMethods:Au,CATEGORIES:Su};function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:a}},e.createColorTextureCoordinates=function(t,n,r,a,o,i,l,s,c){var g=(i[1]-i[0])/s,u=[];u[0]=i[0]-g,u[1]=i[1]+g;var d=1/(u[1]-u[0]),m=n.getData(),f=t.getData(),p=0,C=0;if(o<0||o>=a)for(var I=0;It.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var l=t.lookupTable.getNumberOfAvailableColors();l>4094&&(l=4094),l+=2;for(var s=(a[1]-a[0])/(l-1-2),c=new Float64Array(2*l),g=0;gt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var m=n.getNumberOfComponents(),f=n.getNumberOfTuples();t.colorCoordinates=Bo.a.newInstance({numberOfComponents:2,values:new Float32Array(2*f)});var p=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Xu.MAGNITUDE&&n.getNumberOfComponents()>1&&(p=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,f,m,p,a,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,o)}},e.getIsOpaque=function(){var t=e.getLookupTable();return!t||(t.build(),t.isOpaque())},e.canUseTextureMapForColoring=function(n){if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;var r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),a=r.scalars;return!(!a||r.cellFlag||t.colorMode===xu.DEFAULT&&a.getDataType()===Ou.UNSIGNED_CHAR||t.colorMode===xu.DIRECT_SCALARS)},e.clearColorArrays=function(){t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=function(){return t.lookupTable||e.createDefaultLookupTable(),t.lookupTable},e.getMTime=function(){var e=t.mtime;if(null!==t.lookupTable){var n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=function(){var t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells()}},e.acquireInvertibleLookupTable=Nu("AcquireInvertibleLookupTable"),e.valueToColor=Nu("ValueToColor"),e.colorToValue=Nu("ColorToValue"),e.useInvertibleColorFor=Nu("UseInvertibleColorFor"),e.clearInvertibleColor=Nu("ClearInvertibleColor")}var Yu={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,viewSpecificProperties:null,customShaderAttributes:[]};function Fu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),qg.extend(e,t,n),ln.c.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),ln.c.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),ln.c.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Vu.implementCoincidentTopologyMethods(e,t),Hu(e,t)}var Pu=wu(wu(wu({newInstance:ln.c.newInstance(Fu,"vtkMapper"),extend:Fu},ku),Wu),tu),Ku="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",Mu="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n",Lu={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,a){var o=e.getCoincidentParameters(r,a);if(o&&(0!==o.factor||0!==o.offset)){var i=n.Fragment;i=Hg.substitute(i,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=i}}}},Du={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Eu=hg.Representation,Uu=hg.Shading,zu=Pu.ScalarMode,_u=ic.Filter,ju=ic.Wrap,Qu=ln.c.vtkErrorMacro,qu={type:"StartEvent"},$u={type:"EndEvent"};function ed(e,t){function n(e,t,n){return t.identity(n),e.reduce((function(e,n,r){return 0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e}),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=function(n){n&&(t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t.openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.openGLCamera=t.openGLRenderer.getViewNodeFor(t.openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.render=function(){var n=t.openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(var r=Du.Start;r= cos(radians(lightConeAngle".concat(u,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(u,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(u,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(u,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(u,");")," }"]);l=l.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),a=Hg.substitute(a,"//VTK::Light::Impl",l,!1).result;break;default:Qu("bad light complexity")}e.Fragment=a},e.replaceShaderNormal=function(n,r,a){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,i=n.Geometry,l=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Hg.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,l=Hg.substitute(l,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(a.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));"," vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," fdx = normalize(fdx);"," fdy = normalize(fdy);"," if (abs(fdx.x) > 0.0)"," { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),n.Vertex=o,n.Geometry=i,n.Fragment=l}},e.replaceShaderPositionVC=function(e,n,r){var a=e.Vertex,o=e.Geometry,i=e.Fragment;r.getProperty().getRepresentation()!==Eu.POINTS&&t.lastBoundBO.getPrimitiveType()!==Du.Points||(a=Hg.substitute(a,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(a=Hg.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=a,e.Geometry=o,e.Fragment=i},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var a=e.Vertex,o=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;a=Hg.substitute(a,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var l=t.openGLActor.getActiveTextures(),s=2,c=2;if(l&&l.length>0&&(s=l[0].getComponents(),l[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(c=3)),t.renderable.getColorTextureMap()&&(s=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),c=2),2===c){if(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,l&&l.length>=1)switch(s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=a,e.Geometry=o,e.Fragment=i}},e.replaceShaderClip=function(e,n,r){var a=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6),a=Hg.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,a=Hg.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Hg.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=Hg.substitute(o,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=a,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,a=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||a.getEdgeVisibility()&&a.getRepresentation()===Eu.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Du.Points||a.getRepresentation()===Eu.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Du.Lines||a.getRepresentation()===Eu.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Du.Tris&&o!==Du.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Du.TrisEdges&&o!==Du.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=Hg.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Hg.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderValues=function(n,r,a){if(e.replaceShaderColor(n,r,a),e.replaceShaderNormal(n,r,a),e.replaceShaderLight(n,r,a),e.replaceShaderTCoord(n,r,a),e.replaceShaderPicking(n,r,a),e.replaceShaderClip(n,r,a),e.replaceShaderCoincidentOffset(n,r,a),e.replaceShaderPositionVC(n,r,a),t.haveSeenDepthRequest){var o=n.Fragment;o=Hg.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=Hg.substitute(o,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=o}},e.getNeedToRebuildShaders=function(n,r,a){var o=0,i=0,l=n.getPrimitiveType(),s=t.currentInput,c=!1,g=s.getPointData().getNormals(),u=s.getCellData().getNormals(),d=a.getProperty().getInterpolation()===Uu.FLAT,m=a.getProperty().getRepresentation(),f=e.getOpenGLMode(m,l);if(f===t.context.TRIANGLES||u&&!g||!d&&g?c=!0:d||f!==t.context.LINES||(c=!0),a.getProperty().getLighting()&&c){o=0;for(var p=r.getLightsByReference(),C=0;C0&&(i++,0===o&&(o=1)),1===o&&(i>1||1!==I.getIntensity()||!I.lightTypeIsHeadLight())&&(o=2),o<3&&I.getPositional()&&(o=3)}}var h=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),y=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&y===i||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:i},!0),h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===n.getProgram()||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){var o=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&o>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach((function(e,r){n.getProgram().isAttributeUsed("".concat(e,"MC"))&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"".concat(e,"MC"),n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||Qu("Error setting ".concat(e,"MC in shader VAO.")))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||Qu("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||Qu("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6);for(var l=[],s=0;s0){var g=c.getColorByReference(),u=c.getIntensity();t.lightColor[0]=g[0]*u,t.lightColor[1]=g[1]*u,t.lightColor[2]=g[2]*u;var d=c.getDirection(),m=n.getActiveCamera().getViewMatrix(),f=Object(Ao.a)(d);c.lightTypeIsSceneLight()&&(f[0]=m[0]*d[0]+m[1]*d[1]+m[2]*d[2],f[1]=m[4]*d[0]+m[5]*d[1]+m[6]*d[2],f[2]=m[8]*d[0]+m[9]*d[1]+m[10]*d[2],Object(Xo.y)(f)),t.lightDirection[0]=f[0],t.lightDirection[1]=f[1],t.lightDirection[2]=f[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],Object(Xo.y)(t.lightDirection),o.setUniform3fArray("lightColor".concat(i),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(i),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(i),t.lightHalfAngle),i++}}if(!(a<3)){var p=n.getActiveCamera().getViewMatrix();Object(Yo.i)(p,p),i=0;for(var C=0;C0){var h=I.getTransformedPosition(),b=new Float64Array(3);Object(Fo.q)(b,h,p),o.setUniform3fArray("lightAttenuation".concat(i),I.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(i),I.getPositional()),o.setUniformf("lightExponent".concat(i),I.getExponent()),o.setUniformf("lightConeAngle".concat(i),I.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(i),[b[0],b[1],b[2]]),i++}}}}},e.setCameraShaderParameters=function(e,r,a){var o=e.getProgram(),i=t.openGLCamera.getKeyMatrices(r),l=r.getActiveCamera(),s=t.openGLCamera.getKeyMatrixTime().getMTime(),c=o.getLastCameraMTime(),g=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,u=a.getIsIdentity(),d=u?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();o.setUniformMatrix("MCPCMatrix",n([i.wcpc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("MCVCMatrix")&&o.setUniformMatrix("MCVCMatrix",n([i.wcvc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("normalMatrix")&&o.setUniformMatrix3x3("normalMatrix",n([i.normalMatrix,d.normalMatrix],$l,t.tmpMat3)),c!==s&&(o.isUniformUsed("cameraParallel")&&o.setUniformi("cameraParallel",l.getParallelProjection()),o.setLastCameraMTime(s)),u||o.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram(),o=r.getProperty(),i=o.getOpacity(),l=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),s=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),c=t.drawingEdges?1:o.getAmbient(),g=t.drawingEdges?0:o.getDiffuse(),u=t.drawingEdges?0:o.getSpecular(),d=o.getSpecularPower();a.setUniformf("opacityUniform",i),a.setUniform3fArray("ambientColorUniform",l),a.setUniform3fArray("diffuseColorUniform",s),a.setUniformf("ambient",c),a.setUniformf("diffuse",g);var m=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(m<1)){var f=o.getSpecularColorByReference();if(a.setUniform3fArray("specularColorUniform",f),a.setUniformf("specularPowerUniform",d),a.isUniformUsed("ambientIntensityBF")){if(i=(o=r.getBackfaceProperty()).getOpacity(),l=o.getAmbientColor(),c=o.getAmbient(),s=o.getDiffuseColor(),g=o.getDiffuse(),f=o.getSpecularColor(),u=o.getSpecular(),a.setUniformf("ambientIntensityBF",c),a.setUniformf("diffuseIntensityBF",g),a.setUniformf("opacityUniformBF",i),a.setUniform3fArray("ambientColorUniformBF",l),a.setUniform3fArray("diffuseColorUniformBF",s),m<1)return;a.setUniformf("specularIntensityBF",u),a.setUniform3fArray("specularColorUniformBF",f),a.setUniformf("specularPowerUniformBF",d)}}},e.renderPieceStart=function(n,r){t.primitiveIDOffset=0,t.openGLRenderer.getSelector()&&(t.openGLRenderer.getSelector().getCurrentPass(),t.openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===Eu.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var l=Du.Start;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,td,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=Du,t.tmpMat3=El(new Float64Array(9)),t.tmpMat4=Object(Yo.h)(new Float64Array(16));for(var r=Du.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,a)},e.replaceShaderColor=function(e,r,a){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,i=e.Geometry,l=e.Fragment,s=t.lastBoundBO.getReferenceByName("lastLightComplexity"),c=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];s&&(c=c.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var g=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(g=g.concat([" vec3 specularColor;"," float specularPower;"])),g=g.concat([" opacity = opacityUniform;"]),s&&(g=g.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(c=c.concat(["varying vec4 vertexColorVSOutput;"]),o=Hg.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,i=Hg.substitute(i,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,g=g.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),l=Hg.substitute(l,"//VTK::Color::Impl",g).result,l=Hg.substitute(l,"//VTK::Color::Dec",c).result,e.Vertex=o,e.Geometry=i,e.Fragment=l}n.replaceShaderColor(e,r,a)},e.replaceShaderPositionVC=function(e,r,a){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,a)},e.replaceShaderPicking=function(e,r,a){if(t.hardwareSupport){var o=e.Fragment,i=e.Vertex;i=Hg.substitute(i,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,i=Hg.substitute(i,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=i,o=Hg.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=Hg.substitute(o,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=o}else n.replaceShaderPicking(e,r,a)},e.updateGlyphShaderParameters=function(n,r,a,o,i,l,s,c){var g=a.getProgram();if(n){var u=t.normalMatrix,d=l,m=9*s,f=t.tmpMat3,p=u[0],C=u[1],I=u[2],h=u[3],b=u[4],y=u[5],v=u[6],Z=u[7],A=u[8],G=d[m],S=d[m+1],B=d[m+2],V=d[m+3],R=d[m+4],w=d[m+5],k=d[m+6],W=d[m+7],x=d[m+8];f[0]=G*p+S*h+B*v,f[1]=G*C+S*b+B*Z,f[2]=G*I+S*y+B*A,f[3]=V*p+R*h+w*v,f[4]=V*C+R*b+w*Z,f[5]=V*I+R*y+w*A,f[6]=k*p+W*h+x*v,f[7]=k*C+W*b+x*Z,f[8]=k*I+W*y+x*A,g.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,i,16*s),g.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,i,16*s),g.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var T=o.getData();t.tmpColor[0]=T[4*s]/255,t.tmpColor[1]=T[4*s+1]/255,t.tmpColor[2]=T[4*s+2]/255,g.setUniform3fArray("ambientColorUniform",t.tmpColor),g.setUniform3fArray("diffuseColorUniform",t.tmpColor)}c&&g.setUniform3fArray("mapperIndex",c.getPropColorValue())},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===id.SURFACE,l=t.openGLCamera.getKeyMatrices(n),s=t.openGLActor.getKeyMatrices();_l(t.normalMatrix,l.normalMatrix,s.normalMatrix),Object(Yo.l)(t.mcpcMatrix,l.wcpc,s.mcwc),Object(Yo.l)(t.mcvcMatrix,l.wcvc,s.mcwc);var c=t.renderable.getMatrixArray(),g=t.renderable.getNormalArray(),u=t.renderable.getColorArray(),d=c.length/16,m=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===sd.COMPOSITE_INDEX_PASS&&(m=!0);for(var f=t.primTypes.Start;fe.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||od("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||od("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,a),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,a)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(a,ld.ARRAY_BUFFER),t.normalBuffer.upload(o,ld.ARRAY_BUFFER),i?t.colorBuffer.upload(i.getData(),ld.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var l=a.length/16,s=new Uint8Array(4*l),c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),rd.extend(e,t,n),t.tmpMat3=El(new Float64Array(9)),t.normalMatrix=El(new Float64Array(9)),t.mcpcMatrix=Object(Yo.h)(new Float64Array(16)),t.mcvcMatrix=Object(Yo.h)(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},ln.c.obj(t.glyphBOBuildTime,{mtime:0}),ud(e,t)}var fd={newInstance:ln.c.newInstance(md,"vtkOpenGLGlyph3DMapper"),extend:md},pd={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}},Cd={NEAREST:0,LINEAR:1},Id={InterpolationType:Cd},hd=ln.c.vtkErrorMacro,bd=pd.SlicingMode;function yd(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function vd(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=function(n){if(n){t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera()),t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(r.getActiveCamera())}},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.getCoincidentParameters=function(e,n){return t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null},e.render=function(){var n=t.openGLImageSlice.getRenderable(),r=t.openGLRenderer.getRenderable();e.renderPiece(r,n)},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=Ku,e.Fragment=Mu,e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Vertex,i=n.Fragment;o=Hg.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var l=t.openGLTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(s){for(var g=1;gn.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||hd("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||hd("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var i=t.openGLTexture.getComponents(),l=a.getProperty().getIndependentComponents();if(l)for(var s=0;s1?1:0;var M=o.getData(),L=null;if(T===bd.I){L=new M.constructor(H[2]*H[1]*s);for(var D=0,E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zd,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=Eg.newInstance(),t.openGLTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.pwfTexture=ic.newInstance(),t.imagemat=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,[]),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime),vd(e,t)}var Gd={newInstance:ln.c.newInstance(Ad,"vtkOpenGLImageMapper"),extend:Ad};function Sd(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.opaqueZBufferPass=function(t,n){return e.opaquePass(t,n)},e.opaquePass=function(n,r){n&&(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}var Bd={context:null,keyMatrixTime:null,keyMatrices:null};function Vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bd,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),Sd(e,t)}var Rd={newInstance:ln.c.newInstance(Vd,"vtkOpenGLImageSlice"),extend:Vd},wd=ln.c.vtkDebugMacro;function kd(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var a=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,i=t.openGLRenderer.getTiledSizeAndOrigin(),l=null;if(t.renderable.getUseZValues()){var s=r.getZBufferTexture(),c=Math.floor(s.getWidth()),g=Math.floor(s.getHeight()),u=t.openGLRenderWindow.getContext();s.bind();var d=r.getFramebuffer();d?d.saveCurrentBindingsAndBuffers():wd("No framebuffer to save/restore");var m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.getHandle(),0),u.checkFramebufferStatus(u.FRAMEBUFFER)===u.FRAMEBUFFER_COMPLETE&&(l=new Uint8Array(c*g*4),u.viewport(0,0,c,g),u.readPixels(0,0,c,g,u.RGBA,u.UNSIGNED_BYTE,l)),d&&d.restorePreviousBindingsAndBuffers(),u.deleteFramebuffer(m)}t.renderable.invokeCallback(t.renderable.getInputData(),o,a,i,l)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var Wd={};function xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),_s.extend(e,t,n),kd(e,t)}var Td={newInstance:ln.c.newInstance(xd,"vtkOpenGLPixelSpaceCallbackMapper"),extend:xd},Jd=ln.c.vtkDebugMacro;function Xd(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.renderable.isActiveCameraCreated()||t.renderable.resetCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=function(){for(var e=0,n=t.renderable.getLightsByReference(),r=0;r0&&e++;return e||(Jd("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,a=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=a.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(a.clearDepth(1),r|=a.DEPTH_BUFFER_BIT,a.depthMask(!0));var o=e.getTiledSizeAndOrigin();a.enable(a.SCISSOR_TEST),a.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.colorMask(!0,!0,!0,!0),a.clear(r),a.enable(a.DEPTH_TEST)}},e.cameraPass=function(t){t&&e.clear()},e.getAspectRatio=function(){var e=t.parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=function(){var e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=Object(Xo.a)(e[0]-n[0],0,1),a=Object(Xo.a)(e[1]-n[1],0,1),o=t.parent.normalizedDisplayToDisplay(r,a),i=Math.round(o[0]),l=Math.round(o[1]),s=Object(Xo.a)(e[2]-n[0],0,1),c=Object(Xo.a)(e[3]-n[1],0,1);s>n[2]-n[0]&&(s=n[2]-n[0]),c>n[3]-n[1]&&(c=n[3]-n[1]);var g=t.parent.normalizedDisplayToDisplay(s,c),u=Math.round(g[0])-i,d=Math.round(g[1])-l;return u<0&&(u=0),d<0&&(d=0),{usize:u,vsize:d,lowerLeftU:i,lowerLeftV:l}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var a=t.renderable.getBackgroundByReference();t.context.clearColor(a[0],a[1],a[2],a[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,r.depthMask(!0)),r.colorMask(!0,!0,!0,!0);var o=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=function(){null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))}}var Od={context:null,openGLRenderWindow:null,selector:null};function Nd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),_s.extend(e,t,n),ln.c.get(e,t,["shaderCache"]),ln.c.setGet(e,t,["selector"]),Xd(e,t)}var Hd={newInstance:ln.c.newInstance(Nd,"vtkOpenGLRenderer"),extend:Nd},Yd=ln.c.vtkErrorMacro;function Fd(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=function(n){if(n){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera())}},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=function(n,r){if(n&&!t.openGLRenderer.getSelector()){e.updateBufferObjects(),t.openGLRenderWindow.enableDepthMask(),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var a=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",a);var o=t.openGLRenderer.getRenderable(),i=t.openGLCamera.getKeyMatrices(o),l=new Float64Array(16);if(Object(Yo.g)(l,i.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",l),"box"===t.lastFormat){var s=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",s[0],s[1],s[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=function(){if(!t.tris.getCABO().getElementCount()){for(var e=new Float32Array(12),n=0;n<4;n++)e[3*n]=n%2*2-1,e[3*n+1]=n>1?1:-1,e[3*n+2]=1;var r=Bo.a.newInstance({numberOfComponents:3,values:e});r.setName("points");var a=new Uint16Array(8);a[0]=3,a[1]=0,a[2]=1,a[3]=3,a[4]=3,a[5]=0,a[6]=3,a[7]=2;var o=Bo.a.newInstance({numberOfComponents:1,values:a});t.tris.getCABO().createVBO(o,"polys",sg.SURFACE,{points:r,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Yd("Error setting vertexMC in shader VAO."));var i=t.renderable.getTextures();i.length||Yd("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==i[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(i[0]))}}var Pd={context:null};function Kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),_s.extend(e,t,n),t.openGLTexture=ic.newInstance(),t.tris=Eg.newInstance(),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Fd(e,t)}var Md={newInstance:ln.c.newInstance(Kd),extend:Kd};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dd=ln.c.vtkErrorMacro;function Ed(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||Dd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),a.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())a.setUniformMatrix("MCVCMatrix",i.wcvc);else{var l=t.openGLActor.getKeyMatrices(),s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(g=i.getArray(t.renderable.getScaleArray()).getData());var u=null,d=0,m=null;a?(d=a.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),u=a.getData(),m=new Uint8Array(3*s*4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(d);var f=new Float32Array(5*s*3);o.setStride(20);for(var p=Math.cos(Object(Xo.B)(30)),C=0,I=0,h=0,b=0,y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ud,n),rd.extend(e,t,n),Ed(e,t)}var _d={newInstance:ln.c.newInstance(zd,"vtkOpenGLSphereMapper"),extend:zd};function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qd=ln.m;function qd(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||Qd("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||Qd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||Qd("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),r.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",i.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",i.normalMatrix);else{var l=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){var s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}if(a.isUniformUsed("normalMatrix")){var c=new Float64Array(9);_l(c,i.normalMatrix,l.normalMatrix),a.setUniformMatrix3x3("normalMatrix",c)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null,u=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),a&&(u=a.getNumberOfComponents(),o.setColorOffset(4),g=a.getData(),o.setColorBOStride(8)),o.setColorComponents(u),o.setStride(28);var d=new Float32Array(7*s*12),m=new Uint8Array(12*s*(g?8:4)),f=null,p=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(f=i.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&i.hasArray(t.renderable.getOrientationArray())?p=i.getArray(t.renderable.getOrientationArray()).getData():Qd(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var C=[0,1,3,0,3,2,2,3,5,2,5,4],I=0,h=0,b=0,y=0,v=0;v=4?255:0,m[y++]=C[G]>=2?255:0,m[y++]=255,h=v*u,g&&(m[y++]=g[h],m[y++]=g[h+1],m[y++]=g[h+2],m[y++]=g[h+3])}o.setElementCount(b/7),o.upload(d,Xc.ARRAY_BUFFER),o.getColorBO().upload(m,Xc.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var $d={};function em(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),rd.extend(e,t,n),qd(e,t)}var tm={newInstance:Object(ln.g)(em,"vtkOpenGLStickMapper"),extend:em},nm="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n",rm=hg.Representation;function am(e,t,n,r){var o=Object(a.a)(t,2),i=o[0],l=o[1],s=e.getContext(),c=ic.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:s.FLOAT,baseLevel:0,maxLevel:0});return c.setOpenGLRenderWindow(e),c.setInternalFormat(s.RGBA32F),c.create2DFromRaw(i,l,4,"Float32Array",null),c.activate(),c.sendParameters(),c.deactivate(),c}function om(e,t){return am(e,t,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE)}function im(e,t){t.classHierarchy.push("vtkLICPingPongBufferManager"),t.openGLRenderWindow?(t.quad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",rm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow),t.context=t.openGLRenderWindow.getContext(),t.licTexture0=om(t.openGLRenderWindow,t.size),t.seedTexture0=om(t.openGLRenderWindow,t.size),t.licTexture1=om(t.openGLRenderWindow,t.size),t.seedTexture1=om(t.openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?am(t.openGLRenderWindow,t.size,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE):null,t.imageVectorTexture=t.doVTPass?function(e,t){return am(e,t,ic.Filter.LINEAR,ic.Wrap.CLAMP_TO_EDGE)}(t.openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=function(){t.readIndex=1-t.readIndex},e.renderQuad=function(e,n){var r=t.quad,a=t.context,o=t.quadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=function(){return 0===t.readIndex?t.licTexture0:t.licTexture1},e.getLastSeedBuffer=function(){return 0===t.readIndex?t.seedTexture0:t.seedTexture1},e.getLICBuffer=function(){return 1-t.readIndex==0?t.licTexture0:t.licTexture1},e.getSeedBuffer=function(){return 1-t.readIndex==0?t.seedTexture0:t.seedTexture1},e.getLICTextureUnit=function(){var e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=function(){var e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=function(){return t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()},e.getImageVectorTextureUnit=function(){return t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit()},e.getMaskVectorTextureUnit=function(){return t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit()},e.clearBuffers=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);var a=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),a.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(a),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=function(e){var n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,a=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1])},e.detachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=function(){var e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=function(){var e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=function(){t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);var e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=function(){var e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]),t.textures[t.readIndex][0].deactivate()},e.detachBuffers=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);var r=t.textures[t.readIndex],a=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),a[0]&&a[0].deactivate(),a[1]&&a[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=function(){return 1-t.readIndex},e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}var lm={openGLRenderWindow:null,vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lm,n),ln.c.obj(e,t),ln.c.get(e,t,["readIndex"]),ln.c.setGet(e,t,["doEEPass","doVTPass","openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),im(e,t)}var cm={newInstance:ln.c.newInstance(sm,"vtkLICPingPongBufferManager"),extend:sm},gm=0,um=1,dm=2,mm=3,fm=0,pm=1;function Cm(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.dumpTextureValues=function(e,n){var r=Object(a.a)(n,2),o=r[0],i=r[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,g=gc.newInstance(),u=l,d=null;return g.setOpenGLRenderWindow(s),g.saveCurrentBindingsAndBuffers(),g.create(o,i),g.populateFramebuffer(),g.setColorBuffer(e),d=new Float32Array(o*i*c),u.readPixels(0,0,o,i,4===c?u.RGBA:u.RGB,u.FLOAT,d),g.restorePreviousBindingsAndBuffers(),d},e.getTextureMinMax=function(n,r){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,i=e.dumpTextureValues(n,r,a,o,4),l=Number.MAX_VALUE,s=Number.MIN_VALUE,c=0;cs&&(s=g)}return{min:l,max:s}},e.getComponentSelectionProgram=function(e){var t="xyzw";return".".concat(t[e[0]]).concat(t[e[1]])},e.buildShaders=function(){t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");var n=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl","vec2 V = texture2D(texVectors, tcoordVC.st)".concat(e.getComponentSelectionProgram(t.componentIds),";")).result;t.VTProgram=e.buildAShader(n);var r=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){var e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=function(a,o,i,l,s,c){if(t.openGLRenderWindow=s,t.context=s.getContext(),Object.assign(t,c),a[0]<=0||a[1]<=0)return null;var g=[1/a[0],1/a[1]],u=t.stepSize*Math.sqrt(g[0]*g[0]+g[1]*g[1]);u<=0&&(u=1e-10);var d,m=t.context,f=t.framebuffer;f&&a[0]===f.getSize()[0]&&a[1]===f.getSize()[1]||((f=gc.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),(d=f).create.apply(d,Object(Ao.a)(a)),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),m.viewport.apply(m,[0,0].concat(Object(Ao.a)(a))),m.scissor.apply(m,[0,0].concat(Object(Ao.a)(a))),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(i),t.bufs.setNoiseTexture(l)):t.bufs=cm.newInstance({openGLRenderWindow:s,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:i,noiseTexture:l,framebuffer:f,size:a});var p=[(l.getWidth()+1)/a[0],(l.getHeight()+1)/a[1]],C=1/a[0],I=1/a[1],h=t.openGLRenderWindow.getShaderCache();if(t.transformVectors){var b=t.VTProgram;h.readyShaderProgram(b),t.bufs.attachImageVectorBuffer(),b.setUniform2f.apply(b,["uTexSize"].concat(Object(Ao.a)(a))),b.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),t.bufs.renderQuad(a,b),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);var y=t.LIC0ShaderProgram;h.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f.apply(y,["uNoiseBoundsPt1"].concat(p)),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,a,y);var v=t.LICIShaderProgram;h.readyShaderProgram(v),v.setUniformi("uPassNo",0),v.setUniformf("uStepSize",-u),v.setUniform2f.apply(v,["uNoiseBoundsPt1"].concat(p)),v.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),v.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(var Z=0;Z1||l<0)&&(console.error("Invalid color range: ",l,s),l=0,s=1);var c=s-l;n&&(l+=c*t.lowLICContrastEnhancementFactor,c=(s-=c*t.highLICContrastEnhancementFactor)-l);var g=t.CEProgram;o.readyShaderProgram(g),g.setUniformi("texLIC",t.bufs.getLICTextureUnit()),g.setUniformf("uMin",l),g.setUniformf("uMaxMinDiff",c),r(t.bufs,a,g)}}var Im={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Im,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),Cm(e,t)}var bm={newInstance:ln.c.newInstance(hm,"vtkLineIntegralConvolution2D"),extend:hm},ym=n(53);function vm(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}var Zm={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:gm,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:0,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:pm,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function Am(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),ln.c.obj(e,t),ln.c.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),vm(0,t)}var Gm={newInstance:ln.c.newInstance(Am,"vtkSurfaceLICInterface"),extend:Am},Sm=hg.Representation;function Bm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=function(e,n){var r=t.licQuad,a=t.context,o=t.licQuadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=function(e){if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Object(ym.a)(t.noiseGeneratorSeed,{global:!0});var n=[],r=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue"),o=r.noiseTextureType,i=r.noiseGrainSize,l=r.numberOfNoiseLevels,s=r.noiseImpulseProbability,c=r.noiseImpulseBackgroundValue,g=r.minNoiseValue,u=r.maxNoiseValue;switch(o){case pm:n=function(e,t,n,r,a,o){var i=Math.max(0,Math.min(1,n)),l=Float32Array.from({length:e*e},(function(){var e=0;if(1===i||Math.random()>1-i)for(var t=0;t<2048;++t)e+=Math.random();return e})),s=0,c=2049;l.forEach((function(e){c=1===i?e0?e:c,s=e>s?e:s}));var g=s-c;0===g&&(c=0,g=0===s?1:s);var u=t-1,d=0!==u?1/u:0,m=o-a;return l.map((function(e){var n=e=c?1===t?o:a+(i>u?u:i)*d*m:r}))}(Math.floor(e/i),l,s,c,g,u);break;case fm:default:n=function(e,t,n,r){var o=Object(a.a)(e,2),i=o[0],l=o[1],s=r-n;return Float32Array.from({length:i*l},(function(){var e=Math.random();return(e=(e=Math.floor(e*t)/t)*s+n)>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],l,g,u)}var d=1/i,m=Float32Array.from({length:e*e*4},(function(t,r){var a=r/4;if(r%4==0){var o=Math.floor(a%e*d),l=Math.floor(a/e*d);return n[l*(e/i)+o]}return r%4==1||r%4==3?1:0})),f=ic.newInstance({wrapS:ic.Wrap.REPEAT,wrapT:ic.Wrap.REPEAT,minificationFilter:ic.Filter.NEAREST,magnificationFilter:ic.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});f.setOpenGLRenderWindow(t.openGLRenderWindow),f.create2DFromRaw(e,e,4,"Float32Array",m),f.activate(),f.sendParameters(),f.deactivate(),t.noiseTexture=f}},e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.allocateTextures=function(){var n=ic.Filter.NEAREST,r=ic.Filter.LINEAR,a=t.openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(a,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(a,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(a,r)),t.LICImage||(t.LICImage=e.allocateTexture(a,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(a,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(a,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(a))},e.allocateTexture=function(e,n){var r=t.context,a=ic.newInstance({wrapS:ic.Wrap.CLAMP_TO_EDGE,wrapT:ic.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return a.setOpenGLRenderWindow(e),a.setInternalFormat(r.RGBA32F),a.create2DFromRaw.apply(a,Object(Ao.a)(t.size).concat([4,"Float32Array",null])),a.activate(),a.sendParameters(),a.deactivate(),a},e.allocateDepthTexture=function(e){var n=t.context,r=ic.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw.apply(r,Object(Ao.a)(t.size).concat(["Float32Array",null])),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=function(){if(!t.framebuffer){t.licHelper=null;var e=gc.newInstance();e.setOpenGLRenderWindow(t.openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create.apply(e,Object(Ao.a)(t.size)),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=function(){t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=function(){e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",Sm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow)),t.licHelper||(t.licHelper=bm.newInstance())},e.prepareForGeometry=function(){var e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(1),e.removeColorBuffer(2),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,1),e.setColorBuffer(t.maskVectorImage,2),e.setDepthBuffer(t.depthTexture);var n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1,n.COLOR_ATTACHMENT2]),n.viewport.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.scissor.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=function(n){t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();var r=t.licCopyPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(r);var a=t.context;a.viewport.apply(a,[0,0].concat(Object(Ao.a)(n))),a.scissor.apply(a,[0,0].concat(Object(Ao.a)(n))),a.disable(a.BLEND),a.enable(a.DEPTH_TEST),a.disable(a.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=function(){var n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create.apply(r,Object(Ao.a)(t.size)),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();var a=t.licColorPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(a),a.setUniformi("texVectors",t.vectorImage.getTextureUnit()),a.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());var o=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor"),i=o.colorMode,l=o.LICIntensity,s=o.mapModeBias,c=o.maskIntensity,g=o.maskColor,u=o.enhanceContrast,d=o.lowColorContrastEnhancementFactor,m=o.highColorContrastEnhancementFactor;if(a.setUniformi("texLIC",t.LICImage.getTextureUnit()),a.setUniformi("uScalarColorMode",i),a.setUniformf("uLICIntensity",l),a.setUniformf("uMapBias",s),a.setUniformf("uMaskIntensity",c),a.setUniform3f.apply(a,["uMaskColor"].concat(Object(Ao.a)(g))),e.renderQuad(t.size,a),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),u===dm||u===mm){var f=0,p=1,C=p-f;C=(p-=C*m)-(f+=C*d),r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();var I=t.enhanceContrastPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(I),I.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),I.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),I.setUniformi("texLIC",t.LICImage.getTextureUnit()),I.setUniformf("uLMin",f),I.setUniformf("uLMaxMinDiff",C),e.renderQuad(t.size,I),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=function(){var e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t.openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=function(n){Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=function(){t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}var Vm={context:null,openGLRenderWindow:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vm,n),Gm.extend(e,t,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","reallocateTextures","licInterface","size"]),Bm(e,t)}var wm={newInstance:ln.c.newInstance(Rm,"vtkSurfaceLICInterface"),extend:Rm};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=ln.c.vtkErrorMacro;function xm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");var n=function(e){for(var t=1;t1&&t.renderable.setCustomShaderAttributes([a.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=function(e){var n;t.stateCache=(Object(qi.a)(n={},e.BLEND,e.isEnabled(e.BLEND)),Object(qi.a)(n,e.DEPTH_TEST,e.isEnabled(e.DEPTH_TEST)),Object(qi.a)(n,e.SCISSOR_TEST,e.isEnabled(e.SCISSOR_TEST)),n)},e.popState=function(e){var n=function(n){return t.stateCache[n]?e.enable(n):e.disable(n)};n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST)},e.renderPiece=function(r,a){var o=!0;t.openGLRenderWindow.getWebgl2()||(Wm("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(Wm("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(Wm("No input"),o=!1);var i=t.renderable.getLicInterface();i||(i=Gm.newInstance(),t.renderable.setLicInterface(i)),t.openGLLicInterface||(t.openGLLicInterface=wm.newInstance()),i!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(i);var l=t.renderable.getInputArrayToProcess(0);if(i.getEnableLIC()&&(!l||l.getNumberOfComponents()<2)&&(Wm("No vector input array"),o=!1),i.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,o&&i.getEnableLIC()){var s=t.openGLRenderWindow.getSize(),c=s.map((function(e){return Math.round(e*i.getViewPortScale())}));t.openGLLicInterface.setSize(c),t.openGLLicInterface.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,a),n.renderPieceDraw(r,a),n.renderPieceFinish(r,a),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(s),e.popState(t.context)}else n.renderPiece(r,a)}}var Tm={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tm,n),rd.extend(e,t,n),xm(e,t),ln.c.setGet(e,t,["openGLLicInterface"])}var Xm={newInstance:ln.c.newInstance(Jm,"vtkOpenGLSurfaceLICMapper"),extend:Jm};function Om(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0))},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.MCWCMatrix,t.renderable.getMatrix()),Object(Yo.i)(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?El(t.normalMatrix):(Dl(t.normalMatrix,t.MCWCMatrix),zl(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}var Nm={};function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nm,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),ln.c.setGet(e,t,["context"]),Om(e,t)}var Ym={newInstance:ln.c.newInstance(Hm,"vtkOpenGLVolume"),extend:Hm},Fm={NEAREST:0,LINEAR:1,FAST_LINEAR:2},Pm={FRACTIONAL:0,PROPORTIONAL:1},Km={InterpolationType:Fm,OpacityMode:Pm},Mm={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3},Lm={BlendMode:Mm};function Dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Em=ln.c.vtkWarningMacro,Um=ln.c.vtkErrorMacro;function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n// Lighting values\n//VTK::Light::Dec\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing triliear values from multiple z slices\n#ifdef vtkTriliearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)).a - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)).a - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)).a - scalar;\n\n // divide by spacing\n result.xyz /= vSpacing;\n\n result.w = length(result.xyz);\n\n // rotate to View Coords\n result.xyz =\n result.x * vPlaneNormal0 +\n result.y * vPlaneNormal2 +\n result.z * vPlaneNormal4;\n\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - 0.5) * 2.0,\n (fragCoord.y / vpHeight - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n return (vWCtoIDX * vertex).xyz / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\n//\nfloat computeGradientOpacityFactor(\n vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n#if vtkLightComplexity > 0\nvoid applyLighting(inout vec3 tColor, vec4 normal)\n{\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n //VTK::Light::Impl\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n}\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = 1.0;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normal0 = computeNormal(posIS, tValue.a, tstep);\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n applyLighting(tColor.rgb, normal0);\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n#endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\n\n\n\n\n\n\n\nreturn tColor;\n}\n\n\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, float sampleDistanceIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 //AVERAGE_INTENSITY_BLEND\n vec4 averageIPScalarRangeMin = vec4 (\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n 1.0);\n vec4 averageIPScalarRangeMax = vec4(\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n 1.0);\n\n vec4 sum = vec4(0.);\n\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n // - We are setting the alpha channel for averageIPScalarRangeMin and\n // averageIPScalarRangeMax so that we do not trigger this 'continue'\n // based on the alpha channel comparison.\n // - There might be a better way to do this. I'm not sure if there is an\n // equivalent of 'any' which only operates on RGB, though I suppose\n // we could write an 'anyRGB' function and see if that is faster.\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n if (any(lessThan(tValue, averageIPScalarRangeMin)) ||\n any(greaterThan(tValue, averageIPScalarRangeMax))) {\n continue;\n }\n\n // Sum the values across each step in the path\n sum += tValue;\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (result == 0.0)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*(tdims - 1.0);\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, out float sampleDistanceIS, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n}\n\nvoid main()\n{\n\n vec3 rayDirVC;\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n float sampleDistanceIS;\n computeIndexSpaceValues(posIS, endIS, sampleDistanceIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, sampleDistanceIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Fragment;a.getProperty().getInterpolationType()===Fm.LINEAR&&(o=Hg.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===a.getProperty().getUseLabelOutline()&&(o=Hg.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var i=t.scalarTexture.getComponents();o=Hg.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(i)).result;var l=a.getProperty().getIndependentComponents();if(l){o=Hg.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var s=[],c=0;c0&&(o=Hg.substitute(o,"//VTK::vtkProportionalComponents",s.join("\n")).result)}var g=t.currentInput.getExtent(),u=t.currentInput.getSpacing(),d=new Float64Array(3);Object(Fo.p)(d,(g[1]-g[0])*u[0],(g[3]-g[2])*u[1],(g[5]-g[4])*u[2]);var m=Object(Fo.j)(d)/t.renderable.getSampleDistance();o=Hg.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(m))).result,o=Hg.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=a.getProperty().getUseGradientOpacity(0);for(var f=1;l&&!t.gopacity&&f0&&(a=Hg.substitute(a,"//VTK::Light::Dec",["uniform vec3 lightColor".concat(o,";"),"uniform vec3 lightDirectionVC".concat(o,"; // normalized"),"uniform vec3 lightHalfAngleVC".concat(o,"; // normalized"),"//VTK::Light::Dec"],!1).result,a=Hg.substitute(a,"//VTK::Light::Impl",[" float df = abs(dot(normal.rgb, -lightDirectionVC".concat(o,"));")," diffuse += ((df".concat("",") * lightColor").concat(o,");")," float sf = pow( abs(dot(lightHalfAngleVC".concat(o,",normal.rgb)), vSpecularPower);")," specular += ((sf".concat("",") * lightColor").concat(o,");")," //VTK::Light::Impl"],!1).result,o++)}))}e.Fragment=a},e.replaceShaderClippingPlane=function(e,n,r){var a=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;a=Hg.substitute(a,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,a=Hg.substitute(a,"//VTK::ClipPlane::Impl",["for(int i = 0; i < ".concat(o,"; i++) {")," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=a},e.getNeedToRebuildShaders=function(n,r,a){var o=0;a.getProperty().getShade()&&t.renderable.getBlendMode()===Mm.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((function(e){e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));var i=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,i=!0);var l=t.scalarTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=!1,g=[];if(s){for(var u=0;u0&&(c=!0)}var d=t.currentInput.getExtent(),m=t.currentInput.getSpacing(),f=new Float64Array(3);Object(Fo.p)(f,(d[1]-d[0])*m[0],(d[3]-d[2])*m[1],(d[5]-d[4])*m[2]);var p=Object(Fo.j)(f)/t.renderable.getSampleDistance(),C={interpolationType:a.getProperty().getInterpolationType(),useLabelOutline:a.getProperty().getUseLabelOutline(),numComp:l,usesProportionalComponents:c,iComps:s,maxSamples:p,useGradientOpacity:a.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),averageIPScalarMode:t.renderable.getAverageIPScalarRange(),proportionalComponents:g};return t.previousState&&t.previousState.interpolationType===C.interpolationType&&t.previousState.useLabelOutline===C.useLabelOutline&&t.previousState.numComp===C.numComp&&t.previousState.usesProportionalComponents===C.usesProportionalComponents&&t.previousState.iComps===C.iComps&&t.previousState.maxSamples===C.maxSamples&&t.previousState.useGradientOpacity===C.useGradientOpacity&&t.previousState.blendMode===C.blendMode&&zm(t.previousState.averageIPScalarMode,C.averageIPScalarMode)&&zm(t.previousState.proportionalComponents,C.proportionalComponents)?!!(0===n.getProgram()||i||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||!!t.lastZBufferTexture!=!!t.zBufferTexture||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance()),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var i=e.getRenderTargetSize();o.setUniformf("vpWidth",i[0]),o.setUniformf("vpHeight",i[1])}},e.setCameraShaderParameters=function(n,r,a){var o=t.openGLCamera.getKeyMatrices(r),i=t.openGLVolume.getKeyMatrices();Object(Yo.l)(t.modelToView,o.wcvc,i.mcwc);var l=n.getProgram(),s=t.openGLCamera.getRenderable(),c=s.getClippingRange();l.setUniformf("camThick",c[1]-c[0]),l.setUniformf("camNear",c[0]),l.setUniformf("camFar",c[1]);for(var g=t.currentInput.getBounds(),u=t.currentInput.getDimensions(),d=new Float64Array(3),m=new Float64Array(3),f=1,p=-1,C=1,I=-1,h=0;h<8;++h){if(Object(Fo.p)(d,g[h%2],g[2+Math.floor(h/2)%2],g[4+Math.floor(h/4)]),Object(Fo.q)(d,d,t.modelToView),!s.getParallelProjection()){Object(Fo.l)(m,d);var b=-c[0]/d[2];Object(Fo.b)(d,m,b)}Object(Fo.q)(d,d,o.vcpc),f=Math.min(d[0],f),p=Math.max(d[0],p),C=Math.min(d[1],C),I=Math.max(d[1],I)}l.setUniformf("dcxmin",f),l.setUniformf("dcxmax",p),l.setUniformf("dcymin",C),l.setUniformf("dcymax",I),l.isUniformUsed("cameraParallel")&&l.setUniformi("cameraParallel",s.getParallelProjection());var y=t.currentInput.getExtent(),v=t.currentInput.getSpacing(),Z=new Float64Array(3);Object(Fo.p)(Z,(y[1]-y[0]+1)*v[0],(y[3]-y[2]+1)*v[1],(y[5]-y[4]+1)*v[2]),l.setUniform3f("vSpacing",v[0],v[1],v[2]),Object(Fo.p)(d,y[0],y[2],y[4]),t.currentInput.indexToWorldVec3(d,d),Object(Fo.q)(d,d,t.modelToView),l.setUniform3f("vOriginVC",d[0],d[1],d[2]);var A=t.currentInput.getIndexToWorld();Object(Yo.l)(t.idxToView,t.modelToView,A),_l(t.idxNormalMatrix,o.normalMatrix,i.normalMatrix),_l(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var G=Object(Fo.j)(Z)/t.renderable.getSampleDistance();G>t.renderable.getMaximumSamplesPerRay()&&Em("The number of steps required ".concat(Math.ceil(G)," is larger than the\n specified maximum number of steps ").concat(t.renderable.getMaximumSamplesPerRay(),".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));var S=new Float64Array(3);if(Object(Fo.p)(S,1,1,1),Object(Fo.k)(S,S,Z),l.setUniform3f("vVCToIJK",S[0],S[1],S[2]),l.setUniform3i("volumeDimensions",u[0],u[1],u[2]),!t.openGLRenderWindow.getWebgl2()){var B=t.scalarTexture.getVolumeInfo();l.setUniformf("texWidth",t.scalarTexture.getWidth()),l.setUniformf("texHeight",t.scalarTexture.getHeight()),l.setUniformi("xreps",B.xreps),l.setUniformi("xstride",B.xstride),l.setUniformi("ystride",B.ystride)}for(var V=new Float64Array(3),R=new Float64Array(3),w=0;w<6;++w){switch(w){default:case 0:Object(Fo.p)(V,1,0,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 1:Object(Fo.p)(V,-1,0,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 2:Object(Fo.p)(V,0,1,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 3:Object(Fo.p)(V,0,-1,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 4:Object(Fo.p)(V,0,0,1),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 5:Object(Fo.p)(V,0,0,-1),Object(Fo.p)(R,y[0],y[2],y[4])}Object(Fo.m)(V,V,t.idxNormalMatrix),Object(Fo.q)(R,R,t.idxToView);var k=-1*Object(Fo.d)(R,V);if(l.setUniform3f("vPlaneNormal".concat(w),V[0],V[1],V[2]),l.setUniformf("vPlaneDistance".concat(w),k),a.getProperty().getUseLabelOutline()){var W=t.currentInput.getWorldToIndex();l.setUniformMatrix("vWCtoIDX",W),Object(Yo.g)(t.projectionToWorld,o.wcpc),l.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var x=e.getRenderTargetSize();l.setUniformf("vpWidth",x[0]),l.setUniformf("vpHeight",x[1])}}switch(Object(Yo.g)(t.projectionToView,o.vcpc),l.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var T=0,J=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();J[0]=t[0]*n,J[1]=t[1]*n,J[2]=t[2]*n,l.setUniform3fArray("lightColor".concat(T),J);var r=e.getDirection();Object(Fo.p)(V,r[0],r[1],r[2]),Object(Fo.m)(V,V,o.normalMatrix),l.setUniform3f("lightDirectionVC".concat(T),V[0],V[1],V[2]);var a=[-.5*V[0],-.5*V[1],-.5*(V[2]-1)];l.setUniform3fArray("lightHalfAngleVC".concat(T),a),T++}}))}},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram();a.setUniformi("ctexture",t.colorTexture.getTextureUnit()),a.setUniformi("otexture",t.opacityTexture.getTextureUnit()),a.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),i=r.getProperty(),l=t.scalarTexture.getComponents(),s=r.getProperty().getIndependentComponents();if(s&&l>=2)for(var c=0;c0&&(a.setUniformf("vAmbient",i.getAmbient()),a.setUniformf("vDiffuse",i.getDiffuse()),a.setUniformf("vSpecular",i.getSpecular()),a.setUniformf("vSpecularPower",i.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var a=t.openGLCamera.getKeyMatrices(n),o=[],i=[],l=t.renderable.getClippingPlanes(),s=l.length,c=0;c1.43){var e=t.framebuffer.getSize();return[t.fvp[0]*e[0],t.fvp[1]*e[1]]}return t.openGLRenderWindow.getFramebufferSize()},e.renderPieceStart=function(n,r){if(t.renderable.getAutoAdjustSampleDistances()){var a=n.getVTKWindow().getInteractor(),o=a.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var i=Math.sqrt(t.avgFrameTime*a.getDesiredUpdateRate()/t.avgWindowArea);i>10&&(i=10),t.targetXYF=i}else t.targetXYF=Math.sqrt(t.avgFrameTime*a.getStillUpdateRate()/t.avgWindowArea);t.targetXYF<1.53&&t.targetXYF>1.33&&(t.targetXYF=t.lastXYF),Math.abs(1-t.targetXYF/t.lastXYF)<.1&&(t.targetXYF=t.lastXYF),t.lastXYF=t.targetXYF}else t.lastXYF=t.renderable.getImageSampleDistance();t.lastXYF<=1.43&&(t.lastXYF=1);var l=t.lastXYF,s=t.openGLRenderWindow.getFramebufferSize();if(l>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer();else{var c=t.framebuffer.getSize();c[0]===Math.floor(.7*s[0])&&c[1]===Math.floor(.7*s[1])||(t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var g=t.context;g.clearColor(0,0,0,0),g.colorMask(!0,!0,!0,!0),g.clear(g.COLOR_BUFFER_BIT),g.viewport(0,0,s[0]/l,s[1]/l),t.fvp=[Math.floor(s[0]/l)/Math.floor(.7*s[0]),Math.floor(s[1]/l)/Math.floor(.7*s[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===Fm.NEAREST?(t.scalarTexture.setMinificationFilter(Ms.NEAREST),t.scalarTexture.setMagnificationFilter(Ms.NEAREST)):(t.scalarTexture.setMinificationFilter(Ms.LINEAR),t.scalarTexture.setMagnificationFilter(Ms.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var a=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),a.drawArrays(a.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=function(e,n){if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t.lastXYF>1.43){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");var r=t.copyShader;t.copyVAO=Kg.newInstance(),t.copyVAO.setOpenGLRenderWindow(t.openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(r,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var a=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,a[0],a[1]);var o=t.framebuffer.getColorTexture();o.activate(),t.copyShader.setUniformi("texture",o.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);var i=t.context;i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=function(n,r){e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Um("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():Object(Xo.D)(t.Bounds)},e.updateBufferObjects=function(t,n){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=function(n,r){return t.VBOBuildTime.getMTime()1?1:-1,k[3*W+2]=-1;var x=new Uint16Array(8);x[0]=3,x[1]=0,x[2]=1,x[3]=3,x[4]=3,x[5]=0,x[6]=3,x[7]=2;var T=Bo.a.newInstance({numberOfComponents:3,values:k});T.setName("points");var J=Bo.a.newInstance({numberOfComponents:1,values:x});t.tris.getCABO().createVBO(J,"polys",sg.SURFACE,{points:T,cellOffset:0})}t.VBOBuildTime.modified()}}}}var jm={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function Qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jm,n),_s.extend(e,t,n),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime,{mtime:0}),t.tris=Eg.newInstance(),t.scalarTexture=ic.newInstance(),t.opacityTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.jitterTexture=ic.newInstance(),t.jitterTexture.setWrapS(Ks.REPEAT),t.jitterTexture.setWrapT(Ks.REPEAT),t.framebuffer=gc.newInstance(),t.idxToView=Object(Yo.h)(new Float64Array(16)),t.idxNormalMatrix=El(new Float64Array(9)),t.modelToView=Object(Yo.h)(new Float64Array(16)),t.projectionToView=Object(Yo.h)(new Float64Array(16)),t.projectionToWorld=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,["context"]),_m(e,t)}var qm={newInstance:ln.c.newInstance(Qm,"vtkOpenGLVolumeMapper"),extend:Qm};function $m(e,t){t.overrides={},t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,a=n.getClassName(r++),o=!1,i=Object.keys(t.overrides);a&&!o;)-1!==i.indexOf(a)?o=!0:a=n.getClassName(r++);if(!o)return null;var l=t.overrides[a]();return l.setMyFactory(e),l},e.registerOverride=function(e,n){t.overrides[e]=n}}var ef={};function tf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ef,n),ln.c.obj(e,t),$m(e,t)}var nf={newInstance:ln.c.newInstance(tf,"vtkViewNodeFactory"),extend:tf};function rf(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var af={};function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,af,n),nf.extend(e,t,n),rf(0,t),e.registerOverride("vtkActor",Bc.newInstance),e.registerOverride("vtkActor2D",kc.newInstance),e.registerOverride("vtkCamera",Jc.newInstance),e.registerOverride("vtkGlyph3DMapper",fd.newInstance),e.registerOverride("vtkImageMapper",Gd.newInstance),e.registerOverride("vtkImageSlice",Rd.newInstance),e.registerOverride("vtkMapper",rd.newInstance),e.registerOverride("vtkPixelSpaceCallbackMapper",Td.newInstance),e.registerOverride("vtkRenderer",Hd.newInstance),e.registerOverride("vtkSkybox",Md.newInstance),e.registerOverride("vtkSphereMapper",_d.newInstance),e.registerOverride("vtkStickMapper",tm.newInstance),e.registerOverride("vtkTexture",ic.newInstance),e.registerOverride("vtkSurfaceLICMapper",Xm.newInstance),e.registerOverride("vtkVolume",Ym.newInstance),e.registerOverride("vtkVolumeMapper",qm.newInstance),e.registerOverride("vtkWidgetRepresentation",Zc.newInstance)}var lf={newInstance:ln.c.newInstance(of,"vtkOpenGLViewNodeFactory"),extend:of},sf=Object(Cn.d)((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,a,o,i){return n((l=n(n(t,e),n(a,i)))<<(s=o)|l>>>32-s,r);var l,s}function a(e,t,n,a,o,i,l){return r(t&n|~t&a,e,t,o,i,l)}function o(e,t,n,a,o,i,l){return r(t&a|n&~a,e,t,o,i,l)}function i(e,t,n,a,o,i,l){return r(t^n^a,e,t,o,i,l)}function l(e,t,n,a,o,i,l){return r(n^(t|~a),e,t,o,i,l)}function s(e,t){var r,s,c,g,u;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,m=-271733879,f=-1732584194,p=271733878;for(r=0;r>5]>>>t%32&255);return n}function g(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function d(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return c(s(g(e),8*e.length))}(d(e))}function f(e,t){return function(e,t){var n,r,a=g(e),o=[],i=[];for(o[15]=i[15]=void 0,a.length>16&&(a=s(a,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^a[n],i[n]=1549556828^a[n];return r=s(o.concat(g(t)),512+8*t.length),c(s(i.concat(r),640))}(d(e),d(t))}function p(e,t,n){return t?n?f(t,e):u(f(t,e)):n?m(e):u(m(e))}e.exports?e.exports=p:t.md5=p}(Cn.b)}),"/$$rollup_base$$/node_modules/blueimp-md5/js"),cf=["lastShaderBound","context","openGLRenderWindow"];function gf(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var a=n;r.length>0&&(a=Hg.substitute(a,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),i="\n",l="#version 100\n";o?l="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(i="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),a=Hg.substitute(a,"//VTK::System::Dec",["".concat(l,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",i,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var s=Hg.substitute(e,"//VTK::System::Dec",["".concat(l,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(s=Hg.substitute(s,"varying","out").result,a=Hg.substitute(a,"varying","in").result,a=Hg.substitute(a,"gl_FragData\\[0\\]","fragOutput0").result,a=Hg.substitute(a,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:s,FSSource:a,GSSource:Hg.substitute(r,"//VTK::System::Dec",l).result}},e.readyShaderProgramArray=function(t,n,r){var a=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(a.VSSource,a.FSSource,a.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=function(t){return t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null},e.getShaderProgram=function(e,n,r){var a="".concat(e).concat(n).concat(r),o=sf(a);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var i=Hg.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=function(n){e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((function(e){return t.shaderPrograms[e]})).forEach((function(e){return e.releaseGraphicsResources(n)}))},e.releaseGraphicsResources=function(){t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=function(e){return t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1}}var uf={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign(t,uf,n),t.shaderPrograms={},ln.c.obj(e,t),ln.c.setGet(e,t,cf),gf(e,t),Object.freeze(e)}var mf={newInstance:ln.c.newInstance(df,"vtkShaderCache"),extend:df},ff=ln.c.vtkErrorMacro;function pf(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),ln.c.obj(e,t),t.textureUnits=[],ln.c.get(e,t,["numberOfTextureUnits"]),ln.c.setGet(e,t,["context"]),pf(e,t)}var hf={newInstance:ln.c.newInstance(If,"vtkOpenGLTextureUnitManager"),extend:If},bf=ln.c.vtkDebugMacro,yf=ln.c.vtkErrorMacro,vf=-1!==navigator.userAgent.indexOf("Chrome");function Zf(e,t,n){var r=e.createFramebuffer(),a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}var Af=0,Gf=[];function Sf(){Af++,Gf.forEach((function(e){return e(Af)}))}function Bf(){Af--,Gf.forEach((function(e){return e(Af)}))}function Vf(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");var n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=function(n){if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((function(t){t.setOpenGLRenderWindow(e)}))}},e.initialize=function(){if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=hf.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);var n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=function(){t.context.makeCurrent()},e.setContainer=function(n){t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&yf("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=function(){return t.el},e.getContainerSize=function(){if(!t.containerSize&&t.el){var e=t.el.getBoundingClientRect(),n=e.width,r=e.height;t.containerSize=[n,r]}return t.containerSize||t.size},e.getFramebufferSize=function(){return t.activeFramebuffer?t.activeFramebuffer.getSize():t.size},e.isInViewport=function(t,n,r){var a=r.getViewportByReference(),o=e.getFramebufferSize();return a[0]*o[0]<=t&&a[2]*o[0]>=t&&a[1]*o[1]<=n&&a[3]*o[1]>=n},e.getViewportSize=function(t){var n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=function(t){var n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t/a[0],n/a[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t*a[0],n*a[1],r]},e.worldToView=function(e,t,n,r){return r.worldToView(e,t,n)},e.viewToWorld=function(e,t,n,r){return r.viewToWorld(e,t,n)},e.worldToDisplay=function(t,n,r,a){var o=a.worldToView(t,n,r),i=e.getViewportSize(a),l=a.viewToProjection(o[0],o[1],o[2],i[0]/i[1]),s=a.projectionToNormalizedDisplay(l[0],l[1],l[2]);return e.normalizedDisplayToDisplay(s[0],s[1],s[2])},e.displayToWorld=function(t,n,r,a){var o=e.displayToNormalizedDisplay(t,n,r),i=a.normalizedDisplayToProjection(o[0],o[1],o[2]),l=e.getViewportSize(a),s=a.projectionToView(i[0],i[1],i[2],l[0]/l[1]);return a.viewToWorld(s[0],s[1],s[2])},e.normalizedDisplayToViewport=function(t,n,r,a){var o=a.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var i=e.normalizedDisplayToDisplay(t,n,r);return[i[0]-o[0]-.5,i[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,a){var o=e.getViewportSize(a);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=function(t,n,r){var a=e.getFramebufferSize();return[t*(a[0]-1),n*(a[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,a){var o=a.getViewportByReference(),i=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,l=n+o[1]+.5;return e.displayToNormalizedDisplay(i,l,r)},e.getPixelData=function(e,n,r,a){var o=new Uint8Array((r-e+1)*(a-n+1)*4);return t.context.readPixels(e,n,r-e+1,a-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,a="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&a&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bf("using webgl2")),r||(bf("using webgl1"),r=t.canvas.getContext("webgl",n)||t.canvas.getContext("experimental-webgl",n)),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(n){n.length>0&&(t.vrDisplay=n[0],t.vrDisplay.depthNear=.01,t.vrDisplay.depthFar=100,e.invokeHaveVRDisplay())})),t.canvas.addEventListener("webglcontextlost",(function(e){e.preventDefault()}),!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1),r},e.startVR=function(){t.oldCanvasSize=t.size.slice(),t.vrDisplay.capabilities.canPresent?t.vrDisplay.requestPresent([{source:t.canvas}]).then((function(){if(t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&t.hideCanvasInVR&&(t.el.style.display="none"),t.queryVRSize){var n=t.vrDisplay.getEyeParameters("left"),r=t.vrDisplay.getEyeParameters("right"),a=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(a,o)}else e.setSize(t.vrResolution);t.renderable.getRenderers()[0].resetCamera(),t.vrFrameData=new VRFrameData,t.renderable.getInteractor().switchToVRAnimation(),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),vf&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):yf("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,Object(Ao.a)(t.oldCanvasSize)),t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&(t.el.style.display="block");var n=t.renderable.getRenderers()[0];n.getActiveCamera().setProjectionMatrix(null),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.vrRender=function(){if(t.vrDisplay.isPresenting){t.renderable.getInteractor().updateGamepads(t.vrDisplay.displayId),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),t.vrDisplay.getFrameData(t.vrFrameData);var n=t.renderable.getRenderers()[0];n.setViewport(0,0,.5,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.leftViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.leftProjectionMatrix),e.traverseAllPasses(),n.setViewport(.5,0,1,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.rightViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.rightProjectionMatrix),e.traverseAllPasses(),t.vrDisplay.submitFrame()}},e.restoreContext=function(){var t=fc.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t.textureResourceIds.get(n);if(void 0===r){var a=e.getTextureUnitManager().allocate();a<0?yf("Hardware does not support the number of textures defined."):(t.textureResourceIds.set(n,a),t.context.activeTexture(t.context.TEXTURE0+a))}else t.context.activeTexture(t.context.TEXTURE0+r)},e.deactivateTexture=function(n){var r=t.textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t.textureResourceIds.delete(n))},e.getTextureUnitForTexture=function(e){var n=t.textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n,r){if(t.webgl2)switch(e){case cn.b.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;case 4:default:return t.context.RGBA8}default:case cn.b.FLOAT:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;case 4:default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:default:return t.context.RGBA}},e.setBackgroundImage=function(e){t.bgImage.src=e.src},e.setUseBackgroundImage=function(e){t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(t.deleted)return null;t.imageFormat=n;var r=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,new Promise((function(n,a){var o=e.onImageReady((function(e){t.notifyStartCaptureImage=r,o.unsubscribe(),n(e)}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),o=n.getExtension("OES_texture_half_float"),i=n.getExtension("WEBGL_debug_renderer_info"),l=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),c=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&Zf(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[o&&Zf(n,n.RGBA,o.HALF_FLOAT_OES)?"RGBA":"",o&&Zf(n,n.RGB,o.HALF_FLOAT_OES)?"RGB":"",o&&Zf(n,n.LUMINANCE,o.HALF_FLOAT_OES)?"LUMINANCE":"",o&&Zf(n,n.ALPHA,o.HALF_FLOAT_OES)?"ALPHA":"",o&&Zf(n,n.LUMINANCE_ALPHA,o.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&Zf(n,n.RGB,n.FLOAT)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",l?n.getParameter(l.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",i&&n.getParameter(i.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",i&&n.getParameter(i.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],g={};c.length;){var u=c.pop(),d=Object(a.a)(u,3),m=d[0],f=d[1],p=d[2];f&&(g[f]={label:m,value:p})}return g},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,a.drawImage(t.canvas,0,0);var o=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rf,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",Sf(),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t.textureResourceIds=new Map,_s.extend(e,t,n),t.myFactory=lf.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",kf),t.shaderCache=mf.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hc.newInstance(),ln.c.event(e,t,"imageReady"),ln.c.event(e,t,"haveVRDisplay"),ln.c.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),ln.c.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),ln.c.setGetArray(e,t,["size","vrResolution"],2),Vf(e,t)}var kf=ln.c.newInstance(wf,"vtkOpenGLRenderWindow");Os("WebGL",kf);var Wf={newInstance:kf,extend:wf,pushMonitorGLContextCount:function(e){Gf.push(e)},popMonitorGLContextCount:function(e){return Gf.pop()}},xf={Device:{Unknown:0,LeftController:1,RightController:2},Input:{Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4}};function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,i=n?"addEventListener":"removeEventListener",l=n?"removeEventListener":"addEventListener";!a&&!n&&r>0&&--r,r&&!a||(r=0,t.container&&t.container[l]("mousemove",e.handleMouseMove),o[i]("mouseup",e.handleMouseUp),o[i]("mousemove",e.handleMouseMove),o[i]("touchend",e.handleTouchEnd,!1),o[i]("touchcancel",e.handleTouchEnd,!1),o[i]("touchmove",e.handleTouchMove,!1)),!a&&n&&++r}function g(){t.view&&t.enabled&&t.enableRender&&(t.inRender=!0,t.view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.start=function(){(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=function(e){Hf("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=function(n){t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=function(){t.initialized=!0,e.enable(),e.render()},e.enable=function(){return e.setEnabled(!0)},e.disable=function(){return e.setEnabled(!1)},e.startEventLoop=function(){return Nf("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||a(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Mf),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("mouseenter",e.handleMouseEnter),n.addEventListener("mouseleave",e.handleMouseLeave),n.addEventListener("mousemove",e.handleMouseMove),n.addEventListener("mousedown",e.handleMouseDown),document.querySelector("body").addEventListener("keypress",e.handleKeyPress),document.querySelector("body").addEventListener("keydown",e.handleKeyDown),document.querySelector("body").addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){c(!1,!0),t.container.removeEventListener("contextmenu",Mf),t.container.removeEventListener("wheel",e.handleWheel),t.container.removeEventListener("DOMMouseScroll",e.handleWheel),t.container.removeEventListener("mouseenter",e.handleMouseEnter),t.container.removeEventListener("mouseleave",e.handleMouseLeave),t.container.removeEventListener("mousemove",e.handleMouseMove),t.container.removeEventListener("mousedown",e.handleMouseDown),document.querySelector("body").removeEventListener("keypress",e.handleKeyPress),document.querySelector("body").removeEventListener("keydown",e.handleKeyDown),document.querySelector("body").removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=s(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=s(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=s(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){c(!0),t.stopPropagation(),t.preventDefault();var n=Jf(Jf({},l(t)),{},{position:o(t)});switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:Hf("Unknown mouse button pressed: ".concat(t.button))}}},e.requestPointerLock=function(){e.getView().getCanvas().requestPointerLock()},e.exitPointerLock=function(){return document.exitPointerLock()},e.isPointerLocked=function(){return!!document.pointerLockElement},e.handlePointerLockChange=function(){e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=function(r){void 0!==r?n.has(r)?Nf("requester is already registered for animating"):(n.add(r),1===n.size&&(t.lastFrameTime=.1,t.lastFrameStart=Date.now(),t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):Hf("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!a){var o=r&&r.getClassName?r.getClassName():r;Nf("".concat(o," did not request an animation"))}},e.switchToVRAnimation=function(){t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.vrAnimation=!0},e.returnFromVRAnimation=function(){t.vrAnimation=!1,0!==n.size&&(t.FrameTime=-1,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateGamepads=function(n){for(var r=navigator.getGamepads(),a=0;a1){var r=i(n.touches);if(2===n.touches.length){var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(a)}e.recognizeGesture("TouchStart",r)}else{var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}},e.handleTouchMove=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures&&n.touches.length>1){var r=i(n.touches);e.recognizeGesture("TouchMove",r)}else{var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(a)}},e.handleTouchEnd=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures)if(0===n.touches.length)if(1===n.changedTouches.length){var r={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(r),c(!1)}else{var a=i(n.changedTouches);e.recognizeGesture("TouchEnd",a),c(!1)}else if(1===n.touches.length){var l=i(n.changedTouches);e.recognizeGesture("TouchEnd",l);var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}else{var g=i(n.touches);e.recognizeGesture("TouchMove",g)}else{var u={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(u),c(!1)}},e.setView=function(n){t.view!==n&&(t.view=n,t.view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=function(){return t.view.getRenderable().getRenderersByReference()[0]},e.findPokedRenderer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.view)return null;var r=t.view.getRenderable().getRenderers();r.sort((function(e,t){return e.getLayer()-t.getLayer()}));for(var a=null,o=null,i=null,l=r.length;l--;){var s=r[l];if(t.view.isInViewport(e,n,s)&&s.getInteractive()){i=s;break}null===a&&s.getInteractive()&&(a=s),null===o&&t.view.isInViewport(e,n,s)&&(o=s)}return null===i&&(i=a),null===i&&(i=o),null==i&&(i=r[0]),i},e.render=function(){null!==t.animationRequest||t.inRender||g()},Kf.forEach((function(n){var r=n.charAt(0).toLowerCase()+n.slice(1);e["".concat(r,"Event")]=function(r){if(t.enabled)if(e.getCurrentRenderer()){var a=Jf({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](a)}else Ff("\n Can not forward events without a current renderer on the interactor.\n ")}})),e.recognizeGesture=function(n,r){if(!(Object.keys(r).length>2)){if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((function(e){t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});var a=0,o=[],i=[];Object.keys(r).forEach((function(e){o[a]=r[e],i[a]=t.startingEventPositions[e],a++}));var l=Math.sqrt((i[0].x-i[1].x)*(i[0].x-i[1].x)+(i[0].y-i[1].y)*(i[0].y-i[1].y)),s=Math.sqrt((o[0].x-o[1].x)*(o[0].x-o[1].x)+(o[0].y-o[1].y)*(o[0].y-o[1].y)),c=Object(Xo.F)(Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)),g=Object(Xo.F)(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),u=g-c;g=g+180>=360?g-180:g+180,c=c+180>=360?c-180:c+180,Math.abs(g-c)m&&f>p&&f>C){t.currentGesture="Pinch";var I={scale:1,touches:r};e.startPinchEvent(I)}else if(p>m&&p>C){t.currentGesture="Rotate";var h={rotation:0,touches:r};e.startRotateEvent(h)}else if(C>m){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var y={rotation:u,touches:r};e.rotateEvent(y)}if("Pinch"===t.currentGesture){var v={scale:s/l,touches:r};e.pinchEvent(v)}if("Pan"===t.currentGesture){var Z={translation:d,touches:r};e.panEvent(Z)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()};var u=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),u()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Df={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,view:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{}};function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Df,n),ln.c.obj(e,t),ln.c.event(e,t,"RenderEvent"),Kf.forEach((function(n){return ln.c.event(e,t,n)})),ln.c.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),ln.c.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Lf(e,t)}var Uf=Jf({newInstance:ln.c.newInstance(Ef,"vtkRenderWindowInteractor"),extend:Ef,handledEvents:Kf},xf),zf=ln.c.vtkDebugMacro;function _f(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),o=Object(Yo.h)(new Float64Array(16)),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3),c=Object(Yo.h)(new Float64Array(16)),g=Object(Yo.h)(new Float64Array(16)),u=new Float64Array(3),d=new Float64Array(3);function m(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=function(){var n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=function(n,r,a){n===t.position[0]&&r===t.position[1]&&a===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,a){n===t.focalPoint[0]&&r===t.focalPoint[1]&&a===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,zf("Distance is set to minimum."));var r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()}},e.computeDistance=function(){var e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,zf("Distance is set to minimum.");var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,m()},e.dolly=function(n){if(!(n<=0)){var r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])}},e.roll=function(n){var r=t.position,a=t.focalPoint,o=t.viewUp,i=new Float64Array([o[0],o[1],o[2],0]);Object(Yo.h)(c);var l=new Float64Array([a[0]-r[0],a[1]-r[1],a[2]-r[2]]);Object(Yo.q)(c,c,Object(Xo.B)(n),l),bg(i,i,c),t.viewUp[0]=i[0],t.viewUp[1]=i[1],t.viewUp[2]=i[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.yaw=function(n){var r=t.position;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint(d[0],d[1],d[2])},e.elevation=function(n){var r=t.focalPoint,a=e.getViewMatrix(),o=[-a[0],-a[1],-a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.pitch=function(n){var r=t.position,a=e.getViewMatrix(),o=[a[0],a[1],a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint.apply(e,Object(Ao.a)(d))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,a){var o=[n,r,a];Object(Xo.x)(t.position,o,t.position),Object(Xo.x)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(Object(Ao.a)(t.viewUp),[1]),a=[],o=[],i=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],bg(a,[].concat(Object(Ao.a)(t.position),[1]),n),bg(o,[].concat(Object(Ao.a)(t.focalPoint),[1]),n),bg(i,r,n),i[0]-=a[0],i[1]-=a[1],i[2]-=a[2],e.setPosition.apply(e,Object(Ao.a)(a.slice(0,3))),e.setFocalPoint.apply(e,Object(Ao.a)(o.slice(0,3))),e.setViewUp.apply(e,Object(Ao.a)(i.slice(0,3)))},e.getThickness=function(){return t.clippingRange[1]-t.clippingRange[0]},e.setThickness=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=function(e){},e.getRoll=function(){},e.setObliqueAngles=function(e,t){},e.getOrientation=function(){},e.getOrientationWXYZ=function(){},e.getFrustumPlanes=function(e){},e.getCameraLightTransformMatrix=function(){},e.deepCopy=function(e){},e.physicalOrientationToWorldDirection=function(e){var t,n,r=Ag(e[0],e[1],e[2],e[3]),a=yg(),o=Ag(0,0,1,0);return n=r,(t=a)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Zg(o,r,o),Zg(o,o,a),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Object(Yo.g)(t,t)},e.getWorldToPhysicalMatrix=function(e){Object(Yo.h)(e);var n=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Object(Yo.i)(e,e),Object(Fo.p)(i,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Object(Yo.r)(e,e,i),Object(Yo.s)(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(c){Object(Yo.g)(o,c),Object(Fo.q)(i,n,o),e.computeDistance();var g=t.distance;e.setPosition(i[0],i[1],i[2]),Object(Fo.q)(l,r,o),Object(Fo.a)(l,l,i),Object(Fo.l)(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),Object(Fo.q)(s,a,o),Object(Fo.a)(s,s,i),Object(Fo.l)(s,s),e.setViewUp(s[0],s[1],s[2]),e.setDistance(g)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Object(Yo.l)(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Object(Yo.d)(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Object(Yo.i)(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;Object(Yo.k)(o,t.position,t.focalPoint,t.viewUp),Object(Yo.i)(o,o);var e=new Float64Array(16);return Object(Yo.d)(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var a=new Float64Array(16);if(Object(Yo.h)(a),t.projectionMatrix){var l=1/t.physicalScale;return Object(Fo.p)(i,l,l,l),Object(Yo.d)(a,t.projectionMatrix),Object(Yo.r)(a,a,i),Object(Yo.i)(a,a),a}Object(Yo.h)(o);var s=t.clippingRange[1]-t.clippingRange[0],c=[t.clippingRange[0]+(n+1)*s/2,t.clippingRange[0]+(r+1)*s/2];if(t.parallelProjection){var g=t.parallelScale*e,u=t.parallelScale,d=(t.windowCenter[0]-1)*g,m=(t.windowCenter[0]+1)*g,f=(t.windowCenter[1]-1)*u,p=(t.windowCenter[1]+1)*u;Object(Yo.n)(o,d,m,f,p,c[0],c[1]),Object(Yo.i)(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var C,I,h=Math.tan(Object(Xo.B)(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(C=t.clippingRange[0]*h,I=t.clippingRange[0]*h/e):(C=t.clippingRange[0]*h*e,I=t.clippingRange[0]*h);var b=(t.windowCenter[0]-1)*C,y=(t.windowCenter[0]+1)*C,v=(t.windowCenter[1]-1)*I,Z=(t.windowCenter[1]+1)*I,A=c[0],G=c[1];o[0]=2*A/(y-b),o[5]=2*A/(Z-v),o[2]=(b+y)/(y-b),o[6]=(v+Z)/(Z-v),o[10]=-(A+G)/(G-A),o[14]=-1,o[11]=-2*A*G/(G-A),o[15]=0}return Object(Yo.d)(a,o),a},e.getCompositeProjectionMatrix=function(t,n,r){var a=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Object(Yo.l)(o,a,o),o},e.setDirectionOfProjection=function(e,n,r){if(t.directionOfProjection[0]!==e||t.directionOfProjection[1]!==n||t.directionOfProjection[2]!==r){t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,m()}},e.setDeviceAngles=function(n,r,a,o){var i=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,i);var l=Object(Yo.h)(new Float64Array(16));Object(Yo.q)(l,l,Object(Xo.B)(n),t.physicalViewUp),Object(Yo.q)(l,l,Object(Xo.B)(r),i),Object(Yo.q)(l,l,Object(Xo.B)(a),t.physicalViewNorth),Object(Yo.q)(l,l,Object(Xo.B)(-o),t.physicalViewUp);var s=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),c=new Float64Array(t.physicalViewNorth);Object(Fo.q)(s,s,l),Object(Fo.q)(c,c,l),e.setDirectionOfProjection(s[0],s[1],s[2]),e.setViewUp(c[0],c[1],c[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,a){var o=Object(Yo.h)(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==a)){var i=Object(Xo.B)(t),l=yg();vg(l,[n,r,a],i),Object(Yo.j)(o,l)}var s=new Float64Array(3);Object(Fo.q)(s,[0,0,-1],o);var c=new Float64Array(3);Object(Fo.q)(c,[0,1,0],o),e.setDirectionOfProjection.apply(e,Object(Ao.a)(s)),e.setViewUp.apply(e,Object(Ao.a)(c)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var a=-n[0],o=-n[1],i=-n[2],l=-(a*r[0]+o*r[1]+i*r[2]),s=[a*e[0]+o*e[2]+i*e[4]+l,1e-18],c=0;c<2;c++)for(var g=0;g<2;g++)for(var u=0;u<2;u++){var d=a*e[u]+o*e[2+g]+i*e[4+c]+l;s[0]=ds[1]?d:s[1]}return s}}var jf={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function Qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jf,n),ln.c.obj(e,t),ln.c.get(e,t,["distance"]),ln.c.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),ln.c.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),ln.c.setGetArray(e,t,["clippingRange","windowCenter"],2),ln.c.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),_f(e,t)}var qf={newInstance:ln.c.newInstance(Qf,"vtkCamera"),extend:Qf};function $f(e,t){t.classHierarchy.push("vtkLight"),e.getTransformedPosition=function(){return t.transformMatrix?[]:[].concat(t.position)},e.getTransformedFocalPoint=function(){return t.transformMatrix?[]:[].concat(t.focalPoint)},e.getDirection=function(){return t.directionMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ep,n),ln.c.obj(e,t),ln.c.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),ln.c.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),$f(e,t)}var np={newInstance:ln.c.newInstance(tp,"vtkLight"),extend:tp,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},rp=ln.c.vtkErrorMacro;function ap(e,t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);var r=e.getNestedProps();if(r&&r.length)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,op,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),ln.c.setGetArray(e,t,["viewport"],4),ln.c.setGetArray(e,t,["background","background2"],3),ap(e,t)}var lp={newInstance:ln.c.newInstance(ip,"vtkViewport"),extend:ip},sp=ln.l,cp=ln.m,gp=ln.n;function up(e){return function(){return cp("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function dp(e,t){for(t.classHierarchy.push("vtkRenderer"),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1);var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},a={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(sp("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0},e.updateLightsGeometryToFollowCamera=function(){var n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((function(e){e.lightTypeIsSceneLight()||e.lightTypeIsCameraLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):cp("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=up("allocateTime"),e.updateGeometry=up("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){sp(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=function(n){return t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0)},e.makeCamera=function(){var t=qf.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=function(){return t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera},e.getActiveCameraAndResetIfCreated=function(){return t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera},e.getActors=function(){return t.actors=[],t.props.forEach((function(e){t.actors=t.actors.concat(e.getActors())})),t.actors},e.addActor=e.addViewProp,e.removeActor=function(n){t.actors=t.actors.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllActors=function(){e.getActors().forEach((function(t){e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=function(){return t.volumes=[],t.props.forEach((function(e){t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes},e.addVolume=e.addViewProp,e.removeVolume=function(n){t.volumes=t.volumes.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllVolumes=function(){e.getVolumes().forEach((function(t){e.removeViewProp(t)})),t.volumes=[],e.modified()},e.addLight=function(n){t.lights=[].concat(t.lights,n),e.modified()},e.removeLight=function(n){t.lights=t.lights.filter((function(e){return e!==n})),e.modified()},e.removeAllLights=function(){t.lights=[],e.modified()},e.setLightCollection=function(n){t.lights=n,e.modified()},e.makeLight=np.newInstance,e.createLight=function(){t.automaticLightCreation&&(t.createdLight&&(e.removeLight(t.createdLight),t.createdLight.delete(),t.createdLight=null),t.createdLight=e.makeLight(),e.addLight(t.createdLight),t.createdLight.setLightTypeToHeadLight(),t.createdLight.setPosition(e.getActiveCamera().getPosition()),t.createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=function(t,n,r,a){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],a),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,a){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],a),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return cp("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.g)(a,a),Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.projectionToView=function(e,n,r,a){if(null===t.activeCamera)return cp("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.g)(o,o),Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.worldToView=function(e,n,r){if(null===t.activeCamera)return cp("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.viewToProjection=function(e,n,r,a){if(null===t.activeCamera)return cp("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.computeVisiblePropBounds=function(){t.allBounds[0]=Ol.INIT_BOUNDS[0],t.allBounds[1]=Ol.INIT_BOUNDS[1],t.allBounds[2]=Ol.INIT_BOUNDS[2],t.allBounds[3]=Ol.INIT_BOUNDS[3],t.allBounds[4]=Ol.INIT_BOUNDS[4],t.allBounds[5]=Ol.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var a=0;at.allBounds[1]&&(t.allBounds[1]=i[1]),i[2]t.allBounds[3]&&(t.allBounds[3]=i[3]),i[4]t.allBounds[5]&&(t.allBounds[5]=i[5]))}}return r&&(Object(Xo.D)(t.allBounds),sp("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!Object(Xo.l)(r))return sp("Cannot reset camera!"),!1;var i=null;if(!e.getActiveCamera())return cp("Trying to reset non-existent camera"),!1;i=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;var l=r[1]-r[0],s=r[3]-r[2],c=r[5]-r[4],g=(l*=l)+(s*=s)+(c*=c);g=0===g?1:g,g=.5*Math.sqrt(g);var u=Object(Xo.B)(t.activeCamera.getViewAngle()),d=g,m=g/Math.sin(.5*u),f=t.activeCamera.getViewUp();return Math.abs(Object(Xo.q)(f,i))>.999&&(gp("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-f[2],f[0],f[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+m*i[0],o[1]+m*i[1],o[2]+m*i[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(d),t.activeCamera.setPhysicalScale(g),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(a),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=n||e.computeVisiblePropBounds();if(!Object(Xo.l)(a))return sp("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return cp("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(a),i=0;if(t.activeCamera.getParallelProjection())i=.1*t.activeCamera.getParallelScale();else{var l=Object(Xo.B)(t.activeCamera.getViewAngle());i=.2*Math.tan(l/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]e&&(e=n);var r=t.createdLight?t.createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=function(){return!!t.preserveColorBuffer},e.isActiveCameraCreated=function(){return!!t.activeCamera}}var mp={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,createdLight:null,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:Object(Xo.j)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,pass:0};function fp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mp,n),lp.extend(e,t,n),Object(ln.e)(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Object(ln.j)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Object(ln.f)(e,t,["actors","volumes","lights"]),Object(ln.k)(e,t,["background"],4,1),dp(e,t)}var pp={newInstance:Object(ln.g)(fp,"vtkRenderer"),extend:fp};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),ln.c.obj(e,t),ln.c.event(e,t,"InteractionEvent"),ln.c.event(e,t,"StartInteractionEvent"),ln.c.event(e,t,"EndInteractionEvent"),ln.c.get(e,t,["interactor","enabled"]),ln.c.setGet(e,t,["priority","processEvents"]),yp(e,t)}var Ap=Ip({newInstance:ln.c.newInstance(Zp,"vtkInteractorObserver"),extend:Zp},{computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}}),Gp={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}};function Sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bp=Gp.States,Vp={Rotate:Bp.IS_ROTATE,Pan:Bp.IS_PAN,Spin:Bp.IS_SPIN,Dolly:Bp.IS_DOLLY,CameraPose:Bp.IS_CAMERA_POSE,WindowLevel:Bp.IS_WINDOW_LEVEL,Slice:Bp.IS_SLICE};function Rp(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Vp).forEach((function(n){ln.c.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===Bp.IS_NONE&&(t.state=Vp[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},ln.c.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Vp[n]&&(t.state=Bp.IS_NONE,t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e["invokeEnd".concat(n,"Event")]({type:"End".concat(n,"Event")}),t.interactor.render())}})),e.handleKeyPress=function(e){var n=t.interactor;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}var wp={state:Bp.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function kp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wp,n),Ap.extend(e,t,n),Rp(e,t)}var Wp=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pp,n),Wp.extend(e,t,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),ln.c.setGetArray(e,t,["centerOfRotation"],3),Fp(e,t)}var Mp=function(e){for(var t=1;te&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Lp("pick"),e.hasKey=Lp("hasKey"),e.getRedrawMTime=function(){return t.mtime},e.setEstimatedRenderTime=function(e){t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=function(){t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=function(e){t.estimatedRenderTime+=e},e.setAllocatedRenderTime=function(e){t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=function(){return!1},e.getTextures=function(){return t.textures},e.hasTexture=function(e){return-1!==t.textures.indexOf(e)},e.addTexture=function(n){n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=function(n){var r=t.textures.filter((function(e){return e!==n}));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=function(){t.textures=[],e.modified()}}var Ep={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ep,n),ln.c.obj(e,t),ln.c.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),ln.c.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Dp(e,t)}var zp={newInstance:ln.c.newInstance(Up,"vtkProp"),extend:Up};function _p(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=function(n){t.position=t.position.map((function(e,t){return e+n[t]})),e.modified()},e.getOrientationWXYZ=function(){var e=yg();Object(Yo.m)(e,t.rotation);var n=new Float64Array(3),r=function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ml.b?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}(n,e);return[Object(Xo.F)(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Object(Yo.a)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateY=function(n){0!==n&&(Object(Yo.b)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Object(Yo.c)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateWXYZ=function(n,r,a,o){if(0!==n&&(0!==r||0!==a||0!==o)){var i=Object(Xo.B)(n),l=yg();vg(l,[r,a,o],i);var s=new Float64Array(16);Object(Yo.j)(s,l),Object(Yo.l)(t.rotation,t.rotation,s),e.modified()}},e.setOrientation=function(n,r,a){return(n!==t.orientation[0]||r!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[n,r,a],Object(Yo.h)(t.rotation),e.rotateZ(a),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Object(Yo.d)(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Object(Yo.h)(t.matrix),t.userMatrix&&Object(Yo.l)(t.matrix,t.matrix,t.userMatrix),Object(Yo.s)(t.matrix,t.matrix,t.origin),Object(Yo.s)(t.matrix,t.matrix,t.position),Object(Yo.l)(t.matrix,t.matrix,t.rotation),Object(Yo.r)(t.matrix,t.matrix,t.scale),Object(Yo.s)(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Object(Yo.i)(t.matrix,t.matrix),t.isIdentity=!0;for(var n=0;n<4;++n)for(var r=0;r<4;++r)(n===r?1:0)!==t.matrix[n+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=function(){return Ol.getCenter(t.bounds)},e.getLength=function(){return Ol.getLength(t.bounds)},e.getXRange=function(){return Ol.getXRange(t.bounds)},e.getYRange=function(){return Ol.getYRange(t.bounds)},e.getZRange=function(){return Ol.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var jp={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Qp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jp,n),zp.extend(e,t,n),t.matrixMTime={},ln.c.obj(t.matrixMTime),ln.c.get(e,t,["bounds","isIdentity"]),ln.c.getArray(e,t,["orientation"]),ln.c.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Object(Yo.h)(new Float64Array(16)),t.rotation=Object(Yo.h)(new Float64Array(16)),t.userMatrix=Object(Yo.h)(new Float64Array(16)),t.transform=null,_p(e,t)}var qp={newInstance:ln.c.newInstance(Qp,"vtkProp3D"),extend:Qp};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var eC=ln.c.vtkDebugMacro;function tC(e,t){t.classHierarchy.push("vtkActor");var n=function(e){for(var t=1;t=1;return(n=n&&(!t.texture||!t.texture.isTranslucent()))&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque())},e.makeProperty=hg.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){eC("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Ol.getCorners(n,r),e.computeMatrix();var a=new Float64Array(16);Object(Yo.i)(a,t.matrix),r.forEach((function(e){return Object(Fo.q)(e,e,a)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?r.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):r.reduce((function(e,n){return ee?r:e}if(null!==t.backfaceProperty){var a=t.backfaceProperty.getMTime();e=a>e?a:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var nC={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nC,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),tC(e,t)}var aC={newInstance:ln.c.newInstance(rC,"vtkActor"),extend:rC};function oC(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,a,o){if(t.callback){var i=n.getCompositeProjectionMatrix(r,-1,1);Object(Yo.i)(i,i);for(var l=e.getPoints(),s=new Float64Array(3),c=a.usize,g=a.vsize,u=c/2,d=g/2,m=[],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iC,n),Pu.extend(e,t,n),ln.c.setGet(e,t,["callback","useZValues"]),oC(e,t)}var sC={newInstance:ln.c.newInstance(lC,"vtkPixelSpaceCallbackMapper"),extend:lC};function cC(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=function(){t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setImage=function(n){t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null)),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())}}var gC={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function uC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gC,n),ln.c.obj(e,t),ln.c.algo(e,t,6,0),ln.c.get(e,t,["imageLoaded"]),ln.c.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),cC(e,t)}var dC={newInstance:ln.c.newInstance(uC,"vtkTexture"),extend:uC};function mC(e){return+e}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var CC=e=>()=>e;function IC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):CC(isNaN(e)?t:e)}function hC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yC(){}var vC="\\s*([+-]?\\d+)\\s*",ZC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GC=/^#([0-9a-f]{3,8})$/,SC=new RegExp("^rgb\\("+[vC,vC,vC]+"\\)$"),BC=new RegExp("^rgb\\("+[AC,AC,AC]+"\\)$"),VC=new RegExp("^rgba\\("+[vC,vC,vC,ZC]+"\\)$"),RC=new RegExp("^rgba\\("+[AC,AC,AC,ZC]+"\\)$"),wC=new RegExp("^hsl\\("+[ZC,AC,AC]+"\\)$"),kC=new RegExp("^hsla\\("+[ZC,AC,AC,ZC]+"\\)$"),WC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xC(){return this.rgb().formatHex()}function TC(){return this.rgb().formatRgb()}function JC(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XC(t):3===n?new YC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?OC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?OC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SC.exec(e))?new YC(t[1],t[2],t[3],1):(t=BC.exec(e))?new YC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VC.exec(e))?OC(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?OC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wC.exec(e))?MC(t[1],t[2]/100,t[3]/100,1):(t=kC.exec(e))?MC(t[1],t[2]/100,t[3]/100,t[4]):WC.hasOwnProperty(e)?XC(WC[e]):"transparent"===e?new YC(NaN,NaN,NaN,0):null}function XC(e){return new YC(e>>16&255,e>>8&255,255&e,1)}function OC(e,t,n,r){return r<=0&&(e=t=n=NaN),new YC(e,t,n,r)}function NC(e){return e instanceof yC||(e=JC(e)),e?new YC((e=e.rgb()).r,e.g,e.b,e.opacity):new YC}function HC(e,t,n,r){return 1===arguments.length?NC(e):new YC(e,t,n,null==r?1:r)}function YC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FC(){return"#"+KC(this.r)+KC(this.g)+KC(this.b)}function PC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function KC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function MC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DC(e,t,n,r)}function LC(e){if(e instanceof DC)return new DC(e.h,e.s,e.l,e.opacity);if(e instanceof yC||(e=JC(e)),!e)return new DC;if(e instanceof DC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-a,s=(o+a)/2;return l?(i=t===o?(n-r)/l+6*(n0&&s<1?0:i,new DC(i,l,s,e.opacity)}function DC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function EC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hC(yC,JC,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xC,formatHex:xC,formatHsl:function(){return LC(this).formatHsl()},formatRgb:TC,toString:TC}),hC(YC,HC,bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FC,formatHex:FC,formatRgb:PC,toString:PC})),hC(DC,(function(e,t,n,r){return 1===arguments.length?LC(e):new DC(e,t,n,null==r?1:r)}),bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new YC(EC(e>=240?e-240:e+120,a,r),EC(e,a,r),EC(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var UC=function e(t){var n=function(e){return 1==(e=+e)?IC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):CC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=HC(e)).r,(t=HC(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=IC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function zC(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;ni&&(a=t.slice(i,a),s[l]?s[l]+=a:s[++l]=a),(n=n[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,c.push({i:l,x:fC(n,r)})),i=qC.lastIndex;return it?1:e>=t?0:NaN}function rI(e){let t=e,n=e;function r(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)<0?r=o+1:a=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>nI(e(t),n)}(e)),{left:r,center:function(e,n,a,o){null==a&&(a=0),null==o&&(o=e.length);const i=r(e,n,a,o-1);return i>a&&t(e[i-1],n)>-t(e[i],n)?i-1:i},right:function(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)>0?a=o:r=o+1}return r}}}const aI=rI(nI).right;rI((function(e){return null===e?NaN:+e})).center;var oI=[0,1];function iI(e){return e}function lI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function sI(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return at&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=s>2?cI:sI,a=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),l,s)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(l,i.map(e),fC)))(n)))},u.domain=function(e){return arguments.length?(i=Array.from(e,mC),g()):i.slice()},u.range=function(e){return arguments.length?(l=Array.from(e),g()):l.slice()},u.rangeRound=function(e){return l=Array.from(e),s=pC,g()},u.clamp=function(e){return arguments.length?(c=!!e||iI,g()):c!==iI},u.interpolate=function(e){return arguments.length?(s=e,g()):s},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,g()}}()(iI,iI)}function dI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mI,fI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pI(e){if(!(t=fI.exec(e)))throw new Error("invalid format: "+e);var t;return new CI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CI(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hI(e){return(e=II(Math.abs(e)))?e[1]:NaN}function bI(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}pI.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bI(100*e,t),r:bI,s:function(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(mI=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+II(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vI(e){return e}var ZI,AI,GI,SI=Array.prototype.map,BI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ZI=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?vI:(t=SI.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?vI:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(SI.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=pI(e)).fill,n=e.align,u=e.sign,d=e.symbol,m=e.zero,f=e.width,p=e.comma,C=e.precision,I=e.trim,h=e.type;"n"===h?(p=!0,h="g"):yI[h]||(void 0===C&&(C=12),I=!0,h="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===d?o:/[%p]/.test(h)?s:"",v=yI[h],Z=/[defgprs%]/.test(h);function A(e){var a,o,s,d=b,A=y;if("c"===h)A=v(e)+A,e="";else{var G=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:v(Math.abs(e),C),I&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),G&&0==+e&&"+"!==u&&(G=!1),d=(G?"("===u?u:c:"-"===u||"("===u?"":u)+d,A=("s"===h?BI[8+mI/3]:"")+A+(G&&"("===u?")":""),Z)for(a=-1,o=e.length;++a(s=e.charCodeAt(a))||s>57){A=(46===s?i+e.slice(a+1):e.slice(a))+A,e=e.slice(0,a);break}}p&&!m&&(e=r(e,1/0));var S=d.length+e.length+A.length,B=S>1)+d+e+A+B.slice(S);break;default:e=B+d+e+A}return l(e)}return C=void 0===C?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=u(((e=pI(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hI(t)/3))),a=Math.pow(10,-r),o=BI[8+r/3];return function(e){return n(a*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),AI=ZI.format,GI=ZI.formatPrefix;var VI=Math.sqrt(50),RI=Math.sqrt(10),wI=Math.sqrt(2);function kI(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=VI?10:o>=RI?5:o>=wI?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=VI?10:o>=RI?5:o>=wI?2:1)}function WI(e,t,n,r){var a,o,i,l,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=VI?a*=10:o>=RI?a*=5:o>=wI&&(a*=2),t0)return[e];if((r=t0){let n=Math.round(e/i),r=Math.round(t/i);for(n*it&&--r,o=new Array(a=r-n+1);++lt&&--r,o=new Array(a=r-n+1);++l0;){if((a=kI(s,c,n))===r)return o[i]=s,o[l]=c,t(o);if(a>0)s=Math.floor(s/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function TI(){var e=uI();return e.copy=function(){return gI(e,TI())},dI.apply(e,arguments),xI(e)}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XI(e){for(var t=1;ta,t.camera.getParallelProjection()||(Object(Fo.l)(LI,LI),i=Object(Fo.d)(LI,MI)>a)),i!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=i,n=!0)}return n},e.updatePolyData=function(e,n,r){var a=0,o=0;a+=8;for(var i=0,l=0;l<12;l++)n[l]>0&&i++;if(o+=i,t.gridLines)for(var s=0;s<6;s++)e[s]&&(a+=2*r[FI[s][0]].length+2*r[FI[s][1]].length,o+=r[FI[s][0]].length+r[FI[s][1]].length);for(var c=new Float64Array(3*a),g=new Uint32Array(3*o),u=0,d=0,m=0;m<2;m++)for(var f=0;f<2;f++)for(var p=0;p<2;p++)c[3*u]=t.dataBounds[p],c[3*u+1]=t.dataBounds[2+f],c[3*u+2]=t.dataBounds[4+m],u++;for(var C=0;C<12;C++)n[C]>0&&(g[3*d]=2,g[3*d+1]=HI[C][0],g[3*d+2]=HI[C][1],d++);if(t.gridLines)for(var I=0;I<6;I++)if(e[I]){for(var h=Math.floor(I/2),b=r[FI[I][0]],y=0;y.5?Object(Fo.b)(MI,DI,i[0]*l):Object(Fo.b)(MI,DI,i[0]*l-c.width/2),Object(Fo.g)(PI,PI,MI),Object(Fo.b)(MI,EI,i[1]*l-c.height/2),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[0],s.tcoords[2*m+1]=c.tcoords[1],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[2],s.tcoords[2*m+1]=c.tcoords[3],m++,Object(Fo.b)(MI,EI,c.height),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[4],s.tcoords[2*m+1]=c.tcoords[5],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.a)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[6],s.tcoords[2*m+1]=c.tcoords[7],m++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-3,s.polys[4*f+3]=m-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-2,s.polys[4*f+3]=m-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n);var r=t.textValues.length,a=4*r,o=2*r,i=new Float64Array(3*a),l=new Uint16Array(4*o),s=new Float32Array(2*a);Object(Yo.g)(UI,n);for(var c={ptIdx:0,cellIdx:0,polys:l,points:i,tcoords:s},g=0,u=0,d=0,m=t.textPolyData.getPoints().getData();g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jI(n)),aC.extend(e,t,n),t.lastSize=[800,800],t.lastAspectRatio=1,t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.mapper=Pu.newInstance(),t.polyData=Go.a.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,a,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=aC.newInstance(),t.pixelActor.setMapper(t.pixelMapper),ln.c.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),ln.c.setGetArray(e,t,["dataBounds"],6),ln.c.setGetArray(e,t,["axisLabels"],3),ln.c.get(e,t,["axisTextStyle","tickTextStyle","camera"]),_I(e,t)}var qI={newInstance:ln.c.newInstance(QI,"vtkCubeAxesActor"),extend:QI};function $I(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=function(e,n){var r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}var eh={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var th={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eh,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.setGetArray(e,t,["displayCenter"],2),ln.c.setGetArray(e,t,["center"],3),$I(e,t)}};function nh(e,t){t.classHierarchy.push("vtkCompositeMouseManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onButtonDown=function(e,t,n){},e.onButtonUp=function(e){},e.onMouseMove=function(e,t,n){},e.onStartScroll=function(e,t,n){},e.onScroll=function(e,t,n){},e.onEndScroll=function(e){},e.isDragEnabled=function(){return t.dragEnabled},e.isScrollEnabled=function(){return t.scrollEnabled}}var rh={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var ah={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rh,n),ln.c.setGet(e,t,["button","shift","control","alt"]),ln.c.set(e,t,["dragEnabled","scrollEnabled"]),nh(e,t)}};function oh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,c,g){if(g){var u=c.getActiveCamera(),d=u.getPosition(),m=u.getFocalPoint();Object(Yo.h)(o);var f=t.center,p=t.rotationFactor;Object(Yo.s)(o,o,f);var C=t.previousPosition.x-g.x,I=t.previousPosition.y-g.y,h=e.getView().getSize(),b=u.getViewUp();Object(Yo.q)(o,o,Object(Xo.B)(360*C/h[0]*p),b),Object(Xo.w)(u.getDirectionOfProjection(),b,i),Object(Yo.q)(o,o,Object(Xo.B)(-360*I/h[1]*p),i),l[0]=-f[0],l[1]=-f[1],l[2]=-f[2],Object(Yo.s)(o,o,l),Object(Fo.q)(n,d,o),Object(Fo.q)(r,m,o),s[0]=b[0]+d[0],s[1]=b[1]+d[1],s[2]=b[2]+d[2],Object(Fo.q)(a,s,o),u.setPosition(n[0],n[1],n[2]),u.setFocalPoint(r[0],r[1],r[2]),u.setViewUp(a[0]-n[0],a[1]-n[1],a[2]-n[2]),u.orthogonalizeViewUp(),c.resetCameraClippingRange(),e.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=g}}}var ih={};function lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ih,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),oh(e,t)}var sh={newInstance:ln.c.newInstance(lh,"vtkMouseCameraTrackballRotateManipulator"),extend:lh};function ch(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(c,g,u){if(u){var d=g.getActiveCamera(),m=d.getPosition(),f=d.getFocalPoint(),p=d.getViewUp();n[0]=f[0]-m[0],n[1]=f[1]-m[1],n[2]=f[2]-m[2],e.computeDisplayCenter(c.getInteractorStyle(),g);var C=t.previousPosition.x-t.displayCenter[0],I=u.x-t.displayCenter[0],h=t.previousPosition.y-t.displayCenter[1],b=u.y-t.displayCenter[1];if(!(0===I&&0===b||0===C&&0===h)){var y=Object(Xo.F)((C*b-h*I)/(Math.sqrt(C*C+h*h)*Math.sqrt(I*I+b*b))),v=t.center;Object(Yo.h)(o),a[0]=-v[0],a[1]=-v[1],a[2]=-v[2],Object(Yo.s)(o,o,v),Object(Yo.q)(o,o,Object(Xo.B)(y),n),Object(Yo.s)(o,o,a),Object(Fo.q)(i,m,o),Object(Fo.q)(l,f,o),r[0]=p[0]+m[0],r[1]=p[1]+m[1],r[2]=p[2]+m[2],Object(Fo.q)(s,r,o),d.setPosition(i[0],i[1],i[2]),d.setFocalPoint(l[0],l[1],l[2]),d.setViewUp(s[0]-i[0],s[1]-i[1],s[2]-i[2]),d.orthogonalizeViewUp(),g.resetCameraClippingRange(),c.getLightFollowCamera()&&g.updateLightsGeometryToFollowCamera(),t.previousPosition=u}}}}var gh={};function uh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),ch(e,t)}var dh={newInstance:ln.c.newInstance(uh,"vtkMouseCameraTrackballRollManipulator"),extend:uh};function mh(e){return e*e}function fh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=sh.newInstance(),r=dh.newInstance(),a=null;e.onButtonDown=function(t,o,i){var l,s,c=t.getView().getSize(),g=[.5*c[0],.5*c[1]],u=.9*((l=g[0])<(s=g[1])?s:l),d=mh(g[0]-i.x)+mh(g[1]-i.y);(a=u*u>d?n:r).setButton(e.getButton()),a.setShift(e.getShift()),a.setControl(e.getControl()),a.setCenter(e.getCenter()),a.onButtonDown(t,i)},e.onButtonUp=function(e){a&&a.onButtonUp(e)},e.onMouseMove=function(e,t,n){a&&a.onMouseMove(e,t,n)}}var ph={};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ph,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),fh(e,t)}var Ih={newInstance:ln.c.newInstance(Ch,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ch};function hh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var a=r,o=t.previousPosition;t.previousPosition=r;var i=n.getActiveCamera(),l=i.getPosition(),s=i.getFocalPoint();if(i.getParallelProjection()){i.orthogonalizeViewUp();var c=i.getViewUp(),g=i.getViewPlaneNormal(),u=[0,0,0];Object(Xo.w)(g,c,u);var d=e.getView().getSize()[1],m=(a.x-o.x)/d,f=(o.y-a.y)/d,p=i.getParallelScale();f*=2*p;var C=u[0]*(m*=2*p)+c[0]*f;l[0]+=C,s[0]+=C,C=u[1]*m+c[1]*f,l[1]+=C,s[1]+=C,C=u[2]*m+c[2]*f,l[2]+=C,s[2]+=C,i.setPosition(l[0],l[1],l[2]),i.setFocalPoint(s[0],s[1],s[2])}else{var I=t.center,h=e.getInteractorStyle(),b=h.computeWorldToDisplay(n,I[0],I[1],I[2])[2],y=h.computeDisplayToWorld(n,a.x,a.y,b),v=h.computeDisplayToWorld(n,o.x,o.y,b),Z=[l[0]+(v[0]-y[0]),l[1]+(v[1]-y[1]),l[2]+(v[2]-y[2])],A=[s[0]+(v[0]-y[0]),s[1]+(v[1]-y[1]),s[2]+(v[2]-y[2])];i.setPosition(Z[0],Z[1],Z[2]),i.setFocalPoint(A[0],A[1],A[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var bh={};function yh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),hh(e,t)}var vh={newInstance:ln.c.newInstance(yh,"vtkMouseCameraTrackballPanManipulator"),extend:yh};function Zh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var a=e.getView().getSize(),o=n.getActiveCamera(),i=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/a[1]*i;else{var l=o.getClippingRange();t.zoomScale=l[1]/a[1]*1.5*i}},e.onMouseMove=function(e,n,r){if(r){var a=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var i=a*t.zoomScale;o.setParallelScale((1-i)*o.getParallelScale())}else{var l=o.getPosition(),s=o.getFocalPoint(),c=o.getDirectionOfProjection(),g=a*t.zoomScale,u=g*c[0];l[0]+=u,s[0]+=u,u=g*c[1],l[1]+=u,s[1]+=u,u=g*c[2],l[2]+=u,s[2]+=u,o.getFreezeFocalPoint()||o.setFocalPoint(s[0],s[1],s[2]),o.setPosition(l[0],l[1],l[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),a=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/a):(r.dolly(a),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Ah={zoomScale:0,flipDirection:!1};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ah,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),ln.c.setGet(e,t,["flipDirection"]),Zh(e,t)}var Sh={newInstance:ln.c.newInstance(Gh,"vtkMouseCameraTrackballZoomManipulator"),extend:Gh};function Bh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,a){n(e,r,a),t.zoomPosition=a},e.onMouseMove=function(e,n,r){if(r){var a=(t.previousPosition.y-r.y)*t.zoomScale;Mp.dollyToPosition(1-a,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var a=1-.1*n;Mp.dollyToPosition(a,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Vh={zoomPosition:null};function Rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vh,n),Sh.extend(e,t,n),Bh(e,t)}var wh={newInstance:ln.c.newInstance(Rh,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Rh};function kh(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onStartPinch=function(e,t){},e.onStartRotate=function(e,t){},e.onStartPan=function(e,t){},e.onPinch=function(e,t,n){},e.onRotate=function(e,t,n){},e.onPan=function(e,t,n){},e.onEndPinch=function(e){},e.onEndRotate=function(e){},e.onEndPan=function(e){},e.isPinchEnabled=function(){return t.pinchEnabled},e.isPanEnabled=function(){return t.panEnabled},e.isRotateEnabled=function(){return t.rotateEnabled}}var Wh={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var xh={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wh,n),ln.c.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),ln.c.setGet(e,t,["interactorStyle"]),kh(e,t)}};function Th(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=function(e,n){t.previousScale=n},e.onStartRotate=function(e,n){t.previousRotation=n},e.onStartPan=function(e,n){t.previousTranslation=n},e.onPinch=function(e,n,r){Mp.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=function(e,n,r){var a=n.getActiveCamera(),o=e.getInteractorStyle(),i=a.getFocalPoint(),l=(i=o.computeWorldToDisplay(n,i[0],i[1],i[2]))[2],s=r,c=t.previousTranslation,g=o.computeDisplayToWorld(n,i[0]+s[0]-c[0],i[1]+s[1]-c[1],l),u=o.computeDisplayToWorld(n,i[0],i[1],l),d=[];d[0]=u[0]-g[0],d[1]=u[1]-g[1],d[2]=u[2]-g[2],i=a.getFocalPoint();var m=a.getPosition();a.setFocalPoint(d[0]+i[0],d[1]+i[1],d[2]+i[2]),a.setPosition(d[0]+m[0],d[1]+m[1],d[2]+m[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=function(e,n,r){var a=n.getActiveCamera();a.roll(r-t.previousRotation),a.orthogonalizeViewUp(),t.previousRotation=r}}var Jh={};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jh,n),ln.c.obj(e,t),xh.extend(e,t,n),th.extend(e,t,n),Th(e,t)}var Oh={newInstance:ln.c.newInstance(Xh,"vtkGestureCameraManipulator"),extend:Xh};function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh(n)),Object(ln.h)(e,t),ah.extend(e,t,n),Object(ln.d)(e,t,"BoxSelectChange"),Object(ln.d)(e,t,"BoxSelectInput"),Object(ln.j)(e,t,["renderSelection","selectionStyle"]),Ph(e,t)}var Lh={newInstance:Object(ln.g)(Mh,"vtkMouseBoxSelectionManipulator"),extend:Mh},Dh=n(38);function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uh(e){for(var t=1;t.001?Math.acos(n/o):0,l=i>.001?Math.atan2(a,r):0;t[0]=o,t[1]=i,t[2]=l}function db(e,t){if(e[0]>=t-.1)return e[2];var n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function mb(e,t,n,r){var a=[],o=[];Object(Xo.e)(t,a),Object(Xo.e)(n,o);var i=[],l=[];ub(a,i),ub(o,l);var s=e;if(i[1]>.05&&l[1]>.05&&function(e,t){var n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(i[2],l[2])>.33*Math.PI){var c=Math.max(i[0],l[0]);c=Math.max(88,c),e<.5?(l[0]=c,l[1]=0,l[2]=0,s*=2):(i[0]=c,i[1]=0,i[2]=0,s=2*s-1)}i[1]<.05&&l[1]>.05?i[2]=db(l,i[0]):l[1]<.05&&i[1]>.05&&(l[2]=db(i,l[0]));var g=[];g[0]=(1-s)*i[0]+s*l[0],g[1]=(1-s)*i[1]+s*l[1],g[2]=(1-s)*i[2]+s*l[2];var u=[];!function(e,t){var n=e[0],r=e[1],a=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(a),t[2]=n*Math.sin(r)*Math.sin(a)}(g,u),Object(Xo.f)(u,r)}function fb(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,a){return e.addRGBPointLong(t,n,r,a,.5,0)},e.addRGBPointLong=function(n,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i<0||i>1)return cb("Midpoint outside range [0.0, 1.0]"),-1;if(l<0||l>1)return cb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var s={x:n,r:r,g:a,b:o,midpoint:i,sharpness:l};t.nodes.push(s),e.sortAndUpdateRange();for(var c=0;c4&&void 0!==arguments[4]?arguments[4]:.5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=[],s=[n,r,a];return Object(Xo.u)(s,l),e.addRGBPoint(t,l[0],l[1],l[2],o,i)},e.setNodes=function(n){t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=function(){t.nodes.sort((function(e,t){return e.x-t.x})),e.updateRange()||e.modified()},e.updateRange=function(){var n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];var r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=function(n){for(var r=0;r=t.nodes.length)return-1;var o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var a=0;a=n&&t.nodes[g].x<=i?t.nodes.splice(g,1):g++;e.addRGBPointLong(n,r,a,o,.5,0),e.addRGBPointLong(i,l,s,c,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,a,o,i,l,s){var c=[i,l,s],g=[],u=[];Object(Xo.u)([n,r,a],g),Object(Xo.u)(c,u),e.addRGBSegment(t,g[0],g[1],g[2],o,u[0],u[1],u[2])},e.mapValue=function(t){var n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=function(n,r){if(t.indexedLookup){var a=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===a)e.getNanColor(r);else{var i=[];e.getNodeValue(o%a,i),r[0]=i.r,r[1]=i.g,r[2]=i.b}}else e.getTable(n,n,1,r)},e.getRedValue=function(t){var n=[];return e.getColor(t,n),n[0]},e.getGreenValue=function(t){var n=[];return e.getColor(t,n),n[1]},e.getBlueValue=function(t){var n=[];return e.getColor(t,n),n[2]},e.getTable=function(n,r,a,o){if(Object(Xo.v)(n)||Object(Xo.v)(r))for(var i=0;i0);var v=0,Z=0,A=0;y&&(v=Math.log10(n),Z=Math.log10(r));for(var G=0;G1?y?(A=v+G/(a-1)*(Z-v),d=Math.pow(10,A)):d=n+G/(a-1)*(r-n):y?(A=.5*(v+Z),d=Math.pow(10,A)):d=.5*(n+r),t.discretize){var B=t.mappingRange;if(d>=B[0]&&d<=B[1]){var V=t.numberOfValues,R=B[1]-B[0];if(V<=1)d=B[0]+R/2;else{var w=(d-B[0])/R,k=Object(Xo.g)(V*w);d=B[0]+k/(V-1)*R}}}for(;lt.nodes[l].x;)++l.99999&&(I=.99999));if(d>t.mappingRange[1])o[S]=0,o[S+1]=0,o[S+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[S]=t.aboveRangeColor[0],o[S+1]=t.aboveRangeColor[1],o[S+2]=t.aboveRangeColor[2]):(o[S]=c,o[S+1]=g,o[S+2]=u));else if(d0&&(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b));else if(0===l&&(Math.abs(d-n)<1e-6||t.discretize))s>0?(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b):(o[S]=0,o[S+1]=0,o[S+2]=0);else{var W=0;if(W=(W=y?(A-m)/(f-m):(d-m)/(f-m)).99){if(W<.5){o[S]=p[0],o[S+1]=p[1],o[S+2]=p[2];continue}o[S]=C[0],o[S+1]=C[1],o[S+2]=C[2];continue}if(h<.01){if(t.colorSpace===ob.RGB)o[S]=(1-W)*p[0]+W*C[0],o[S+1]=(1-W)*p[1]+W*C[1],o[S+2]=(1-W)*p[2]+W*C[2];else if(t.colorSpace===ob.HSV){var x=[],T=[];Object(Xo.d)(p,x),Object(Xo.d)(C,T),t.hSVWrap&&(x[0]-T[0]>.5||T[0]-x[0]>.5)&&(x[0]>T[0]?x[0]-=1:T[0]-=1);var J=[];J[0]=(1-W)*x[0]+W*T[0],J[0]<0&&(J[0]+=1),J[1]=(1-W)*x[1]+W*T[1],J[2]=(1-W)*x[2]+W*T[2],Object(Xo.u)(J,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var X=[],O=[];Object(Xo.e)(p,X),Object(Xo.e)(C,O);var N=[];N[0]=(1-W)*X[0]+W*O[0],N[1]=(1-W)*X[1]+W*O[1],N[2]=(1-W)*X[2]+W*O[2],Object(Xo.f)(N,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.",t.colorSpace);continue}W<.5?W=.5*Math.pow(2*W,1+10*h):W>.5&&(W=1-.5*Math.pow(2*(1-W),1+10*h));var H=W*W,Y=H*W,F=2*Y-3*H+1,P=-2*Y+3*H,K=Y-2*H+W,M=Y-H,L=void 0;if(t.colorSpace===ob.RGB)for(var D=0;D<3;D++)L=(1-h)*(C[D]-p[D]),o[S+D]=F*p[D]+P*C[D]+K*L+M*L;else if(t.colorSpace===ob.HSV){var E=[],U=[];Object(Xo.d)(p,E),Object(Xo.d)(C,U),t.hSVWrap&&(E[0]-U[0]>.5||U[0]-E[0]>.5)&&(E[0]>U[0]?E[0]-=1:U[0]-=1);for(var z=[],_=0;_<3;_++)L=(1-h)*(U[_]-E[_]),z[_]=F*E[_]+P*U[_]+K*L+M*L,0===_&&z[_]<0&&(z[_]+=1);Object(Xo.u)(z,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var j=[],Q=[];Object(Xo.e)(p,j),Object(Xo.e)(C,Q);for(var q=[],$=0;$<3;$++)L=(1-h)*(Q[$]-j[$]),q[$]=F*j[$]+P*Q[$]+K*L+M*L;Object(Xo.f)(q,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[S+ee]=o[S+ee]<0?0:o[S+ee],o[S+ee]=o[S+ee]>1?1:o[S+ee]}}}},e.getUint8Table=function(n,r,a){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return cb("Attempting to lookup a value with no points in the function"),t.table;var i=o?4:3;t.tableSize===a&&t.tableWithAlpha===o||(t.table=new Uint8Array(a*i),t.tableSize=a,t.tableWithAlpha=o);var l=[];e.getTable(n,r,a,l);for(var s=0;s1&&(i=(r-n)/(a-1));for(var l=0;l=t.nodes.length?(cb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){if(n<0||n>=t.nodes.length)return cb("Index out of range!"),-1;var a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=function(){return t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216},e.getIndexedColor=function(t,n){var r=e.getSize();if(r>0&&t>=0){var a=[];e.getNodeValue(t%r,a);for(var o=0;o<3;++o)n[o]=a[o+1];n[3]=1}else e.getNanColor(n),n[3]=1},e.fillFromDataPointer=function(t,n){if(!(t<=0)&&n){e.removeAllPoints();for(var r=0;rn[1]?(e.getColor(n[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])):(e.getColor(r[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])),e.sortAndUpdateRange();for(var o=0;o=n[0]&&t.nodes[o].x<=n[1]?t.nodes.splice(o,1):++o;return 1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){if(t.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pb,n),mu.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},ln.c.obj(t.buildTime),ln.c.get(e,t,["buildTime","mappingRange"]),ln.c.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),fb(e,t)}var Ib=function(e){for(var t=1;t0&&(n=t.nodes[0].y);for(var a=1;an)switch(r){case 0:case 1:r=1;break;default:case 2:r=3}else switch(r){case 0:case 2:r=2;break;default:case 1:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:case 3:return"Varied"}},e.getDataPointer=function(){var e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(var n=0;n0?t.nodes[n-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=function(e,n){var r=t.nodes.length;return e<0||e>=r?(hb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){var a=t.nodes.length;if(n<0||n>=a)return hb("Index out of range!"),-1;var o=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],o!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=function(t,n){return e.addPointLong(t,n,.5,0)},e.addPointLong=function(n,r,a,o){if(a<0||a>1)return hb("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return hb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var i,l={x:n,y:r,midpoint:a,sharpness:o};for(t.nodes.push(l),e.sortAndUpdateRange(),i=0;i=t.nodes.length)return-1;var a=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,a,o){e.sortAndUpdateRange();for(var i=0;i=n&&t.nodes[i].x<=a?t.nodes.splice(i,1):i++;e.addPoint(n,r,.5,0),e.addPoint(a,o,.5,0)},e.getValue=function(t){var n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=function(n){if(n.length<2)return 0;var r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(var a=0;a=n[0]&&t.nodes[a].x<=n[1]?t.nodes.splice(a,1):++a;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){var e=t.nodes.length;if(e<2)return-1;for(var n=t.nodes[1].x-t.nodes[0].x,r=0;r4&&void 0!==arguments[4]?arguments[4]:1,l=0,s=t.nodes.length,c=0;0!==s&&(c=t.nodes[s-1].y);var g=0,u=0,d=0,m=0,f=0,p=0,C=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);lt.nodes[l].x;)++l.99999&&(p=.99999));if(l>=s)a[I]=t.clamping?c:0;else if(0===l)a[I]=t.clamping?t.nodes[0].y:0;else{var h=(g-u)/(d-u);if(h=h.99){if(h<.5){a[I]=m;continue}a[I]=f;continue}if(C<.01){a[I]=(1-h)*m+h*f;continue}h<.5?h=.5*Math.pow(2*h,1+10*C):h>.5&&(h=1-.5*Math.pow(2*(1-h),1+10*C));var b=h*h,y=b*h,v=2*y-3*b+1,Z=-2*y+3*b,A=y-2*b+h,G=y-b,S=f-m,B=(1-C)*S;a[I]=v*m+Z*f+A*B+G*B;var V=mf?m:f;a[I]=a[I]R?R:a[I]}}}}var yb={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yb,n),ln.c.obj(e,t),t.nodes=[],ln.c.setGet(e,t,["allowDuplicateScalars","clamping"]),ln.c.setArray(e,t,["range"],2),ln.c.getArray(e,t,["range"]),bb(e,t)}var Zb={newInstance:ln.c.newInstance(vb,"vtkPiecewiseFunction"),extend:vb};function Ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Gb=Km.InterpolationType,Sb=Km.OpacityMode,Bb=ln.c.vtkErrorMacro;function Vb(e,t){t.classHierarchy.push("vtkVolumeProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(n=n>(e=t.componentData[r].grayTransferFunction.getMTime())?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].scalarOpacity&&(n=n>(e=t.componentData[r].scalarOpacity.getMTime())?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(n=n>(e=t.componentData[r].gradientOpacity.getMTime())?n:e));return n},e.getColorChannels=function(e){return e<0||e>3?(Bb("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var a=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,a=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,a=!0),a&&e.modified(),a},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Zb.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction},e.setRGBTransferFunction=function(n,r){var a=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,a=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,a=!0),a&&e.modified(),a},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=Ib.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction},e.setScalarOpacity=function(n,r){return t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0)},e.getScalarOpacity=function(n){return null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=Zb.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Bb("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Bb("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Gb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Gb.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(Gb.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Gb,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["set".concat(r)]=function(r,a){return t.componentData[r]["".concat(n)]!==a&&(t.componentData[r]["".concat(n)]=a,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var Rb={independentComponents:!0,interpolationType:Gb.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function wb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rb,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;++r)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:Sb.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),Vb(e,t)}var kb=function(e){for(var t=1;tr[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){Wb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e}}var Tb={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function Jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tb,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),xb(e,t)}var Xb={newInstance:ln.c.newInstance(Jb,"vtkVolume"),extend:Jb},Ob=Lm.BlendMode;function Nb(e,t){t.classHierarchy.push("vtkVolumeMapper"),e.getBounds=function(){var n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=Object(Xo.j)(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(Ob.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(Ob.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(Ob.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(Ob.AVERAGE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return ln.c.enumToString(Ob,t.blendMode)}}var Hb={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:Ob.COMPOSITE_BLEND,averageIPScalarRange:[-1e6,1e6]};function Yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),_g.extend(e,t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),ln.c.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),ln.c.setGetArray(e,t,["averageIPScalarRange"],2),ln.c.event(e,t,"lightingActivated"),Nb(e,t)}var Fb={newInstance:ln.c.newInstance(Yb,"vtkVolumeMapper"),extend:Yb},Pb=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Pb[e.Name]=e}));var Kb=Object.keys(Pb);Kb.sort();var Mb={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Pb[e.Name]||(Kb.push(e.Name),Kb.sort()),Pb[e.Name]=e)},removePresetByName:function(e){var t=Kb.indexOf(e);t>-1&&Kb.splice(t,1),delete Pb[e]},getPresetByName:function(e){return Pb[e]},rgbPresetNames:Kb};var Lb=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.volume=Xb.newInstance({visibility:!1}),t.mapper=Fb.newInstance(),t.volume.setMapper(t.mapper),t.volume.getProperty().setRGBTransferFunction(0,t.lookupTable),t.volume.getProperty().setScalarOpacity(0,t.piecewiseFunction),t.volume.getProperty().setInterpolationTypeToLinear(),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addVolume(e.volume),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&(this.view.renderer.removeVolume(this.volume),this.view=null),this.volume.delete(),this.volume=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.volume,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange;if(!r||t&&r===t.volume||this.volume.set(r),!a||t&&a===t.property||this.volume.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var s,c=Mb.getPresetByName(i);this.lookupTable.applyColorMap(c),(s=this.lookupTable).setMappingRange.apply(s,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?(console.log("from update"),this.dataChanged()):(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.volume.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.volume.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();Lb.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},Lb.propTypes={id:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Db=Lb,Eb=Id.InterpolationType,Ub=ln.c.vtkErrorMacro;function zb(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].piecewiseFunction&&(n=n>(e=t.componentData[r].piecewiseFunction.getMTime())?n:e);return n},e.setRGBTransferFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].rGBTransferFunction!==o&&(t.componentData[a].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].piecewiseFunction!==o&&(t.componentData[a].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=function(t,n){var r=t,a=n;return Number.isInteger(t)||(a=t,r=0),e.setPiecewiseFunction(r,a)},e.getScalarOpacity=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Ub("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Ub("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Eb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Eb.LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Eb,t.interpolationType)}}var _b={independentComponents:!1,interpolationType:Eb.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,_b,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),zb(e,t)}var Qb={newInstance:ln.c.newInstance(jb,"vtkImageProperty"),extend:jb},qb=ln.c.vtkDebugMacro;function $b(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=function(){return e},e.getImages=function(){return e},e.getIsOpaque=function(){if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=Qb.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n,r=t.mapper.getBounds();if(!r||6!==r.length)return r;if(r[0]>r[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){qb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,a=t.mapper.getBoundsForSlice(n,r);if(!a||6!==a.length)return a;if(a[0]>a[1])return a;var o=[];Ol.getCorners(a,o),e.computeMatrix();var i=new Float64Array(16);Object(Yo.i)(i,t.matrix),o.forEach((function(e){return Object(Fo.q)(e,e,i)}));var l=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return l.map((function(e,t){return t%2==0?o.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):o.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}if(null!==t.property){var r=t.property.getMTime();e=r>e?r:e,null!==t.property.getRGBTransferFunction()&&(e=(r=t.property.getRGBTransferFunction().getMTime())>e?r:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var ey={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ey,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),$b(e,t)}var ny={newInstance:ln.c.newInstance(ty,"vtkImageSlice"),extend:ty};function ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ay(e){for(var t=1;ti&&(i=g,s=r[c]<0,l=c)}if(1!==i){var u="IJKXYZ"[t.slicingMode],d="IJKXYZ"[l];ly("Unaccurate slicing along ".concat(u," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(i,"% aligned). ")+"Necessitates slice reformat that is not yet implemented. You can switch the slicing mode on your mapper to do IJK slicing instead.")}t.closestIJKAxis={ijkMode:l,flip:s}}function r(n,r){var a=e.getInputData(),o=a.getExtent(),i=[o[0],o[2],o[4]],l=e.getClosestIJKAxis().ijkMode,s=t.slice;l!==t.slicingMode&&(s=e.getSliceAtPosition(s)),i[l]+=s;var c=[0,0,0];a.indexToWorld(i,c),i[l]+=1;var g=[0,0,0];a.indexToWorld(i,g),g[0]-=c[0],g[1]-=c[1],g[2]-=c[2],Object(Fo.l)(g,g);var u=tl.a.intersectWithLine(n,r,c,g);if(u.intersection){var d=u.x,m=[0,0,0];return a.worldToIndex(d,m),{t:u.t,absoluteIJK:m}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,a=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=a.getBounds();switch(t.slicingMode){case sy.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case sy.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case sy.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var i=[0,0,0];a.worldToIndex(r,i);var l=a.getExtent(),s=0;switch(e.getClosestIJKAxis().ijkMode){case sy.I:s=Object(Xo.a)(i[0],l[0],l[1]),s=Math.round(s);break;case sy.J:s=Object(Xo.a)(i[1],l[2],l[3]),s=Math.round(s);break;case sy.K:s=Object(Xo.a)(i[2],l[4],l[5]),s=Math.round(s);break;default:return 0}return s},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case sy.I:case sy.J:case sy.K:var a=e.getSliceAtPosition(r);e.setSlice(a);break;case sy.X:e.setSlice(r[0]);break;case sy.Y:e.setSlice(r[1]);break;case sy.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(sy.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(sy.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(sy.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(sy.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(sy.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(sy.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),a=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case sy.X:n[0]=1;break;case sy.Y:n[1]=1;break;case sy.Z:n[2]=1;break;case sy.I:Object(Xo.k)(a,[1,0,0],n);break;case sy.J:Object(Xo.k)(a,[0,1,0],n);break;case sy.K:Object(Xo.k)(a,[0,0,1],n)}return n},e.setSlicingMode=function(r){t.slicingMode!==r&&(t.slicingMode=r,e.getInputData()&&n(),e.modified())},e.getClosestIJKAxis=function(){return void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==sy.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return Object(Xo.j)();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),a=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(a!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),a){case sy.I:r[0]=o,r[1]=o;break;case sy.J:r[2]=o,r[3]=o;break;case sy.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getInputData();if(!a)return Object(Xo.j)();var o=a.getExtent(),i=e.getClosestIJKAxis(),l=i.ijkMode,s=n;switch(l!==t.slicingMode&&(s=e.getSliceAtPosition(n)),l){case sy.I:o[0]=s-r,o[1]=s+r;break;case sy.J:o[2]=s-r,o[3]=s+r;break;case sy.K:o[4]=s-r,o[5]=s+r}return a.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=[Math.round(a.absoluteIJK[0]),Math.round(a.absoluteIJK[1]),Math.round(a.absoluteIJK[2])];return i[0]o[1]||i[1]o[3]||i[2]o[5]?null:{t:a.t,ijk:i}}return null},e.intersectWithLineForCellPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=a.absoluteIJK,l=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])];if(l[0]o[1]-1||l[1]o[3]-1||l[2]o[5]-1)return null;var s=[i[0]-l[0],i[1]-l[1],i[2]-l[2]];return{t:a.t,ijk:l,pCoords:s}}return null}}var gy={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:sy.NONE,closestIJKAxis:{ijkMode:sy.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gy,n),_g.extend(e,t,n),ln.c.get(e,t,["slicingMode"]),ln.c.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),ln.c.setGetArray(e,t,["customDisplayExtent"],4),Vu.implementCoincidentTopologyMethods(e,t),cy(e,t)}var dy=ay(ay(ay({newInstance:ln.c.newInstance(uy,"vtkImageMapper"),extend:uy},oy),iy),pd);var my=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.actor=ny.newInstance({visibility:!1}),t.mapper=dy.newInstance(),t.actor.setMapper(t.mapper),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addActor(e.actor),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&this.view.renderer.removeActor(this.actor),this.actor.delete(),this.actor=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.actor,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange,s=e.iSlice,c=e.jSlice,g=e.kSlice,u=e.xSlice,d=e.ySlice,m=e.zSlice;if(!r||t&&r===t.actor||this.actor.set(r),!a||t&&a===t.property||this.actor.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var f,p=Mb.getPresetByName(i);this.lookupTable.applyColorMap(p),(f=this.lookupTable).setMappingRange.apply(f,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?this.dataChanged():(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),!s||t&&s===t.iSlice||this.mapper.setISlice(s),!c||t&&c===t.jSlice||this.mapper.setJSlice(c),!g||t&&g===t.kSlice||this.mapper.setKSlice(g),!u||t&&u===t.xSlice||this.mapper.setXSlice(u),!d||t&&d===t.ySlice||this.mapper.setYSlice(d),!m||t&&m===t.zSlice||this.mapper.setZSlice(m),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.actor.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.actor.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();my.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},my.propTypes={id:Rs.a.string,mapper:Rs.a.object,actor:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),iSlice:Rs.a.number,jSlice:Rs.a.number,kSlice:Rs.a.number,xSlice:Rs.a.number,ySlice:Rs.a.number,zSlice:Rs.a.number,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var fy=my,py=Object.create(null);[{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){py[e.Name]=e}));var Cy=Object.keys(py);Cy.sort();var Iy={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(py[e.Name]||(Cy.push(e.Name),Cy.sort()),py[e.Name]=e)},removePresetByName:function(e){var t=Cy.indexOf(e);t>-1&&Cy.splice(t,1),delete py[e]},getPresetByName:function(e){return py[e]},rgbPresetNames:Cy},hy=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments[3];return new Promise((function(o,i){var l=n._messageId++;n._messages.set(l,[o,i,a]),n._worker.postMessage([l,t,e],r||[])}))}},{key:"postMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return new Promise((function(a,o){var i=t._messageId++;t._messages.set(i,[a,o,r]),t._worker.postMessage([i,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+l||uo+s?d===s?o:o+d/(d-s)*(u-o-s):-d===s?o:o-d/(d+s)*(u-o-s))-o)/d,f=Math.exp(-4*m*m),p=1-m*m,C=1,I=i*(c<1?c*p+(1-c)*f:(2-c)*p+(c-1)*C);I>n[g]&&(n[g]=I)}}return n}function Xy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},a=t[3],o=t[2]/(n.length-1),i=!!r.fillStyle,l=a+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var s=0;s3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function Ny(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,Object(Ao.a)(n));return n.indexOf(r)}function Hy(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,a=n.offsetY;t&&n.preventDefault(),e(r,a)}}function Yy(){xy.filter((function(e){return e.ready})).forEach((function(e){e.callbacks.forEach((function(t){t.touches===e.touches&&t.clicks===e.count&&t.action.apply(t,Object(Ao.a)(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(a){var o=a.target.getBoundingClientRect(),i=Array.prototype.map.call(a.touches,(function(e){return[e.pageX-o.left,e.pageY-o.top]})).reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]).map((function(e){return e/a.touches.length}));"touchstart"===a.type?(clearTimeout(xy[e].timeout),xy[e].ts=a.timeStamp,xy[e].singleTouche=i,xy[e].touches=a.touches.length):"touchmove"===a.type?(xy[e].ts=0,xy[e].count=0,xy[e].ready=!1):"touchend"===a.type&&(a.timeStamp-xy[e].ts1&&void 0!==arguments[1]?arguments[1]:{},o=r.numberOfBinToConsiders,i=void 0===o?1:o,l=r.numberOfBinsToSkip,s=void 0===l?1:l,c=r.numberOfComponents,g=void 0===c?1:c,u=r.component,d=void 0===u?0:u;t.histogram=null,t.histogramArray=n,t.dataRange=Object(Xo.b)(n,d,g);var m=Object(a.a)(t.dataRange,2),f=m[0],p=m[1],C=4,I=Math.floor(n.length/C)||1;I+=I%g;for(var h=0,b=[],y=[];hr;)a.shift();for(var l=a.reduce((function(e,t){return e+t}),0)/r,c=0,g=t.histogram.length;c1){for(var c=t.style.iconSize+t.style.padding,g=c,u=0;r>g;)u+=1,g+=c;switch(u){case 0:var d=e.addGaussian(0,1,.1,0,0),m=t.gaussians[d],f=ky({},m),p=Ty.adjustPosition;t.activeGaussian=d,t.selectedGaussian=d,ln.c.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:p,gaussian:m,originalGaussian:f}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(l<0||l>1||s<0||s>1)t.selectedGaussian=-1,t.dragAction=null;else{var C=Ny(l,t.gaussians);C!==t.selectedGaussian&&(t.selectedGaussian=C,e.modified())}return!0},e.onHover=function(n,r){var o=20/t.canvas.height,i=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),l=Object(a.a)(i,2),s=l[0],c=l[1],g=Oy(n,r,t.graphArea),u=Object(a.a)(g,1)[0],d=s<0?t.selectedGaussian:Ny(s,t.gaussians);t.canvas.style.cursor="default";var m=t.gaussians[d];if(t.enableRangeZoom&&u>=0&&rt.rangeZoom[1]-f?t.canvas.style.cursor=Wy.adjustZoom:t.canvas.style.cursor=Wy.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:Ty.adjustZoom}}else if(m&&u>=0){var p,C=1-c;p=C>m.height+o?"adjustPosition":C>m.height-o?Math.abs(s-m.position).5*m.height+o?"adjustPosition":C>.5*m.height-o?Math.abs(s-m.position)o?"adjustPosition":"adjustWidth",t.canvas.style.cursor=Wy[p];var I=Ty[p],h=ky({},m);t.dragAction={originalXY:[s,c],action:I,gaussian:m,originalGaussian:h}}return d!==t.activeGaussian&&(t.activeGaussian=d,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);t.gaussianSide=0;var i=t.gaussians[o];return i&&(t.gaussianSide=i.position-a),o!==t.selectedGaussian&&a>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];(0,t.dragAction.action)(l,s,ky({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=Jy(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=function(n,r){return t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0},e.onLeave=function(n,r){return e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0},e.onAddGaussian=function(n,r){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];return l>=0&&e.addGaussian(l,1-s,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);return a>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=xy.length,t=arguments.length,n=new Array(t),r=0;r1){var c=Math.round(t.style.iconSize/2-t.style.strokeWidth),g=Math.round(c+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(g-i/2,g,c,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g),e.stroke(),e.moveTo(g-i/2,g-c+t.style.strokeWidth+2),e.lineTo(g-i/2,g+c-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(g-i/2,g+i/2+t.style.iconSize,c,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g+i/2+t.style.iconSize),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&Xy(e,l,Ky(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),Xy(e,l,Ky(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var u=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){var a=r||document.createElement("canvas");a.setAttribute("width",t),a.setAttribute("height",256);for(var o=a.getContext("2d"),i=e.getUint8Table(n[0],n[1],t,4),l=o.getImageData(0,0,t,256),s=0;s<256;s++)l.data.set(i,4*s*t);for(var c=256*t*4,g=4*t,u=3;u0&&(a=Math.min(a,i)),t.opacities[i]>0&&(o=Math.max(o,i));return[n[0]+a*r,n[0]+o*r]};var n=e.setEnableRangeZoom;e.setEnableRangeZoom=function(e){var r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};var r=e.setRangeZoom;e.setRangeZoom=function(){var e=r.apply(void 0,arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((function(){return e.render()})),e.setSize.apply(e,Object(Ao.a)(t.size))}var Dy={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),ln.c.obj(e,t),ln.c.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),ln.c.setGetArray(e,t,["rangeZoom"],2),ln.c.get(e,t,["size","canvas","gaussians"]),ln.c.event(e,t,"opacityChange"),ln.c.event(e,t,"animation"),ln.c.event(e,t,"zoomChange"),Ly(e,t)}var Uy=ky({newInstance:ln.c.newInstance(Ey,"vtkPiecewiseGaussianWidget"),extend:Ey},My),zy='',_y='',jy='';var Qy={container:"VolumeController-module_container__2HNSO",line:"VolumeController-module_line__3rtqL",button:"VolumeController-module_button__2T-xL",sliderEntry:"VolumeController-module_sliderEntry__27XSC",sliderIcon:"VolumeController-module_sliderIcon__U8YAZ VolumeController-module_button__2T-xL",slider:"VolumeController-module_slider__3PS68",piecewiseEditor:"VolumeController-module_piecewiseEditor__2_jav",select:"VolumeController-module_select__7mbfS",presets:"VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadow:"VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonDarkBG:"VolumeController-module_buttonDarkBG__3W1zO VolumeController-module_button__2T-xL",presetsDarkBG:"VolumeController-module_presetsDarkBG__2ZI2W VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowDarkBG:"VolumeController-module_shadowDarkBG__WHYZ- VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonBrightBG:"VolumeController-module_buttonBrightBG__2dstz VolumeController-module_button__2T-xL",presetsBrightBG:"VolumeController-module_presetsBrightBG__3_VRC VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowBrightBG:"VolumeController-module_shadowBrightBG__YCHpe VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".VolumeController-module_container__2HNSO {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n justify-content: space-between;\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(128, 128, 128, 0.5);\n border-radius: 5px;\n padding: 2px;\n border: 0.5px solid black;\n box-sizing: border-box;\n}\n\n.VolumeController-module_line__3rtqL {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.VolumeController-module_button__2T-xL {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module_button__2T-xL svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module_sliderEntry__27XSC {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module_sliderIcon__U8YAZ {\n height: 1rem;\n}\n\n.VolumeController-module_slider__3PS68 {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module_piecewiseEditor__2_jav {\n flex: 1;\n}\n\n.VolumeController-module_select__7mbfS {\n flex: 1;\n border: none;\n background: transparent;\n color: white;\n border: none;\n -moz-appearance: none;\n width: 5px;\n}\n\n.VolumeController-module_select__7mbfS select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module_presets__1h4j5 {\n}\n\n.VolumeController-module_shadow__29K9t {\n}\n\n.VolumeController-module_buttonDarkBG__3W1zO {\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W {\n color: white;\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W option {\n color: black;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- {\n color: white;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- option {\n color: black;\n}\n\n.VolumeController-module_buttonBrightBG__2dstz {\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC {\n color: black;\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC option {\n color: white;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe {\n color: black;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe option {\n color: white;\n}\n");var qy=Iy.rgbPresetNames.map((function(e){return'")}));function $y(e,t){function n(){var e=!!Number(t.el.querySelector(".js-shadow").value);t.actor.getProperty().setShade(e),t.renderWindow.render()}function r(){var e=t.actor.getMapper().getInputData();if(e){var n=e.getPointData().getScalars()||e.getPointData().getArrays()[0],r=t.rescaleColorMap?t.colorDataRange:n.getRange(),a=Iy.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(a),o.setMappingRange.apply(o,Object(Ao.a)(r)),o.updateRange(),t.renderWindow.render()}}function a(){var e=Number(t.el.querySelector(".js-spacing").value),n=t.actor.getMapper().getInputData(),r=.7*Math.sqrt(n.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.actor.getMapper().setSampleDistance(r*Math.pow(2,3*e-1.5)),t.renderWindow.render()}function o(){var e=Number(t.el.querySelector(".js-edge").value);if(0===e)t.actor.getProperty().setUseGradientOpacity(0,!1);else{var n=t.actor.getMapper().getInputData(),r=(n.getPointData().getScalars()||n.getPointData().getArrays()[0]).getRange();t.actor.getProperty().setUseGradientOpacity(0,!0);var a=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*a*a),t.actor.getProperty().setGradientOpacityMaximumValue(0,1*(r[1]-r[0])*e*e)}t.renderWindow.render()}t.classHierarchy.push("vtkVolumeController"),t.el=document.createElement("div"),t.el.setAttribute("class",Qy.container),t.widget=Uy.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(i,l,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(l),e.setRenderWindow(i);var u=t.actor.getMapper().getInputData(),d=u.getPointData().getScalars()||u.getPointData().getArrays()[0],m=t.actor.getProperty().getRGBTransferFunction(0),f=t.actor.getProperty().getScalarOpacity(0),p=s?"DarkBG":"BrightBG",C={};["button","presets","shadow"].forEach((function(e){C[e]=Qy["".concat(e).concat(p)]})),t.el.innerHTML='\n
\n
').concat(zy,'
\n \n \n
\n
\n
\n
').concat(jy,'
\n \n
\n
\n
').concat(_y,'
\n \n
\n
\n
\n ');var I=t.el.querySelector(".js-button"),h=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),y=t.el.querySelector(".js-spacing"),v=t.el.querySelector(".js-edge"),Z=t.el.querySelector(".js-pwf");t.widget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),t.widget.addGaussian(.5,1,.5,.5,.4),t.widget.setDataArray(d.getData()),t.widget.setColorTransferFunction(m),t.widget.applyOpacity(f),t.widget.setContainer(Z),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),I.addEventListener("click",e.toggleVisibility),h.addEventListener("change",n),b.addEventListener("change",r),y.addEventListener("input",a),v.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(f),t.colorDataRange=t.widget.getOpacityRange(),t.rescaleColorMap&&r(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),t.widget.onAnimation((function(e){e?t.renderWindow.getInteractor().requestAnimation(t.widget):(t.renderWindow.getInteractor().cancelAnimation(t.widget),t.renderWindow.render())})),m.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),h.value=Number(c)?"1":"0",b.value=g,n(),r(),a(),o()},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.el),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.el),e.modified())};var i=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!i(e)&&(r(),!0)},e.toggleVisibility=function(){e.setExpanded(!e.getExpanded())},e.setExpanded=function(e){var n=t.el.querySelectorAll(".js-toggle"),r=n.length;if(t.expanded=e,t.expanded)for(;r--;)n[r].style.display="flex";else for(;r--;)n[r].style.display="none"},e.getExpanded=function(){return t.expanded},e.setSize=t.widget.setSize,e.render=t.widget.render,e.onAnimation=t.widget.onAnimation,e.onModified(e.render),e.setSize.apply(e,Object(Ao.a)(t.size))}var ev={size:[600,300],expanded:!0,rescaleColorMap:!1};function tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ev,n),ln.c.obj(e,t),ln.c.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),ln.c.get(e,t,["widget"]),$y(e,t)}var nv={newInstance:ln.c.newInstance(tv,"vtkVolumeController"),extend:tv};var rv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;ps(this,n),(r=t.call(this,e)).subscriptions=[],r.containerRef=Bs.a.createRef();var a=e.size,o=e.rescaleColorMap;return r.controller=nv.newInstance({size:a,rescaleColorMap:o}),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return Bs.a.createElement(_h.Consumer,null,(function(n){return e.view=t,e.representation=n,Bs.a.createElement("div",{ref:e.containerRef})}))}))}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t,n){var r;(r=this.controller).setSize.apply(r,fs(this.props.size)),this.controller.render()}},{key:"componentWillUnmount",value:function(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.controller.setContainer(null),this.controller.delete(),this.controller=null}},{key:"init",value:function(){var e=this,t=this.containerRef.current,n=this.view,r=n.renderWindow,a=n.props,o=this.representation.volume,i=a.background[0]+a.background[1]+a.background[2]<1.5;if(o&&o.getMapper()&&o.getMapper().getInputData()){var l=o.getMapper().getInputData();this.controller.setContainer(t),this.controller.setupContent(r,o,i),this.controller.render(),this.view.resetCamera(),this.view.renderView(),this.subscriptions.push(l.onModified((function(){return e.onDataChange()}),-1))}else setTimeout((function(){return e.init()}),100)}},{key:"onDataChange",value:function(){var e=this.controller.getWidget();if(this.representation&&this.representation.volume){var t=this.representation.volume.getMapper().getInputData(),n=t.getPointData().getScalars()||t.getPointData().getArrays()[0];e.setDataArray(n.getData())}}}]),n}();rv.defaultProps={size:[400,150],rescaleColorMap:!0},rv.propTypes={id:Rs.a.string,size:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool};var av=rv;function ov(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getPointData()},e.children)}))}ov.defaultProps={},ov.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var iv=ov,lv={int32:Int32Array,int16:Int16Array,int8:Int8Array,uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array,float32:Float32Array,float64:Float64Array};function sv(e,t){if(!e)return null;if(Array.isArray(e))return t.from(e);if(e.dtype){var n=e.bvals,r=e.dtype,a=Ki.toArrayBuffer(n);return new lv[r](a)}return e}var cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).polydata=Go.a.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(jh.Provider,{value:e},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.polydata.delete(),this.polydata=null}},{key:"update",value:function(e,t){var n=e.connectivity,r=e.points,a=e.verts,o=e.lines,i=e.polys,l=e.strips,s=!1,c=r&&r.length>196608?Uint32Array:Uint16Array;if(!r||t&&r===t.points||(this.polydata.getPoints().setData(sv(r,Float64Array),3),s=!0),!a||t&&a===t.verts||(this.polydata.getVerts().setData(sv(a,c)),s=!0),!o||t&&o===t.lines||(this.polydata.getLines().setData(sv(o,c)),s=!0),!i||t&&i===t.polys||(this.polydata.getPolys().setData(sv(i,c)),s=!0),!l||t&&l===t.strips||(this.polydata.getStrips().setData(sv(l,c)),s=!0),n&&(n||!t||n!==t.connectivity)){var g=r.length/3;switch(n){case"points":var u=new Uint32Array(g+1);u[0]=g;for(var d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.event(e,t,"DataAvailable"),mv(e,t)}),"vtkTrivialProducer"),pv={},Cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(){return ps(this,n),t.apply(this,arguments)}return Is(n,[{key:"getTrivialProducer",value:function(){var e=pv[this.props.name];return e||(e=fv(),pv[this.props.name]=e),e}},{key:"render",value:function(){var e=this;return this.update(),Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.getTrivialProducer()},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}))}},{key:"update",value:function(){var e=this;this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.subscription=this.getTrivialProducer().onDataAvailable((function(){e.dataAvailable()}))}},{key:"dataAvailable",value:function(){this.downstream&&this.downstream.setInputConnection(this.getTrivialProducer().getOutputPort(),this.props.port),this.validData||(this.validData=!0,this.getTrivialProducer().invokeDataAvailable()),this.representation&&this.representation.dataAvailable()}},{key:"dataChanged",value:function(){this.representation&&this.representation.dataChanged()}}]),n}();Cv.defaultProps={port:0,name:"shared"},Cv.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Iv=Cv;function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*a,10):t.tickTextStyle.fontSize=Math.max(16*a,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var i=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var l=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];i+.4*l>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=i+.4*l,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=i+1.4*l,t.boxPosition=[.99-t.boxSize[0],-.92]),t.boxSize[1]=Math.max(1.2,Math.min(1.84/r,1.84))}else{t.axisTitlePixelOffset=2*t.tickTextStyle.fontSize,t.tickLabelPixelOffset=.5*t.tickTextStyle.fontSize;var s=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],c=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],g=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*g*(t.ticks.length+3))),t.boxSize[1]=s+c,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)},e.update=function(){if(t.scalarsToColors&&t.visibility){if(t.barMapper.setLookupTable(t.scalarsToColors),t.forceUpdate||Math.max(t.scalarsToColors.getMTime(),e.getMTime())>t.lastRebuildTime.getMTime()){var n=t.scalarsToColors.getMappingRange();t.lastTickBounds=Object(Ao.a)(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=TI().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var a=r.tickFormat(5);if(t.tickStrings=t.ticks.map(a),t.automated)e.computeAndApplyAutomatedSettings();else{var o=e.updateTextureAtlas();e.recomputeBarSegments(o)}t.forceViewUpdate=!0,t.lastRebuildTime.modified(),t.forceUpdate=!1}(t.forceViewUpdate||t.camera.getMTime()>t.lastRedrawTime.getMTime())&&(e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRedrawTime.modified(),t.forceViewUpdate=!1)}},e.completedImage=function(r){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,n=t.nextAtlas,t.nextAtlas=null,r&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,a=0,o=1;Rv(t.tmContext,t.axisTextStyle);var i=t.tmContext.measureText(t.axisLabel),l={height:i.actualBoundingBoxAscent+2,startingHeight:o,width:i.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,l),o+=l.height,a=l.width,n.titleWidth=l.width,n.titleHeight=l.height,n.tickWidth=0,n.tickHeight=0,Rv(t.tmContext,t.tickTextStyle);for(var s=[].concat(Object(Ao.a)(t.tickStrings),["NaN","Below","Above"]),c=0;ct.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var a=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){var o=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-a,t.barSize[1]=t.boxSize[1]-o}else{var i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-i-a,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+a,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var l=(2*e.tickWidth-8)/t.lastSize[0],s=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-s-n,t.barPosition[1]=t.boxPosition[1],r[0]=l}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var a=[0,0],o=t.vertical?1:0,i=t.vertical?.01:.02;function l(e,n){t.barSegments.push({corners:[[].concat(a),[a[0]+r[0],a[1]],[a[0]+r[0],a[1]+r[1]],[a[0],a[1]+r[1]]],scalars:n,title:e}),a[o]+=r[o]+i}"function"==typeof t.scalarsToColors.getNanColor&&l("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&l("Below",[-.1,-.1,-.1,-.1]);var s="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();a[o]+=i;var c=r[o];r[o]=s?1-2*i-r[o]-a[o]:1-i-a[o],l("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),s&&(r[o]=c,a[o]+=i,l("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,t,r,a,o,i,l){var s=n.get(e);if(s){var c=l.ptIdx,g=l.cellIdx;vv[0]=t[0],vv[1]=t[1],vv[2]=t[2],o[0]<-.5?Object(Fo.b)(Av,r,o[0]*i-s.width):o[0]>.5?Object(Fo.b)(Av,r,o[0]*i):Object(Fo.b)(Av,r,o[0]*i-s.width/2),Object(Fo.g)(vv,vv,Av),Object(Fo.b)(Av,a,o[1]*i-s.height/2),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[0],l.tcoords[2*c+1]=s.tcoords[1],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[2],l.tcoords[2*c+1]=s.tcoords[3],c++,Object(Fo.b)(Av,a,s.height),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[4],l.tcoords[2*c+1]=s.tcoords[5],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.a)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[6],l.tcoords[2*c+1]=s.tcoords[7],c++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-3,l.polys[4*g+3]=c-2,g++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-2,l.polys[4*g+3]=c-1,l.ptIdx+=4,l.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n),Object(Yo.g)(Vv,n);var r=t.lastSize;Av[0]=0,Av[1]=0,Av[2]=-.99,Object(Fo.q)(vv,Av,Vv),Av[0]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Sv,Zv,vv),Av[0]-=.1,Av[1]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Bv,Zv,vv);for(var a=0;a<3;a++)Sv[a]/=.05*r[0],Bv[a]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,i=4*o,l=2*o,s=new Float64Array(3*i),c=new Uint16Array(4*l),g=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:c,points:s,tcoords:g},d=t.vertical?0:1,m=t.vertical?1:0,f=[0,1];t.vertical?(t.topTitle?(Av[0]=t.boxPosition[0]+.5*t.boxSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,[0,1],t.axisTitlePixelOffset,u)):(Av[0]=t.barPosition[0]+t.barSize[0],Av[1]=t.barPosition[1]+.5*t.barSize[1],Object(Fo.q)(vv,Av,Vv),Object(Fo.b)(Sv,Sv,-1),e.createPolyDataForOneLabel(t.axisLabel,vv,Bv,Sv,[0,-1],t.axisTitlePixelOffset,u),Object(Fo.b)(Sv,Sv,-1)),f=[-1,0]):(Av[0]=t.barPosition[0]+.5*t.barSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,f,t.axisTitlePixelOffset,u)),Gv[2]=-.99,Gv[d]=t.barPosition[d]+(.5*f[d]+.5)*t.barSize[d],Gv[m]=t.barPosition[m]+.5*t.barSize[m];for(var p=null,C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kv(n)),aC.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=Pu.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=Go.a.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=aC.newInstance(),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},ln.c.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},ln.c.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmActor.setProperty(e.getProperty()),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.mapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,a,o,i){t.camera=r,t.lastSize[0]===i[0]&&t.lastSize[1]===i[1]||(t.lastSize[0]=i[0],t.lastSize[1]=i[1],t.lastAspectRatio=i[0]/i[1],t.forceUpdate=!0),e.update()})),ln.c.setGet(e,t,["automated","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),ln.c.get(e,t,["axisTextStyle","tickTextStyle"]),ln.c.getArray(e,t,["boxPosition","boxSize"]),ln.c.setArray(e,t,["boxPosition","boxSize"],2),wv(e,t)}var xv={newInstance:ln.c.newInstance(Wv,"vtkScalarBarActor"),extend:Wv};var Tv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).validData=!1,r.currentVisibility=!0,r.actor=aC.newInstance({visibility:!1,representationId:e.id}),r.lookupTable=Ib.newInstance(),r.mapper=Pu.newInstance({lookupTable:r.lookupTable,useLookupTableScalarRange:!0}),r.actor.setMapper(r.mapper),r.cubeAxes=qI.newInstance({visibility:!1,dataBounds:[-1,1,-1,1,-1,1]}),r.cubeAxes.getActors().forEach((function(e){return(0,e.setVisibility)(!1)})),r.scalarBar=xv.newInstance(),r.scalarBar.setScalarsToColors(r.lookupTable),r.scalarBar.setVisibility(!1),r.subscriptions=[],r.subscriptions.push(r.mapper.onModified((function e(){if(r.mapper.getInputData()){1===r.subscriptions.length&&r.subscriptions.push(r.mapper.getInputData().onModified(e));var t=r.mapper.getInputData().getBounds();t[0]t.bounds[1]&&(t.bounds[1]=g[0]),g[1]>t.bounds[3]&&(t.bounds[3]=g[1]),g[2]>t.bounds[5]&&(t.bounds[5]=g[2]);var R=new Float32Array(I,36*b,9);Dl(R,y),zl(R,R),Ul(R,R)}var w=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),t.colorArray=null;var k=e.getLookupTable();k&&w&&(k.build(),t.colorArray=k.mapScalars(w,t.colorMode,0)),t.buildTime.modified()}},e.getPrimitiveCount=function(){var t=e.getInputData(1),n=e.getInputData().getPoints().getNumberOfValues()/3;return{points:n*t.getPoints().getNumberOfValues()/3,verts:n*(t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells()),lines:n*(t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells()),triangles:n*(t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells())}}}var Pv={orient:!0,orientationMode:Nv.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:Hv.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function Kv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pv,n),Pu.extend(e,t,n),ln.c.algo(e,t,2,0),t.buildTime={},ln.c.obj(t.buildTime,{mtime:0}),t.boundsTime={},ln.c.obj(t.boundsTime,{mtime:0}),ln.c.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),ln.c.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),Fv(e,t)}var Mv=function(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};return{getArrays:function(){return{input:e.augmentInputArrays(t,n.map((function(e){return{location:t,name:e}}))),output:[{location:t,name:r,attribute:"outputAttributeType"in o?o.outputAttributeType:ti.a.SCALARS,numberOfComponents:"numberOfOutputComponents"in o?o.numberOfOutputComponents:1}]}},evaluate:function(e,t){var n=new Array(e.length),r=e.map((function(e,t){var r=e.getNumberOfComponents(),a=e.getData();return 1===r?function(e){return a[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],i=o.getData(),l=o.getNumberOfComponents(),s=new Array(l);if(1===l)i.forEach((function(e,t){i[t]=a.apply(void 0,Object(Ao.a)(r.map((function(e){return e(t)}))).concat([t,s]))}));else for(var c=o.getNumberOfTuples(),g=function(e){s=a.apply(void 0,Object(Ao.a)(r.map((function(t){return t(e)}))).concat([e,s])),o.setTuple(e,s)},u=0;u4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,a,o))},e.prepareArrays=function(e,t,n){var r=[],a=[];return e.input.forEach((function(e){if(e.location===Dh.b.COORDINATE)r.push(t.getPoints());else{var n=[[Dh.b.UNIFORM,function(e){return e.getFieldData()}],[Dh.b.POINT,function(e){return e.getPointData()}],[Dh.b.CELL,function(e){return e.getCellData()}],[Dh.b.VERTEX,function(e){return e.getVertexData()}],[Dh.b.EDGE,function(e){return e.getEdgeData()}],[Dh.b.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),a="location"in e&&e.location in n?n[e.location](t):null;a?e.name?r.push(a.getArrayByName(e.name)):"index"in e?r.push(a.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Dh.b.UNIFORM?r.push(a.getActiveAttribute(e.attribute)):(rZ('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rZ('Specifier "'.concat(JSON.stringify(e),'" did not provide a usable location.')),r.push(null))}})),e.output.forEach((function(e){var r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),aZ(e,t)}var lZ={newInstance:ln.c.newInstance(iZ,"vtkCalculator"),extend:iZ};var sZ=Nl.a.FieldDataTypes,cZ=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).calculator=lZ.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.arrays,a=t.location,o=t.formula;return this.calculator.setFormulaSimple(sZ[a],r,n,o),Bs.a.createElement(qh.Consumer,null,(function(t){return e.downstream||(t.setInputConnection(e.calculator.getOutputPort(),e.props.port),e.downstream=t),Bs.a.createElement(qh.Provider,{value:e.calculator},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}},{key:"componentWillUnmount",value:function(){this.calculator.delete(),this.calculator=null}}]),n}();cZ.defaultProps={port:0,name:"scalars",location:"POINT",arrays:[],formula:function(e){return e[0]}},cZ.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,location:Rs.a.string,arrays:Rs.a.arrayOf(Rs.a.string),formula:Rs.a.func,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var gZ=cZ;function uZ(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getCellData()},e.children)}))}uZ.defaultProps={},uZ.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var dZ={VolumeRepresentation:Db,SliceRepresentation:fy,VolumeController:av,PointData:iv,PolyData:gv,Reader:dv,ShareDataSet:Iv,View:nb,GeometryRepresentation:Jv,GlyphRepresentation:Dv,ImageData:Uv,DataArray:_v,FieldData:Qv,Algorithm:tZ,Calculator:gZ,CellData:uZ};function mZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r="Float32Array"),console.log("nbComponents",t),Bs.a.createElement(Jv,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,showCubeAxes:e.showCubeAxes,cubeAxesStyle:e.cubeAxesStyle,showScalarBar:e.showScalarBar,scalarBarTitle:e.scalarBarTitle,scalarBarStyle:e.scalarBarStyle},Bs.a.createElement(gv,{points:e.xyz,connectivity:"points"},t&&Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}mZ.defaultProps={xyz:[0,0,0],colorMapPreset:"erdc_rainbow_bright",colorDataRange:[0,1],showCubeAxes:!1,showScalarBar:!1,scalarBarTitle:""},mZ.propTypes={id:Rs.a.string,xyz:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),colorMapPreset:Rs.a.string,colorDataRange:Rs.a.arrayOf(Rs.a.number),property:Rs.a.object,showCubeAxes:Rs.a.bool,cubeAxesStyle:Rs.a.object,showScalarBar:Rs.a.bool,scalarBarTitle:Rs.a.string,scalarBarStyle:Rs.a.object};var fZ=mZ;function pZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r=e.scalarsType),Bs.a.createElement(Db,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,mapper:e.mapper,volume:e.volume},e.volumeController&&Bs.a.createElement(av,{rescaleColorMap:e.rescaleColorMap,size:e.controllerSize}),Bs.a.createElement(Uv,{dimensions:e.dimensions,origin:e.origin,spacing:e.spacing},Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}pZ.defaultProps={scalarsType:"Float32Array",colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto",volumeController:!0,rescaleColorMap:!0,controllerSize:[400,150]},pZ.propTypes={id:Rs.a.string,dimensions:Rs.a.arrayOf(Rs.a.number),spacing:Rs.a.arrayOf(Rs.a.number),origin:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),scalarsType:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,volumeController:Rs.a.bool,controllerSize:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string])};var CZ={PointCloudRepresentation:fZ,VolumeDataRepresentation:pZ},IZ=dZ.VolumeRepresentation,hZ=dZ.SliceRepresentation,bZ=dZ.VolumeController,yZ=dZ.PointData,vZ=dZ.PolyData,ZZ=dZ.Reader,AZ=dZ.ShareDataSet,GZ=dZ.View,SZ=dZ.GeometryRepresentation,BZ=dZ.GlyphRepresentation,VZ=dZ.ImageData,RZ=dZ.DataArray,wZ=dZ.FieldData,kZ=dZ.Algorithm,WZ=dZ.Calculator,xZ=dZ.CellData,TZ=CZ.PointCloudRepresentation,JZ=CZ.VolumeDataRepresentation,XZ={ViewContext:zh,RepresentationContext:_h,DataSetContext:jh,FieldsContext:Qh,DownstreamContext:qh},OZ={Core:dZ,Representations:CZ,Contexts:XZ};t.default=r}]]); +(window.webpackJsonpdash_vtk=window.webpackJsonpdash_vtk||[]).push([[0],[,,,function(e,t,n){"use strict";(function(e){var t=n(43),r=n(47),a=n(26),o=n(9);Object(o.c)("/$$rollup_base$$/node_modules/readable-stream/lib/_stream_duplex.js",(function(n,o){var i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};n.exports=d;var l=t.a,s=r.a;Object(a.a)(d,l);for(var c=i(s.prototype),g=0;g0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(t);var n=[];function r(e){n[e]=null}function a(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++g),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?C("instance deleted - cannot call any method"):r&&r0&&void 0!==arguments[0]?arguments[0]:0;return t.classHierarchy[t.classHierarchy.length-1-e]},e.set=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(l){var s=a?null:e["set".concat(y(l))];s&&Array.isArray(n[l])&&s.length>1?o=s.apply(void 0,Object(i.a)(n[l]))||o:s?o=s(n[l])||o:(-1!==["mtime"].indexOf(l)||r||I("Warning: Set value to model directly ".concat(l,", ").concat(n[l])),t[l]=n[l],o=!0)})),o},e.get=function(){for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]&&arguments[1];if(n.getClassName()!==e.getClassName())throw new Error("Cannot ShallowCopy ".concat(n.getClassName()," into ").concat(e.getClassName()));var a=n.get(),o=Object.keys(t).sort(),i=Object.keys(a).sort();i.forEach((function(e){var n=o.indexOf(e);-1===n?r&&p("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=a[e]})),o.length&&r&&p("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function B(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["get".concat(y(n.name))]=function(){return t[n.name]}:e["get".concat(y(n))]=function(){return t[n]}}))}var V={enum:function(e,t,n){return function(r){if("string"==typeof r){if(void 0!==n.enum[r])return t[n.name]!==n.enum[r]&&(t[n.name]=n.enum[r],e.modified(),!0);throw C("Set Enum with invalid argument ".concat(n,", ").concat(r)),new RangeError("Set Enum with invalid string argument")}if("number"==typeof r){if(t[n.name]!==r){if(-1!==Object.keys(n.enum).map((function(e){return n.enum[e]})).indexOf(r))return t[n.name]=r,e.modified(),!0;throw C("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw C("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function R(e){if("object"===Object(a.a)(e)){var t=V[e.type];if(t)return function(n,r){return t(n,r,e)};throw C("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(C("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function w(e,t,n){n.forEach((function(n){"object"===Object(a.a)(n)?e["set".concat(y(n.name))]=R(n)(e,t):e["set".concat(y(n))]=R(n)(e,t)}))}function k(e,t,n){B(e,t,n),w(e,t,n)}function W(e,t,n){n.forEach((function(n){e["get".concat(y(n))]=function(){return[].concat(t[n])},e["get".concat(y(n),"ByReference")]=function(){return t[n]}}))}function x(e,t,n,r){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(y(n))]=function(){if(t.deleted)return C("instance deleted - cannot call any method"),!1;for(var o=arguments.length,i=new Array(o),l=0;l4&&void 0!==arguments[4]?arguments[4]:void 0;W(e,t,n),x(e,t,n,r,a)}var J=Symbol("Event abort");function X(e,t,n){var a=[],o=e.delete,i=1;function l(e){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return C("instance deleted - cannot call any method"),null;var o=i++;return a.push([o,e,r]),a.sort((function(e,t){return t[2]-e[2]})),s(o)},e.delete=function(){o(),a.forEach((function(e){return l(Object(r.a)(e,1)[0])}))}}function O(e,t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r={};return e(r,n,t),Object.freeze(r)};return t&&l.a.register(t,n),n}function N(e){return e&&e.isA&&e.isA("vtkObject")}function H(e,t,n){var r,a=this;return function(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:{};t.keystore=Object.assign(t.keystore||{},n),e.setKey=function(e,n){t.keystore[e]=n},e.getKey=function(e){return t.keystore[e]},e.getAllKeys=function(){return Object.keys(t.keystore)},e.deleteKey=function(e){return delete t.keystore[e]},e.clearKeystore=function(){return e.getAllKeys().forEach((function(e){return delete t.keystore[e]}))}}var F=1;var P={algo:function(e,t,n,r){function a(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?C("instance deleted - cannot call any method"):r>=t.numberOfInputs?C("algorithm ".concat(e.getClassName()," only has ").concat(t.numberOfInputs," input ports. To add more input ports, use addInputData()")):(t.inputData[r]!==n||t.inputConnection[r])&&(t.inputData[r]=n,t.inputConnection[r]=null,e.modified&&e.modified())}function o(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t.deleted)C("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var a="algorithm ".concat(e.getClassName()," only has ");return a+="".concat(t.numberOfInputs),void C(a+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function i(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(C("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(l.a):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(l.a):t.inputConnection=[],t.output?t.output=t.output.map(l.a):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(l.a):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),a=r,o=1/0;a--;){if(!t.output[a])return!0;var i=t.output[a].getMTime();if(io)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=a,e.setInputConnection=o,e.addInputData=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,a(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?C("instance deleted - cannot call any method"):(t.numberOfInputs++,o(e,t.numberOfInputs-1))},e.getInputData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]&&(t.inputData[e]=t.inputConnection[e]()),t.inputData[e]},e.getInputConnection=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.inputConnection[e]}}r&&(e.getOutputData=i,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return i(t)};return n.filter=e,n}),e.update=function(){var n=[];if(t.numberOfInputs)for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:"Scalars";t.inputArrayToProcess.length1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],a=Number(e),o="B";a>n;)a/=n,o=r.pop();return"".concat(a.toFixed(t)," ").concat(o)},formatNumbersWithThousandSeparator:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ",n=[],r=e;r>1e3;)n.push("000".concat(r%1e3).slice(-3)),r=Math.floor(r/1e3);return r>0&&n.push(r),n.reverse(),n.join(t)},get:B,getArray:W,getCurrentGlobalMTime:function(){return g},getStateArrayMapFunc:A,isVtkObject:N,keystore:Y,newInstance:O,normalizeWheel:function(e){var t=0,n=0,r=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||a)&&e.deltaMode&&(1===e.deltaMode?(r*=40,a*=40):(r*=800,a*=800)),r&&!t&&(t=r<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:a}},obj:S,proxy:function(e,t){Y(e,t);var n=e.delete;t.proxyId="".concat(F++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),B(e,t,["proxyId","proxyGroup","proxyName"]),k(e,t,["proxyManager"]);var r={},a={};function i(e,t){a[t]||(a[t]=[]);for(var n=a[t],o=0;o0&&void 0!==arguments[0]?arguments[0]:"__root__";return a[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__root__",r=[],a=t.proxyId,o=l(n)||[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,a=[],i=0,l=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(l)return null;var c=[],g=null;for(i=a.length;i--;){var u=a[i];u.instance===n?g=u:c.push(u)}if(!g)return null;var d=g.instance["get".concat(y(g.propertyName))]();if(!Z(d,r)||s){for(r=d,l=!0;c.length;){var m=c.pop();m.instance.set(Object(o.a)({},m.propertyName,r))}l=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function c(e,t){var n=[];for(i=a.length;i--;){var r=a[i];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(i))}for(;n.length;)a.splice(n.pop(),1)}function g(n,r){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=n.onModified(s),g=a[0];return a.push({instance:n,propertyName:r,subscription:l}),i&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(Object(o.a)({},r,t.propertyLinkMap[e].value)):g&&s(g.instance,!0)),{unsubscribe:function(){return c(n,r)}}}function u(){for(;a.length;)a.pop().subscription.unsubscribe()}var d={bind:g,unbind:c,unsubscribe:u,persistent:n};return t.propertyLinkMap[e]=d,d},e.listPropertyNames=function(){return s().map((function(e){return e.name}))},e.getPropertyByName=function(e){return s().find((function(t){return t.name===e}))},e.getPropertyDomainByName=function(e){return(r[e]||{}).domain},e.getProxySection=function(){return{id:t.proxyId,name:t.proxyGroup,ui:t.ui,properties:s()}},e.delete=function(){for(var r=Object.keys(t.propertyLinkMap),a=r.length;a--;)t.propertyLinkMap[r[a]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},G((function(){if(t.links)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function a(e){for(var n=Object.keys(e),r=n.length;r--;){var a=n[r];t[a].set(e[a])}}t.this=e;for(var o=Object.keys(r),i=o.length,l=function(){var l=o[i];t[l]=r[l];var s=n[l];e["set".concat(y(l))]=function(n){n!==t[l]&&(t[l]=n,a(s[n]),e.modified())}};i--;)l();o.length&&B(e,t,o)},safeArrays:v,set:w,setArray:x,setGet:k,setGetArray:T,setImmediate:G,setLoggerFunction:function(e,t){f[e]&&(f[e]=t||m)},throttle:function(e,t){var n=!1,r=null;function a(){n=!1,null!==r&&(o.apply(void 0,Object(i.a)(r)),r=null)}function o(){for(var o=arguments.length,i=new Array(o),l=0;l2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(N(t)){if(a.indexOf(t)>=0)return r;a.push(t);var o=n(t);void 0!==o&&r.push(o);var i=t.get();Object.keys(i).forEach((function(t){var o=i[t];Array.isArray(o)?o.forEach((function(t){e(t,n,r,a)})):e(o,n,r,a)}))}return r},TYPED_ARRAYS:b,uncapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},VOID:u,vtkDebugMacro:p,vtkErrorMacro:C,vtkInfoMacro:function(){f.info.apply(f,arguments)},vtkLogMacro:function(){f.log.apply(f,arguments)},vtkOnceErrorMacro:function(e){h[e]||(f.error(e),h[e]=!0)},vtkWarningMacro:I};t.c=P}).call(this,n(20))},function(e,t,n){"use strict";t.a=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return X})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return N})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return k})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return y})),n.d(t,"j",(function(){return Y})),n.d(t,"k",(function(){return Z})),n.d(t,"l",(function(){return T})),n.d(t,"m",(function(){return u})),n.d(t,"n",(function(){return A})),n.d(t,"o",(function(){return S})),n.d(t,"p",(function(){return J})),n.d(t,"q",(function(){return p})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return b})),n.d(t,"t",(function(){return f})),n.d(t,"u",(function(){return w})),n.d(t,"v",(function(){return H})),n.d(t,"w",(function(){return C})),n.d(t,"x",(function(){return m})),n.d(t,"y",(function(){return h})),n.d(t,"z",(function(){return v})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return i})),n.d(t,"C",(function(){return V})),n.d(t,"D",(function(){return x})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return l}));var r=n(14),a=(n(3),n(53),n(4).c.vtkWarningMacro);function o(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=[];t.length1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,a=-1/0,o=t,i=e.length;o0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t-e;return e+n*Math.random()}function m(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function f(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function p(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){var r=e[1]*t[2]-e[2]*t[1],a=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=a,n[2]=o,n}function I(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;switch(t){case 1:return Math.abs(e);case 2:return Math.sqrt(e[0]*e[0]+e[1]*e[1]);case 3:return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);default:for(var n=0,r=0;r2&&void 0!==arguments[2]?arguments[2]:1e-6;if(e.length!==t.length)return!1;function r(e,r){return Math.abs(e-t[r])<=n}return e.every(r)};function G(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!"".concat(e).includes("e"))return+"".concat(Math.round("".concat(e,"e+").concat(t)),"e-").concat(t);var n="".concat(e).split("e"),r="";return+n[1]+t>0&&(r="+"),+"".concat(Math.round("".concat(+n[0],"e").concat(r).concat(+n[1]+t)),"e-").concat(t)}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=G(e[0],n),t[1]=G(e[1],n),t[2]=G(e[2],n),t}function B(e,t,n){var r,i,l,s,c,g,u,d=0,m=o(n);for(r=0;rs&&(s=u);if(0===s)return a("Unable to factor linear system"),0;m[r]=1/s}for(i=0;i=s&&(s=g,d=r)}if(i!==d){for(l=0;l=0)for(o=i;o<=a-1;o++)s-=e[a][o]*n[o];else 0!==s&&(i=a);n[a]=s}for(a=r-1;a>=0;a--){for(s=n[a],o=a+1;oc?c=l:lc?c=s:s0?(c-g)/c:0)>0?(n=i===c?1/6*(l-s)/(c-g):l===c?1/3+1/6*(s-i)/(c-g):2/3+1/6*(i-l)/(c-g))<0&&(n+=1):n=0,t[0]=n,t[1]=a,t[2]=u}function w(e,t){var n,a,o,i=Object(r.a)(e,3),l=i[0],s=i[1],c=i[2],g=1/3,u=1/6,d=2/3;l>u&&l<=g?(a=1,n=(g-l)/u,o=0):l>g&&l<=.5?(a=1,o=(l-g)/u,n=0):l>.5&&l<=d?(o=1,a=(d-l)/u,n=0):l>d&&l<=5/6?(o=1,n=(l-d)/u,a=0):l>5/6&&l<=1?(n=1,o=(1-l)/u,a=0):(n=1,a=l/u,o=0),n=s*n+(1-s),a=s*a+(1-s),o=s*o+(1-s),n*=c,a*=c,o*=c,t[0]=n,t[1]=a,t[2]=o}function k(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2];a>.04045?a=Math.pow((a+.055)/1.055,2.4):a/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,t[0]=.4124*a+.3576*o+.1805*i,t[1]=.2126*a+.7152*o+.0722*i,t[2]=.0193*a+.1192*o+.9505*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0]/.9505,o=n[1]/1,i=n[2]/1.089;a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,t[0]=116*o-16,t[1]=500*(a-o),t[2]=200*(o-i)}(n,t)}function W(e,t){var n=[0,0,0];(function(e,t){var n=Object(r.a)(e,3),a=(n[0]+16)/116,o=n[1]/500+a,i=a-n[2]/200;a=Math.pow(a,3)>.008856?Math.pow(a,3):(a-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,t[0]=.9505*o,t[1]=1*a,t[2]=1.089*i})(e,n),function(e,t){var n=Object(r.a)(e,3),a=n[0],o=n[1],i=n[2],l=3.2406*a+-1.5372*o+-.4986*i,s=-.9689*a+1.8758*o+.0415*i,c=.0557*a+-.204*o+1.057*i;l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,c>.0031308?c=1.055*Math.pow(c,1/2.4)-.055:c*=12.92;var g=l;g1&&(l/=g,s/=g,c/=g),l<0&&(l=0),s<0&&(s=0),c<0&&(c=0),t[0]=l,t[1]=s,t[2]=c}(n,t)}function x(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function T(e){return!(e[1]-e[0]<0)}function J(e,t,n){n[0]=Math.min(e[0],t[0]),n[1]=Math.max(e[0],t[0]),n[2]=Math.min(e[1],t[1]),n[3]=Math.max(e[1],t[1]),n[4]=Math.min(e[2],t[2]),n[5]=Math.max(e[2],t[2])}function X(e,t,n){return en?n:e}function O(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=X(e[0],t[0],n[0]),r[1]=X(e[1],t[1],n[1]),r[2]=X(e[2],t[2],n[2]),r}var N=function(e){return!Number.isFinite(e)},H=Number.isNaN;function Y(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(15)),o=n(4),i=n(6);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;ta&&(e=a),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=u(),a=e.length,o=0;if(t<0&&n>1){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function f(e){return Object.prototype.toString.call(e).slice(8,-1)}var p={computeRange:d,createRangeHelper:u,getDataType:f,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=a)}return n}};function C(e,t){function n(){t.ranges=null,e.modified()}t.classHierarchy.push("vtkDataArray"),e.getElementComponentSize=function(){return t.values.BYTES_PER_ELEMENT},e.getComponent=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.values[e*t.numberOfComponents+n]},e.setComponent=function(e,r,a){a!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=a,n())},e.getData=function(){return t.values},e.getRange=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=e<0?t.numberOfComponents:e,r=null;return t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=d(t.values,e,t.numberOfComponents),t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple)},e.setRange=function(e,n){t.ranges||(t.ranges=m(t.ranges,t.numberOfComponents));var r={min:e.min,max:e.max};return t.ranges[n]=r,t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple},e.setTuple=function(e,n){for(var r=e*t.numberOfComponents,a=0;a1&&void 0!==arguments[1]?arguments[1]:g,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var a=e*r;if(1===r)n[0]=t.values[a];else if(2===r)n[0]=t.values[a],n[1]=t.values[a+1];else if(3===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2];else if(4===r)n[0]=t.values[a],n[1]=t.values[a+1],n[2]=t.values[a+2],n[3]=t.values[a+3];else for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:1;return e*t.numberOfComponents},e.getNumberOfComponents=function(){return t.numberOfComponents},e.getNumberOfValues=function(){return t.values.length},e.getNumberOfTuples=function(){return t.values.length/t.numberOfComponents},e.getDataType=function(){return t.dataType},e.newClone=function(){return b({empty:!0,name:t.name,dataType:t.dataType,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkDataArray".concat(e.getMTime())),t.name},e.setData=function(e,r){t.values=e,t.size=e.length,t.dataType=f(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=s(s({},t),{},{vtkClass:e.getClassName()});n.values=Array.from(n.values),delete n.buffer,Object.keys(n).forEach((function(e){n[e]||delete n[e]}));var r={};return Object.keys(n).sort().forEach((function(e){r[e]=n[e]})),r.mtime&&delete r.mtime,r}}var I={name:"",numberOfComponents:1,size:0,dataType:c,rangeTuple:[0,0]};function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,I,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkDataArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=window[t.dataType].from(t.values)):t.values=new window[t.dataType](t.size),t.values&&(t.size=t.values.length,t.dataType=f(t.values)),Object(o.h)(e,t),Object(o.i)(e,t,["name","numberOfComponents"]),C(e,t)}var b=Object(o.g)(h,"vtkDataArray"),y=s(s({newInstance:b,extend:h},p),a.c);t.a=y},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return p})),n.d(t,"f",(function(){return C})),n.d(t,"g",(function(){return l})),n.d(t,"h",(function(){return o})),n.d(t,"i",(function(){return i})),n.d(t,"j",(function(){return v})),n.d(t,"k",(function(){return A})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return Z})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return V})),n.d(t,"q",(function(){return u})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return c}));var r=n(24);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function i(e,t){if(e===t){var n=t[1],r=t[2],a=t[3],o=t[6],i=t[7],l=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=a,e[13]=i,e[14]=l}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function l(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=t[4],l=t[5],s=t[6],c=t[7],g=t[8],u=t[9],d=t[10],m=t[11],f=t[12],p=t[13],C=t[14],I=t[15],h=n*l-r*i,b=n*s-a*i,y=n*c-o*i,v=r*s-a*l,Z=r*c-o*l,A=a*c-o*s,G=g*p-u*f,S=g*C-d*f,B=g*I-m*f,V=u*C-d*p,R=u*I-m*p,w=d*I-m*C,k=h*w-b*R+y*V+v*B-Z*S+A*G;return k?(k=1/k,e[0]=(l*w-s*R+c*V)*k,e[1]=(a*R-r*w-o*V)*k,e[2]=(p*A-C*Z+I*v)*k,e[3]=(d*Z-u*A-m*v)*k,e[4]=(s*B-i*w-c*S)*k,e[5]=(n*w-a*B+o*S)*k,e[6]=(C*y-f*A-I*b)*k,e[7]=(g*A-d*y+m*b)*k,e[8]=(i*R-l*B+c*G)*k,e[9]=(r*B-n*R-o*G)*k,e[10]=(f*Z-p*y+I*h)*k,e[11]=(u*y-g*Z-m*h)*k,e[12]=(l*S-i*V-s*G)*k,e[13]=(n*V-r*S+a*G)*k,e[14]=(p*b-f*v-C*h)*k,e[15]=(g*v-u*b+d*h)*k,e):null}function s(e,t,n){var r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],p=t[12],C=t[13],I=t[14],h=t[15],b=n[0],y=n[1],v=n[2],Z=n[3];return e[0]=b*r+y*l+v*u+Z*p,e[1]=b*a+y*s+v*d+Z*C,e[2]=b*o+y*c+v*m+Z*I,e[3]=b*i+y*g+v*f+Z*h,b=n[4],y=n[5],v=n[6],Z=n[7],e[4]=b*r+y*l+v*u+Z*p,e[5]=b*a+y*s+v*d+Z*C,e[6]=b*o+y*c+v*m+Z*I,e[7]=b*i+y*g+v*f+Z*h,b=n[8],y=n[9],v=n[10],Z=n[11],e[8]=b*r+y*l+v*u+Z*p,e[9]=b*a+y*s+v*d+Z*C,e[10]=b*o+y*c+v*m+Z*I,e[11]=b*i+y*g+v*f+Z*h,b=n[12],y=n[13],v=n[14],Z=n[15],e[12]=b*r+y*l+v*u+Z*p,e[13]=b*a+y*s+v*d+Z*C,e[14]=b*o+y*c+v*m+Z*I,e[15]=b*i+y*g+v*f+Z*h,e}function c(e,t,n){var r,a,o,i,l,s,c,g,u,d,m,f,p=n[0],C=n[1],I=n[2];return t===e?(e[12]=t[0]*p+t[4]*C+t[8]*I+t[12],e[13]=t[1]*p+t[5]*C+t[9]*I+t[13],e[14]=t[2]*p+t[6]*C+t[10]*I+t[14],e[15]=t[3]*p+t[7]*C+t[11]*I+t[15]):(r=t[0],a=t[1],o=t[2],i=t[3],l=t[4],s=t[5],c=t[6],g=t[7],u=t[8],d=t[9],m=t[10],f=t[11],e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=s,e[6]=c,e[7]=g,e[8]=u,e[9]=d,e[10]=m,e[11]=f,e[12]=r*p+l*C+u*I+t[12],e[13]=a*p+s*C+d*I+t[13],e[14]=o*p+c*C+m*I+t[14],e[15]=i*p+g*C+f*I+t[15]),e}function g(e,t,n){var r=n[0],a=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function u(e,t,n,a){var o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B,V,R,w=a[0],k=a[1],W=a[2],x=Math.hypot(w,k,W);return x0?(I=2*Math.sqrt(C+1),e[3]=.25*I,e[0]=(d-f)/I,e[1]=(m-c)/I,e[2]=(s-g)/I):l>u&&l>p?(I=2*Math.sqrt(1+l-u-p),e[3]=(d-f)/I,e[0]=.25*I,e[1]=(s+g)/I,e[2]=(m+c)/I):u>p?(I=2*Math.sqrt(1+u-l-p),e[3]=(m-c)/I,e[0]=(s+g)/I,e[1]=.25*I,e[2]=(d+f)/I):(I=2*Math.sqrt(1+p-l-u),e[3]=(s-g)/I,e[0]=(m+c)/I,e[1]=(d+f)/I,e[2]=.25*I),e}function y(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=t[3],s=a+a,c=o+o,g=i+i,u=a*s,d=a*c,m=a*g,f=o*c,p=o*g,C=i*g,I=l*s,h=l*c,b=l*g,y=r[0],v=r[1],Z=r[2];return e[0]=(1-(f+C))*y,e[1]=(d+b)*y,e[2]=(m-h)*y,e[3]=0,e[4]=(d-b)*v,e[5]=(1-(u+C))*v,e[6]=(p+I)*v,e[7]=0,e[8]=(m+h)*Z,e[9]=(p-I)*Z,e[10]=(1-(u+f))*Z,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function v(e,t){var n=t[0],r=t[1],a=t[2],o=t[3],i=n+n,l=r+r,s=a+a,c=n*i,g=r*i,u=r*l,d=a*i,m=a*l,f=a*s,p=o*i,C=o*l,I=o*s;return e[0]=1-u-f,e[1]=g+I,e[2]=d-C,e[3]=0,e[4]=g-I,e[5]=1-c-f,e[6]=m+p,e[7]=0,e[8]=d+C,e[9]=m-p,e[10]=1-c-u,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Z(e,t,n,r,a,o,i){var l=1/(t-n),s=1/(r-a),c=1/(o-i);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+n)*l,e[13]=(a+r)*s,e[14]=(i+o)*c,e[15]=1,e}function A(e,t,n,a){var i,l,s,c,g,u,d,m,f,p,C=t[0],I=t[1],h=t[2],b=a[0],y=a[1],v=a[2],Z=n[0],A=n[1],G=n[2];return Math.abs(C-Z)0?(n[0]=2*(s*l+u*a+c*i-g*o)/d,n[1]=2*(c*l+u*o+g*a-s*i)/d,n[2]=2*(g*l+u*i+s*o-c*a)/d):(n[0]=2*(s*l+u*a+c*i-g*o),n[1]=2*(c*l+u*o+g*a-s*i),n[2]=2*(g*l+u*i+s*o-c*a)),I(e,t,n),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:h,getRotation:b,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(e,t,n,r,a){var o=t[0],i=t[1],l=t[2],s=t[3],c=o+o,g=i+i,u=l+l,d=o*c,m=o*g,f=o*u,p=i*g,C=i*u,I=l*u,h=s*c,b=s*g,y=s*u,v=r[0],Z=r[1],A=r[2],G=a[0],S=a[1],B=a[2],V=(1-(p+I))*v,R=(m+y)*v,w=(f-b)*v,k=(m-y)*Z,W=(1-(d+I))*Z,x=(C+h)*Z,T=(f+b)*A,J=(C-h)*A,X=(1-(d+p))*A;return e[0]=V,e[1]=R,e[2]=w,e[3]=0,e[4]=k,e[5]=W,e[6]=x,e[7]=0,e[8]=T,e[9]=J,e[10]=X,e[11]=0,e[12]=n[0]+G-(V*G+k*S+T*B),e[13]=n[1]+S-(R*G+W*S+J*B),e[14]=n[2]+B-(w*G+x*S+X*B),e[15]=1,e},fromQuat:v,frustum:function(e,t,n,r,a,o,i){var l=1/(n-t),s=1/(a-r),c=1/(o-i);return e[0]=2*o*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*s,e[6]=0,e[7]=0,e[8]=(n+t)*l,e[9]=(a+r)*s,e[10]=(i+o)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=i*o*2*c,e[15]=0,e},perspective:function(e,t,n,r,a){var o,i=1/Math.tan(t/2);return e[0]=i/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=a&&a!==1/0?(o=1/(r-a),e[10]=(a+r)*o,e[14]=2*a*r*o):(e[10]=-1,e[14]=-2*r),e},perspectiveFromFieldOfView:function(e,t,n,r){var a=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),i=Math.tan(t.leftDegrees*Math.PI/180),l=Math.tan(t.rightDegrees*Math.PI/180),s=2/(i+l),c=2/(a+o);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(i-l)*s*.5,e[9]=(a-o)*c*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},ortho:Z,lookAt:A,targetTo:function(e,t,n,r){var a=t[0],o=t[1],i=t[2],l=r[0],s=r[1],c=r[2],g=a-n[0],u=o-n[1],d=i-n[2],m=g*g+u*u+d*d;m>0&&(g*=m=1/Math.sqrt(m),u*=m,d*=m);var f=s*d-c*u,p=c*g-l*d,C=l*u-s*g;return(m=f*f+p*p+C*C)>0&&(f*=m=1/Math.sqrt(m),p*=m,C*=m),e[0]=f,e[1]=p,e[2]=C,e[3]=0,e[4]=u*C-d*p,e[5]=d*f-g*C,e[6]=g*p-u*f,e[7]=0,e[8]=g,e[9]=u,e[10]=d,e[11]=0,e[12]=a,e[13]=o,e[14]=i,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},subtract:G,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var n=e[0],a=e[1],o=e[2],i=e[3],l=e[4],s=e[5],c=e[6],g=e[7],u=e[8],d=e[9],m=e[10],f=e[11],p=e[12],C=e[13],I=e[14],h=e[15],b=t[0],y=t[1],v=t[2],Z=t[3],A=t[4],G=t[5],S=t[6],B=t[7],V=t[8],R=t[9],w=t[10],k=t[11],W=t[12],x=t[13],T=t[14],J=t[15];return Math.abs(n-b)<=r.b*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-y)<=r.b*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(o-v)<=r.b*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(i-Z)<=r.b*Math.max(1,Math.abs(i),Math.abs(Z))&&Math.abs(l-A)<=r.b*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(s-G)<=r.b*Math.max(1,Math.abs(s),Math.abs(G))&&Math.abs(c-S)<=r.b*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(g-B)<=r.b*Math.max(1,Math.abs(g),Math.abs(B))&&Math.abs(u-V)<=r.b*Math.max(1,Math.abs(u),Math.abs(V))&&Math.abs(d-R)<=r.b*Math.max(1,Math.abs(d),Math.abs(R))&&Math.abs(m-w)<=r.b*Math.max(1,Math.abs(m),Math.abs(w))&&Math.abs(f-k)<=r.b*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-W)<=r.b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(C-x)<=r.b*Math.max(1,Math.abs(C),Math.abs(x))&&Math.abs(I-T)<=r.b*Math.max(1,Math.abs(I),Math.abs(T))&&Math.abs(h-J)<=r.b*Math.max(1,Math.abs(h),Math.abs(J))},mul:S,sub:B})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return a}));var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return p(e,null==t?n.path:t)}},n.exports),n.exports}function i(e,t){l[e]=t}const l=Object.create(null),s=Object.create(null),c={id:"",exports:{},parent:void 0,filename:null,loaded:!1,children:[],paths:[]},g=["",".js",".json"];function u(e){const t=(e=e.replace(/\\/g,"/")).split("/"),n=""===t[0];for(let e=1;e0&&".."!==t[e-1]&&"."!==t[e-1]&&(t.splice(--e,2),e--);return e=t.join("/"),n&&"/"!==e[0]?e="/"+e:0===e.length&&(e="."),e}function d(){if(0===arguments.length)return".";let e;for(let t=0;t0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":e}function m(e){if(0===e.length)return".";let t=e.length-1;for(;t>0;){const n=e.charCodeAt(t);if((47===n||92===n)&&t!==e.length-1)break;t--}return t>0?e.substr(0,t):47===e.chartCodeAt(0)||92===e.chartCodeAt(0)?e.charAt(0):"."}function f(e,t,n){const r=function(e){let t=e[0];if("/"===t||"\\"===t)return!1;let n=e[1],r=e[2];return!(!("."!==t||n&&"/"!==n&&"\\"!==n)||!("."!==t||"."!==n||r&&"/"!==r&&"\\"!==r))&&(":"!==n||"/"!==r&&"\\"!==r)}(e);let a;for("/"===(e=u(e))[0]&&(t="/");a=r?u(t?t+"/node_modules/"+e:d("node_modules",e)):t?u(t+"/"+e):e,!a.endsWith("/..");){for(let e=0;e1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function u(e,t){for(var n=0;n0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function y(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[0],l=n[1],s=n[2];return e[0]=a*s-o*l,e[1]=o*i-r*s,e[2]=r*l-a*i,e}function v(e,t,n){var r=t[0],a=t[1],o=t[2],i=n[3]*r+n[7]*a+n[11]*o+n[15];return i=i||1,e[0]=(n[0]*r+n[4]*a+n[8]*o+n[12])/i,e[1]=(n[1]*r+n[5]*a+n[9]*o+n[13])/i,e[2]=(n[2]*r+n[6]*a+n[10]*o+n[14])/i,e}function Z(e,t,n){var r=t[0],a=t[1],o=t[2];return e[0]=r*n[0]+a*n[3]+o*n[6],e[1]=r*n[1]+a*n[4]+o*n[7],e[2]=r*n[2]+a*n[5]+o*n[8],e}function A(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function G(e,t){var n=e[0],a=e[1],o=e[2],i=t[0],l=t[1],s=t[2];return Math.abs(n-i)<=r.b*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(a-l)<=r.b*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(o-s)<=r.b*Math.max(1,Math.abs(o),Math.abs(s))}var S,B=c,V=g,R=u,w=m,k=f,W=o,x=p,T=(S=a(),function(e,t,n,r,a,o){var i,l;for(t||(t=3),n||(n=0),l=r?Math.min(r*t+n,e.length):e.length,i=n;i1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=new(window[e.getDataType()])(3*t.pointsIds.length));var a=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=a[n],r[++o]=a[++n],r[++o]=a[++n]})),t.points.setData(r)}else{t.points=e,t.pointsIds=new Array(e.getNumberOfPoints());for(var o=e.getNumberOfPoints()-1;o>=0;--o)t.pointsIds[o]=o}},e.getBounds=function(){var e=t.points.getNumberOfPoints(),n=[];if(e){t.points.getPoint(0,n),t.bounds[0]=n[0],t.bounds[1]=n[0],t.bounds[2]=n[1],t.bounds[3]=n[1],t.bounds[4]=n[2],t.bounds[5]=n[2];for(var r=1;rt.bounds[1]?n[0]:t.bounds[1],t.bounds[2]=n[1]t.bounds[3]?n[1]:t.bounds[3],t.bounds[4]=n[2]t.bounds[5]?n[2]:t.bounds[5]}else Object(s.D)(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,a=0;a<3;a++)n+=(r=t.bounds[2*a+1]-t.bounds[2*a])*r;return n},e.getParametricDistance=function(e){for(var t,n=0,r=0;r<3;r++)(t=e[r]<0?-e[r]:e[r]>1?e[r]-1:0)>n&&(n=t);return n},e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.deepCopy=function(e){e.initialize(t.points,t.pointsIds)},e.getCellDimension=function(){},e.intersectWithLine=function(e,t,n,r,a,o,i){},e.evaluatePosition=function(e,t,n,r,a,o){}}var u={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,u,n),a.c.obj(e,t),t.points||(t.points=c.a.newInstance()),a.c.get(e,t,["points","pointsIds"]),g(e,t)}var m={newInstance:a.c.newInstance(d,"vtkCell"),extend:d};function f(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),a=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:1e3;t.array=Array(e).fill().map((function(){return{ncells:0,cells:null}})),t.extend=n,t.maxId=-1},e.initialize=function(){t.array=null},e.getLink=function(e){return t.array[e]},e.getNcells=function(e){return t.array[e].ncells},e.getCells=function(e){return t.array[e].cells},e.insertNextPoint=function(e){t.array.push({ncells:e,cells:Array(e)}),++t.maxId},e.insertNextCellReference=function(e,n){t.array[e].cells[t.array[e].ncells++]=n},e.deletePoint=function(e){t.array[e].ncells=0,t.array[e].cells=null},e.removeCellReference=function(e,n){t.array[n].cells=t.array[n].cells.filter((function(t){return t!==e})),t.array[n].ncells=t.array[n].cells.length},e.addCellReference=function(e,n){t.array[n].cells[t.array[n].ncells++]=e},e.resizeCellList=function(e,n){t.array[e].cells.length=n},e.squeeze=function(){!function(e,t){var n=t;for(t>=e.array.length&&(n+=e.array.length);n>e.array.length;)e.array.push({ncells:0,cells:null});e.array.length=n}(t,t.maxId+1)},e.reset=function(){t.maxId=-1},e.deepCopy=function(e){t.array=Object(l.a)(e.array),t.extend=e.extend,t.maxId=e.maxId},e.incrementLinkCount=function(e){++t.array[e].ncells},e.allocateLinks=function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),a.c.obj(e,t),f(e,t)}var I={newInstance:a.c.newInstance(C,"vtkCellLinks"),extend:C},h=0,b=1,y=2,v=3,Z=4,A=5,G=6,S=7,B=9,V=21,R=41,w=42,k=["vtkEmptyCell","vtkVertex","vtkPolyVertex","vtkLine","vtkPolyLine","vtkTriangle","vtkTriangleStrip","vtkPolygon","vtkPixel","vtkQuad","vtkTetra","vtkVoxel","vtkHexahedron","vtkWedge","vtkPyramid","vtkPentagonalPrism","vtkHexagonalPrism","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkQuadraticEdge","vtkQuadraticTriangle","vtkQuadraticQuad","vtkQuadraticTetra","vtkQuadraticHexahedron","vtkQuadraticWedge","vtkQuadraticPyramid","vtkBiQuadraticQuad","vtkTriQuadraticHexahedron","vtkQuadraticLinearQuad","vtkQuadraticLinearWedge","vtkBiQuadraticQuadraticWedge","vtkBiQuadraticQuadraticHexahedron","vtkBiQuadraticTriangle","vtkCubicLine","vtkQuadraticPolygon","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkConvexPointSet","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","UnknownClass","vtkParametricCurve","vtkParametricSurface","vtkParametricTriSurface","vtkParametricQuadSurface","vtkParametricTetraRegion","vtkParametricHexRegion","UnknownClass","UnknownClass","UnknownClass","vtkHigherOrderEdge","vtkHigherOrderTriangle","vtkHigherOrderQuad","vtkHigherOrderPolygon","vtkHigherOrderTetrahedron","vtkHigherOrderWedge","vtkHigherOrderPyramid","vtkHigherOrderHexahedron"];function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x={getClassNameFromTypeId:function(e){return e0&&void 0!==arguments[0]?arguments[0]:512,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;t.size=e>0?e:1,t.extend=n>0?n:1,t.maxId=-1,t.typeArray=new Uint8Array(e),t.locationArray=new Uint32Array(e)},e.insertCell=function(e,n,r){t.typeArray[e]=n,t.locationArray[e]=r,e>t.maxId&&(t.maxId=e)},e.insertNextCell=function(n,r){return e.insertCell(++t.maxId,n,r),t.maxId},e.setCellTypes=function(e,n,r){t.size=e,t.typeArray=n,t.locationArray=r,t.maxId=e-1},e.getCellLocation=function(e){return t.locationArray[e]},e.deleteCell=function(e){t.typeArray[e]=h},e.getNumberOfTypes=function(){return t.maxId+1},e.isType=function(t){for(var n=e.getNumberOfTypes(),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J,n),a.c.obj(e,t),a.c.get(e,t,["size","maxId","extend"]),a.c.getArray(e,t,["typeArray","locationArray"]),T(e,t)}var O=function(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},i=[];i[0]=n[0]-t[0],i[1]=n[1]-t[1],i[2]=n[2]-t[2];var l=i[0]*(e[0]-t[0])+i[1]*(e[1]-t[1])+i[2]*(e[2]-t[2]),c=Object(s.q)(i,i),g=1e-5*l;return 0!==c&&(o.t=l/c),g<0&&(g=-g),-g1?r=n:(r=i,i[0]=t[0]+o.t*i[0],i[1]=t[1]+o.t*i[1],i[2]=t[2]+o.t*i[2]),a&&(a[0]=r[0],a[1]=r[1],a[2]=r[2]),o.distance=Object(s.s)(r,e),o}function K(e,t,n,r,a,o){var i=[],l=[],c=[];a[0]=0,o[0]=0,i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],l[0]=r[0]-n[0],l[1]=r[1]-n[1],l[2]=r[2]-n[2],c[0]=n[0]-e[0],c[1]=n[1]-e[1],c[2]=n[2]-e[2];var g=[];g[0]=[Object(s.q)(i,i),-Object(s.q)(i,l)],g[1]=[g[0][1],Object(s.q)(l,l)];var u=[];if(u[0]=Object(s.q)(i,c),u[1]=-Object(s.q)(l,c),0===Object(s.C)(g,u,2)){for(var d,m=Number.MAX_VALUE,f=[e,t,n,r],p=[n,n,e,e],C=[r,r,t,t],I=[o[0],o[0],a[0],a[0]],h=[a[0],a[0],o[0],o[0]],b=0;b<4;b++)(d=P(f[b],p[b],C[b])).distance=0&&a[0]<=1&&o[0]>=0&&o[0]<=1?F.YES_INTERSECTION:F.NO_INTERSECTION}var M={distanceToLine:P,intersection:K};function L(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,a,o){var i={intersect:0,t:Number.MIN_VALUE,subId:0};o[1]=0,o[2]=0;var l=[],c=[],g=[];t.points.getPoint(0,c),t.points.getPoint(1,g);var u=[],d=[],m=K(e,n,c,g,u,d);if(i.t=u[0],o[0]=d[0],m===F.YES_INTERSECTION){for(var f=0;f<3;f++)a[f]=c[f]+o[0]*(g[f]-c[f]),l[f]=e[f]+i.t*(n[f]-e[f]);if(Object(s.s)(a,l)<=r*r)return i.intersect=1,i}else{var p;if(i.t<0)return i.t=0,p=P(e,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(i.t>1)return i.t=1,p=P(n,c,g,a),o[0]=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[0]<0)return o[0]=0,p=P(c,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i;if(o[1]>1)return o[1]=1,p=P(g,e,n,a),i.t=p.t,p.distance<=r*r?(i.intersect=1,i):i}return i},e.evaluatePosition=function(e,t,n,r,a,o){}}var D={};function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,D,n),m.extend(e,t,n),L(e,t)}var U=Y(Y({newInstance:a.c.newInstance(E,"vtkLine"),extend:E},M),N),z=n(31);function _(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=Object(o.a)(t.points):t.points=c.a.newInstance(),e.getNumberOfPoints=function(){return t.points.getNumberOfPoints()},e.getBounds=function(){return t.points.getBounds()},e.computeBounds=function(){e.getBounds()};var n=e.shallowCopy;e.shallowCopy=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n(e,r),t.points=c.a.newInstance(),t.points.shallowCopy(e.getPoints())}}var j={};function Q(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j,n),z.a.extend(e,t,n),a.c.setGet(e,t,["points"]),_(e,t)}var q={newInstance:a.c.newInstance(Q,"vtkPointSet"),extend:Q},$=n(39);function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e,t,n,r){var a=n[0]-t[0],o=n[1]-t[1],i=n[2]-t[2],l=e[0]-t[0],s=e[1]-t[1],c=e[2]-t[2];r[0]=o*c-i*s,r[1]=i*l-a*c,r[2]=a*s-o*l}function ne(e,t,n,r){te(e,t,n,r);var a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);0!==a&&(r[0]/=a,r[1]/=a,r[2]/=a)}var re={computeNormalDirection:te,computeNormal:ne};function ae(e,t){t.classHierarchy.push("vtkTriangle"),e.getCellDimension=function(){return 2},e.intersectWithLine=function(n,r,a,o,i){var l={subId:0,t:0,intersect:-1};i[2]=0;var c=a*a,g=[],u=[],d=[];t.points.getPoint(0,g),t.points.getPoint(1,u),t.points.getPoint(2,d);var m=[];if(ne(g,u,d,m),0!==m[0]||0!==m[1]||0!==m[2]){var f=$.a.intersectWithLine(n,r,g,m);if(l.t=f.t,o[0]=f.x[0],o[1]=f.x[1],o[2]=f.x[2],!f.intersection)return i[0]=0,i[1]=0,l.intersect=0,l;var p=e.evaluatePosition(o,[],i,[]);if(p.evaluation>=0)return p.dist2<=c?(l.intersect=1,l):(l.intersect=p.evaluation,l)}var C=Object(s.s)(g,u),I=Object(s.s)(u,d),h=Object(s.s)(d,g);if(t.line||(t.line=U.newInstance()),C>I&&C>h?(t.line.getPoints().setPoint(0,g),t.line.getPoints().setPoint(1,u)):I>h&&I>C?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,g)),t.line.intersectWithLine(n,r,a,o,i).intersect){for(var b=[],y=[],v=[],Z=0;Z<3;Z++)b[Z]=g[Z]-d[Z],y[Z]=u[Z]-d[Z],v[Z]=o[Z]-d[Z];return i[0]=Object(s.q)(v,b)/h,i[1]=Object(s.q)(v,y)/I,l.evaluation=1,l}return i[0]=0,i[1]=0,l.evaluation=0,l},e.evaluatePosition=function(e,n,r,a){var o,i,l,c,g,u,d,m={subId:0,dist2:0,evaluation:-1},f=[],p=[],C=[],I=[],h=[],b=[],y=[],v=0,Z=[],A=[],G=[],S=[],B=[];m.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,p),t.points.getPoint(0,C),te(f,p,C,I),$.a.generalizedProjectPoint(e,f,I,B);var V=0;for(o=0;o<3;o++)(l=I[o]<0?-I[o]:I[o])>V&&(V=l,v=o);for(i=0,o=0;o<3;o++)o!==v&&(Z[i++]=o);for(o=0;o<2;o++)h[o]=B[Z[o]]-C[Z[o]],b[o]=f[Z[o]]-C[Z[o]],y[o]=p[Z[o]]-C[Z[o]];if(0===(c=Object(s.z)(b,y)))return r[0]=0,r[1]=0,m.evaluation=-1,m;if(r[0]=Object(s.z)(h,y)/c,r[1]=Object(s.z)(b,h)/c,a[0]=1-(r[0]+r[1]),a[1]=r[0],a[2]=r[1],a[0]>=0&&a[0]<=1&&a[1]>=0&&a[1]<=1&&a[2]>=0&&a[2]<=1)n&&(m.dist2=Object(s.s)(B,e),n[0]=B[0],n[1]=B[1],n[2]=B[2]),m.evaluation=1;else{var R;if(n)if(a[1]<0&&a[2]<0)for(g=Object(s.s)(e,C),u=U.distanceToLine(e,f,C,R,G),d=U.distanceToLine(e,C,p,R,S),g1?r[a]-1:0)>n&&(n=t);return n}}var oe={};function ie(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oe,n),m.extend(e,t,n),ae(e,t)}var le,se=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),ce.forEach((function(n){t[n]=i.a.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),a=e.getNumberOfPolys(),o=e.getNumberOfStrips(),i=n+r+a+o,l=new Uint8Array(i),s=l,c=new Uint32Array(i),g=c;if(n){var u=0;t.verts.getCellSizes().forEach((function(e,t){g[t]=u,s[t]=e>1?y:b,u+=e+1})),g=g.subarray(n),s=s.subarray(n)}if(r){var d=0;t.lines.getCellSizes().forEach((function(e,t){g[t]=d,s[t]=e>2?Z:v,1===e&&ge("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),d+=e+1})),g=g.subarray(r),s=s.subarray(r)}if(a){var m=0;t.polys.getCellSizes().forEach((function(e,t){switch(g[t]=m,e){case 3:s[t]=A;break;case 4:s[t]=B;break;default:s[t]=S}e<3&&ge("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),m+=e+1})),g+=g.subarray(a),s+=s.subarray(a)}if(o){var f=0;s.fill(G,0,o),t.strips.getCellSizes().forEach((function(e,t){g[t]=f,f+=e+1}))}t.cells=O.newInstance(),t.cells.setCellTypes(i,l,c)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=I.newInstance(),n>0?t.links.allocate(n):t.links.allocate(e.getPoints().getNumberOfPoints()),t.links.buildLinks(e)},e.getCellPoints=function(e){var n=t.cells.getCellType(e),r=null;switch(n){case b:case y:r=t.verts;break;case v:case Z:r=t.lines;break;case A:case B:case S:r=t.polys;break;case G:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var a=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(a)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var a=t.links.getLink(n),o=t.links.getLink(r);return a.cells.filter((function(t){return t!==e&&-1!==o.cells.indexOf(t)}))},e.getCell=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.getCellPoints(t),a=n||ue[r.cellType].newInstance();return a.initialize(e.getPoints(),r.cellPointIds),a}}var me={};function fe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,me,n),q.extend(e,t,n),a.c.get(e,t,["cells","links"]),a.c.setGet(e,t,["verts","lines","polys","strips"]),de(e,t)}var pe={newInstance:a.c.newInstance(fe,"vtkPolyData"),extend:fe};t.a=pe},function(e,t,n){"use strict";var r=function(e){if(Array.isArray(e))return e};var a=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw o}}return n}},o=n(41);var i=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")};t.a=function(e,t){return r(e)||a(e,t)||Object(o.a)(e,t)||i()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},a={VOID:"",CHAR:"Int8Array",SIGNED_CHAR:"Int8Array",UNSIGNED_CHAR:"Uint8Array",SHORT:"Int16Array",UNSIGNED_SHORT:"Uint16Array",INT:"Int32Array",UNSIGNED_INT:"Uint32Array",FLOAT:"Float32Array",DOUBLE:"Float64Array"},o={DefaultDataType:a.FLOAT,DataTypeByteSize:r,VtkDataTypes:a};t.c=o},function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.d(t,"a",(function(){return a})),r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}};var a=r},function(e,t,n){"use strict";(function(e){var r=n(48),a=n(5);n(3);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i={vtkObject:function(){return null}};function l(t){if(null==t)return t;if(t.isA)return t;if(!t.vtkClass)return e.console&&e.console.error&&e.console.error("Invalid VTK object"),null;var n=i[t.vtkClass];if(!n)return e.console&&e.console.error&&e.console.error("No vtk class found for Object of type ".concat(t.vtkClass)),null;var s=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r[e](t)},has:a,registerType:o};t.a=i},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o}));var r=n(9),a=n(54),o=Object(r.d)((function(t,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==e,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=0===new Blob([r],{type:"application/zip"}).size}catch(t){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(r),n.blob=0===o.getBlob("application/zip").size}catch(t){n.blob=!1}}}try{n.nodestream=!!a.a.Readable}catch(t){n.nodestream=!1}}),"/$$rollup_base$$/node_modules/jszip/lib")}).call(this,n(35).Buffer)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n,r,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function l(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,c=[],g=!1,u=-1;function d(){g&&s&&(g=!1,s.length?c=s.concat(c):u=-1,c.length&&m())}function m(){if(!g){var e=l(d);g=!0;for(var t=c.length;t;){for(s=c,c=[];++u1)for(var n=1;n2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,a,i;if("string"==typeof t&&(a="not ",t.substr(0,a.length)===a)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))i="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+".".length>e.length)&&-1!==e.indexOf(".",n)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(o(t,"type"))}return i+". Received type ".concat(typeof n)}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");var i={codes:r}},function(e,t,n){"use strict";var r=n(11),a=n(51),o=n(52),i=(n(3),n(24)),l=n(8),s=n(12),c=n(6),g=function(e){return e},u=Object(l.h)(new Float64Array(16)),d=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Object(a.a)(this,e),this.matrix=Object(l.h)(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?i.d:g}return Object(o.a)(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(16);Object(s.p)(n,e[0],e[1],e[2]),Object(s.p)(r,t[0],t[1],t[2]),Object(s.l)(n,n),Object(s.l)(r,r);var o=Object(s.d)(n,r);return o>=1||(Object(s.c)(this.tmp,n,r),Object(s.j)(this.tmp)<1e-6&&(Object(s.c)(this.tmp,[1,0,0],e),Object(s.j)(this.tmp)<1e-6&&Object(s.c)(this.tmp,[0,1,0],e)),Object(l.f)(a,Math.acos(o),this.tmp),Object(l.l)(this.matrix,this.matrix,a)),this}},{key:"rotate",value:function(e,t){return s.p.apply(s.r,[this.tmp].concat(Object(r.a)(t))),Object(s.l)(this.tmp,this.tmp),Object(l.q)(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Object(l.a)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return Object(l.b)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Object(l.c)(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.s)(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Object(s.p)(this.tmp,e,t,n),Object(l.r)(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Object(l.l)(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Object(l.h)(this.matrix),this}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Object(c.n)(u,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,a=t;a2&&void 0!==arguments[2]?arguments[2]:{},a=new XMLHttpRequest;return a.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(r.a)(e,2),n=t[0],o=t[1];return a.setRequestHeader(n,o)})),n.progressCallback&&a.addEventListener("progress",n.progressCallback),a}var m={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return r&&r.compression?g():n.ref&&!n.ref.pending?new Promise((function(a,l){var g=d("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);g.onreadystatechange=function(t){1===g.readyState&&(n.ref.pending=!0,1==++u&&e.invokeBusy&&e.invokeBusy(!0)),4===g.readyState&&(n.ref.pending=!1,200===g.status||0===g.status?(n.buffer=g.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(o.a.ENDIANNESS!==n.ref.encode&&o.a.ENDIANNESS&&(c("Swap bytes of ".concat(n.name)),o.a.swapBytes(n.buffer,i.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&s("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--u&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):l({xhr:g,e:t}))},g.responseType="string"!==n.dataType?"arraybuffer":"text",g.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression?g():new Promise((function(r,a){var o=d("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++u&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--u&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):a({xhr:o,e:t}))},o.responseType="text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=d("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(l.b)("http")||Object(l.c)("http",(function(e){return m}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(9),a=Object(r.d)((function(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),"/$$rollup_base$$/node_modules/inherits")},function(e,t,n){"use strict";n(3);var r=n(4),a=n(7),o=n(15),i=r.c.vtkErrorMacro,l=[1,-1,1,-1,1,-1];function s(e,t){t.classHierarchy.push("vtkPoints"),e.getNumberOfPoints=e.getNumberOfTuples,e.setNumberOfPoints=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=new window[t.dataType](t.size),e.setNumberOfComponents(r),e.modified())},e.setPoint=function(e){for(var n=e*t.numberOfComponents,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c,n),a.a.extend(e,t,n),s(e,t)}var u={newInstance:r.c.newInstance(g,"vtkPoints"),extend:g};t.a=u},function(e,t,n){"use strict";var r,a,o=n(9),i=o.b.MutationObserver||o.b.WebKitMutationObserver;if(i){var l=0,s=new i(d),c=o.b.document.createTextNode("");s.observe(c,{characterData:!0}),r=function(){c.data=l=++l%2}}else if(o.b.setImmediate||void 0===o.b.MessageChannel)r="document"in o.b&&"onreadystatechange"in o.b.document.createElement("script")?function(){var e=o.b.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},o.b.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var g=new o.b.MessageChannel;g.port1.onmessage=d,r=function(){g.port2.postMessage(0)}}var u=[];function d(){var e,t;a=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var r,o,i=[],l=t;l>18&63]+a[o>>12&63]+a[o>>6&63]+a[63&o]);return i.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63;var d=function(e){var t,n,r=g(e),a=r[0],l=r[1],s=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),c=0,u=l>0?a-4:a;for(n=0;n>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===l&&(t=o[e.charCodeAt(n)]<<2|o[e.charCodeAt(n+1)]>>4,s[c++]=255&t),1===l&&(t=o[e.charCodeAt(n)]<<10|o[e.charCodeAt(n+1)]<<4|o[e.charCodeAt(n+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},m=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,l=0,s=n-r;ls?s:l+i));return 1===r?(t=e[n-1],o.push(a[t>>2]+a[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),o.join("")},f=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},p=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p};n.d(t,"a",(function(){return C}));var C=Object(r.d)((function(e,t){const n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;const r=2147483647;function a(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return i(e,t,n)}function i(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|C(e,t);let r=a(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(j(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(j(e,ArrayBuffer)||e&&j(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(j(e,SharedArrayBuffer)||e&&j(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return o.from(r,t,n);const i=function(e){if(o.isBuffer(e)){const t=0|u(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return l(e),a(e<0?0:0|u(e))}function c(e){const t=e.length<0?0:0|u(e.length),n=a(t);for(let r=0;r=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function C(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||j(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(a)return r?-1:U(e).length;t=(""+t).toLowerCase(),a=!0}}function I(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return W(this,t,n);case"utf8":case"utf-8":return V(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return B(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function h(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,a){let o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){let r=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){let n=!0;for(let r=0;ra&&(r=a):r=a;const o=t.length;let i;for(r>o/2&&(r=o/2),i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function B(e,t,n){return 0===t&&n===e.length?m(e):m(e.slice(t,n))}function V(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a239?4:t>223?3:t>191?2:1;if(a+i<=n){let n,r,l,s;switch(i){case 1:t<128&&(o=t);break;case 2:n=e[a+1],128==(192&n)&&(s=(31&t)<<6|63&n,s>127&&(o=s));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(s=(15&t)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(o=s));break;case 4:n=e[a+1],r=e[a+2],l=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&l)&&(s=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&l,s>65535&&s<1114112&&(o=s))}}null===o?(o=65533,i=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(o.isBuffer(t)||(t=o.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!o.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},o.byteLength=C,o.prototype._isBuffer=!0,o.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},n&&(o.prototype[n]=o.prototype.inspect),o.prototype.compare=function(e,t,n,r,a){if(j(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0);const s=Math.min(i,l),c=this.slice(r,a),g=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return Z(this,e,t,n);case"ascii":case"latin1":case"binary":return A(this,e,t,n);case"base64":return G(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function w(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;ar)&&(n=r);let a="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function J(e,t,n,r,a,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function X(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,n}function O(e,t,n,r,a){M(t,r,a,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=i,i>>=8,e[n+2]=i,i>>=8,e[n+1]=i,i>>=8,e[n]=i,n+8}function N(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,4),p(e,t,n,r,23,4),n+4}function Y(e,t,n,r,a){return t=+t,n>>>=0,a||N(e,0,n,8),p(e,t,n,r,52,8),n+8}o.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readBigUInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||T(e,t,this.length);let r=this[e],a=1,o=0;for(;++o=a&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||T(e,t,this.length);let r=t,a=1,o=this[e+--r];for(;r>0&&(a*=256);)o+=this[e+--r]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readBigInt64LE=$((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||D(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||T(e,4,this.length),f(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),f(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),f(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||J(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigUInt64LE=$((function(e,t=0){return X(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeBigUInt64BE=$((function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=0,o=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);J(this,e,t,n,r-1,-r)}let a=n-1,o=1,i=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/o>>0)-i&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||J(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeBigInt64LE=$((function(e,t=0){return X(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeBigInt64BE=$((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),o.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return Y(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return Y(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function M(e,t,n,r,a,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new F.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||D(t,e.length-(n+1))}(r,a,o)}function L(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function D(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new F.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}P("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),P("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),P("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=K(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=K(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const E=/[^+/0-9A-Za-z-_]/g;function U(e,t){let n;t=t||1/0;const r=e.length;let a=null;const o=[];for(let i=0;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function j(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function $(e){return"undefined"==typeof BigInt?ee:e}function ee(){throw new Error("BigInt not supported")}}),"/$$rollup_base$$/node_modules/buffer")},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(17),i=n(7);function l(e,t){t.classHierarchy.push("vtkFieldData");var n=e.getState;t.arrays&&(t.arrays=t.arrays.map((function(e){return{data:Object(o.a)(e.data)}}))),e.initialize=function(){e.initializeFields(),e.copyAllOn(),e.clearFieldFlags()},e.initializeFields=function(){t.arrays=[],t.copyFieldFlags={},e.modified()},e.copyStructure=function(n){e.initializeFields(),t.copyFieldFlags=n.getCopyFieldFlags().map((function(e){return e})),t.arrays=n.arrays().map((function(e){return{array:e}}))},e.getNumberOfArrays=function(){return t.arrays.length},e.getNumberOfActiveArrays=function(){return t.arrays.length},e.addArray=function(e){return t.arrays=[].concat(t.arrays,{data:e}),t.arrays.length-1},e.removeAllArrays=function(){t.arrays=[]},e.removeArray=function(e){t.arrays=t.arrays.filter((function(t){return e!==t.data.getName()}))},e.removeArrayByIndex=function(e){t.arrays=t.arrays.filter((function(t,n){return n!==e}))},e.getArrays=function(){return t.arrays.map((function(e){return e.data}))},e.getArray=function(t){return"number"==typeof t?e.getArrayByIndex(t):e.getArrayByName(t)},e.getArrayByName=function(e){return t.arrays.reduce((function(t,n,r){return n.data.getName()===e?n.data:t}),null)},e.getArrayWithIndex=function(e){return t.arrays.reduce((function(t,n,r){return n.data&&n.data.getName()===e?{array:n.data,index:r}:t}),{array:null,index:-1})},e.getArrayByIndex=function(e){return e>=0&&e=0},e.getArrayName=function(e){var n=t.arrays[e];return n?n.data.getName():""},e.getCopyFieldFlags=function(){return t.copyFieldFlags},e.getFlag=function(e){return t.copyFieldFlags[e]},e.passData=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n.getArrays().forEach((function(n){var o=e.getFlag(n.getName());if(!1!==o&&(!t.doCopyAllOff||!0===o)&&n){var l=e.getArrayByName(n.getName());if(l){if(n.getNumberOfComponents()===l.getNumberOfComponents())if(r>-1&&r-1?a:r;l.setTuple(s,n.getTuple(r))}else for(var c=0;cn.getNumberOfTuples())e.addArray(n);else{var g=n.getNumberOfComponents(),u=n.getNumberOfValues(),d=a>-1?a:r;ue?t.data.getMTime():e}),t.mtime)},e.getNumberOfComponents=function(){return t.arrays.reduce((function(e,t){return e+t.data.getNumberOfComponents()}),0)},e.getNumberOfTuples=function(){return t.arrays.length>0?t.arrays[0].getNumberOfTuples():0},e.getState=function(){var e=n();return e.arrays=t.arrays.map((function(e){return{data:e.data.getState()}})),e}}var s={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,s,n),a.c.obj(e,t),l(e,t)}var g={newInstance:a.c.newInstance(c,"vtkFieldData"),extend:c},u=n(37);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=u.c.AttributeTypes,f=u.c.AttributeCopyOperations,p=a.c.vtkWarningMacro;function C(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return m[t.toUpperCase()]===e||"number"!=typeof e&&t.toLowerCase()===e.toLowerCase()}));return void 0===t&&(t=null),t}t.classHierarchy.push("vtkDataSetAttributes"),e.checkNumberOfComponents=function(e){return!0},e.setAttribute=function(n,a){var o=r(a);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return p("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return p("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var i=t["active".concat(o)];if(i>=0&&i=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,I,n),g.extend(e,t,n),a.c.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),C(e,t)}var b=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Z.forEach((function(n){t[n]=b.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var G={};function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,G,n),a.c.obj(e,t),a.c.setGet(e,t,Z),A(e,t)}var B=function(e){for(var t=1;t0&&i.length>a&&!i.warned){i.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=i.length,l=s,console&&console.warn&&console.warn(l)}return e}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=m.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(i=t[0]),i instanceof Error)throw i;var l=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw l.context=i,l}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)o(s,this,t);else{var c=s.length,g=I(s,c);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){i=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},l.prototype.listeners=function(e){return p(this,e,!0)},l.prototype.rawListeners=function(e){return p(this,e,!1)},l.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},l.prototype.listenerCount=C,l.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]},s.once=function(e,t){return new Promise((function(n,r){function a(){void 0!==o&&e.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==t&&(o=function(n){e.removeListener(t,a),r(n)},e.once("error",o)),e.once(t,a)}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(22).a.codes.ERR_STREAM_PREMATURE_CLOSE;function a(){}var o=function e(t,n,o){if("function"==typeof n)return e(t,null,n);n||(n={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function f(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return w(this,t,n);case"utf8":case"utf-8":return B(this,t,n);case"ascii":return V(this,t,n);case"latin1":case"binary":return R(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function C(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function I(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:h(e,t,n,r,a);if("number"==typeof t)return t&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):h(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function h(e,t,n,r,a){var o,i=1,l=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;i=2,l/=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(a){var g=-1;for(o=n;ol&&(n=l-s),o=n;o>=0;o--){for(var u=!0,d=0;da&&(r=a):r=a;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var i=0;i>8,a=n%256,o.push(a),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function B(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:c>223?3:c>191?2:1;if(a+u<=n)switch(u){case 1:c<128&&(g=c);break;case 2:128==(192&(o=e[a+1]))&&(s=(31&c)<<6|63&o)>127&&(g=s);break;case 3:o=e[a+1],i=e[a+2],128==(192&o)&&128==(192&i)&&(s=(15&c)<<12|(63&o)<<6|63&i)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:o=e[a+1],i=e[a+2],l=e[a+3],128==(192&o)&&128==(192&i)&&128==(192&l)&&(s=(15&c)<<18|(63&o)<<12|(63&i)<<6|63&l)>65535&&s<1114112&&(g=s)}null===g?(g=65533,u=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),a+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,r,a){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(a>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),l=Math.min(o,i),c=this.slice(r,a),g=e.slice(t,n),u=0;ua)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return Z(this,e,t,n);case"base64":return A(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function V(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,a,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function T(e,t,n,r){t<0&&(t=65535+t+1);for(var a=0,o=Math.min(e.length-n,2);a>>8*(r?a:1-a)}function J(e,t,n,r){t<0&&(t=4294967295+t+1);for(var a=0,o=Math.min(e.length-n,4);a>>8*(r?a:3-a)&255}function X(e,t,n,r,a,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||X(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function N(e,t,n,r,o){return o||X(e,0,n,8),a.write(e,t,n,r,52,8),n+8}s.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(a*=256);)r+=this[e+--t]*a;return r},s.prototype.readUInt8=function(e,t){return t||W(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||W(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||W(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||W(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=this[e],a=1,o=0;++o=(a*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||W(e,t,this.length);for(var r=t,a=1,o=this[e+--r];r>0&&(a*=256);)o+=this[e+--r]*a;return o>=(a*=128)&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||W(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||W(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||W(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||W(e,4,this.length),a.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||W(e,8,this.length),a.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):J(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=0,i=1,l=0;for(this[t]=255&e;++o>0)-l&255;return t+n},s.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var a=Math.pow(2,8*n-1);x(this,e,t,n,a-1,-a)}var o=n-1,i=1,l=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/i>>0)-l&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):J(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):J(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return N(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return N(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--a)e[a+t]=this[a+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(a=0;a>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&o.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}}).call(this,n(20))},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(4)),o=n(7),i=n(15);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};o.a.extend(e,t,d(n)),u(e,t)}var f=s({newInstance:a.c.newInstance(m,"vtkCellArray"),extend:m},g);t.a=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));n(3);var r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},a={DEFAULT:0,SINGLE:1,DOUBLE:2},o={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:r,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:a,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};t.c=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));n(3);var r={UNIFORM:0,DATA_OBJECT_FIELD:0,COORDINATE:1,POINT_DATA:1,POINT:2,POINT_FIELD_DATA:2,CELL:3,CELL_FIELD_DATA:3,VERTEX:4,VERTEX_FIELD_DATA:4,EDGE:5,EDGE_FIELD_DATA:5,ROW:6,ROW_DATA:6},a={FIELD_ASSOCIATION_POINTS:0,FIELD_ASSOCIATION_CELLS:1,FIELD_ASSOCIATION_NONE:2,FIELD_ASSOCIATION_POINTS_THEN_CELLS:3,FIELD_ASSOCIATION_VERTICES:4,FIELD_ASSOCIATION_EDGES:5,FIELD_ASSOCIATION_ROWS:6,NUMBER_OF_ASSOCIATIONS:7},o={FieldDataTypes:r,FieldAssociations:a};t.c=o},function(e,t,n){"use strict";var r=n(5),a=(n(3),n(6)),o=n(4);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){var r=n[0]*(e[0]-t[0])+n[1]*(e[1]-t[1])+n[2]*(e[2]-t[2]);return Math.abs(r)}function s(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o);r[0]=e[0]-i*n[0],r[1]=e[1]-i*n[1],r[2]=e[2]-i*n[2]}function c(e,t,n){var r=Object(a.q)(e,t),o=Object(a.q)(t,t);return 0===o&&(o=1),n[0]=e[0]-r*t[0]/o,n[1]=e[1]-r*t[1]/o,n[2]=e[2]-r*t[2]/o,n}function g(e,t,n,r){var o=[];Object(a.t)(e,t,o);var i=Object(a.q)(n,o),l=Object(a.q)(n,n);0!==l?(r[0]=e[0]-i*n[0]/l,r[1]=e[1]-i*n[1]/l,r[2]=e[2]-i*n[2]/l):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function u(e,t,n,r){var o={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},i=[],l=[];Object(a.t)(t,e,i),Object(a.t)(n,e,l);var s=Object(a.q)(r,l),c=Object(a.q)(r,i);return(c<0?-c:c)<=(s<0?1e-6*-s:1e-6*s)||(o.t=s/c,o.x[0]=e[0]+o.t*i[0],o.x[1]=e[1]+o.t*i[1],o.x[2]=e[2]+o.t*i[2],o.intersection=!0,o.betweenPoints=o.t>=0&&o.t<=1),o}function d(e,t,n,r){var o={intersection:!1,l0:[],l1:[],error:null},i=[];Object(a.w)(t,r,i);var l,s=i.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<1e-6){var c=[];return Object(a.t)(e,n,c),0===Object(a.q)(t,c)?o.error="coincide":o.error="disjoint",o}l=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var g=[],u=-Object(a.q)(t,e),d=-Object(a.q)(r,n);switch(l){case"x":g[0]=0,g[1]=(d*t[2]-u*r[2])/i[0],g[2]=(u*r[1]-d*t[1])/i[0];break;case"y":g[0]=(u*r[2]-d*t[2])/i[1],g[1]=0,g[2]=(d*t[0]-u*r[0])/i[1];break;case"z":g[0]=(d*t[1]-u*r[1])/i[2],g[1]=(u*r[0]-d*t[0])/i[2],g[2]=0}return o.l0=g,Object(a.x)(g,i,o.l1),o.intersection=!0,o}var m={evaluate:function(e,t,n){return e[0]*(n[0]-t[0])+e[1]*(n[1]-t[1])+e[2]*(n[2]-t[2])},distanceToPlane:l,projectPoint:s,projectVector:c,generalizedProjectPoint:g,intersectWithLine:u,intersectWithPlane:d,DISJOINT:"disjoint",COINCIDE:"coincide"};function f(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return l(e,t.origin,t.normal)},e.projectPoint=function(e,n){s(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return c(e,t.normal,n)},e.push=function(e){if(0!==e)for(var n=0;n<3;n++)t.origin[n]+=e*t.normal[n]},e.generalizedProjectPoint=function(e,n){g(e,t.origin,t.normal,n)},e.evaluateFunction=function(e,n,r){return Array.isArray(e)?t.normal[0]*(e[0]-t.origin[0])+t.normal[1]*(e[1]-t.origin[1])+t.normal[2]*(e[2]-t.origin[2]):t.normal[0]*(e-t.origin[0])+t.normal[1]*(n-t.origin[1])+t.normal[2]*(r-t.origin[2])},e.evaluateGradient=function(e){return[t.normal[0],t.normal[1],t.normal[2]]},e.intersectWithLine=function(e,n){return u(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return d(e,n,t.origin,t.normal)}}var p={normal:[0,0,1],origin:[0,0,0]};function C(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,p,n),o.c.obj(e,t),o.c.setGetArray(e,t,["normal","origin"],3),f(e,t)}var I=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:null,a=r(e),o=t.exec(a);if(!o)return{text:a};var i=o.index+o[0].length,l=a.substring(0,i),s=null,c=n?n.exec(a):null;if(c){var g=a.substr(c.index);s={text:l+g,binaryBuffer:e.slice(i,c.index)}}else s={text:l,binaryBuffer:e.slice(i)};return s}};t.a=a},function(e,t,n){"use strict";var r=n(42);t.a=function(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";t.a=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)if("string"==typeof t||i.objectMode||Object.getPrototypeOf(t)===b.prototype||(t=function(e){return b.from(e)}(t)),r)i.endEmitted?k(e,new w):X(e,i,t,!0);else if(i.ended)k(e,new V);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!n?(t=i.decoder.write(t),i.objectMode||0!==t.length?X(e,i,t,!1):Y(e,i)):X(e,i,t,!1)}else r||(i.reading=!1,Y(e,i));return!i.ended&&(i.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(t){var n=t._readableState;I("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(I("emitReadable",n.flowing),n.emittedReadable=!0,e.nextTick(H,t))}function H(e){var t=e._readableState;I("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function Y(t,n){n.readingMore||(n.readingMore=!0,e.nextTick(F,t,n))}function F(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function K(e){I("readable nexttick read 0"),e.read(0)}function M(e,t){I("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(I("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function E(t){var n=t._readableState;I("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,e.nextTick(U,n,t))}function U(e,t){if(I("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function z(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return I("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):N(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&E(this),null;var r,a=t.needReadable;return I("need readable",a),(0===t.length||t.length-e0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==r&&this.emit("data",r),r},T.prototype._read=function(e){k(this,new R("_read()"))},T.prototype.pipe=function(t,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,I("pipe count=%d opts=%j",a.pipesCount,n);var o=n&&!1===n.end||t===e.stdout||t===e.stderr?m:i;function i(){I("onend"),t.end()}a.endEmitted?e.nextTick(o):r.once("end",o),t.on("unpipe",(function e(n,o){I("onunpipe"),n===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,I("cleanup"),t.removeListener("close",u),t.removeListener("finish",d),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),s=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;I("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&h(e,"data")&&(t.flowing=!0,L(e))}}(r);t.on("drain",l);var s=!1;function c(e){I("ondata");var n=t.write(e);I("dest.write",n),!1===n&&((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==z(a.pipes,t))&&!s&&(I("false write response, pause",a.awaitDrain),a.awaitDrain++),r.pause())}function g(e){I("onerror",e),m(),t.removeListener("error",g),0===h(t,"error")&&k(t,e)}function u(){t.removeListener("finish",d),m()}function d(){I("onfinish"),t.removeListener("close",u),m()}function m(){I("unpipe"),r.unpipe(t)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(t,"error",g),t.once("close",u),t.once("finish",d),t.emit("pipe",r),a.flowing||(I("pipe resume"),r.resume()),t},T.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==a.flowing&&this.resume()):"readable"===t&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,I("on readable",a.length,a.reading),a.length?N(this):a.reading||e.nextTick(K,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,n){var r=o.a.prototype.removeListener.call(this,t,n);return"readable"===t&&e.nextTick(P,this),r},T.prototype.removeAllListeners=function(t){var n=o.a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||e.nextTick(P,this),n},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(I("resume"),t.flowing=!t.readableListening,function(t,n){n.resumeScheduled||(n.resumeScheduled=!0,e.nextTick(M,t,n))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var a in e.on("end",(function(){if(I("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(a){I("wrapped data"),n.decoder&&(a=n.decoder.write(a)),n.objectMode&&null==a||(n.objectMode||a&&a.length)&&(t.push(a)||(r=!0,e.pause()))})),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o-1))throw new V(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(W.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(W.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),W.prototype._write=function(e,t,n){n(new v("_write()"))},W.prototype._writev=null,W.prototype.end=function(t,n,r){var a=this._writableState;return"function"==typeof t?(r=t,t=null,n=null):"function"==typeof n&&(r=n,n=null),null!=t&&this.write(t,n),a.corked&&(a.corked=1,this.uncork()),a.ending||function(t,n,r){n.ending=!0,N(t,n),r&&(n.finished?e.nextTick(r):t.once("finish",r)),n.ended=!0,t.writable=!1}(this,a,r),this},Object.defineProperty(W.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(W.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),W.prototype.destroy=s.a.destroy,W.prototype._undestroy=s.a.undestroy,W.prototype._destroy=function(e,t){t(e)}}).call(this,n(21))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.a=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),a=n(19),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i={encode:function(e){for(var t,n,a,i,l,s,c,g=[],u=0,d=e.length,m=d,f="string"!==r.a.getTypeOf(e);u>2,l=(3&t)<<4|n>>4,s=m>1?(15&n)<<2|a>>6:64,c=m>2?63&a:64,g.push(o.charAt(i)+o.charAt(l)+o.charAt(s)+o.charAt(c));return g.join("")},decode:function(e){var t,n,r,i,l,s,c=0,g=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var d,m=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&m--,e.charAt(e.length-2)===o.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=a.a.uint8array?new Uint8Array(0|m):new Array(0|m);c>4,n=(15&i)<<4|(l=o.indexOf(e.charAt(c++)))>>2,r=(3&l)<<6|(s=o.indexOf(e.charAt(c++))),d[g++]=t,64!==l&&(d[g++]=n),64!==s&&(d[g++]=r);return d}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(67),o=n(16),i=n(49),l=n(19),s=n(28),c=n(68),g=null;if(l.a.nodestream)try{g=c.a}catch(e){}function u(e,t,n){var i=t;switch(t){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=t,this._mimeType=n,r.a.checkSupport(i),this._worker=e.pipe(new a.a(i)),e.lock()}catch(e){this._worker=new o.a("error"),this._worker.error(e)}}u.prototype={accumulate:function(t){return n=this,a=t,new s.a.Promise((function(t,o){var l=[],s=n._internalType,c=n._outputType,g=n._mimeType;n.on("data",(function(e,t){l.push(e),a&&a(t)})).on("error",(function(e){l=[],o(e)})).on("end",(function(){try{var n=function(e,t,n){switch(e){case"blob":return r.a.newBlob(r.a.transformTo("arraybuffer",t),n);case"base64":return i.a.encode(t);default:return r.a.transformTo(e,t)}}(c,function(t,n){var r,a=0,o=null,i=0;for(r=0;r>>0,t=(r*=t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1),r=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function o(e,t){var n=new r(e),o=t&&t.state,i=n.next;return i.int32=function(){return 4294967296*n.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.alea=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),o=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor128=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),i=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:n+=e;for(var r=0;r>>4),t.next()}function a(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function o(e,t){var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorwow=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),l=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.x,a=t.i;return e=r[a],n=(e^=e>>>7)^e<<24,n^=(e=r[a+1&7])^e>>>10,n^=(e=r[a+3&7])^e>>>3,n^=(e=r[a+4&7])^e<<7,e=r[a+7&7],n^=(e^=e<<13)^e<<9,r[a]=n,t.i=a+1&7,n},function(e,t){var n,r=[];if(t===(0|t))r[0]=t;else for(t=""+t,n=0;n0;--n)e.next()}(t,e)}function a(e,t){return t.x=e.x.slice(),t.i=e.i,t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.x&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xorshift7=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),s=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this;t.next=function(){var e,n,r=t.w,a=t.X,o=t.i;return t.w=r=r+1640531527|0,n=a[o+34&127],e=a[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=a[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,a,o,i,l=[],s=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,s=Math.max(s,t.length)),a=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(i=i+1640531527|0,a=0==(n=l[127&o]^=r+i)?a+1:0);for(a>=128&&(l[127&(t&&t.length||0)]=-1),a=127,o=512;o>0;--o)r=l[a+34&127],n=l[a=a+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,l[a]=r^n;e.w=i,e.X=l,e.i=a}(t,e)}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function o(e,t){null==e&&(e=+new Date);var n=new r(e),o=t&&t.state,i=function(){return(n.next()>>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&(o.X&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.xor4096=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),c=Object(r.d)((function(e){!function(e,t,n){function r(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,a=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^a,a=a-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^a,t.a=a-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r>>0)/4294967296};return i.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},i.int32=n.next,i.quick=i,o&&("object"==typeof o&&a(o,n),i.state=function(){return a(n,{})}),i}t&&t.exports?t.exports=o:this.tychei=o}(0,e)}),"/$$rollup_base$$/node_modules/seedrandom/lib"),g=Object.freeze({__proto__:null,default:{}}),u=Object(r.e)(g),d=Object(r.d)((function(e){!function(t,n,r){var a,o=256,i=r.pow(o,6),l=r.pow(2,52),s=2*l,c=255;function g(e,c,g){var u=[],C=f(function e(t,n){var r,a=[],o=typeof t;if(n&&"object"==o)for(r in t)try{a.push(e(t[r],n-1))}catch(t){}return a.length?a:"string"==o?t:t+"\0"}((c=1==c?{entropy:!0}:c||{}).entropy?[e,p(n)]:null==e?function(){try{var e;return a&&(e=a.randomBytes)?e=e(o):(e=new Uint8Array(o),(t.crypto||t.msCrypto).getRandomValues(e)),p(e)}catch(e){var r=t.navigator,i=r&&r.plugins;return[+new Date,t,i,t.screen,p(n)]}}():e,3),u),I=new d(u),h=function(){for(var e=I.g(6),t=i,n=0;e=s;)e/=2,t/=2,n>>>=1;return(e+n)/t};return h.int32=function(){return 0|I.g(4)},h.quick=function(){return I.g(4)/4294967296},h.double=h,f(p(I.S),n),(c.pass||g||function(e,t,n,a){return a&&(a.S&&m(a,I),e.state=function(){return m(I,{})}),n?(r.random=e,t):e})(h,C,"global"in c?c.global:this==r,c.state)}function d(e){var t,n=e.length,r=this,a=0,i=r.i=r.j=0,l=r.S=[];for(n||(e=[n++]);a0,(function(e){r||(r=e),e&&o.forEach(k),i||(o.forEach(k),a(r))}))}));return t.reduce(W)},X.Stream=X,X.prototype.pipe=function(e,t){var n=this;function r(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",r),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",i),n.on("close",l));var o=!1;function i(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(c(),0===J.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",r),e.removeListener("drain",a),n.removeListener("end",i),n.removeListener("close",l),n.removeListener("error",s),e.removeListener("error",s),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",s),e.on("error",s),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e},n.d(t,"a",(function(){return O}));var O=T},function(e,t,n){"use strict";var r=Object.freeze({__proto__:null,default:{}}),a=n(9);n.d(t,"a",(function(){return o}));var o=Object(a.e)(r)},function(e,t){function n(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=56},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(30),a=n(55);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=r.a.Buffer,s=a.a.inspect,c=s&&s.custom||"inspect",g=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype;return t.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},t.concat=function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,a=l.allocUnsafe(e>>>0),o=this.head,i=0;o;)t=o.data,n=a,r=i,l.prototype.copy.call(t,n,r),i+=o.data.length,o=o.next;return a},t.consume=function(e,t){var n;return ea.length?a.length:e;if(o===a.length?r+=a:r+=a.slice(0,e),0==(e-=o)){o===a.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=l.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=a.slice(o));break}++r}return this.length-=r,t},t[c]=function(e,t){return s(this,function(e){for(var t=1;t0?i-4:i;for(n=0;n>16&255,s[g++]=t>>8&255,s[g++]=255&t;2===l&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,s[g++]=255&t);1===l&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,s[g++]=t>>8&255,s[g++]=255&t);return s},t.fromByteArray=function(e){for(var t,n=e.length,a=n%3,o=[],i=0,l=n-a;il?l:i+16383));1===a?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===a&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],a=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,s=i.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function g(e,t,n){for(var a,o,i=[],l=t;l>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,a){var o,i,l=8*a-r-1,s=(1<>1,g=-7,u=n?a-1:0,d=n?-1:1,m=e[t+u];for(u+=d,o=m&(1<<-g)-1,m>>=-g,g+=l;g>0;o=256*o+e[t+u],u+=d,g-=8);for(i=o&(1<<-g)-1,o>>=-g,g+=r;g>0;i=256*i+e[t+u],u+=d,g-=8);if(0===o)o=1-c;else{if(o===s)return i?NaN:1/0*(m?-1:1);i+=Math.pow(2,r),o-=c}return(m?-1:1)*i*Math.pow(2,o-r)},t.write=function(e,t,n,r,a,o){var i,l,s,c=8*o-a-1,g=(1<>1,d=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=r?0:o-1,f=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=g):(i=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-i))<1&&(i--,s*=2),(t+=i+u>=1?d/s:d*Math.pow(2,1-u))*s>=2&&(i++,s/=2),i+u>=g?(l=0,i=g):i+u>=1?(l=(t*s-1)*Math.pow(2,a),i+=u):(l=t*Math.pow(2,u-1)*Math.pow(2,a),i=0));a>=8;e[n+m]=255&l,m+=f,l/=256,a-=8);for(i=i<0;e[n+m]=255&i,m+=f,i/=256,c-=8);e[n+m-f]|=128*p}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r}));var r="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,n(65).setImmediate)},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(a.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(a.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(66),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(20))},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,a,o,i,l,s=1,c={},g=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){f(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){f(e.data)},r=function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(a=u.documentElement,r=function(e){var t=u.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):r=function(e){setTimeout(f,0,e)}:(i="setImmediate$"+Math.random()+"$",l=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&f(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",l,!1):e.attachEvent("onmessage",l),r=function(t){e.postMessage(i+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=a.compression,o=a.progressCallback;return t.binary?a.dataAccessHelper.fetchBinary(e,{compression:r,progressCallback:o}):a.dataAccessHelper.fetchText(n,e,{compression:r,progressCallback:o})}a.classHierarchy.push("vtkSTLReader"),a.dataAccessHelper||(a.dataAccessHelper=r.a.get("http")),n.setUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};a.url=e;var r=e.split("/");return r.pop(),a.baseURL=r.join("/"),a.compression=t.compression,n.loadData({progressCallback:t.progressCallback,binary:!!t.binary})},n.loadData=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c(a.url,e);return t.then(n.parse),t},n.parse=function(e){"string"==typeof e?n.parseAsText(e):n.parseAsArrayBuffer(e)},n.parseAsArrayBuffer=function(r){if(r&&r!==a.parseData)if(n.modified(),a.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var c=r.slice(0,80),g=function(e){for(var t=e.split(" ").filter((function(e){return e.indexOf("=")>-1})),n={},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,d,n),a.c.obj(e,t),a.c.get(e,t,["url","baseURL"]),a.c.setGet(e,t,["dataAccessHelper"]),a.c.algo(e,t,0,1),u(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkSTLReader")}).call(this,n(20))},function(e,t,n){"use strict";var r=n(9),a=n(30),o=Object(r.d)((function(e,t){var n=a.a.Buffer;function r(e,t){for(var n in e)t[n]=e[n]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=a.a:(r(a.a,t),t.Buffer=o),r(n,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var a=n(e);return void 0!==t?"string"==typeof r?a.fill(t,r):a.fill(t):a.fill(0),a},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a.a.SlowBuffer(e)}}),"/$$rollup_base$$/node_modules/safe-buffer");n.d(t,"a",(function(){return h}));var i=o.Buffer,l=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},s=c;function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===l||!l(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=d,this.end=m,t=4;break;case"utf8":this.fillLast=u,t=4;break;case"base64":this.text=f,this.end=p,t=3;break;default:return this.write=C,void(this.end=I)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function g(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function d(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function C(e){return e.toString(this.encoding)}function I(e){return e&&e.length?this.write(e):""}c.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(a>0&&(e.lastNeed=a-1),a):--r=0?(a>0&&(e.lastNeed=a-2),a):--r=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var h={StringDecoder:s}},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"default",(function(){return OZ})),n.d(r,"Algorithm",(function(){return kZ})),n.d(r,"Calculator",(function(){return WZ})),n.d(r,"CellData",(function(){return xZ})),n.d(r,"Contexts",(function(){return XZ})),n.d(r,"DataArray",(function(){return RZ})),n.d(r,"FieldData",(function(){return wZ})),n.d(r,"GeometryRepresentation",(function(){return SZ})),n.d(r,"GlyphRepresentation",(function(){return BZ})),n.d(r,"ImageData",(function(){return VZ})),n.d(r,"PointCloudRepresentation",(function(){return TZ})),n.d(r,"PointData",(function(){return yZ})),n.d(r,"PolyData",(function(){return vZ})),n.d(r,"Reader",(function(){return ZZ})),n.d(r,"ShareDataSet",(function(){return AZ})),n.d(r,"SliceRepresentation",(function(){return hZ})),n.d(r,"View",(function(){return GZ})),n.d(r,"VolumeController",(function(){return bZ})),n.d(r,"VolumeDataRepresentation",(function(){return JZ})),n.d(r,"VolumeRepresentation",(function(){return IZ}));var a=n(14);n(3);function o(e){let t=e.length;for(;--t>=0;)e[t]=0}const i=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),l=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),s=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),g=new Array(576);o(g);const u=new Array(60);o(u);const d=new Array(512);o(d);const m=new Array(256);o(m);const f=new Array(29);o(f);const p=new Array(30);function C(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let I,h,b;function y(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}o(p);const v=e=>e<256?d[e]:d[256+(e>>>7)],Z=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},A=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<{A(e,n[2*t],n[2*t+1])},S=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},B=(e,t,n)=>{const r=new Array(16);let a,o,i=0;for(a=1;a<=15;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=S(r[t]++,t))}},V=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0},R=e=>{e.bi_valid>8?Z(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},w=(e,t,n,r)=>{const a=2*t,o=2*n;return e[a]{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a{let r,a,o,s,c=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],a=e.pending_buf[e.l_buf+c],c++,0===r?G(e,a,t):(o=m[a],G(e,o+256+1,t),s=i[o],0!==s&&(a-=f[o],A(e,a,s)),r--,o=v(r),G(e,o,n),s=l[o],0!==s&&(r-=p[o],A(e,r,s)))}while(c{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.elems;let i,l,s,c=-1;for(e.heap_len=0,e.heap_max=573,i=0;i>1;i>=1;i--)k(e,n,i);s=o;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],k(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=l,n[2*s]=n[2*i]+n[2*l],e.depth[s]=(e.depth[i]>=e.depth[l]?e.depth[i]:e.depth[l])+1,n[2*i+1]=n[2*l+1]=s,e.heap[1]=s++,k(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let c,g,u,d,m,f,p=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)g=e.heap[c],d=n[2*n[2*g+1]+1]+1,d>s&&(d=s,p++),n[2*g+1]=d,g>r||(e.bl_count[d]++,m=0,g>=l&&(m=i[g-l]),f=n[2*g],e.opt_len+=f*(d+m),o&&(e.static_len+=f*(a[2*g+1]+m)));if(0!==p){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(d=s;0!==d;d--)for(g=e.bl_count[d];0!==g;)u=e.heap[--c],u>r||(n[2*u+1]!==d&&(e.opt_len+=(d-n[2*u+1])*n[2*u],n[2*u+1]=d),g--)}})(e,t),B(n,c,e.bl_count)},T=(e,t,n)=>{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l{let r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),r=0;r<=n;r++)if(a=i,i=t[2*(r+1)+1],!(++l{A(e,0+(r?1:0),3),((e,t,n,r)=>{R(e),Z(e,n),Z(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var N={_tr_init:e=>{X||((()=>{let e,t,n,r,a;const o=new Array(16);for(n=0,r=0;r<28;r++)for(f[r]=n,e=0;e<1<>=7;r<30;r++)for(p[r]=a<<7,e=0;e<1<{let a,o,i=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),x(e,e.l_desc),x(e,e.d_desc),i=(e=>{let t;for(T(e,e.dyn_ltree,e.l_desc.max_code),T(e,e.dyn_dtree,e.d_desc.max_code),x(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*c[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?O(e,t,n,r):4===e.strategy||o===a?(A(e,2+(r?1:0),3),W(e,g,u)):(A(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(A(e,t-257,5),A(e,n-1,5),A(e,r-4,4),a=0;a(e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(m[n]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{A(e,2,3),G(e,256,g),(e=>{16===e.bi_valid?(Z(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},H=(e,t,n,r)=>{let a=65535&e|0,o=e>>>16&65535|0,i=0;for(;0!==n;){i=n>2e3?2e3:n,n-=i;do{a=a+t[r++]|0,o=o+a|0}while(--i);a%=65521,o%=65521}return a|o<<16|0};const Y=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var F=(e,t,n,r)=>{const a=Y,o=r+n;e^=-1;for(let n=r;n>>8^a[255&(e^t[n])];return-1^e},P={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:M,_tr_stored_block:L,_tr_flush_block:D,_tr_tally:E,_tr_align:U}=N,{Z_NO_FLUSH:z,Z_PARTIAL_FLUSH:_,Z_FULL_FLUSH:j,Z_FINISH:Q,Z_BLOCK:q,Z_OK:$,Z_STREAM_END:ee,Z_STREAM_ERROR:te,Z_DATA_ERROR:ne,Z_BUF_ERROR:re,Z_DEFAULT_COMPRESSION:ae,Z_FILTERED:oe,Z_HUFFMAN_ONLY:ie,Z_RLE:le,Z_FIXED:se,Z_DEFAULT_STRATEGY:ce,Z_UNKNOWN:ge,Z_DEFLATED:ue}=K,de=(e,t)=>(e.msg=P[t],t),me=e=>(e<<1)-(e>4?9:0),fe=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let pe=(e,t,n)=>(t<{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ie=(e,t)=>{D(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ce(e.strm)},he=(e,t)=>{e.pending_buf[e.pending++]=t},be=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},ye=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=H(e.adler,t,a,n):2===e.state.wrap&&(e.adler=F(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},ve=(e,t)=>{let n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258;let m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(n=t,c[n+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead},Ze=e=>{const t=e.w_size;let n,r,a,o,i;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,r=e.hash_size,n=r;do{a=e.head[--n],e.head[n]=a>=t?a-t:0}while(--r);r=t,n=r;do{a=e.prev[--n],e.prev[n]=a>=t?a-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=ye(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=pe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=pe(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},Ae=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=ve(e,n)),e.match_length>=3)if(r=E(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=pe(e,e.ins_h,e.window[e.strstart+1]);else r=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2},Ge=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<262){if(Ze(e),e.lookahead<262&&t===z)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=E(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=pe(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ie(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=E(e,0,e.window[e.strstart-1]),r&&Ie(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=E(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2};function Se(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Be=[new Se(0,0,0,0,(e,t)=>{let n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Ze(e),0===e.lookahead&&t===z)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;const r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ie(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(Ie(e,!1),e.strm.avail_out),1)}),new Se(4,4,8,4,Ae),new Se(4,5,16,8,Ae),new Se(4,6,32,32,Ae),new Se(4,4,16,16,Ge),new Se(8,16,32,32,Ge),new Se(8,16,128,128,Ge),new Se(8,32,128,256,Ge),new Se(32,128,258,1024,Ge),new Se(32,258,258,4096,Ge)];function Ve(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ue,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),fe(this.dyn_ltree),fe(this.dyn_dtree),fe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),fe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),fe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Re=e=>{if(!e||!e.state)return de(e,te);e.total_in=e.total_out=0,e.data_type=ge;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=z,M(t),$},we=e=>{const t=Re(e);var n;return t===$&&((n=e.state).window_size=2*n.w_size,fe(n.head),n.max_lazy_match=Be[n.level].max_lazy,n.good_match=Be[n.level].good_length,n.nice_match=Be[n.level].nice_length,n.max_chain_length=Be[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},ke=(e,t,n,r,a,o)=>{if(!e)return te;let i=1;if(t===ae&&(t=6),r<0?(i=0,r=-r):r>15&&(i=2,r-=16),a<1||a>9||n!==ue||r<8||r>15||t<0||t>9||o<0||o>se)return de(e,te);8===r&&(r=9);const l=new Ve;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e&&e.state?2!==e.state.wrap?te:(e.state.gzhead=t,$):te,Te=(e,t)=>{let n,r;if(!e||!e.state||t>q||t<0)return e?de(e,te):te;const a=e.state;if(!e.output||!e.input&&0!==e.avail_in||666===a.status&&t!==Q)return de(e,0===e.avail_out?re:te);a.strm=e;const o=a.last_flush;if(a.last_flush=t,42===a.status)if(2===a.wrap)e.adler=0,he(a,31),he(a,139),he(a,8),a.gzhead?(he(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),he(a,255&a.gzhead.time),he(a,a.gzhead.time>>8&255),he(a,a.gzhead.time>>16&255),he(a,a.gzhead.time>>24&255),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(he(a,255&a.gzhead.extra.length),he(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=F(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69):(he(a,0),he(a,0),he(a,0),he(a,0),he(a,0),he(a,9===a.level?2:a.strategy>=ie||a.level<2?4:0),he(a,3),a.status=113);else{let t=ue+(a.w_bits-8<<4)<<8,n=-1;n=a.strategy>=ie||a.level<2?0:a.level<6?1:6===a.level?2:3,t|=n<<6,0!==a.strstart&&(t|=32),t+=31-t%31,a.status=113,be(a,t),0!==a.strstart&&(be(a,e.adler>>>16),be(a,65535&e.adler)),e.adler=1}if(69===a.status)if(a.gzhead.extra){for(n=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending!==a.pending_buf_size));)he(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=73)}else a.status=73;if(73===a.status)if(a.gzhead.name){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.gzindex=0,a.status=91)}else a.status=91;if(91===a.status)if(a.gzhead.comment){n=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>n&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),Ce(e),n=a.pending,a.pending===a.pending_buf_size)){r=1;break}r=a.gzindexn&&(e.adler=F(e.adler,a.pending_buf,a.pending-n,n)),0===r&&(a.status=103)}else a.status=103;if(103===a.status&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Ce(e),a.pending+2<=a.pending_buf_size&&(he(a,255&e.adler),he(a,e.adler>>8&255),e.adler=0,a.status=113)):a.status=113),0!==a.pending){if(Ce(e),0===e.avail_out)return a.last_flush=-1,$}else if(0===e.avail_in&&me(t)<=me(o)&&t!==Q)return de(e,re);if(666===a.status&&0!==e.avail_in)return de(e,re);if(0!==e.avail_in||0!==a.lookahead||t!==z&&666!==a.status){let n=a.strategy===ie?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ze(e),0===e.lookahead)){if(t===z)return 1;break}if(e.match_length=0,n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):a.strategy===le?((e,t)=>{let n,r,a,o;const i=e.window;for(;;){if(e.lookahead<=258){if(Ze(e),e.lookahead<=258&&t===z)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=i[a],r===i[++a]&&r===i[++a]&&r===i[++a])){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=E(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=E(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ie(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Q?(Ie(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(Ie(e,!1),0===e.strm.avail_out)?1:2})(a,t):Be[a.level].func(a,t);if(3!==n&&4!==n||(a.status=666),1===n||3===n)return 0===e.avail_out&&(a.last_flush=-1),$;if(2===n&&(t===_?U(a):t!==q&&(L(a,0,0,!1),t===j&&(fe(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Ce(e),0===e.avail_out))return a.last_flush=-1,$}return t!==Q?$:a.wrap<=0?ee:(2===a.wrap?(he(a,255&e.adler),he(a,e.adler>>8&255),he(a,e.adler>>16&255),he(a,e.adler>>24&255),he(a,255&e.total_in),he(a,e.total_in>>8&255),he(a,e.total_in>>16&255),he(a,e.total_in>>24&255)):(be(a,e.adler>>>16),be(a,65535&e.adler)),Ce(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$:ee)},Je=e=>{if(!e||!e.state)return te;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?de(e,te):(e.state=null,113===t?de(e,ne):$)},Xe=(e,t)=>{let n=t.length;if(!e||!e.state)return te;const r=e.state,a=r.wrap;if(2===a||1===a&&42!==r.status||r.lookahead)return te;if(1===a&&(e.adler=H(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(fe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,i=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ze(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=pe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ze(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=i,e.input=l,e.avail_in=o,r.wrap=a,$};const Oe=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ne=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Oe(n,t)&&(e[t]=n[t])}}return e},He=e=>{let t=0;for(let n=0,r=e.length;n=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Fe[254]=Fe[254]=1;var Pe=e=>{let t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Ke=(e,t)=>{let n,r;const a=t||e.length,o=new Array(2*a);for(r=0,n=0;n4)o[r++]=65533,n+=i-1;else{for(t&=2===i?31:3===i?15:7;i>1&&n1?o[r++]=65533:t<65536?o[r++]=t:(t-=65536,o[r++]=55296|t>>10&1023,o[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Ye)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fe[e[n]]>t?n:t},Le=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const De=Object.prototype.toString,{Z_NO_FLUSH:Ee,Z_SYNC_FLUSH:Ue,Z_FULL_FLUSH:ze,Z_FINISH:_e,Z_OK:je,Z_STREAM_END:Qe,Z_DEFAULT_COMPRESSION:qe,Z_DEFAULT_STRATEGY:$e,Z_DEFLATED:et}=K;function tt(e){this.options=Ne({level:qe,method:et,chunkSize:16384,windowBits:15,memLevel:8,strategy:$e},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=We(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==je)throw new Error(P[n]);if(t.header&&xe(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?Pe(t.dictionary):"[object ArrayBuffer]"===De.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Xe(this.strm,e),n!==je)throw new Error(P[n]);this._dict_set=!0}}function nt(e,t){const n=new tt(t);if(n.push(e,!0),n.err)throw n.msg||P[n.err];return n.result}tt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?_e:Ee,"string"==typeof e?n.input=Pe(e):"[object ArrayBuffer]"===De.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===Ue||o===ze)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=Te(n,o),a===Qe)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=Je(this.strm),this.onEnd(a),this.ended=!0,a===je;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},tt.prototype.onData=function(e){this.chunks.push(e)},tt.prototype.onEnd=function(e){e===je&&(this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rt={Deflate:tt,deflate:nt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,nt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,nt(e,t)},constants:K},at=function(e,t){let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S;const B=e.state;n=e.next_in,G=e.input,r=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),i=a+(e.avail_out-257),l=B.dmax,s=B.wsize,c=B.whave,g=B.wnext,u=B.window,d=B.hold,m=B.bits,f=B.lencode,p=B.distcode,C=(1<>>24,d>>>=b,m-=b,b=h>>>16&255,0===b)S[a++]=65535&h;else{if(!(16&b)){if(0==(64&b)){h=f[(65535&h)+(d&(1<>>=b,m-=b),m<15&&(d+=G[n++]<>>24,d>>>=b,m-=b,b=h>>>16&255,!(16&b)){if(0==(64&b)){h=p[(65535&h)+(d&(1<l){e.msg="invalid distance too far back",B.mode=30;break e}if(d>>>=b,m-=b,b=a-o,v>b){if(b=v-b,b>c&&B.sane){e.msg="invalid distance too far back",B.mode=30;break e}if(Z=0,A=u,0===g){if(Z+=s-b,b2;)S[a++]=A[Z++],S[a++]=A[Z++],S[a++]=A[Z++],y-=3;y&&(S[a++]=A[Z++],y>1&&(S[a++]=A[Z++]))}else{Z=a-v;do{S[a++]=S[Z++],S[a++]=S[Z++],S[a++]=S[Z++],y-=3}while(y>2);y&&(S[a++]=S[Z++],y>1&&(S[a++]=S[Z++]))}break}}break}}while(n>3,n-=y,m-=y<<3,d&=(1<{const s=l.bits;let c,g,u,d,m,f,p=0,C=0,I=0,h=0,b=0,y=0,v=0,Z=0,A=0,G=0,S=null,B=0;const V=new Uint16Array(16),R=new Uint16Array(16);let w,k,W,x=null,T=0;for(p=0;p<=15;p++)V[p]=0;for(C=0;C=1&&0===V[h];h--);if(b>h&&(b=h),0===h)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(I=1;I0&&(0===e||1!==h))return-1;for(R[1]=0,p=1;p<15;p++)R[p+1]=R[p]+V[p];for(C=0;C852||2===e&&A>592)return 1;for(;;){w=p-v,i[C]f?(k=x[T+i[C]],W=S[B+i[C]]):(k=96,W=0),c=1<>v)+g]=w<<24|k<<16|W|0}while(0!==g);for(c=1<>=1;if(0!==c?(G&=c-1,G+=c):G=0,C++,0==--V[p]){if(p===h)break;p=t[n+i[C]]}if(p>b&&(G&d)!==u){for(0===v&&(v=b),m+=I,y=p-v,Z=1<852||2===e&&A>592)return 1;u=G&d,a[u]=b<<24|y<<16|m-o|0}}return 0!==G&&(a[m+G]=p-v<<24|64<<16|0),l.bits=b,0};const{Z_FINISH:gt,Z_BLOCK:ut,Z_TREES:dt,Z_OK:mt,Z_STREAM_END:ft,Z_NEED_DICT:pt,Z_STREAM_ERROR:Ct,Z_DATA_ERROR:It,Z_MEM_ERROR:ht,Z_BUF_ERROR:bt,Z_DEFLATED:yt}=K,vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Zt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const At=e=>{if(!e||!e.state)return Ct;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,mt},Gt=e=>{if(!e||!e.state)return Ct;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,At(e)},St=(e,t)=>{let n;if(!e||!e.state)return Ct;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ct:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Gt(e))},Bt=(e,t)=>{if(!e)return Ct;const n=new Zt;e.state=n,n.window=null;const r=St(e,t);return r!==mt&&(e.state=null),r};let Vt,Rt,wt=!0;const kt=e=>{if(wt){Vt=new Int32Array(512),Rt=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ct(1,e.lens,0,288,Vt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ct(2,e.lens,0,32,Rt,0,e.work,{bits:5}),wt=!1}e.lencode=Vt,e.lenbits=9,e.distcode=Rt,e.distbits=5},Wt=(e,t,n,r)=>{let a;const o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>r&&(a=r),o.window.set(t.subarray(n-r,n-r+a),o.wnext),(r-=a)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G=0;const S=new Uint8Array(4);let B,V;const R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return Ct;n=e.state,12===n.mode&&(n.mode=13),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,u=l,d=s,A=mt;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if((15&c)!==yt){e.msg="unknown compression method",n.mode=30;break}if(c>>>=4,g-=4,Z=8+(15&c),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,S[2]=c>>>16&255,S[3]=c>>>24&255,n.check=F(n.check,S,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(S[0]=255&c,S[1]=c>>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=F(n.check,S,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(m=n.length,m>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+m),Z)),512&n.flags&&(n.check=F(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1,g-=1,3&c){case 0:n.mode=14;break;case 1:if(kt(n),n.mode=20,t===dt){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,t===dt)break e;case 15:n.mode=16;case 16:if(m=n.length,m){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;a.set(r.subarray(o,o+m),i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},A=ct(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(V=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(V=C+3;g>>=C,g-=C,Z=0,m=3+(7&c),c>>>=3,g-=3}else{for(V=C+7;g>>=C,g-=C,Z=0,m=11+(127&c),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,B={bits:n.lenbits},A=ct(1,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},A=ct(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,t===dt)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,at(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;G=n.lencode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;G=n.distcode[c&(1<>>24,I=G>>>16&255,h=65535&G,!(C<=g);){if(0===l)break e;l--,c+=r[o++]<>b)],C=G>>>24,I=G>>>16&255,h=65535&G,!(b+C<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(V=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if(m=n.offset-m,m>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<{if(!e||!e.state)return Ct;let t=e.state;return t.window&&(t.window=null),e.state=null,mt},Ot=(e,t)=>{if(!e||!e.state)return Ct;const n=e.state;return 0==(2&n.wrap)?Ct:(n.head=t,t.done=!1,mt)},Nt=(e,t)=>{const n=t.length;let r,a,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?Ct:11===r.mode&&(a=1,a=H(a,t,n,0),a!==r.check)?It:(o=Wt(e,t,n,n),o?(r.mode=31,ht):(r.havedict=1,mt))):Ct},Ht=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Yt=Object.prototype.toString,{Z_NO_FLUSH:Ft,Z_FINISH:Pt,Z_OK:Kt,Z_STREAM_END:Mt,Z_NEED_DICT:Lt,Z_STREAM_ERROR:Dt,Z_DATA_ERROR:Et,Z_MEM_ERROR:Ut}=K;function zt(e){this.options=Ne({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Le,this.strm.avail_out=0;let n=Tt(this.strm,t.windowBits);if(n!==Kt)throw new Error(P[n]);if(this.header=new Ht,Ot(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Pe(t.dictionary):"[object ArrayBuffer]"===Yt.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Nt(this.strm,t.dictionary),n!==Kt)))throw new Error(P[n])}function _t(e,t){const n=new zt(t);if(n.push(e),n.err)throw n.msg||P[n.err];return n.result}zt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let o,i,l;if(this.ended)return!1;for(i=t===~~t?t:!0===t?Pt:Ft,"[object ArrayBuffer]"===Yt.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=Jt(n,i),o===Lt&&a&&(o=Nt(n,a),o===Kt?o=Jt(n,i):o===Et&&(o=Lt));n.avail_in>0&&o===Mt&&n.state.wrap>0&&0!==e[n.next_in];)xt(n),o=Jt(n,i);switch(o){case Dt:case Et:case Lt:case Ut:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(0===n.avail_out||o===Mt))if("string"===this.options.to){let e=Me(n.output,n.next_out),t=n.next_out-e,a=Ke(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==Kt||0!==l){if(o===Mt)return o=Xt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},zt.prototype.onData=function(e){this.chunks.push(e)},zt.prototype.onEnd=function(e){e===Kt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=He(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var jt={Inflate:zt,inflate:_t,inflateRaw:function(e,t){return(t=t||{}).raw=!0,_t(e,t)},ungzip:_t,constants:K};const{Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en}=rt,{Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an}=jt;var on={Deflate:Qt,deflate:qt,deflateRaw:$t,gzip:en,Inflate:tn,inflate:nn,inflateRaw:rn,ungzip:an,constants:K},ln=n(4),sn=n(34),cn=n(15),gn=n(18),un=ln.c.vtkErrorMacro,dn=ln.c.vtkDebugMacro,mn=0;function fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new XMLHttpRequest;return r.open(e,t,!0),n.headers&&Object.entries(n.headers).forEach((function(e){var t=Object(a.a)(e,2),n=t[0],o=t[1];return r.setRequestHeader(n,o)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var pn={fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return n.ref&&!n.ref.pending?new Promise((function(a,o){var i=fn("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);i.onreadystatechange=function(t){1===i.readyState&&(n.ref.pending=!0,1==++mn&&e.invokeBusy&&e.invokeBusy(!0)),4===i.readyState&&(n.ref.pending=!1,200===i.status||0===i.status?(n.buffer=i.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=on.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=on.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sn.a.ENDIANNESS!==n.ref.encode&&sn.a.ENDIANNESS&&(dn("Swap bytes of ".concat(n.name)),sn.a.swapBytes(n.buffer,cn.a[n.dataType])),n.values=new window[n.dataType](n.buffer)),n.values.length!==n.size&&un("Error in FetchArray: ".concat(n.name,", does not have the proper array size. Got ").concat(n.values.length,", instead of ").concat(n.size)),delete n.ref,0==--mn&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),a(n)):o({xhr:i,e:t}))},i.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",i.send()})):Promise.resolve(n)},fetchJSON:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(on.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n&&n.compression&&"gz"!==n.compression&&(un("Supported algorithms are: [gz]"),un("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,a){var o=fn("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++mn&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--mn&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(on.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):a({xhr:o,e:t}))},o.responseType=n.compression?"arraybuffer":"text",o.send()}))},fetchBinary:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var a=fn("GET",e,t);a.onreadystatechange=function(e){4===a.readyState&&(200===a.status||0===a.status?n(a.response):r({xhr:a,e:e}))},a.responseType="arraybuffer",a.send()}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(n,r){var a=new Image;t.crossOrigin&&(a.crossOrigin=t.crossOrigin),a.onload=function(){return n(a)},a.onerror=r,a.src=e}))}};Object(gn.c)("http",(function(e){return pn}));var Cn=n(9),In=n(10),hn=n(19),bn=n(29),yn=n(16),vn=Object(Cn.d)((function(e,t){for(var n=new Array(256),r=0;r<256;r++)n[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;function a(){yn.a.call(this,"utf-8 decode"),this.leftOver=null}function o(){yn.a.call(this,"utf-8 encode")}n[254]=n[254]=1,t.utf8encode=function(e){return hn.a.nodebuffer?bn.a.newBufferFrom(e,"utf-8"):function(e){var t,n,r,a,o,i=e.length,l=0;for(a=0;a>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t}(e)},t.utf8decode=function(e){return hn.a.nodebuffer?In.a.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,a,o,i=e.length,l=new Array(2*i);for(r=0,t=0;t4)l[r++]=65533,t+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&t1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return l.length!==r&&(l.subarray?l=l.subarray(0,r):l.length=r),In.a.applyFromCharCode(l)}(e=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e))},In.a.inherits(a,yn.a),a.prototype.processChunk=function(e){var r=In.a.transformTo(hn.a.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(hn.a.uint8array){var a=r;(r=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),r.set(a,this.leftOver.length)}else r=this.leftOver.concat(r);this.leftOver=null}var o=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t}(r),i=r;o!==r.length&&(hn.a.uint8array?(i=r.subarray(0,o),this.leftOver=r.subarray(o,r.length)):(i=r.slice(0,o),this.leftOver=r.slice(o,r.length))),this.push({data:t.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=a,In.a.inherits(o,yn.a),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o}),"/$$rollup_base$$/node_modules/jszip/lib"),Zn=n(50),An={base64:!1,binary:!1,dir:!1,createFolders:!0,date:null,compression:null,compressionOptions:null,comment:null,unixPermissions:null,dosPermissions:null},Gn=n(28);function Sn(e){yn.a.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=In.a.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}In.a.inherits(Sn,yn.a),Sn.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this.data=null},Sn.prototype.resume=function(){return!!yn.a.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,In.a.delay(this._tickAndRepeat,[],this)),!0)},Sn.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(In.a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},Sn.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})};var Bn=Sn;function Vn(e){yn.a.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}In.a.inherits(Vn,yn.a),Vn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}yn.a.prototype.processChunk.call(this,e)};var Rn=Vn,wn=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),kn=function(e,t){return void 0!==e&&e.length?"string"!==In.a.getTypeOf(e)?function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t[i])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var a=wn,o=0+n;e^=-1;for(var i=0;i>>8^a[255&(e^t.charCodeAt(i))];return-1^e}(0|t,e,e.length):0};function Wn(){yn.a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}In.a.inherits(Wn,yn.a),Wn.prototype.processChunk=function(e){this.streamInfo.crc32=kn(e.data,this.streamInfo.crc32||0),this.push(e)};var xn=Wn;function Tn(e,t,n,r,a){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=a}Tn.prototype={getContentWorker:function(){var e=new Bn(Gn.a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Rn("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new Bn(Gn.a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Tn.createWorkerFrom=function(e,t,n){return e.pipe(new xn).pipe(new Rn("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new Rn("compressedSize")).withStreamInfo("compression",t)};var Jn=Tn,Xn=function(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}};Xn.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n;"binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker();var a=!this._dataBinary;a&&!r&&(t=t.pipe(new vn.Utf8EncodeWorker)),!a&&r&&(t=t.pipe(new vn.Utf8DecodeWorker))}catch(e){(t=new yn.a("error")).error(e)}return new Zn.a(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof Jn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var n=this._decompressWorker();return this._dataBinary||(n=n.pipe(new vn.Utf8EncodeWorker)),Jn.createWorkerFrom(n,e,t)},_decompressWorker:function(){return this._data instanceof Jn?this._data.getContentWorker():this._data instanceof yn.a?this._data:new Bn(this._data)}};for(var On=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Nn=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Hn=0;Hn=0;)e[t]=0}var Kn=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Mn=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ln=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Dn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],En=new Array(576);Pn(En);var Un=new Array(60);Pn(Un);var zn=new Array(512);Pn(zn);var _n=new Array(256);Pn(_n);var jn=new Array(29);Pn(jn);var Qn,qn,$n,er=new Array(30);function tr(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}function nr(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function rr(e){return e<256?zn[e]:zn[256+(e>>>7)]}function ar(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function or(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function sr(e,t,n){var r,a,o=new Array(16),i=0;for(r=1;r<=15;r++)o[r]=i=i+n[r-1]<<1;for(a=0;a<=t;a++){var l=e[2*a+1];0!==l&&(e[2*a]=lr(o[l]++,l))}}function cr(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function gr(e){e.bi_valid>8?ar(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ur(e,t,n,r){var a=2*t,o=2*n;return e[a]>1;n>=1;n--)dr(e,o,n);a=s;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],dr(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*a]=o[2*n]+o[2*r],e.depth[a]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=a,e.heap[1]=a++,dr(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,a,o,i,l,s=t.dyn_tree,c=t.max_code,g=t.stat_desc.static_tree,u=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,f=t.stat_desc.max_length,p=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(s[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=s[2*s[2*(r=e.heap[n])+1]+1]+1)>f&&(o=f,p++),s[2*r+1]=o,r>c||(e.bl_count[o]++,i=0,r>=m&&(i=d[r-m]),l=s[2*r],e.opt_len+=l*(o+i),u&&(e.static_len+=l*(g[2*r+1]+i)));if(0!==p){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,p-=2}while(p>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(a=e.heap[--n])>c||(s[2*a+1]!==o&&(e.opt_len+=(o-s[2*a+1])*s[2*a],s[2*a+1]=o),r--)}}(e,t),sr(o,c,e.bl_count)}function pr(e,t,n){var r,a,o=-1,i=t[1],l=0,s=7,c=4;for(0===i&&(s=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=i,i=t[2*(r+1)+1],++l>=7;r<30;r++)for(er[r]=a<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),fr(e,e.l_desc),fr(e,e.d_desc),i=function(e){var t;for(pr(e,e.dyn_ltree,e.l_desc.max_code),pr(e,e.dyn_dtree,e.d_desc.max_code),fr(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Dn[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),a=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=a&&(a=o)):a=o=n+5,n+4<=a&&-1!==t?hr(e,t,n,r):4===e.strategy||o===a?(or(e,2+(r?1:0),3),mr(e,En,Un)):(or(e,4+(r?1:0),3),function(e,t,n,r){var a;for(or(e,t-257,5),or(e,n-1,5),or(e,r-4,4),a=0;a>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(_n[n]+256+1)]++,e.dyn_dtree[2*rr(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){or(e,2,3),ir(e,256,En),function(e){16===e.bi_valid?(ar(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},vr=function(e,t,n,r){for(var a=65535&e|0,o=e>>>16&65535|0,i=0;0!==n;){n-=i=n>2e3?2e3:n;do{o=o+(a=a+t[r++]|0)|0}while(--i);a%=65521,o%=65521}return a|o<<16|0},Zr=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}(),Ar=function(e,t,n,r){var a=Zr,o=r+n;e^=-1;for(var i=r;i>>8^a[255&(e^t[i])];return-1^e},Gr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function Sr(e,t){return e.msg=Gr[t],t}function Br(e){return(e<<1)-(e>4?9:0)}function Vr(e){for(var t=e.length;--t>=0;)e[t]=0}function Rr(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(Fn.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function wr(e,t){yr._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rr(e.strm)}function kr(e,t){e.pending_buf[e.pending++]=t}function Wr(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function xr(e,t){var n,r,a=e.max_chain_length,o=e.strstart,i=e.prev_length,l=e.nice_match,s=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,g=e.w_mask,u=e.prev,d=e.strstart+258,m=c[o+i-1],f=c[o+i];e.prev_length>=e.good_match&&(a>>=2),l>e.lookahead&&(l=e.lookahead);do{if(c[(n=t)+i]===f&&c[n+i-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oi){if(e.match_start=t,i=r,r>=l)break;m=c[o+i-1],f=c[o+i]}}}while((t=u[t&g])>s&&0!=--a);return i<=e.lookahead?i:e.lookahead}function Tr(e){var t,n,r,a,o,i,l,s,c,g,u=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=u+(u-262)){Fn.arraySet(e.window,e.window,u,u,0),e.match_start-=u,e.strstart-=u,e.block_start-=u,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=u?r-u:0}while(--n);t=n=u;do{r=e.prev[--t],e.prev[t]=r>=u?r-u:0}while(--n);a+=u}if(0===e.strm.avail_in)break;if(i=e.strm,l=e.window,s=e.strstart+e.lookahead,c=a,g=void 0,(g=i.avail_in)>c&&(g=c),n=0===g?0:(i.avail_in-=g,Fn.arraySet(l,i.input,i.next_in,g,s),1===i.state.wrap?i.adler=vr(i.adler,l,g,s):2===i.state.wrap&&(i.adler=Ar(i.adler,l,g,s)),i.next_in+=g,i.total_in+=g,g),e.lookahead+=n,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=yr._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=yr._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<15&&(i=2,r-=16),a<1||a>9||8!==n||r<8||r>15||t<0||t>9||o<0||o>4)return Sr(e,-2);8===r&&(r=9);var l=new Nr;return e.state=l,l.strm=e,l.wrap=i,l.gzhead=null,l.w_bits=r,l.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tr(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,wr(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(wr(e,!1),e.strm.avail_out),1)})),new Or(4,4,8,4,Jr),new Or(4,5,16,8,Jr),new Or(4,6,32,32,Jr),new Or(4,4,16,16,Xr),new Or(8,16,32,32,Xr),new Or(8,16,128,128,Xr),new Or(8,32,128,256,Xr),new Or(32,128,258,1024,Xr),new Or(32,258,258,4096,Xr)];var Pr={deflateInit:function(e,t){return Fr(e,t,8,15,8,0)},deflateInit2:Fr,deflateReset:Yr,deflateResetKeep:Hr,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},deflate:function(e,t){var n,r,a,o;if(!e||!e.state||t>5||t<0)return e?Sr(e,-2):-2;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||666===r.status&&4!==t)return Sr(e,0===e.avail_out?-5:-2);if(r.strm=e,n=r.last_flush,r.last_flush=t,42===r.status)if(2===r.wrap)e.adler=0,kr(r,31),kr(r,139),kr(r,8),r.gzhead?(kr(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),kr(r,255&r.gzhead.time),kr(r,r.gzhead.time>>8&255),kr(r,r.gzhead.time>>16&255),kr(r,r.gzhead.time>>24&255),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(kr(r,255&r.gzhead.extra.length),kr(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=Ar(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,0),kr(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),kr(r,3),r.status=113);else{var i=8+(r.w_bits-8<<4)<<8;i|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(i|=32),i+=31-i%31,r.status=113,Wr(r,i),0!==r.strstart&&(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending!==r.pending_buf_size));)kr(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),Rr(e),a=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexa&&(e.adler=Ar(e.adler,r.pending_buf,r.pending-a,a)),0===o&&(r.status=103)}else r.status=103;if(103===r.status&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&Rr(e),r.pending+2<=r.pending_buf_size&&(kr(r,255&e.adler),kr(r,e.adler>>8&255),e.adler=0,r.status=113)):r.status=113),0!==r.pending){if(Rr(e),0===e.avail_out)return r.last_flush=-1,0}else if(0===e.avail_in&&Br(t)<=Br(n)&&4!==t)return Sr(e,-5);if(666===r.status&&0!==e.avail_in)return Sr(e,-5);if(0!==e.avail_in||0!==r.lookahead||0!==t&&666!==r.status){var l=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(Tr(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,r,a,o,i=e.window;;){if(e.lookahead<=258){if(Tr(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=i[a=e.strstart-1])===i[++a]&&r===i[++a]&&r===i[++a]){o=e.strstart+258;do{}while(r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&r===i[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=yr._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=yr._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(wr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(wr(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(wr(e,!1),0===e.strm.avail_out)?1:2}(r,t):br[r.level].func(r,t);if(3!==l&&4!==l||(r.status=666),1===l||3===l)return 0===e.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===t?yr._tr_align(r):5!==t&&(yr._tr_stored_block(r,0,0,!1),3===t&&(Vr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Rr(e),0===e.avail_out))return r.last_flush=-1,0}return 4!==t?0:r.wrap<=0?1:(2===r.wrap?(kr(r,255&e.adler),kr(r,e.adler>>8&255),kr(r,e.adler>>16&255),kr(r,e.adler>>24&255),kr(r,255&e.total_in),kr(r,e.total_in>>8&255),kr(r,e.total_in>>16&255),kr(r,e.total_in>>24&255)):(Wr(r,e.adler>>>16),Wr(r,65535&e.adler)),Rr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},deflateEnd:function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?Sr(e,-2):(e.state=null,113===t?Sr(e,-3):0):-2},deflateSetDictionary:function(e,t){var n,r,a,o,i,l,s,c,g=t.length;if(!e||!e.state)return-2;if(2===(o=(n=e.state).wrap)||1===o&&42!==n.status||n.lookahead)return-2;for(1===o&&(e.adler=vr(e.adler,t,g,0)),n.wrap=0,g>=n.w_size&&(0===o&&(Vr(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new Fn.Buf8(n.w_size),Fn.arraySet(c,t,g-n.w_size,n.w_size,0),t=c,g=n.w_size),i=e.avail_in,l=e.next_in,s=e.input,e.avail_in=g,e.next_in=0,e.input=t,Tr(n);n.lookahead>=3;){r=n.strstart,a=n.lookahead-2;do{n.ins_h=(n.ins_h<=252?6:Dr>=248?5:Dr>=240?4:Dr>=224?3:Dr>=192?2:1;function Er(e,t){if(t<65534&&(e.subarray&&Mr||!e.subarray&&Kr))return String.fromCharCode.apply(null,Fn.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},zr=function(e){return Er(e,e.length)},_r=function(e){for(var t=new Fn.Buf8(e.length),n=0,r=t.length;n4)l[r++]=65533,n+=o-1;else{for(a&=2===o?31:3===o?15:7;o>1&&n1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|1023&a)}return Er(l,r)},Qr=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Lr[e[n]]>t?n:t},qr=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$r=Object.prototype.toString;function ea(e){if(!(this instanceof ea))return new ea(e);this.options=Fn.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=Pr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(Gr[n]);if(t.header&&Pr.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ur(t.dictionary):"[object ArrayBuffer]"===$r.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=Pr.deflateSetDictionary(this.strm,r)))throw new Error(Gr[n]);this._dict_set=!0}}function ta(e,t){var n=new ea(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}ea.prototype.push=function(e,t){var n,r,a=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?a.input=Ur(e):"[object ArrayBuffer]"===$r.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new Fn.Buf8(o),a.next_out=0,a.avail_out=o),1!==(n=Pr.deflate(a,r))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(zr(Fn.shrinkBuf(a.output,a.next_out))):this.onData(Fn.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==n);return 4===r?(n=Pr.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==r||(this.onEnd(0),a.avail_out=0,!0)},ea.prototype.onData=function(e){this.chunks.push(e)},ea.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var na={Deflate:ea,deflate:ta,deflateRaw:function(e,t){return(t=t||{}).raw=!0,ta(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,ta(e,t)}},ra=function(e,t){var n,r,a,o,i,l,s,c,g,u,d,m,f,p,C,I,h,b,y,v,Z,A,G,S,B;n=e.state,r=e.next_in,S=e.input,a=r+(e.avail_in-5),o=e.next_out,B=e.output,i=o-(t-e.avail_out),l=o+(e.avail_out-257),s=n.dmax,c=n.wsize,g=n.whave,u=n.wnext,d=n.window,m=n.hold,f=n.bits,p=n.lencode,C=n.distcode,I=(1<>>=y=b>>>24,f-=y,0==(y=b>>>16&255))B[o++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<>>=y,f-=y),f<15&&(m+=S[r++]<>>=y=b>>>24,f-=y,!(16&(y=b>>>16&255))){if(0==(64&y)){b=C[(65535&b)+(m&(1<s){e.msg="invalid distance too far back",n.mode=30;break e}if(m>>>=y,f-=y,Z>(y=o-i)){if((y=Z-y)>g&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(A=0,G=d,0===u){if(A+=c-y,y2;)B[o++]=G[A++],B[o++]=G[A++],B[o++]=G[A++],v-=3;v&&(B[o++]=G[A++],v>1&&(B[o++]=G[A++]))}else{A=o-Z;do{B[o++]=B[A++],B[o++]=B[A++],B[o++]=B[A++],v-=3}while(v>2);v&&(B[o++]=B[A++],v>1&&(B[o++]=B[A++]))}break}}break}}while(r>3,m&=(1<<(f-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===k[v];v--);if(Z>v&&(Z=v),0===v)return a[o++]=20971520,a[o++]=20971520,l.bits=1,0;for(y=1;y0&&(0===e||1!==v))return-1;for(W[1]=0,h=1;h<15;h++)W[h+1]=W[h]+k[h];for(b=0;b852||2===e&&B>592)return 1;for(;;){f=h-G,i[b]m?(p=x[T+i[b]],C=R[w+i[b]]):(p=96,C=0),s=1<>G)+(c-=s)]=f<<24|p<<16|C|0}while(0!==c);for(s=1<>=1;if(0!==s?(V&=s-1,V+=s):V=0,b++,0==--k[h]){if(h===v)break;h=t[n+i[b]]}if(h>Z&&(V&u)!==g){for(0===G&&(G=Z),d+=y,S=1<<(A=h-G);A+G852||2===e&&B>592)return 1;a[g=V&u]=Z<<24|A<<16|d-o|0}}return 0!==V&&(a[d+V]=h-G<<24|64<<16|0),l.bits=Z,0};function ca(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function ga(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Fn.Buf16(320),this.work=new Fn.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function ua(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Fn.Buf32(852),t.distcode=t.distdyn=new Fn.Buf32(592),t.sane=1,t.back=-1,0):-2}function da(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,ua(e)):-2}function ma(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,da(e))):-2}function fa(e,t){var n,r;return e?(r=new ga,e.state=r,r.window=null,0!==(n=ma(e,t))&&(e.state=null),n):-2}var pa,Ca,Ia=!0;function ha(e){if(Ia){var t;for(pa=new Fn.Buf32(512),Ca=new Fn.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(sa(1,e.lens,0,288,pa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sa(2,e.lens,0,32,Ca,0,e.work,{bits:5}),Ia=!1}e.lencode=pa,e.lenbits=9,e.distcode=Ca,e.distbits=5}function ba(e,t,n,r){var a,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(Fn.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>r&&(a=r),Fn.arraySet(o.window,t,n-r,a,o.wnext),(r-=a)?(Fn.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=Ar(n.check,V,2,0),c=0,g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=30;break}if(g-=4,Z=8+(15&(c>>>=4)),0===n.wbits)n.wbits=Z;else if(Z>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=3;case 3:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=Ar(n.check,V,4,0)),c=0,g=0,n.mode=4;case 4:for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>8),512&n.flags&&(V[0]=255&c,V[1]=c>>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0,n.mode=5;case 5:if(1024&n.flags){for(;g<16;){if(0===l)break e;l--,c+=r[o++]<>>8&255,n.check=Ar(n.check,V,2,0)),c=0,g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((m=n.length)>l&&(m=l),m&&(n.head&&(Z=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),Fn.arraySet(n.head.extra,r,o,m,Z)),512&n.flags&&(n.check=Ar(n.check,r,m,o)),l-=m,o+=m,n.length-=m),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===l)break e;m=0;do{Z=r[o+m++],n.head&&Z&&n.length<65536&&(n.head.name+=String.fromCharCode(Z))}while(Z&&m>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;g<32;){if(0===l)break e;l--,c+=r[o++]<>>=7&g,g-=7&g,n.mode=27;break}for(;g<3;){if(0===l)break e;l--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(ha(n),n.mode=20,6===t){c>>>=2,g-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}c>>>=2,g-=2;break;case 14:for(c>>>=7&g,g-=7&g;g<32;){if(0===l)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&c,c=0,g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(m=n.length){if(m>l&&(m=l),m>s&&(m=s),0===m)break e;Fn.arraySet(a,r,o,m,i),l-=m,o+=m,s-=m,i+=m,n.length-=m;break}n.mode=12;break;case 17:for(;g<14;){if(0===l)break e;l--,c+=r[o++]<>>=5,g-=5,n.ndist=1+(31&c),c>>>=5,g-=5,n.ncode=4+(15&c),c>>>=4,g-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,g-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},A=sa(0,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=C,g-=C,n.lens[n.have++]=h;else{if(16===h){for(S=C+2;g>>=C,g-=C,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}Z=n.lens[n.have-1],m=3+(3&c),c>>>=2,g-=2}else if(17===h){for(S=C+3;g>>=C)),c>>>=3,g-=3}else{for(S=C+7;g>>=C)),c>>>=7,g-=7}if(n.have+m>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;m--;)n.lens[n.have++]=Z}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,G={bits:n.lenbits},A=sa(1,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,A){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},A=sa(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,A){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(l>=6&&s>=258){e.next_out=i,e.avail_out=s,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=g,ra(e,d),i=e.next_out,a=e.output,s=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,g=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;I=(B=n.lencode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,n.length=h,0===I){n.mode=26;break}if(32&I){n.back=-1,n.mode=12;break}if(64&I){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&I,n.mode=22;case 22:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;I=(B=n.distcode[c&(1<>>16&255,h=65535&B,!((C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>b)])>>>16&255,h=65535&B,!(b+(C=B>>>24)<=g);){if(0===l)break e;l--,c+=r[o++]<>>=b,g-=b,n.back+=b}if(c>>>=C,g-=C,n.back+=C,64&I){e.msg="invalid distance code",n.mode=30;break}n.offset=h,n.extra=15&I,n.mode=24;case 24:if(n.extra){for(S=n.extra;g>>=n.extra,g-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===s)break e;if(m=d-s,n.offset>m){if((m=n.offset-m)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}m>n.wnext?(m-=n.wnext,f=n.wsize-m):f=n.wnext-m,m>n.length&&(m=n.length),p=n.window}else p=a,f=i-n.offset,m=n.length;m>s&&(m=s),s-=m,n.length-=m;do{a[i++]=p[f++]}while(--m);0===n.length&&(n.mode=21);break;case 26:if(0===s)break e;a[i++]=n.length,s--,n.mode=21;break;case 27:if(n.wrap){for(;g<32;){if(0===l)break e;l--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qr,this.strm.avail_out=0;var n=ya.inflateInit2(this.strm,t.windowBits);if(n!==va.Z_OK)throw new Error(Gr[n]);if(this.header=new Za,ya.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ur(t.dictionary):"[object ArrayBuffer]"===Aa.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ya.inflateSetDictionary(this.strm,t.dictionary))!==va.Z_OK))throw new Error(Gr[n])}function Sa(e,t){var n=new Ga(t);if(n.push(e,!0),n.err)throw n.msg||Gr[n.err];return n.result}Ga.prototype.push=function(e,t){var n,r,a,o,i,l=this.strm,s=this.options.chunkSize,c=this.options.dictionary,g=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?va.Z_FINISH:va.Z_NO_FLUSH,"string"==typeof e?l.input=_r(e):"[object ArrayBuffer]"===Aa.call(e)?l.input=new Uint8Array(e):l.input=e,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new Fn.Buf8(s),l.next_out=0,l.avail_out=s),(n=ya.inflate(l,va.Z_NO_FLUSH))===va.Z_NEED_DICT&&c&&(n=ya.inflateSetDictionary(this.strm,c)),n===va.Z_BUF_ERROR&&!0===g&&(n=va.Z_OK,g=!1),n!==va.Z_STREAM_END&&n!==va.Z_OK)return this.onEnd(n),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&n!==va.Z_STREAM_END&&(0!==l.avail_in||r!==va.Z_FINISH&&r!==va.Z_SYNC_FLUSH)||("string"===this.options.to?(a=Qr(l.output,l.next_out),o=l.next_out-a,i=jr(l.output,a),l.next_out=o,l.avail_out=s-o,o&&Fn.arraySet(l.output,l.output,a,o,0),this.onData(i)):this.onData(Fn.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(g=!0)}while((l.avail_in>0||0===l.avail_out)&&n!==va.Z_STREAM_END);return n===va.Z_STREAM_END&&(r=va.Z_FINISH),r===va.Z_FINISH?(n=ya.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===va.Z_OK):r!==va.Z_SYNC_FLUSH||(this.onEnd(va.Z_OK),l.avail_out=0,!0)},Ga.prototype.onData=function(e){this.chunks.push(e)},Ga.prototype.onEnd=function(e){e===va.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Fn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Ba={Inflate:Ga,inflate:Sa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Sa(e,t)},ungzip:Sa},Va={};(0,Fn.assign)(Va,na,Ba,va);var Ra=Va,wa="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array?"uint8array":"array";function ka(e,t){yn.a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}In.a.inherits(ka,yn.a),ka.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(In.a.transformTo(wa,e.data),!1)},ka.prototype.flush=function(){yn.a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},ka.prototype.cleanUp=function(){yn.a.prototype.cleanUp.call(this),this._pako=null},ka.prototype._createPako=function(){this._pako=new Ra[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}};var Wa={STORE:{magic:"\0\0",compressWorker:function(e){return new yn.a("STORE compression")},uncompressWorker:function(){return new yn.a("STORE decompression")}},DEFLATE:{magic:"\b\0",compressWorker:function(e){return new ka("Deflate",e)},uncompressWorker:function(){return new ka("Inflate",{})}}},xa="PK",Ta="PK",Ja="PK",Xa="PK",Oa="PK",Na="PK\b",Ha=function(e,t){var n,r="";for(n=0;n>>=8;return r},Ya=function(e,t,n,r,a,o){var i,l,s=e.file,c=e.compression,g=o!==vn.utf8encode,u=In.a.transformTo("string",o(s.name)),d=In.a.transformTo("string",vn.utf8encode(s.name)),m=s.comment,f=In.a.transformTo("string",o(m)),p=In.a.transformTo("string",vn.utf8encode(m)),C=d.length!==s.name.length,I=p.length!==m.length,h="",b="",y="",v=s.dir,Z=s.date,A={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(A.crc32=e.crc32,A.compressedSize=e.compressedSize,A.uncompressedSize=e.uncompressedSize);var G=0;t&&(G|=8),g||!C&&!I||(G|=2048);var S,B,V=0,R=0;v&&(V|=16),"UNIX"===a?(R=798,V|=(B=S=s.unixPermissions,S||(B=v?16893:33204),(65535&B)<<16)):(R=20,V|=63&(s.dosPermissions||0)),i=Z.getUTCHours(),i<<=6,i|=Z.getUTCMinutes(),i<<=5,i|=Z.getUTCSeconds()/2,l=Z.getUTCFullYear()-1980,l<<=4,l|=Z.getUTCMonth()+1,l<<=5,l|=Z.getUTCDate(),C&&(b=Ha(1,1)+Ha(kn(u),4)+d,h+="up"+Ha(b.length,2)+b),I&&(y=Ha(1,1)+Ha(kn(f),4)+p,h+="uc"+Ha(y.length,2)+y);var w="";return w+="\n\0",w+=Ha(G,2),w+=c.magic,w+=Ha(i,2),w+=Ha(l,2),w+=Ha(A.crc32,4),w+=Ha(A.compressedSize,4),w+=Ha(A.uncompressedSize,4),w+=Ha(u.length,2),w+=Ha(h.length,2),{fileRecord:xa+w+u+h,dirRecord:Ta+Ha(R,2)+w+Ha(f.length,2)+"\0\0\0\0"+Ha(V,4)+Ha(r,4)+u+h+f}},Fa=function(e){return Na+Ha(e.crc32,4)+Ha(e.compressedSize,4)+Ha(e.uncompressedSize,4)};function Pa(e,t,n,r){yn.a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}In.a.inherits(Pa,yn.a),Pa.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,yn.a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},Pa.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=Ya(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Pa.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=Ya(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:Fa(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Pa.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},za=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},_a=function(e,t){return t=void 0!==t?t:An.createFolders,e=za(e),this.files[e]||Ea.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function ja(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var Qa={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){if(1===arguments.length){if(ja(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,Ea.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(ja(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=_a.call(this,t),r=this.clone();return r.root=n.name,r},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return In.a.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}};var $a=qa;function eo(e){$a.call(this,e);for(var t=0;t=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===a)return o-this.zero;return-1},eo.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),a=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&a===o[3]},eo.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var to=eo;function no(e){$a.call(this,e)}In.a.inherits(no,$a),no.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},no.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},no.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},no.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var ro=no;function ao(e){to.call(this,e)}In.a.inherits(ao,to),ao.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var oo=ao;function io(e){oo.call(this,e)}In.a.inherits(io,oo),io.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};var lo=io,so=function(e){var t=In.a.getTypeOf(e);return In.a.checkSupport(t),"string"!==t||hn.a.uint8array?"nodebuffer"===t?new lo(e):hn.a.uint8array?new oo(In.a.transformTo("uint8array",e)):new to(In.a.transformTo("array",e)):new ro(e)};function co(e,t){this.options=e,this.loadOptions=t}co.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,n;if(e.skip(22),this.fileNameLength=e.readInt(2),n=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(n),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in Wa)if(Wa.hasOwnProperty(t)&&Wa[t].magic===e)return Wa[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+In.a.pretty(this.compressionMethod)+" unknown (inner file : "+In.a.transformTo("string",this.fileName)+")");this.decompressed=new Jn(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===e&&(this.dosPermissions=63&this.externalFileAttributes),3===e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=so(this.extraFields[1].value);this.uncompressedSize===In.a.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===In.a.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===In.a.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===In.a.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,a=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,Ta)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=so(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var mo=uo;function fo(e){return new Gn.a.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new xn);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}function po(){if(!(this instanceof po))return new po;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new po;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}po.prototype=Qa,po.prototype.loadAsync=function(e,t){var n=this;return t=In.a.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:vn.utf8decode}),bn.a.isNode&&bn.a.isStream(e)?Gn.a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):In.a.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new mo(t);return n.load(e),n})).then((function(e){var n=[Gn.a.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var a=0;a1;){var i=o.shift();a=a.folder(i)}e.callback&&e.callback(r)})),{fetchArray:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(l,s){t||Io("ERROR!!! zip not ready...");var c=vo([r,o.ref.basepath,i.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var g="string"!==o.dataType||i.compression?"uint8array":"string",u=yo[g](o,i.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),l(o)}));a.file(c).async(g).then(u)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(JSON.parse(e))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).async("uint8array").then((function(e){var t=on.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=vo(e);return t||Io("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,a.file(n).async("base64").then((function(e){r.src="data:image/".concat(bo(n),";base64,").concat(e)}))}))},fetchBinary:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=vo(e);return t||Io("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?a.file(r).then((function(e){var t=on.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):a.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};Object(gn.c)("zip",(function(e){return Zo.create(e)}));var Ao=n(11),Go=n(13),So=n(23),Bo=n(7);function Vo(e,t){function n(){for(;t.cellFields.length0&&void 0!==arguments[0]?arguments[0]:0;return t.radius[e]},e.setRadius=function(n,r){t.radius[n]=r,e.modified()},e.setCellField=function(n,r){t.cellFields[n]=r,e.modified()},e.removeMask=function(){t.mask=null,e.modified()},e.setMaskLayer=function(n,r){var a=!1;!t.mask&&r&&(a=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(a=!0),t.mask[n]=r),a&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var a;if(!t.deleted&&t.radius.length){n();var o=r[0],i=t.radius.length,l=t.height/2,s=0,c=0,g=t.startThetat.startTheta?t.endTheta:t.startTheta;u*=Math.PI/180;var d=t.resolution,m=!1;u>=g+2*Math.PI?u=g+2*Math.PI:(++d,m=!0);var f=(u-g)/t.resolution,p=d*i*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(s+=2*(d+1)+5*d+(m?10:0),c+=2+d+(m?2:0));for(var C=1;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ro,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.getArray(e,t,["cellFields"]),ln.c.algo(e,t,0,1),Vo(e,t)}),"vtkConcentricCylinderSource");function wo(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var a=n[0],o=2*Math.PI/t.resolution,i=-t.height/2,l=t.resolution+1,s=4*t.resolution+1+t.resolution,c=0,g=new window[t.pointType](3*l),u=0,d=new Uint32Array(s);g[0]=t.height/2,g[1]=0,g[2]=0,t.capping&&(d[u++]=t.resolution);for(var m=0;mt.resolution?1:f+2;(r=So.a.buildFromRadian()).translate.apply(r,Object(Ao.a)(t.center)).rotateFromDirections([1,0,0],t.direction).apply(g),(a=Go.a.newInstance()).getPoints().setData(g,3),a.getPolys().setData(d,1),n[0]=a}}}var ko={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ko,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),wo(e,t)}),"vtkConeSource");function Wo(e,t){t.classHierarchy.push("vtkCubeSource"),e.setBounds=function(){var e=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))e=arguments.length<=0?void 0:arguments[0];else for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),ln.c.setGetArray(e,t,["center","rotations"],3),ln.c.algo(e,t,0,1),Wo(e,t)}),"vtkCubeSource");function To(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,a;if(!t.deleted){var o=n[0],i=2*Math.PI/t.resolution,l=2*t.resolution,s=5*t.resolution;t.capping&&(l=4*t.resolution,s=7*t.resolution+2);for(var c=new window[t.pointType](3*l),g=0,u=new Uint32Array(s),d=new Float32Array(3*l),m=Bo.a.newInstance({numberOfComponents:3,values:d,name:"Normals"}),f=new Float32Array(2*l),p=Bo.a.newInstance({numberOfComponents:2,values:f,name:"TCoords"}),C=[0,0,0],I=[0,0,0],h=[0,0,0],b=[0,0,0],y=[0,0],v=[0,0],Z=0;Z2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["height","radius","resolution","capping"]),ln.c.setGetArray(e,t,["center","direction"],3),ln.c.algo(e,t,0,1),To(e,t)}),"vtkCylinderSource");var Xo=n(6),Oo=ln.c.vtkWarningMacro;function No(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=new Float32Array(3);if(Object(Xo.t)(t.point2,t.point1,i),Object(Xo.A)(i)<=0)Oo("Zero-length line definition");else{var l=t.resolution,s=l+1,c=new window[a](3*s);o.getPoints().setData(c,3);var g=new Uint32Array(s+1);o.getLines().setData(g,1);for(var u=0,d=0,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ho,n),ln.c.obj(e,t),ln.c.setGet(e,t,["resolution"]),ln.c.setGetArray(e,t,["point1","point2"],3),ln.c.algo(e,t,0,1),No(e,t)}),"vtkLineSource");var Yo=n(8),Fo=n(12),Po=ln.c.vtkWarningMacro;function Ko(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var a=r[0],o=a?a.getPoints().getDataType():"Float32Array",i=Go.a.newInstance(),l=new Float32Array(3),s=new Float32Array(3);if(Object(Xo.t)(t.point1,t.origin,l),Object(Xo.t)(t.point2,t.origin,s),e.updatePlane(l,s)){var c=t.xResolution,g=t.yResolution,u=(c+1)*(g+1),d=c*g,m=new window[o](3*u);i.getPoints().setData(m,3);var f=new Uint32Array(5*d);i.getPolys().setData(f,1);var p=new Float32Array(3*u),C=Bo.a.newInstance({numberOfComponents:3,values:p,name:"Normals"});i.getPointData().setNormals(C);var I=new Float32Array(2*u),h=Bo.a.newInstance({numberOfComponents:2,values:I,name:"TextureCoordinates"});i.getPointData().setTCoords(h);for(var b=new Float32Array(2),y=0,v=0;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mo,n),t.normal=[0,0,1],t.center=[0,0,0],ln.c.obj(e,t),ln.c.setGet(e,t,["xResolution","yResolution"]),ln.c.setGetArray(e,t,["origin"],3),ln.c.getArray(e,t,["point1","point2","normal","center"],3),ln.c.algo(e,t,0,1),Ko(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}),"vtkPlaneSource");function Lo(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array",o=Go.a.newInstance(),i=t.numberOfPoints,l=new window[a](3*i);o.getPoints().setData(l,3);var s,c,g,u,d,m=new Uint32Array(i+1);o.getVerts().setData(m,1);for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Do,n),ln.c.obj(e,t),ln.c.setGet(e,t,["numberOfPoints","radius"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Lo(e,t)}),"vtkPointSource");function Eo(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],a=r?r.getPoints().getDataType():"Float32Array";r=Go.a.newInstance();var o=0,i=t.thetaResolution,l=t.startThetat.startTheta?t.endTheta:t.startTheta;s*=Math.PI/180;var c=t.startPhit.startPhi?t.endPhi:t.startPhi;g*=Math.PI/180,Math.abs(l-s)<2*Math.PI&&++i;var u=(s-l)/t.thetaResolution,d=t.startPhi<=0?1:0,m=t.phiResolution+(t.endPhi>=180?-1:0),f=t.phiResolution*i+2,p=2*t.phiResolution*t.thetaResolution,C=0,I=new window[a](3*f),h=new Float32Array(3*f),b=0,y=new Uint32Array(5*p);t.startPhi<=0&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]+t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=1,C++,o++),t.endPhi>=180&&(I[3*C+0]=t.center[0],I[3*C+1]=t.center[1],I[3*C+2]=t.center[2]-t.radius,h[3*C+0]=0,h[3*C+1]=0,h[3*C+2]=-1,C++,o++);for(var v=t.phiResolution-o,Z=(g-c)/(t.phiResolution-1),A=0;A=180)for(var W=v-1+o,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uo,n),ln.c.obj(e,t),ln.c.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),ln.c.setGetArray(e,t,["center"],3),ln.c.algo(e,t,0,1),Eo(e,t)}),"vtkSphereSource");var zo=n(17),_o=n(27),jo=ln.c.vtkDebugMacro,Qo=ln.c.vtkErrorMacro;function qo(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var a=n[0];if(!a)return Qo("Invalid or missing input"),1;var o=a.getPoints(),i=a.getPointData().getNormals(),l=e.getInputArrayToProcess(0);if(!o||!l)return jo("No data to warp",!!o,!!l),r[0]=n[0],1;var s=o.getNumberOfPoints(),c=null,g=[0,0,1];i&&!t.useNormal?(c=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},jo("Using data normals")):e.getXyPlane()?(c=function(e,t){return g},jo("Using x-y plane normal")):(c=function(e,n){return t.normal},jo("Using Normal instance variable"));for(var u=new Float32Array(3*s),d=o.getData(),m=0,f=[0,0,1],p=1,C=l.getData(),I=l.getNumberOfComponents(),h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$o,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),ln.c.setGetArray(e,t,["normal"],3),qo(e,t)}),"vtkWarpScalar");var ei=n(36),ti=n(37),ni={VaryRadius:{VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},GenerateTCoords:{TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3}},ri=ni.VaryRadius,ai=ni.GenerateTCoords,oi=ln.c.vtkDebugMacro,ii=ln.c.vtkErrorMacro,li=ln.c.vtkWarningMacro;function si(e,t){function n(e,n){var r=e;return t.sidesShareVertices?r+=t.numberOfSides*n:r+=2*t.numberOfSides*n,t.capping&&(r+=2*t.numberOfSides),r}function r(e,t,n){for(var r=t[n],a=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],i=t,l=i[0],s=0;s1){var c=0,g=[0,0,0],u=[0,0,0],d=i.slice(s+1,s+1+l);if((c=r(e,d,0))!==l)!function(){var t=d[c],i=e.slice(3*t,3*(t+1)),s=d[c+1],m=e.slice(3*s,3*(s+1));if(g=m.map((function(e,t){return e-i[t]})),Object(Xo.y)(g),a)o=a;else{for(;++c.001){o=p,g=u;break}}if(c>=l)for(var C=0;C<3;++C)if(0!==g[C]){o[(C+2)%3]=0,o[(C+1)%3]=1,o[C]=-g[(C+1)%3]/g[C];break}}Object(Xo.y)(o);for(var I=0;++c0?Math.sqrt(Z):0;for(var A=[0,0,0],G=0;G<3;++G)A[G]=u[G]+g[G];Object(Xo.y)(A),Object(Xo.w)(A,y,b),Object(Xo.w)(g,y,A),Object(Xo.q)(o,A)*Object(Xo.q)(b,A)<0&&(Z*=-1);for(var S=I;St.radiusFactor&&(B=t.radiusFactor);else if(c&&t.varyRadius===ri.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(B=c.getComponent(r[R],0))<0)return li("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var X=0;X1&&k){var q=Z.slice(j,j+A+1);a(u.getData(),q,R)}o(z,A,Q,u.getData(),I.getData(),g.getPointData(),L,b,H,F,P,K,w,U)?(V=i(z,A,_,V,g.getCellData(),M,B),D&&l(z,A,Q,u.getData(),H,D.getData())):li("Could not generate points"),z=n(z,A),_++}c.setPoints(I),c.setStrips(B),c.setPointData(L),L.setNormals(y),s[0]=c}}}}}else ii("Invalid or missing input")}}var ci={outputPointsPrecision:ti.b.DEFAULT,radius:.5,varyRadius:ri.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:ai.TCOORDS_OFF,textureLength:1};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ci,n),ln.c.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),ln.c.obj(e,t),ln.c.algo(e,t,1,1),si(e,t)}),"vtkTubeFilter");var gi=n(40),ui=(n(25),{diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"}),di={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function mi(e){var t="",n=0,r=di.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var a,o,i,l={comments:[],elements:[],headerLength:n},s=t.split("\n"),c=0;c0,u=e.uvs.length>0,d=e.normals.length>0,m=e.faceVertexUvs.length>0,f=0;f0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(a)}}function hi(e,t,n,r){var a;switch(n){case"int8":case"char":a=[e.getInt8(t),1];break;case"uint8":case"uchar":a=[e.getUint8(t),1];break;case"int16":case"short":a=[e.getInt16(t,r),2];break;case"uint16":case"ushort":a=[e.getUint16(t,r),2];break;case"int32":case"int":a=[e.getInt32(t,r),4];break;case"uint32":case"uint":a=[e.getUint32(t,r),4];break;case"float32":case"float":a=[e.getFloat32(t,r),4];break;case"float64":case"double":a=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return a}function bi(e,t,n,r){for(var a,o={},i=0,l=0;l1&&void 0!==arguments[1]?arguments[1]:{},a=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:a,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:a,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=n(t.url,r);return a.then(e.parse),a},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified();var r=mi(gi.a.arrayBufferToString(n));if("ascii"!==r.format){t.parseData=n;for(var a,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},i="binary_little_endian"===r.format,l=n instanceof ArrayBuffer?n:n.buffer,s=new DataView(l,r.headerLength),c=0,g=0;g=a.elements[c].count&&(c++,g=0);var m=Ci(a.elements[c].properties,d);Ii(o,a.elements[c].name,m),g++}}var f=fi(o,a.elements);t.output[0]=f}}},e.requestData=function(n,r){e.parse(t.parseData)}}var vi={};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),yi(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}),"vtkPLYReader"),n(69);function Zi(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){return t.url=n,e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then((function(t){return e.parseAsText(t),!0}))},e.parseAsText=function(n){t.csv=n,t.elevation=[],t.csv.split("\n").forEach((function(e,n){t.elevation.push(e.split(",").map((function(e){return Number(e)})))})),e.modified()},e.requestData=function(e,n){var r=Go.a.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var a=t.elevation.length,o=t.elevation[0].length,i=r.getPoints();i.setNumberOfPoints(o*a,3);var l=i.getData(),s=ei.a.newInstance({size:5*(o-1)*(a-1)});r.setPolys(s);var c=s.getData(),g=0,u=new Float32Array(o*a*2),d=Bo.a.newInstance({numberOfComponents:2,values:u,name:"TextureCoordinates"});r.getPointData().setTCoords(d);for(var m=0;m0&&m>0&&(c[g++]=4,c[g++]=p,c[g++]=p-1,c[g++]=p-1-o,c[g++]=p-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Ai={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ai,n),ln.c.obj(e,t),ln.c.get(e,t,["url"]),ln.c.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Zi(e,t)}),"vtkElevationReader");var Gi={};function Si(e,t,n,r){for(var a=0;a0&&"\r"!==e})),i=o.length;a.push(i);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".obj")||r.fullpath){t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.obj");return e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsText)},e.parseAsText=function(n){return!n||(n!==t.parseData&&e.modified(),t.parseData=n,t.numberOfOutputs=0,r=t.splitMode,Gi.splitOn=r,Gi.pieces=[],Gi.v=[],Gi.vt=[],Gi.vn=[],Gi.f=[[]],Gi.size=0,n.split("\n").forEach(Bi),function(e){var t=!!Gi.vt.length,n=!!Gi.vn.length;if(e.splitMode){e.numberOfOutputs=Gi.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ri,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper","splitMode"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Vi(e,t)}),"vtkOBJReader");var wi=["chemical json","name","inchi","formula","atoms","bonds","properties"];function ki(e,t){t.classHierarchy.push("vtkMolecule")}var Wi={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function xi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wi,n),ln.c.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),ln.c.setGet(e,t,wi),ki(0,t)}var Ti={newInstance:ln.c.newInstance(xi,"vtkMolecule"),extend:xi},Ji={H:[1],He:[2],Li:[3],Be:[4],B:[5],C:[6],N:[7],O:[8],F:[9],Ne:[10],Na:[11],Mg:[12],Al:[13],Si:[14],P:[15],S:[16],Cl:[17],Ar:[18],K:[19],Ca:[20],Sc:[21],Ti:[22],V:[23],Cr:[24],Mn:[25],Fe:[26],Co:[27],Ni:[28],Cu:[29],Zn:[30],Ga:[31],Ge:[32],As:[33],Se:[34],Br:[35],Kr:[36],Rb:[37],Sr:[38],Y:[39],Zr:[40],Nb:[41],Mo:[42],Tc:[43],Ru:[44],Rh:[45],Pd:[46],Ag:[47],Cd:[48],In:[49],Sn:[50],Sb:[51],Te:[52],I:[53],Xe:[54],Cs:[55],Ba:[56],La:[57],Ce:[58],Pr:[59],Nd:[60],Pm:[61],Sm:[62],Eu:[63],Gd:[64],Tb:[65],Dy:[66],Ho:[67],Er:[68],Tm:[69],Yb:[70],Lu:[71],Hf:[72],Ta:[73],W:[74],Re:[75],Os:[76],Ir:[77],Pt:[78],Au:[79],Hg:[80],Tl:[81],Pb:[82],Bi:[83],Po:[84],At:[85],Rn:[86],Fr:[87],Ra:[88],Ac:[89],Th:[90],Pa:[91],U:[92],Np:[93],Pu:[94],Am:[95],Cm:[96],Bk:[97],Cf:[98],Es:[99],Fm:[100],Md:[101],No:[102],Lr:[103],Rf:[104],Db:[105],Sg:[106],Bh:[107],Hs:[108],Mt:[109],Ds:[110],Rg:[111],Cn:[112],Uut:[113],Uuq:[114],Uup:[115],Uuh:[116],Uus:[117],Uuo:[118]};function Xi(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var a=n.split("/");a.pop(),t.baseURL=a.join("/")}return e.loadData(r)},e.loadData=function(n){return function(n,r){return t.dataAccessHelper.fetchText(e,n,r)}(t.url,n).then(e.parseAsText)},e.parseAsText=function(n){return t.pdb=n,t.molecule=[],t.molecule=t.pdb.split("\n"),e.modified(),!0},e.requestData=function(e,n){var r=Ti.newInstance();if(t.molecule){var o=t.molecule.length,i=[],l=[];t.numberOfAtoms=0;for(var s=0;s=78&&(C=g.substr(76,2).replace(/\s+/g,"")),""===C&&(C=d.substr(0,2).replace(/\d/g,"")),i.push(m),i.push(f),i.push(p);var I=Object(a.a)(Ji[C],1)[0];l.push(I),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(l),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(i)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Oi={numberOfAtoms:0,requestCount:0};ln.c.newInstance((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oi,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),ln.c.event(e,t,"busy"),Xi(e,t)}),"vtkPDBReader");var Ni=[];Ni["-".charCodeAt(0)]=62,Ni["_".charCodeAt(0)]=63;for(var Hi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Yi=0;Yi>16&255,r[g++]=c>>8&255,r[g++]=255&c}switch(i){case 3:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<10;!Fi(e[s]);)s++;for(c|=Ni[e.charCodeAt(s++)]<<4;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>2,r[g++]=c>>8&255,r[g++]=255&c;break;case 2:for(;!Fi(e[s]);)s++;for(c=Ni[e.charCodeAt(s++)]<<2;!Fi(e[s]);)s++;c|=Ni[e.charCodeAt(s++)]>>4,r[g++]=255&c;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return g}var Ki={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,a=0;a1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=gn.a.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var a=n.split("/");return a.pop(),t.baseURL=a.join("/"),e.loadData(r)},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(t.url,r).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;if(n===t.rawDataBuffer)return!0;e.modified();var r=function(e){return gi.a.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),a=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var i=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(a).firstChild,l=i.getAttribute("type"),s=i.getAttribute("compressor"),c=i.getAttribute("byte_order"),g=i.getAttribute("header_type")||"UInt32";if(s&&"vtkZLibDataCompressor"!==s)return console.error("Invalid compressor",s),!1;if(c&&"LittleEndian"!==c)return console.error("Only LittleEndian encoding is supported"),!1;if(l!==t.dataType)return console.error("Invalid data type",l,"expecting",t.dataType),!1;if(i.querySelector("AppendedData")){var u=i.querySelector("AppendedData"),d=u.getAttribute("encoding"),m=i.querySelectorAll("DataArray"),f=t.binaryBuffer;"base64"===d&&(f=u.textContent.trim().substr(1));for(var p=[],C=0;C0?0===Z[3]?new ArrayBuffer(Z[2]*A):new ArrayBuffer(Z[2]*(A-1)+Z[3]):new ArrayBuffer(0);for(var S=new Uint8Array(y),B={offset:0,uint8:S},V=0;V2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ji,n),ln.c.obj(e,t),ln.c.get(e,t,["url","baseURL"]),ln.c.setGet(e,t,["dataAccessHelper"]),ln.c.algo(e,t,0,1),_i(e,t)},processDataArray:zi,processFieldData:function(e,t,n,r,a,o,i){if(t){var l={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(l[r]=n["set".concat(e)])}));for(var s=t.getElementsByTagName("DataArray"),c=s.length,g=0;g(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=o<(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[3]=i>(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[4]=l<(arguments.length<=3?void 0:arguments[3])?l:arguments.length<=3?void 0:arguments[3],e[5]=s>(arguments.length<=3?void 0:arguments[3])?s:arguments.length<=3?void 0:arguments[3]}function cl(e,t,n,r,o,i,l){var s=Object(a.a)(e,6),c=s[0],g=s[1],u=s[2],d=s[3],m=s[4],f=s[5];void 0===l?(e[0]=Math.min(t[0],c),e[1]=Math.max(t[1],g),e[2]=Math.min(t[2],u),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],m),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,c),e[1]=Math.max(n,g),e[2]=Math.min(r,u),e[3]=Math.max(o,d),e[4]=Math.min(i,m),e[5]=Math.max(l,f))}function gl(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t,e[1]=t>l?t:l,e[2]=n,e[3]=n>c?n:c,e[4]=r,e[5]=r>u?r:u,i!==t||s!==n||g!==r}function ul(e,t,n,r){var o=Object(a.a)(e,6),i=o[0],l=o[1],s=o[2],c=o[3],g=o[4],u=o[5];return e[0]=t=0?(e[0]*=t,e[1]*=t):(e[0]=t*e[1],e[1]=t*e[0]),n>=0?(e[2]*=n,e[3]*=n):(e[2]=n*e[3],e[3]=n*e[2]),r>=0?(e[4]*=r,e[5]*=r):(e[4]=r*e[5],e[5]=r*e[4]),!0)}function fl(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function pl(e,t){return e[2*t+1]-e[2*t]}function Cl(e){return[pl(e,0),pl(e,1),pl(e,2)]}function Il(e){return e.slice(0,2)}function hl(e){return e.slice(2,4)}function bl(e){return e.slice(4,6)}function yl(e){var t=Cl(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function vl(e){if(ol(e)){var t=Cl(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Zl(e){return[e[0],e[2],e[4]]}function Al(e){return[e[1],e[3],e[5]]}function Gl(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Sl(e,t){for(var n=0,r=0;r<2;r++)for(var a=2;a<4;a++)for(var o=4;o<6;o++)t[n]=[e[r],e[a],e[o]],n++}function Bl(e,t,n){t[0]=e[0],t[1]=e[2],t[2]=e[4],n[0]=e[1],n[1]=e[3],n[2]=e[5]}function Vl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=fl(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Rl(e,t,n,r){for(var a=[].concat(rl),o=e.getData(),i=0;ie[2*g+1]?(i[g]=0,c[g]=e[2*g+1],o=!1):i[g]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],a[0]=0,1;for(var u=0;u<3;u++)2!==i[u]&&0!==n[u]?s[u]=(c[u]-t[u])/n[u]:s[u]=-1;for(var d=0;d<3;d++)s[l]1||s[l]<0)return 0;a[0]=s[l];for(var m=0;m<3;m++)if(l!==m){if(r[m]=t[m]+s[l]*n[m],r[m]e[2*m+1])return 0}else r[m]=c[m];return 1}function kl(e,t,n){for(var r=[],a=0,o=1,i=1,l=4;l<=5;++l){r[2]=e[l];for(var s=2;s<=3;++s){r[1]=e[s];for(var c=0;c<=1;++c)if(r[0]=e[c],a=tl.a.evaluate(n,t,r),i&&(o=a>=0?1:-1,i=0),0===a||o>0&&a<0||o<0&&a>0)return 1}}return 0}function Wl(e,t){if(!ol(e)||!ol(t))return!1;for(var n,r=[0,0,0,0,0,0],a=0;a<3;a++)if(n=!1,t[2*a]>=e[2*a]&&t[2*a]<=e[2*a+1]?(n=!0,r[2*a]=t[2*a]):e[2*a]>=t[2*a]&&e[2*a]<=t[2*a+1]&&(n=!0,r[2*a]=e[2*a]),t[2*a+1]>=e[2*a]&&t[2*a+1]<=e[2*a+1]?(n=!0,r[2*a+1]=t[2*a+1]):e[2*a+1]>=t[2*a]&&e[2*a+1]<=t[2*a+1]&&(n=!0,r[2*a+1]=e[2*a+1]),!n)return!1;return e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e[4]=r[4],e[5]=r[5],!0}function xl(e,t){if(!ol(e)||!ol(t))return!1;for(var n=0;n<3;n++)if(!(t[2*n]>=e[2*n]&&t[2*n]<=e[2*n+1]||e[2*n]>=t[2*n]&&e[2*n]<=t[2*n+1]||t[2*n+1]>=e[2*n]&&t[2*n+1]<=e[2*n+1]||e[2*n+1]>=t[2*n]&&e[2*n+1]<=t[2*n+1]))return!1;return!0}function Tl(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Jl(e,t,n){for(var r=[[0,1,2,3,4,5,6,7],[0,1,4,5,2,3,6,7],[0,2,4,6,1,3,5,7]],a=[0,0,0,0,0,0,0,0],o=0,i=0;i<2;i++)for(var l=2;l<4;l++)for(var s=4;s<6;s++){var c=[e[i],e[l],e[s]];a[o++]=tl.a.evaluate(n,t,c)}for(var g=2;g--&&!(Gl(a[r[g][0]],a[r[g][4]])&&Gl(a[r[g][1]],a[r[g][5]])&&Gl(a[r[g][2]],a[r[g][6]])&&Gl(a[r[g][3]],a[r[g][7]])););if(g<0)return!1;for(var u=Math.sign(n[g]),d=Math.abs((e[2*g+1]-e[2*g])*n[g]),m=u>0?1:0,f=0;f<4;f++)if(0!==d){var p=Math.abs(a[r[g][f]])/d;u>0&&pm&&(m=p)}var C=(1-m)*e[2*g]+m*e[2*g+1];return u>0?e[2*g]=C:e[2*g+1]=C,!0}var Xl=function(){function e(t){Object($i.a)(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),il(this.bounds,rl))}return Object(el.a)(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return al(this.bounds,e)}},{key:"isValid",value:function(){return ol(this.bounds)}},{key:"setBounds",value:function(e){return il(this.bounds,e)}},{key:"reset",value:function(){return ll(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;ne[1]||e[2]>e[3]||e[4]>e[5]?Pl.EMPTY:3===t?Pl.XYZ_GRID:2===t?e[0]===e[1]?Pl.YZ_PLANE:e[2]===e[3]?Pl.XZ_PLANE:Pl.XY_PLANE:1===t?e[0]1&&(n*=t[r]-1)}return n},e.getNumberOfPoints=function(){var t=e.getDimensions();return t[0]*t[1]*t[2]},e.getPoint=function(n){var r=e.getDimensions();if(0===r[0]||0===r[1]||0===r[2])return es("Requesting a point from an empty image."),null;var a=new Float64Array(3);switch(t.dataDescription){case Hl.EMPTY:return null;case Hl.SINGLE_POINT:break;case Hl.X_LINE:a[0]=n;break;case Hl.Y_LINE:a[1]=n;break;case Hl.Z_LINE:a[2]=n;break;case Hl.XY_PLANE:a[0]=n%r[0],a[1]=n/r[0];break;case Hl.YZ_PLANE:a[1]=n%r[1],a[2]=n/r[1];break;case Hl.XZ_PLANE:a[0]=n%r[0],a[2]=n/r[0];break;case Hl.XYZ_GRID:a[0]=n%r[0],a[1]=n/r[0]%r[1],a[2]=n/(r[0]*r[1]);break;default:es("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(a,o),o},e.getBounds=function(){return e.extentToBounds(t.extent)},e.extentToBounds=function(t){var n=[t[0],t[2],t[4],t[1],t[2],t[4],t[0],t[3],t[4],t[1],t[3],t[4],t[0],t[2],t[5],t[1],t[2],t[5],t[0],t[3],t[5],t[1],t[3],t[5]],r=new Float64Array([n[0],n[1],n[2]]),a=new Float64Array(3);e.indexToWorld(r,a);for(var o=[a[0],a[0],a[1],a[1],a[2],a[2]],i=3;i<24;i+=3)Object(Fo.p)(r,n[i],n[i+1],n[i+2]),e.indexToWorld(r,a),a[0]o[1]&&(o[1]=a[0]),a[1]>o[3]&&(o[3]=a[1]),a[2]>o[5]&&(o[5]=a[2]);return o},e.computeTransforms=function(){Object(Yo.e)(t.indexToWorld,t.origin),t.indexToWorld[0]=t.direction[0],t.indexToWorld[1]=t.direction[1],t.indexToWorld[2]=t.direction[2],t.indexToWorld[4]=t.direction[3],t.indexToWorld[5]=t.direction[4],t.indexToWorld[6]=t.direction[5],t.indexToWorld[8]=t.direction[6],t.indexToWorld[9]=t.direction[7],t.indexToWorld[10]=t.direction[8],Object(Yo.r)(t.indexToWorld,t.indexToWorld,t.spacing),Object(Yo.g)(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return es("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),a=0;a1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.indexToWorld),n},e.indexToWorldVec3=e.indexToWorld,e.worldToIndex=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(Fo.q)(n,e,t.worldToIndex),n},e.worldToIndexVec3=e.worldToIndex,e.indexToWorldBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.indexToWorld),Object(Fo.q)(i,a,t.indexToWorld),Object(Xo.p)(o,i,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],a=[0,0,0];Ol.computeCornerPoints(e,r,a);var o=[0,0,0],i=[0,0,0];return Object(Fo.q)(o,r,t.worldToIndex),Object(Fo.q)(i,a,t.worldToIndex),Object(Xo.p)(o,i,n),n},e.onModified(e.computeTransforms),e.computeTransforms(),e.getCenter=function(){for(var t=e.getBounds(),n=[],r=0;r<3;r++)n[r]=(t[2*r+1]+t[2*r])/2;return n},e.computeHistogram=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0];e.worldToIndexBounds(t,r);var a=[0,0,0],o=[0,0,0];Ol.computeCornerPoints(r,a,o),Object(Xo.o)(a,a),Object(Xo.o)(o,o);var i=e.getDimensions();Object(Xo.r)(a,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],a),Object(Xo.r)(o,[0,0,0],[i[0]-1,i[1]-1,i[2]-1],o);for(var l=i[0],s=i[0]*i[1],c=e.getPointData().getScalars().getData(),g=-1/0,u=1/0,d=0,m=0,f=0,p=a[2];p<=o[2];p++)for(var C=a[1];C<=o[1];C++)for(var I=a[0]+C*l+p*s,h=a[0];h<=o[0];h++){if(!n||n([h,C,p],r)){var b=c[I];b>g&&(g=b),b0?m/f:0,v=d-y*y,Z=Math.sqrt(v);return{minimum:u,maximum:g,average:y,variance:v,sigma:Z}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,a=0;a<3;++a)n[a]=r,r*=e[2*a+1]-e[2*a]+1;return n},e.computeOffsetIndex=function(t){var n=Object(a.a)(t,3),r=n[0],o=n[1],i=n[2],l=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),c=e.computeIncrements(l,s);return Math.floor((Math.round(r)-l[0])*c[0]+(Math.round(o)-l[2])*c[1]+(Math.round(i)-l[4])*c[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),a=0;a<3;++a)if(r[a]n[2*a+1])return es("GetScalarPointer: Pixel ".concat(r," is not in memory. Current extent = ").concat(n)),NaN;return e.computeOffsetIndex(r)},e.getScalarValueFromWorld=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.getPointData().getScalars().getNumberOfComponents();if(n<0||n>=r)return es("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var a=e.getOffsetIndexFromWorld(t);return Number.isNaN(a)?a:e.getPointData().getScalars().getComponent(a,n)}}var ns={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:Hl.EMPTY};function rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ns,n),Nl.a.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=El(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),ln.c.get(e,t,["direction","indexToWorld","worldToIndex"]),ln.c.setGetArray(e,t,["origin","spacing"],3),ln.c.getArray(e,t,["extent"],6),ts(e,t)}var as={newInstance:ln.c.newInstance(rs,"vtkImageData"),extend:rs};function os(e,t){t.classHierarchy.push("vtkXMLImageDataReader"),e.parseXML=function(e,n,r,a,o){for(var i=e.getElementsByTagName(t.dataType)[0],l=i.getAttribute("Origin").split(" ").map((function(e){return Number(e)})),s=i.getAttribute("Spacing").split(" ").map((function(e){return Number(e)})),c=i.getElementsByTagName("Piece"),g=c.length,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,is,n),Qi.extend(e,t,n),os(e,t)}),"vtkXMLImageDataReader");function ls(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,a,o){var i=e.getElementsByTagName(t.dataType)[0],l=i.getElementsByTagName("FieldData")[0],s=i.getElementsByTagName("Piece"),c=s.length,g=[];l&&(g=Object(Ao.a)(l.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,a){var o=Number(e.getAttribute("NumberOfTuples"));return Bo.a.newInstance(Qi.processDataArray(o,e,t,n,r,a))}(e,r,a,o,t.binaryBuffer)})));for(var u=function(e){var n=Go.a.newInstance(),i=s[e],l=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],c=Qi.processDataArray(l,s,r,a,o,i),g=c.values,u=c.numberOfComponents;e["get".concat(t)]().setData(g,u)}return l}(n,"Points",i,r,a,o,t.binaryBuffer),c=0;["Verts","Lines","Strips","Polys"].forEach((function(e){c+=function(e,t,n,r,a,o,i){var l=Number(n.getAttribute("NumberOf".concat(t)));if(l>0){var s=Qi.processCells(l,n.getElementsByTagName(t)[0],r,a,o,i);e["get".concat(t)]().setData(s)}return l}(n,e,i,r,a,o,t.binaryBuffer)})),Qi.processFieldData(l,i.getElementsByTagName("PointData")[0],n.getPointData(),r,a,o,t.binaryBuffer),Qi.processFieldData(c,i.getElementsByTagName("CellData")[0],n.getCellData(),r,a,o,t.binaryBuffer);for(var u=n.getFieldData(),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ss,n),Qi.extend(e,t,n),ls(e,t)}),"vtkXMLPolyDataReader");var cs=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};return Xs[e]&&Xs[e](t)}function Hs(e,t){t.classHierarchy.push("vtkRenderWindow"),e.addRenderer=function(n){e.hasRenderer(n)||(n.setRenderWindow(e),t.renderers.push(n),e.modified())},e.removeRenderer=function(n){t.renderers=t.renderers.filter((function(e){return e!==n})),e.modified()},e.hasRenderer=function(e){return-1!==t.renderers.indexOf(e)},e.newAPISpecificView=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ns(e||t.defaultViewAPI,n)},e.addView=function(n){e.hasView(n)||(n.setRenderable(e),t.views.push(n),e.modified())},e.removeView=function(n){t.views=t.views.filter((function(e){return e!==n})),e.modified()},e.hasView=function(e){return-1!==t.views.indexOf(e)},e.render=function(){t.interactor?t.interactor.render():t.views.forEach((function(e){return e.traverseAllPasses()}))},e.getStatistics=function(){var e={propCount:0,invisiblePropCount:0};return t.renderers.forEach((function(t){t.getViewProps().forEach((function(t){if(t.getVisibility()){e.propCount+=1;var n=t.getMapper&&t.getMapper();if(n&&n.getPrimitiveCount){var r=n.getPrimitiveCount();Object.keys(r).forEach((function(t){e[t]||(e[t]=0),e[t]+=r[t]}))}}else e.invisiblePropCount+=1}))})),e.str=Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n"),e},e.captureImages=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";return ln.c.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n):void 0})).filter((function(e){return!!e}))}}var Ys={defaultViewAPI:Js,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function Fs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),ln.c.obj(e,t),ln.c.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),ln.c.get(e,t,["neverRendered"]),ln.c.getArray(e,t,["renderers"]),ln.c.event(e,t,"completion"),Hs(e,t)}var Ps={newInstance:ln.c.newInstance(Fs,"vtkRenderWindow"),extend:Fs,registerViewConstructor:Os,listViewAPIs:function(){return Object.keys(Xs)},newAPISpecificView:Ns},Ks={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},Ms={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},Ls={Wrap:Ks,Filter:Ms},Ds=ln.c.vtkErrorMacro;function Es(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),a=e[r];if(a)a(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Us,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),t.renderableChildMap=new Map,ln.c.get(e,t,["visited"]),ln.c.setGet(e,t,["parent","renderable","myFactory"]),ln.c.getArray(e,t,["children"]),Es(e,t)}var _s={newInstance:ln.c.newInstance(zs,"vtkViewNode"),extend:zs,PASS_TYPES:["Build","Render"]};function js(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qs=Ls.Wrap,qs=Ls.Filter,$s=Bo.a.VtkDataTypes,ec=ln.c.vtkDebugMacro,tc=ln.c.vtkErrorMacro,nc=ln.c.vtkWarningMacro;function rc(e,t){var n=this;function r(e,n){var r=[];if(e!==$s.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=t.width*t.height*t.components,o=0;o=a&&(I=a-1);var h=p-C,b=1-h;C=C*r*o,I=I*r*o;for(var y=0;y=r&&(G=r-1);var S=Z-A;A*=o,G*=o;for(var B=0;Ba[s]&&(a[s]=n[i]),i++;for(var c=[],g=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null;if(n?t.openGLRenderWindow=n:(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent()),t.context=t.openGLRenderWindow.getContext(),t.renderable.getInterpolate()?(t.generateMipmap?e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qs.LINEAR),e.setMagnificationFilter(qs.LINEAR)):(e.setMinificationFilter(qs.NEAREST),e.setMagnificationFilter(qs.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(Qs.REPEAT),e.setWrapS(Qs.REPEAT),e.setWrapT(Qs.REPEAT)),t.renderable.getInputData()&&t.renderable.setImage(null),!t.handle||t.renderable.getMTime()>t.textureBuildTime.getMTime()){null!==t.renderable.getImage()&&(t.renderable.getInterpolate()&&(t.generateMipmap=!0,e.setMinificationFilter(qs.LINEAR_MIPMAP_LINEAR)),t.renderable.getImage()&&t.renderable.getImageLoaded()&&(e.create2DFromImage(t.renderable.getImage()),e.activate(),e.sendParameters(),t.textureBuildTime.modified()));var r=t.renderable.getInputData(0);if(r&&r.getPointData().getScalars()){for(var a=r.getExtent(),o=r.getPointData().getScalars(),i=[],l=0;lt.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;switch(t.target){case t.context.TEXTURE_2D:n=t.context.TEXTURE_BINDING_2D;break;default:nc("impossible case")}e=t.context.getIntegerv(n)===t.handle}return e},e.sendParameters=function(){t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_S,e.getOpenGLWrapMode(t.wrapS)),t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_T,e.getOpenGLWrapMode(t.wrapT)),t.openGLRenderWindow.getWebgl2()&&t.context.texParameteri(t.target,t.context.TEXTURE_WRAP_R,e.getOpenGLWrapMode(t.wrapR)),t.context.texParameteri(t.target,t.context.TEXTURE_MIN_FILTER,e.getOpenGLFilterMode(t.minificationFilter)),t.context.texParameteri(t.target,t.context.TEXTURE_MAG_FILTER,e.getOpenGLFilterMode(t.magnificationFilter)),t.openGLRenderWindow.getWebgl2()&&(t.context.texParameteri(t.target,t.context.TEXTURE_BASE_LEVEL,t.baseLevel),t.context.texParameteri(t.target,t.context.TEXTURE_MAX_LEVEL,t.maxLevel)),t.sendParametersTime.modified()},e.getInternalFormat=function(n,r){return t.internalFormat||(t.internalFormat=e.getDefaultInternalFormat(n,r)),t.internalFormat||ec("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var a=0;return(a=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(a=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(ec("Unsupported internal texture type!"),ec("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),a},e.setInternalFormat=function(n){n!==t.internalFormat&&(t.internalFormat=n,e.modified())},e.getFormat=function(n,r){return t.format=e.getDefaultFormat(n,r),t.format},e.getDefaultFormat=function(e,n){if(t.openGLRenderWindow.getWebgl2())switch(n){case 1:return t.context.RED;case 2:return t.context.RG;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}else switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:return t.context.RGBA;default:return t.context.RGB}},e.resetFormatAndType=function(){t.format=0,t.internalFormat=0,t.openGLDataType=0},e.getDefaultDataType=function(e){if(t.openGLRenderWindow.getWebgl2())switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.FLOAT}switch(e){case $s.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case $s.FLOAT:case $s.VOID:default:return t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear")?t.context.FLOAT:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){return t.openGLDataType=e.getDefaultDataType(n),t.openGLDataType},e.getShiftAndScale=function(){var e=0,n=1;switch(t.openGLDataType){case t.context.BYTE:e=(n=127.5)-128;break;case t.context.UNSIGNED_BYTE:n=255,e=0;break;case t.context.SHORT:e=(n=32767.5)-32768;break;case t.context.UNSIGNED_SHORT:n=65536,e=0;break;case t.context.INT:e=(n=2147483647.5)-2147483648;break;case t.context.UNSIGNED_INT:n=4294967295,e=0;break;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case qs.NEAREST:return t.context.NEAREST;case qs.LINEAR:return t.context.LINEAR;case qs.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qs.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qs.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qs.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case Qs.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case Qs.REPEAT:return t.context.REPEAT;case Qs.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=a(r(l,[s]));return t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,i,l,s){if(e.getOpenGLDataType(l),e.getInternalFormat(l,i),e.getFormat(l,i),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=i,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=s.length/6-1,e.createTexture(),e.bind();for(var c=a(r(l,s)),g=[],u=t.width,d=t.height,m=0;m=1&&y>=1;){var v=null;h<=t.maxLevel&&(v=g[6*h+I]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+I,h,t.internalFormat,b,y,0,t.format,t.openGLDataType,v),h++,b/=2,y/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,a,o){return e.getOpenGLDataType(a),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?a===$s.FLOAT?t.internalFormat=t.context.DEPTH_COMPONENT32F:t.internalFormat=t.context.DEPTH_COMPONENT16:t.internalFormat=t.context.DEPTH_COMPONENT,t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_2D,t.components=1,t.width=n,t.height=r,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1),t.context.texImage2D(t.target,0,t.internalFormat,t.width,t.height,0,t.format,t.openGLDataType,o),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType($s.UNSIGNED_CHAR),e.getInternalFormat($s.UNSIGNED_CHAR,4),e.getFormat($s.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return tc("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=4,t.width=n.width,t.height=n.height,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.pixelStorei(t.context.UNPACK_ALIGNMENT,1);var r=!Object(Xo.m)(n.width)||!Object(Xo.m)(n.height),a=document.createElement("canvas");a.width=r?Object(Xo.h)(n.width):n.width,a.height=r?Object(Xo.h)(n.height):n.height;var o=a.getContext("2d");o.translate(0,a.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,a.width,a.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var i=a;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,i),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,a,o,i,l){return e.getOpenGLDataType(i),e.getInternalFormat(i,o),e.getFormat(i,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,l),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(tc("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,a,i,l,s){for(var c=n*r*a,g=[],u=[],d=0;d4096&&(G===$s.FLOAT||i>=3)&&(B=4096);var V=1,R=1;c>B*B&&(R=V=Math.ceil(Math.sqrt(c/(B*B))));var w=Math.sqrt(c)/V;w=Object(Xo.h)(w);var k,W=Math.floor(w*V/n),x=Math.ceil(a/W),T=Object(Xo.h)(r*x/R);t.width=w,t.height=T,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=W,t.volumeInfo.yreps=x,t.volumeInfo.xstride=V,t.volumeInfo.ystride=R,t.volumeInfo.offset=Z.offset,t.volumeInfo.scale=Z.scale;var J=w*T*i;k=G===$s.FLOAT?new Float32Array(J):new Uint8Array(J);for(var X=0,O=Math.floor(n/V),N=Math.floor(r/R),H=0;H2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ac,n),_s.extend(e,t,n),t.sendParametersTime={},ln.c.obj(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},ln.c.obj(t.textureBuildTime,{mtime:0}),ln.c.set(e,t,["format","openGLDataType"]),ln.c.setGet(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ln.c.get(e,t,["width","height","volumeInfo","components","handle","target"]),rc(e,t)}var ic=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,a=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");a+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,a,r.TEXTURE_2D,e.getHandle(),0)},e.removeColorBuffer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.context,r=n.COLOR_ATTACHMENT0;if(e>0){if(!t.openGLRenderWindow.getWebgl2())return void Object(ln.m)("Using multiple framebuffer attachments requires WebGL 2");r+=e}n.framebufferTexture2D(n.FRAMEBUFFER,r,n.TEXTURE_2D,null,0)},e.setDepthBuffer=function(e){if(t.openGLRenderWindow.getWebgl2()){var n=t.context;n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,e.getHandle(),0)}else Object(ln.m)("Attaching depth buffer textures to fbo requires WebGL 2")},e.removeDepthBuffer=function(){if(t.openGLRenderWindow.getWebgl2()){var e=t.context;e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,null,0)}else Object(ln.m)("Attaching depth buffer textures to framebuffers requires WebGL 2")},e.getGLFramebuffer=function(){return t.glFramebuffer},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))},e.releaseGraphicsResources=function(){t.glFramebuffer&&t.context.deleteFramebuffer(t.glFramebuffer),t.colorTexture&&t.colorTexture.releaseGraphicsResources()},e.getSize=function(){var e=[0,0];return null!==t.glFramebuffer&&(e[0]=t.glFramebuffer.width,e[1]=t.glFramebuffer.height),e},e.populateFramebuffer=function(){e.bind();var n=t.context,r=ic.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(Ms.LINEAR),r.setMagnificationFilter(Ms.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,cn.b.UNSIGNED_CHAR,null),e.setColorBuffer(r),t.depthTexture=n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,t.depthTexture),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT16,t.glFramebuffer.width,t.glFramebuffer.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,t.depthTexture)}}var sc={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function cc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Object(ln.h)(e,t),Object(ln.j)(e,t,["colorTexture"]),lc(e,t)}var gc={newInstance:Object(ln.g)(cc,"vtkFramebuffer"),extend:cc};function uc(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(ln.c.capitalize(t.currentOperation))},e.getTraverseOperation=function(){return t.currentTraverseOperation},e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.deleted||(t.currentParent=r,t.preDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})),t.delegates.forEach((function(t){t.traverse(n,e)})),t.postDelegateOperations.forEach((function(t){e.setCurrentOperation(t),n.traverse(e)})))}}var dc={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function mc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dc,n),ln.c.obj(e,t),ln.c.get(e,t,["currentOperation"]),ln.c.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),uc(e,t)}var fc={newInstance:ln.c.newInstance(mc,"vtkRenderPass"),extend:mc};function pc(e,t){t.classHierarchy.push("vtkForwardPass"),e.traverse=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t.deleted){t.currentParent=r,e.setCurrentOperation("buildPass"),n.traverse(e);for(var a=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),i=0;i0&&t.volumeCount>0||t.depthRequested){var g=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=gc.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var u=t.framebuffer.getSize();null!==u&&u[0]===g[0]&&u[1]===g[1]||(t.framebuffer.create(g[0],g[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),s.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),s.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),s.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),s.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),s.traverse(e))}}}},e.getZBufferTexture=function(){return t.framebuffer?t.framebuffer.getColorTexture():null},e.requestDepth=function(){t.depthRequested=!0},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.incrementVolumeCount=function(){return t.volumeCount++}}var Cc={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function Ic(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cc,n),fc.extend(e,t,n),ln.c.get(e,t,["framebuffer"]),pc(e,t)}var hc={newInstance:ln.c.newInstance(Ic,"vtkForwardPass"),extend:Ic};function bc(e,t){t.classHierarchy.push("vtkGenericWidgetRepresentation")}var yc={};function vc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yc,n),_s.extend(e,t,n),bc(0,t)}var Zc={newInstance:ln.c.newInstance(vc),extend:vc};function Ac(e,t){t.classHierarchy.push("vtkOpenGLActor"),e.buildPass=function(n){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes(),t.ogltextures=null,t.activeTextures=null;for(var r=0;rt.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?El(t.keyMatrices.normalMatrix):(Dl(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Ul(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var Gc={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gc,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Ac(e,t)}var Bc={newInstance:ln.c.newInstance(Sc),extend:Sc};function Vc(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNodes(t.renderable.getTextures()),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.isA("vtkOpenGLTexture")||e.traverse(n)})),e.apply(n,!1))},e.activateTextures=function(){t.activeTextures=[],t.children.forEach((function(e){e.isA("vtkOpenGLTexture")&&(e.render(),e.getHandle()&&t.activeTextures.push(e))}))},e.opaquePass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}var Rc={context:null,activeTextures:[]};function wc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rc,n),_s.extend(e,t,n),Object(ln.j)(e,t,["context"]),Object(ln.e)(e,t,["activeTextures"]),Vc(e,t)}var kc={newInstance:Object(ln.g)(wc),extend:wc};function Wc(e,t){t.classHierarchy.push("vtkOpenGLCamera"),e.buildPass=function(n){n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext())},e.opaquePass=function(e){if(e){var n=t.openGLRenderer.getTiledSizeAndOrigin();t.context.viewport(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize),t.context.scissor(n.lowerLeftU,n.lowerLeftV,n.usize,n.vsize)}},e.translucentPass=e.opaquePass,e.opaqueZBufferPass=e.opaquePass,e.volumePass=e.opaquePass,e.getKeyMatrices=function(n){if(n!==t.lastRenderer||t.openGLRenderWindow.getMTime()>t.keyMatrixTime.getMTime()||e.getMTime()>t.keyMatrixTime.getMTime()||n.getMTime()>t.keyMatrixTime.getMTime()||t.renderable.getMTime()>t.keyMatrixTime.getMTime()){Object(Yo.d)(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),Dl(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),zl(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Object(Yo.i)(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Object(Yo.d)(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Object(Yo.i)(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Object(Yo.l)(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var xc={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function Tc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),_s.extend(e,t,n),t.keyMatrixTime={},Object(ln.h)(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Object(ln.j)(e,t,["context","keyMatrixTime"]),Wc(e,t)}var Jc={newInstance:Object(ln.g)(Tc),extend:Tc},Xc={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Oc={ObjectType:Xc};function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hc(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pc,n),ln.c.obj(e,t),ln.c.get(e,t,["openGLRenderWindow"]),Fc(e,t)}var Mc=Hc(Hc({newInstance:ln.c.newInstance(Kc),extend:Kc},{}),Oc),Lc={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}},Dc={SelectionContent:{GLOBALIDS:0,PEDIGREEIDS:1,VALUES:2,INDICES:3,FRUSTUM:4,LOCATIONS:5,THRESHOLDS:6,BLOCKS:7,QUERY:8},SelectionField:{CELL:0,POINT:1,FIELD:2,VERTEX:3,EDGE:4,ROW:5}};function Ec(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uc(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function _c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zc,n),ln.c.obj(e,t),t.properties={},ln.c.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Uc(e,t)}var jc=function(e){for(var t=1;t0&&(--o in t.hitProps||(t.hitProps[o]=!0))}},e.renderProp=function(n){t.currentPass===qc.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+t.idOffset),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===qc.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+t.idOffset)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.getPropFromID=function(e){return e>=0&&et.area[2]||n[1]t.area[3])return null;var i=[n[0]-t.area[0],n[1]-t.area[1]],l=e.convert(i[0],i[1],t.pixBuffer[qc.ACTOR_PASS]);if(l<=0)return null;var s={valid:!0};s.propID=l-t.idOffset,s.prop=e.getPropFromID(s.propID);var c=e.convert(i[0],i[1],t.pixBuffer[qc.COMPOSITE_INDEX_PASS]);if((c<0||c>16777215)&&(c=0),s.compositeID=c-t.idOffset,t.captureZValues){var g=4*(i[1]*(t.area[2]-t.area[0]+1)+i[0]);s.zValue=(256*t.zBuffer[g]+t.zBuffer[g+1])/65535,s.displayPosition=n}return s}var u=[n[0],n[1]],d=[0,0],m=e.getPixelInformation(n,0,a);if(m&&m.valid)return m;for(var f=1;ff?u[1]-f:0;p<=u[1]+f;++p){if(d[1]=p,u[0]>=f&&(d[0]=u[0]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[0]=u[0]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}for(var C=u[0]>=f?u[0]-(f-1):0;C<=u[0]+(f-1);++C){if(d[0]=C,u[1]>=f&&(d[1]=u[1]-f,(m=e.getPixelInformation(d,0,a))&&m.valid))return m;if(d[1]=u[1]+f,(m=e.getPixelInformation(d,0,a))&&m.valid)return m}}return a[0]=n[0],a[1]=n[1],null},e.convertSelection=function(e,n){var r=[],a=0;return n.forEach((function(n,o){var i=jc.newInstance();switch(i.setContentType($c.INDICES),e){case tg.FIELD_ASSOCIATION_CELLS:i.setFieldType(eg.CELL);break;case tg.FIELD_ASSOCIATION_POINTS:i.setFieldType(eg.POINT);break;default:ng("Unknown field association")}i.getProperties().propID=n.info.propID,i.getProperties().prop=n.info.prop,i.getProperties().compositeID=n.info.compositeID,i.getProperties().pixelCount=n.pixelCount,t.captureZValues&&(i.getProperties().displayPosition=[n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue],i.getProperties().worldPosition=t.openGLRenderWindow.displayToWorld(n.info.displayPosition[0],n.info.displayPosition[1],n.info.zValue,t.renderer)),i.setSelectionList(n.attributeIDs),r[a]=i,a++})),r},e.getInfoHash=function(e){return"".concat(e.propID," ").concat(e.compositeID)},e.generateSelection=function(n,r,a,o){for(var i=Math.floor(n),l=Math.floor(r),s=Math.floor(a),c=Math.floor(o),g=new Map,u=[0,0],d=l;d<=c;d++)for(var m=i;m<=s;m++){var f=[m,d],p=e.getPixelInformation(f,0,u);if(p&&p.valid){var C=e.getInfoHash(p);if(g.has(C)){var I=g.get(C);I.pixelCount++,t.captureZValues&&p.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ag,n),ln.c.obj(e,t),t.area=[0,0,0,0],t.propColorValue=[0,0,0],t.props=[],ln.c.setGet(e,t,["fieldAssociation","renderer","currentPass","captureZValues"]),ln.c.setGetArray(e,t,["area"],4),ln.c.setGetArray(e,t,["propColorValue"],3),ln.c.event(e,t,"event"),rg(e,t)}var ig=function(e){for(var t=1;t0&&(e=1/(t.ambient+t.diffuse+t.specular));for(var n=0;n<3;n++)t.color[n]=e*(t.ambient*t.ambientColor[n]+t.diffuse*t.diffuseColor[n]+t.specular*t.specularColor[n]);return[].concat(t.color)},e.addShaderVariable=mg("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(dg.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(dg.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(dg.PHONG)},e.getInterpolationAsString=function(){return ln.c.enumToString(dg,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ug.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ug.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ug.POINTS)},e.getRepresentationAsString=function(){return ln.c.enumToString(ug,t.representation)}}var pg={color:[1,1,1],ambientColor:[1,1,1],diffuseColor:[1,1,1],specularColor:[1,1,1],edgeColor:[0,0,0],ambient:0,diffuse:1,specular:0,specularPower:1,opacity:1,interpolation:dg.GOURAUD,representation:ug.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Cg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),ln.c.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),fg(e,t)}var Ig,hg=function(e){for(var t=1;t2)for(var r=0;r2){for(var r=0;r1?2*(e-1):0},polysToWireframe:function(e,t){return e>2?2*e:0},stripsToWireframe:function(e,t){return e>2?4*e-6:0},polysToSurface:function(e,t){return e>2?3*(e-2):0},stripsToSurface:function(e,t,n){return e>2?3*(e-2):0}},v=null,Z=null;a===sg.POINTS||"verts"===r?(v=b.anythingToPoints,Z=y.anythingToPoints):a===sg.WIREFRAME||"lines"===r?(v=b["".concat(r,"ToWireframe")],Z=y["".concat(r,"ToWireframe")]):(v=b["".concat(r,"ToSurface")],Z=y["".concat(r,"ToSurface")]);for(var A=n.getData(),G=A.length,S=0,B=0;B0&&(Math.abs(x)/W>1e6||Math.abs(Math.log10(W))>3||0===W&&x>1e6)){for(var N=new Float64Array(3),H=new Float64Array(3),Y=0;Y<3;++Y){var F=o.points.getRange(Y),P=F[1]-F[0];N[Y]=.5*(F[1]+F[0]),H[Y]=P>0?1/P:1}e.setCoordShiftAndScale(N,H)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);d=function(e){if(m=3*e,t.coordShiftAndScaleEnabled?(R[w++]=(i[m++]-t.coordShift[0])*t.coordScale[0],R[w++]=(i[m++]-t.coordShift[1])*t.coordScale[1],R[w++]=(i[m++]-t.coordShift[2])*t.coordScale[2]):(R[w++]=i[m++],R[w++]=i[m++],R[w++]=i[m++]),null!==l&&(f=o.haveCellNormals?3*(h+o.cellOffset):3*e,R[w++]=l[f++],R[w++]=l[f++],R[w++]=l[f++]),t.customData.forEach((function(t){I=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bg,n),Mc.extend(e,t,n),ln.c.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),ln.c.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),Sg(e,t)}var Rg={newInstance:ln.c.newInstance(Vg),extend:Vg},wg=ln.c.vtkErrorMacro;function kg(e,t){t.classHierarchy.push("vtkShader"),e.compile=function(){var e=t.context.VERTEX_SHADER;if(!t.source||!t.source.length||"Unknown"===t.shaderType)return!1;switch(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),t.shaderType){case"Fragment":e=t.context.FRAGMENT_SHADER;break;case"Vertex":default:e=t.context.VERTEX_SHADER}if(t.handle=t.context.createShader(e),t.context.shaderSource(t.handle,t.source),t.context.compileShader(t.handle),!t.context.getShaderParameter(t.handle,t.context.COMPILE_STATUS)){var n=t.context.getShaderInfoLog(t.handle);return wg("Error compiling shader '".concat(t.source,"': ").concat(n)),t.context.deleteShader(t.handle),t.handle=0,!1}return!0},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0,t.dirty=!0)}}var Wg={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wg,n),ln.c.obj(e,t),ln.c.setGet(e,t,["shaderType","source","error","handle","context"]),kg(e,t)}var Tg={newInstance:ln.c.newInstance(xg,"vtkShader"),extend:xg},Jg=ln.c.vtkErrorMacro;function Xg(e,t){t.classHierarchy.push("vtkShaderProgram"),e.compileShader=function(){return t.vertexShader.compile()?t.fragmentShader.compile()?e.attachShader(t.vertexShader)&&e.attachShader(t.fragmentShader)?e.link()?(e.setCompiled(!0),1):(Jg("Links failed: ".concat(t.error)),0):(Jg(t.error),0):(Jg(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.fragmentShader.getError()),0):(Jg(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),Jg(t.vertexShader.getError()),0)},e.cleanup=function(){"Unknown"!==t.shaderType&&0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0)},e.bind=function(){return!(!t.linked&&!e.link()||(t.context.useProgram(t.handle),e.setBound(!0),0))},e.isBound=function(){return!!t.bound},e.release=function(){t.context.useProgram(null),e.setBound(!1)},e.setContext=function(e){t.vertexShader.setContext(e),t.fragmentShader.setContext(e),t.geometryShader.setContext(e)},e.link=function(){if(t.inked)return!0;if(0===t.handle)return t.error="Program has not been initialized, and/or does not have shaders.",!1;if(t.uniformLocs={},t.context.linkProgram(t.handle),!t.context.getProgramParameter(t.handle,t.context.LINK_STATUS)){var n=t.context.getProgramInfoLog(t.handle);return Jg("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(a,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(a,!1,o),!0},e.setUniformf=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(a,r),!0)},e.setUniformfv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(a,r),!0)},e.setUniformi=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(a,r),!0)},e.setUniformiv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(a,r),!0)},e.setUniform2f=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,a),!0},e.setUniform2fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(a,r),!0)},e.setUniform2i=function(n,r,a){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===a)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,a),!0},e.setUniform2iv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(a,r),!0)},e.setUniform3f=function(n,r,a,o){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===o)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(i,r,a,o),!0},e.setUniform3fArray=function(n,r){var a=e.findUniform(n);if(-1===a)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(!Array.isArray(r)||3!==r.length)throw new RangeError("Invalid number of values for array");return t.context.uniform3f(a,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var a=e.findUniform(n);return-1===a?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(a,r),!0)},e.setUniform3i=function(n){var r=e.findUniform(n);if(-1===r)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;for(var a=arguments.length,o=new Array(a>1?a-1:0),i=1;i1?a-1:0),i=1;i1?a-1:0),i=1;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=Tg.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=Tg.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=Tg.newInstance(),t.geometryShader.setShaderType("Geometry"),ln.c.obj(e,t),ln.c.get(e,t,["lastCameraMTime"]),ln.c.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),Xg(e,t)}var Hg={newInstance:ln.c.newInstance(Ng,"vtkShaderProgram"),extend:Ng,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var i="";r&&(i="g");var l=new RegExp(t,i),s=e.replace(l,a);return{replace:o,result:s}}};function Yg(e,t){t.classHierarchy.push("vtkOpenGLVertexArrayObject"),e.exposedMethod=function(){},e.initialize=function(){t.instancingExtension=null,t.openGLRenderWindow.getWebgl2()||(t.instancingExtension=t.context.getExtension("ANGLE_instanced_arrays")),!t.forceEmulation&&t.openGLRenderWindow&&t.openGLRenderWindow.getWebgl2()?(t.extension=null,t.supported=!0,t.handleVAO=t.context.createVertexArray()):(t.extension=t.context.getExtension("OES_vertex_array_object"),!t.forceEmulation&&t.extension?(t.supported=!0,t.handleVAO=t.extension.createVertexArrayOES()):t.supported=!1)},e.isReady=function(){return 0!==t.handleVAO||!1===t.supported},e.bind=function(){if(e.isReady()||e.initialize(),e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(t.handleVAO):t.context.bindVertexArray(t.handleVAO);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,1):n.vertexAttribDivisor(i.index+s,1))}},e.release=function(){if(e.isReady()&&t.supported)t.extension?t.extension.bindVertexArrayOES(null):t.context.bindVertexArray(null);else if(e.isReady())for(var n=t.context,r=0;r0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(i.index+s,0):n.vertexAttribDivisor(i.index+s,0)),n.disableVertexAttribArray(i.index+s)}},e.shaderProgramChanged=function(){e.release(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.handleProgram=0},e.releaseGraphicsResources=function(){e.shaderProgramChanged(),t.handleVAO&&(t.extension?t.extension.deleteVertexArrayOES(t.handleVAO):t.context.deleteVertexArray(t.handleVAO)),t.handleVAO=0,t.supported=!0,t.handleProgram=0},e.addAttributeArray=function(t,n,r,a,o,i,l,s){return e.addAttributeArrayWithDivisor(t,n,r,a,o,i,l,s,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,a,o,i,l,s,c,g,u){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Xc.ARRAY_BUFFER)return!1;if(0===t.handleProgram&&(t.handleProgram=n.getHandle()),e.isReady()||e.initialize(),!e.isReady()||t.handleProgram!==n.getHandle())return!1;var d=t.context,m={};if(m.name=a,m.index=d.getAttribLocation(t.handleProgram,a),m.offset=o,m.stride=i,m.type=l,m.size=s,m.normalize=c,m.isMatrix=u,m.divisor=g,-1===m.Index)return!1;if(r.bind(),d.enableVertexAttribArray(m.index),d.vertexAttribPointer(m.index,m.size,m.type,m.normalize,m.stride,m.offset),g>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m.index,1):d.vertexAttribDivisor(m.index,1)),m.buffer=r.getHandle(),!t.supported){for(var f=!1,p=0;p0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(m+f,1):d.vertexAttribDivisor(m+f,1));return!0},e.removeAttributeArray=function(n){if(!e.isReady()||0===t.handleProgram)return!1;if(!t.supported)for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fg,n),t.buffers=[],ln.c.obj(e,t),ln.c.get(e,t,["supported"]),ln.c.setGet(e,t,["forceEmulation"]),Yg(e,t)}var Kg={newInstance:ln.c.newInstance(Pg,"vtkOpenGLVertexArrayObject"),extend:Pg};function Mg(e,t){t.classHierarchy.push("vtkOpenGLHelper"),e.setOpenGLRenderWindow=function(e){t.program.setContext(e.getContext()),t.VAO.setOpenGLRenderWindow(e),t.CABO.setOpenGLRenderWindow(e)},e.releaseGraphicsResources=function(e){t.VAO.releaseGraphicsResources(),t.CABO.releaseGraphicsResources(),t.CABO.setElementCount(0)}}var Lg={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function Dg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lg,n),ln.c.obj(e,t),t.shaderSourceTime={},ln.c.obj(t.shaderSourceTime),t.attributeUpdateTime={},ln.c.obj(t.attributeUpdateTime),ln.c.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=Hg.newInstance(),t.VAO=Kg.newInstance(),t.CABO=Rg.newInstance(),Mg(e,t)}var Eg={newInstance:ln.c.newInstance(Dg),extend:Dg};function Ug(e,t){e.update=function(){e.getInputData()},e.addClippingPlane=function(e){"vtkPlane"===e.getClassName()&&t.clippingPlanes.push(e)},e.getNumberOfClippingPlanes=function(){return t.clippingPlanes.length},e.removeAllClippingPlanes=function(){t.clippingPlanes.length=0},e.removeClippingPlane=function(e){e<0||e>=6||t.clippingPlanes.splice(e,1)},e.getClippingPlanes=function(){return t.clippingPlanes},e.setClippingPlanes=function(t){if(t)if(Array.isArray(t))for(var n=t.length,r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Ug(e,t)}};function jg(e,t){e.getBounds=function(){return 0},e.getBounds=function(n){e.getBounds();for(var r=0;r<6;r++)n[r]=t.bounds[r]},e.getCenter=function(){e.getBounds();for(var n=0;n<3;n++)t.center[n]=(t.bounds[2*n+1]+t.bounds[2*n])/2;return t.center.slice()},e.getLength=function(){var n=0,r=0;e.getBounds();for(var a=0;a<3;a++)r+=(n=t.bounds[2*a+1]-t.bounds[2*a])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var a=t.clippingPlanes,o=e;if(a){var i=a.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qg,n),_g.extend(e,t,n),t.bounds||Object(Xo.D)(t.bounds),t.center||(t.center=[0,0,0]),jg(e,t)}},$g={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},eu={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:$g},tu={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:{DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5}};function nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ru=eu.ScalarMappingTarget,au=eu.VectorMode,ou=Bo.a.VtkDataTypes,iu=tu.ColorMode,lu=ln.c.vtkErrorMacro;function su(e){return e}function cu(e){return Math.floor(255*e+.5)}function gu(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(au.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(au.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(au.RGBCOLORS)},e.build=function(){},e.isOpaque=function(){return!0},e.setAnnotations=function(n,r){if(!(n&&!r||!n&&r))if(n&&r&&n.length!==r.length)lu("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var a=r.length,o=0;o=0?t.annotationArray[a].annotation!==r&&(t.annotationArray[a].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),a=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),a},e.getNumberOfAnnotatedValues=function(){return t.annotationArray.length},e.getAnnotatedValue=function(e){return e<0||e>=t.annotationArray.length?null:t.annotationArray[e].value},e.getAnnotation=function(e){return void 0===t.annotationArray[e]?null:t.annotationArray[e].annotation},e.getAnnotatedValueIndex=function(n){return t.annotationArray.length?e.checkForAnnotatedValue(n):-1},e.removeAnnotation=function(n){var r=e.checkForAnnotatedValue(n),a=r>=0;return a&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),a},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var a=e.getAnnotatedValueIndex(n);e.getIndexedColor(a,r)}else e.getColor(parseFloat(n),r),r[3]=1},e.checkForAnnotatedValue=function(t){return e.getAnnotatedValueIndexInternal(t)},e.getAnnotatedValueIndexInternal=function(e){if(void 0!==t.annotatedValueMap[e]){var n=t.annotationArray.length;return t.annotatedValueMap[e]%n}return-1},e.getIndexedColor=function(e,t){t[0]=0,t[1]=0,t[2]=0,t[3]=0},e.updateAnnotatedValueMap=function(){t.annotatedValueMap=[];for(var e=t.annotationArray.length,n=0;n1?e.mapVectorsThroughTable(t,o,ru.RGBA,-1,-1):(s<0&&(s=0),s>=a&&(s=a-1),e.mapScalarsThroughTable(t,o,ru.RGBA,s))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),a=e.getNumberOfComponents(),o=t.getData(),i=e.getData(),l=0;l=c&&(s=c-1)):(-1===l&&(l=e.getVectorSize()),l<=0?(s=0,l=c):(s<0&&(s=0),s>=c&&(s=c-1),s+l>c&&(l=c-s)),i!==au.MAGNITUDE||1!==c&&1!==l||(i=au.COMPONENT));var g=0;switch(s>0&&(g=s),i){case au.COMPONENT:e.mapScalarsThroughTable(t,n,r,g);break;default:case au.MAGNITUDE:var u=Bo.a.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,u,l),e.mapScalarsThroughTable(u,n,r,0);break;case au.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var a=r(n),o=t.getData(),i=e.getData(),l=o.length,s=0,c=0;c=1&&n.getDataType()===ou.UNSIGNED_CHAR)return n;var i=Bo.a.newInstance({numberOfComponents:4,empty:!0,size:4*a,dataType:ou.UNSIGNED_CHAR});if(a<=0)return i;o=(o=o>0?o:0)<1?o:1;var l=su;switch(n.getDataType()!==ou.FLOAT&&n.getDataType()!==ou.DOUBLE||(l=cu),r){case 1:e.luminanceToRGBA(i,n,o,l);break;case 2:e.luminanceAlphaToRGBA(i,n,l);break;case 3:e.rGBToRGBA(i,n,o,l);break;case 4:e.rGBAToRGBA(i,n,o,l);break;default:return lu("Cannot convert colors"),null}return i},e.usingLogScale=function(){return!1},e.getNumberOfAvailableColors=function(){return 16777216},e.setRange=function(t,n){return e.setMappingRange(t,n)},e.getRange=function(t,n){return e.getMappingRange()}}var uu={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:au.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function du(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uu,n),ln.c.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],ln.c.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),ln.c.setArray(e,t,["mappingRange"],2),ln.c.getArray(e,t,["mappingRange"]),gu(e,t)}var mu=function(e){for(var t=1;tt.range[1]?t.maxIndex+1+1.5:(n=(e+t.shift)*t.scale)e[0]&&(t.scale=(t.maxIndex+1)/(e[1]-e[0]))},e.mapScalarsThroughTable=function(n,r,a,o){var i=e.linearLookup;t.indexedLookup&&(i=e.indexedLookupFunction);var l=e.getMappingRange(),s={maxIndex:e.getNumberOfColors()-1,range:l,shift:0,scale:0};e.lookupShiftAndScale(l,s);var c=e.getAlpha(),g=n.getNumberOfTuples(),u=n.getNumberOfComponents(),d=r.getData(),m=n.getData();if(c>=1){if(a===$g.RGBA)for(var f=0;ft.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Cu={numberOfColors:256,hueRange:[0,.66667],saturationRange:[1,1],valueRange:[1,1],alphaRange:[1,1],nanColor:[.5,0,0,1],belowRangeColor:[0,0,0,1],aboveRangeColor:[1,1,1,1],useAboveRangeColor:!1,useBelowRangeColor:!1,alpha:1};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),mu.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},ln.c.obj(t.buildTime),t.opaqueFlagBuildTime={},ln.c.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},ln.c.obj(t.insertTime,{mtime:0}),ln.c.get(e,t,["buildTime"]),ln.c.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),ln.c.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),pu(e,t)}var hu={newInstance:ln.c.newInstance(Iu,"vtkLookupTable"),extend:Iu},bu=1,yu=0,vu=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Zu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;yu=e}var Au={getResolveCoincidentTopologyAsString:function(){return vu[yu]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bu},getResolveCoincidentTopology:function(){return yu},setResolveCoincidentTopology:Zu,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bu=e},setResolveCoincidentTopologyToDefault:function(){Zu(0)},setResolveCoincidentTopologyToOff:function(){Zu(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Zu(1)}};function Gu(e,t,n){n.forEach((function(n){e["get".concat(n.method)]=function(){return t[n.key]},e["set".concat(n.method)]=function(e,r){t[n.key]={factor:e,offset:r}}}))}var Su=["Polygon","Line","Point"],Bu={};Gu(Bu,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Su.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Vu={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),ln.c.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Au).forEach((function(t){e[t]=Au[t]})),Object.keys(Bu).forEach((function(t){e[t]=Bu[t]})),Gu(e,t.topologyOffset,Su.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Bu.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Bu.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Bu,otherStaticMethods:Au,CATEGORIES:Su};function Ru(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:a}},e.createColorTextureCoordinates=function(t,n,r,a,o,i,l,s,c){var g=(i[1]-i[0])/s,u=[];u[0]=i[0]-g,u[1]=i[1]+g;var d=1/(u[1]-u[0]),m=n.getData(),f=t.getData(),p=0,C=0;if(o<0||o>=a)for(var I=0;It.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var l=t.lookupTable.getNumberOfAvailableColors();l>4094&&(l=4094),l+=2;for(var s=(a[1]-a[0])/(l-1-2),c=new Float64Array(2*l),g=0;gt.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var m=n.getNumberOfComponents(),f=n.getNumberOfTuples();t.colorCoordinates=Bo.a.newInstance({numberOfComponents:2,values:new Float32Array(2*f)});var p=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Xu.MAGNITUDE&&n.getNumberOfComponents()>1&&(p=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,f,m,p,a,t.lookupTable.getRange(),t.colorTextureMap.getPointData().getScalars().getNumberOfTuples()/2-2,o)}},e.getIsOpaque=function(){var t=e.getLookupTable();return!t||(t.build(),t.isOpaque())},e.canUseTextureMapForColoring=function(n){if(!t.interpolateScalarsBeforeMapping)return!1;if(t.lookupTable&&t.lookupTable.getIndexedLookup())return!1;var r=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName),a=r.scalars;return!(!a||r.cellFlag||t.colorMode===xu.DEFAULT&&a.getDataType()===Ou.UNSIGNED_CHAR||t.colorMode===xu.DIRECT_SCALARS)},e.clearColorArrays=function(){t.colorMapColors=null,t.colorCoordinates=null,t.colorTextureMap=null},e.getLookupTable=function(){return t.lookupTable||e.createDefaultLookupTable(),t.lookupTable},e.getMTime=function(){var e=t.mtime;if(null!==t.lookupTable){var n=t.lookupTable.getMTime();e=n>e?n:e}return e},e.getPrimitiveCount=function(){var t=e.getInputData();return{points:t.getPoints().getNumberOfValues()/3,verts:t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells(),lines:t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells(),triangles:t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells()}},e.acquireInvertibleLookupTable=Nu("AcquireInvertibleLookupTable"),e.valueToColor=Nu("ValueToColor"),e.colorToValue=Nu("ColorToValue"),e.useInvertibleColorFor=Nu("UseInvertibleColorFor"),e.clearInvertibleColor=Nu("ClearInvertibleColor")}var Yu={colorMapColors:null,static:!1,lookupTable:null,scalarVisibility:!0,scalarRange:[0,1],useLookupTableScalarRange:!1,colorMode:0,scalarMode:0,arrayAccessMode:1,renderTime:0,colorByArrayName:null,fieldDataTupleId:-1,interpolateScalarsBeforeMapping:!1,colorCoordinates:null,colorTextureMap:null,forceCompileOnly:0,useInvertibleColors:!1,invertibleScalars:null,viewSpecificProperties:null,customShaderAttributes:[]};function Fu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),qg.extend(e,t,n),ln.c.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),ln.c.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),ln.c.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Vu.implementCoincidentTopologyMethods(e,t),Hu(e,t)}var Pu=wu(wu(wu({newInstance:ln.c.newInstance(Fu,"vtkMapper"),extend:Fu},ku),Wu),tu),Ku="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexMC;\n\n// frag position in VC\n//VTK::PositionVC::Dec\n\n// optional normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// material property values\n//VTK::Color::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// camera and actor matrix values\n//VTK::Camera::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// picking support\n//VTK::Picking::Dec\n\nvoid main()\n{\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Clip::Impl\n\n //VTK::PrimID::Impl\n\n //VTK::PositionVC::Impl\n\n //VTK::Light::Impl\n\n //VTK::Picking::Impl\n}\n",Mu="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkPolyDataFS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n// Template for the polydata mappers fragment shader\n\nuniform int PrimitiveIDOffset;\n\n// VC position of this fragment\n//VTK::PositionVC::Dec\n\n// optional color passed in from the vertex shader, vertexColor\n//VTK::Color::Dec\n\n// optional surface normal declaration\n//VTK::Normal::Dec\n\n// extra lighting parameters\n//VTK::Light::Dec\n\n// Texture coordinates\n//VTK::TCoord::Dec\n\n// picking support\n//VTK::Picking::Dec\n\n// Depth Peeling Support\n//VTK::DepthPeeling::Dec\n\n// clipping plane vars\n//VTK::Clip::Dec\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Apple Bug\n//VTK::PrimID::Dec\n\n// handle coincident offsets\n//VTK::Coincident::Dec\n\n//VTK::ZBuffer::Dec\n\nvoid main()\n{\n // VC position of this fragment. This should not branch/return/discard.\n //VTK::PositionVC::Impl\n\n // Place any calls that require uniform flow (e.g. dFdx) here.\n //VTK::UniformFlow::Impl\n\n // Set gl_FragDepth here (gl_FragCoord.z by default)\n //VTK::Depth::Impl\n\n // Early depth peeling abort:\n //VTK::DepthPeeling::PreColor\n\n // Apple Bug\n //VTK::PrimID::Impl\n\n //VTK::Clip::Impl\n\n //VTK::Color::Impl\n\n // Generate the normal if we are not passed in one\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n if (gl_FragData[0].a <= 0.0)\n {\n discard;\n }\n\n //VTK::DepthPeeling::Impl\n\n //VTK::Picking::Impl\n\n // handle coincident offsets\n //VTK::Coincident::Impl\n\n //VTK::ZBuffer::Impl\n}\n",Lu={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,a){var o=e.getCoincidentParameters(r,a);if(o&&(0!==o.factor||0!==o.offset)){var i=n.Fragment;i=Hg.substitute(i,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(i=Hg.substitute(i,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):i=Hg.substitute(i,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=i}}}},Du={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Eu=hg.Representation,Uu=hg.Shading,zu=Pu.ScalarMode,_u=ic.Filter,ju=ic.Wrap,Qu=ln.c.vtkErrorMacro,qu={type:"StartEvent"},$u={type:"EndEvent"};function ed(e,t){function n(e,t,n){return t.identity(n),e.reduce((function(e,n,r){return 0===r?n?t.copy(e,n):t.identity(e):n?t.multiply(e,e,n):e}),n)}t.classHierarchy.push("vtkOpenGLPolyDataMapper"),e.buildPass=function(n){n&&(t.openGLActor=e.getFirstAncestorOfType("vtkOpenGLActor"),t.openGLRenderer=t.openGLActor.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.openGLCamera=t.openGLRenderer.getViewNodeFor(t.openGLRenderer.getRenderable().getActiveCamera()))},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.render=function(){var n=t.openGLRenderWindow.getContext();if(t.context!==n){t.context=n;for(var r=Du.Start;r= cos(radians(lightConeAngle".concat(u,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(u,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(u,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(u,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(u,");")," }"]);l=l.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),a=Hg.substitute(a,"//VTK::Light::Impl",l,!1).result;break;default:Qu("bad light complexity")}e.Fragment=a},e.replaceShaderNormal=function(n,r,a){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,i=n.Geometry,l=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,i=Hg.substitute(i,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,l=Hg.substitute(l,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(a.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = vec3(dFdx(vertexVC.x),dFdx(vertexVC.y),dFdx(vertexVC.z));"," vec3 fdy = vec3(dFdy(vertexVC.x),dFdy(vertexVC.y),dFdy(vertexVC.z));"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," fdx = normalize(fdx);"," fdy = normalize(fdy);"," if (abs(fdx.x) > 0.0)"," { normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(l=Hg.substitute(l,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,l=Hg.substitute(l,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,l=Hg.substitute(l,"//VTK::Normal::Impl",[" fdx = normalize(fdx);"," fdy = normalize(fdy);"," vec3 normalVCVSOutput = normalize(cross(fdx,fdy));"," if (cameraParallel == 1 && normalVCVSOutput.z < 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"," if (cameraParallel == 0 && dot(normalVCVSOutput,vertexVC.xyz) > 0.0) { normalVCVSOutput = -1.0*normalVCVSOutput; }"]).result),n.Vertex=o,n.Geometry=i,n.Fragment=l}},e.replaceShaderPositionVC=function(e,n,r){var a=e.Vertex,o=e.Geometry,i=e.Fragment;r.getProperty().getRepresentation()!==Eu.POINTS&&t.lastBoundBO.getPrimitiveType()!==Du.Points||(a=Hg.substitute(a,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(a=Hg.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=Hg.substitute(i,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(a=Hg.substitute(a,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,a=Hg.substitute(a,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=a,e.Geometry=o,e.Fragment=i},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var a=e.Vertex,o=e.Geometry,i=e.Fragment;if(t.drawingEdges)return;a=Hg.substitute(a,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var l=t.openGLActor.getActiveTextures(),s=2,c=2;if(l&&l.length>0&&(s=l[0].getComponents(),l[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(c=3)),t.renderable.getColorTextureMap()&&(s=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),c=2),2===c){if(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,l&&l.length>=1)switch(s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(a=Hg.substitute(a,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,i=Hg.substitute(i,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,s){case 1:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,1.0);"]).result;break;case 2:i=Hg.substitute(i,"//VTK::TCoord::Impl",["vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*"," vec4(tcolor.r,tcolor.r,tcolor.r,tcolor.g);"]).result;break;default:i=Hg.substitute(i,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=a,e.Geometry=o,e.Fragment=i}},e.replaceShaderClip=function(e,n,r){var a=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6),a=Hg.substitute(a,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,a=Hg.substitute(a,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=Hg.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=Hg.substitute(o,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," if (clipDistancesVSOutput[planeNum] < 0.0) discard;"," }"]).result}e.Vertex=a,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,a=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||a.getEdgeVisibility()&&a.getRepresentation()===Eu.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Du.Points||a.getRepresentation()===Eu.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Du.Lines||a.getRepresentation()===Eu.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Du.Tris&&o!==Du.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Du.TrisEdges&&o!==Du.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=Hg.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=Hg.substitute(r,"//VTK::Picking::Impl"," gl_FragData[0] = picking != 0 ? vec4(mapperIndex,1.0) : gl_FragData[0];").result,e.Fragment=r},e.replaceShaderValues=function(n,r,a){if(e.replaceShaderColor(n,r,a),e.replaceShaderNormal(n,r,a),e.replaceShaderLight(n,r,a),e.replaceShaderTCoord(n,r,a),e.replaceShaderPicking(n,r,a),e.replaceShaderClip(n,r,a),e.replaceShaderCoincidentOffset(n,r,a),e.replaceShaderPositionVC(n,r,a),t.haveSeenDepthRequest){var o=n.Fragment;o=Hg.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=Hg.substitute(o,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float iz = floor(gl_FragCoord.z*65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result,n.Fragment=o}},e.getNeedToRebuildShaders=function(n,r,a){var o=0,i=0,l=n.getPrimitiveType(),s=t.currentInput,c=!1,g=s.getPointData().getNormals(),u=s.getCellData().getNormals(),d=a.getProperty().getInterpolation()===Uu.FLAT,m=a.getProperty().getRepresentation(),f=e.getOpenGLMode(m,l);if(f===t.context.TRIANGLES||u&&!g||!d&&g?c=!0:d||f!==t.context.LINES||(c=!0),a.getProperty().getLighting()&&c){o=0;for(var p=r.getLightsByReference(),C=0;C0&&(i++,0===o&&(o=1)),1===o&&(i>1||1!==I.getIntensity()||!I.lightTypeIsHeadLight())&&(o=2),o<3&&I.getPositional()&&(o=3)}}var h=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),y=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&y===i||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:i},!0),h=!0),!!(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===n.getProgram()||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())){var o=t.lastBoundBO.getReferenceByName("lastLightComplexity");n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("normalMC")&&n.getCABO().getNormalOffset()&&o>0?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"normalMC",n.getCABO().getNormalOffset(),n.getCABO().getStride(),t.context.FLOAT,3,!1)||Qu("Error setting normalMC in shader VAO."):n.getVAO().removeAttributeArray("normalMC"),t.renderable.getCustomShaderAttributes().forEach((function(e,r){n.getProgram().isAttributeUsed("".concat(e,"MC"))&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"".concat(e,"MC"),n.getCABO().getCustomData()[r].offset,n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getCustomData()[r].components,!1)||Qu("Error setting ".concat(e,"MC in shader VAO.")))})),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),!1)||Qu("Error setting tcoordMC in shader VAO."):n.getVAO().removeAttributeArray("tcoordMC"),n.getProgram().isAttributeUsed("scalarColor")&&n.getCABO().getColorComponents()?n.getVAO().addAttributeArray(n.getProgram(),n.getCABO().getColorBO(),"scalarColor",n.getCABO().getColorOffset(),n.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,4,!0)||Qu("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var i=t.renderable.getNumberOfClippingPlanes();i>6&&(ln.c.vtkErrorMacro("OpenGL has a limit of 6 clipping planes"),i=6);for(var l=[],s=0;s0){var g=c.getColorByReference(),u=c.getIntensity();t.lightColor[0]=g[0]*u,t.lightColor[1]=g[1]*u,t.lightColor[2]=g[2]*u;var d=c.getDirection(),m=n.getActiveCamera().getViewMatrix(),f=Object(Ao.a)(d);c.lightTypeIsSceneLight()&&(f[0]=m[0]*d[0]+m[1]*d[1]+m[2]*d[2],f[1]=m[4]*d[0]+m[5]*d[1]+m[6]*d[2],f[2]=m[8]*d[0]+m[9]*d[1]+m[10]*d[2],Object(Xo.y)(f)),t.lightDirection[0]=f[0],t.lightDirection[1]=f[1],t.lightDirection[2]=f[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],Object(Xo.y)(t.lightDirection),o.setUniform3fArray("lightColor".concat(i),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(i),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(i),t.lightHalfAngle),i++}}if(!(a<3)){var p=n.getActiveCamera().getViewMatrix();Object(Yo.i)(p,p),i=0;for(var C=0;C0){var h=I.getTransformedPosition(),b=new Float64Array(3);Object(Fo.q)(b,h,p),o.setUniform3fArray("lightAttenuation".concat(i),I.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(i),I.getPositional()),o.setUniformf("lightExponent".concat(i),I.getExponent()),o.setUniformf("lightConeAngle".concat(i),I.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(i),[b[0],b[1],b[2]]),i++}}}}},e.setCameraShaderParameters=function(e,r,a){var o=e.getProgram(),i=t.openGLCamera.getKeyMatrices(r),l=r.getActiveCamera(),s=t.openGLCamera.getKeyMatrixTime().getMTime(),c=o.getLastCameraMTime(),g=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,u=a.getIsIdentity(),d=u?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();o.setUniformMatrix("MCPCMatrix",n([i.wcpc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("MCVCMatrix")&&o.setUniformMatrix("MCVCMatrix",n([i.wcvc,d.mcwc,g],Yo.p,t.tmpMat4)),o.isUniformUsed("normalMatrix")&&o.setUniformMatrix3x3("normalMatrix",n([i.normalMatrix,d.normalMatrix],$l,t.tmpMat3)),c!==s&&(o.isUniformUsed("cameraParallel")&&o.setUniformi("cameraParallel",l.getParallelProjection()),o.setLastCameraMTime(s)),u||o.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram(),o=r.getProperty(),i=o.getOpacity(),l=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),s=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),c=t.drawingEdges?1:o.getAmbient(),g=t.drawingEdges?0:o.getDiffuse(),u=t.drawingEdges?0:o.getSpecular(),d=o.getSpecularPower();a.setUniformf("opacityUniform",i),a.setUniform3fArray("ambientColorUniform",l),a.setUniform3fArray("diffuseColorUniform",s),a.setUniformf("ambient",c),a.setUniformf("diffuse",g);var m=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(m<1)){var f=o.getSpecularColorByReference();if(a.setUniform3fArray("specularColorUniform",f),a.setUniformf("specularPowerUniform",d),a.isUniformUsed("ambientIntensityBF")){if(i=(o=r.getBackfaceProperty()).getOpacity(),l=o.getAmbientColor(),c=o.getAmbient(),s=o.getDiffuseColor(),g=o.getDiffuse(),f=o.getSpecularColor(),u=o.getSpecular(),a.setUniformf("ambientIntensityBF",c),a.setUniformf("diffuseIntensityBF",g),a.setUniformf("opacityUniformBF",i),a.setUniform3fArray("ambientColorUniformBF",l),a.setUniform3fArray("diffuseColorUniformBF",s),m<1)return;a.setUniformf("specularIntensityBF",u),a.setUniform3fArray("specularColorUniformBF",f),a.setUniformf("specularPowerUniformBF",d)}}},e.renderPieceStart=function(n,r){t.primitiveIDOffset=0,t.openGLRenderer.getSelector()&&(t.openGLRenderer.getSelector().getCurrentPass(),t.openGLRenderer.getSelector().renderProp(r)),e.updateBufferObjects(n,r),t.renderable.getColorTextureMap()&&t.internalColorTexture.activate(),t.lastBoundBO=null},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===Eu.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var l=Du.Start;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,td,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=Du,t.tmpMat3=El(new Float64Array(9)),t.tmpMat4=Object(Yo.h)(new Float64Array(16));for(var r=Du.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=Hg.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,a)},e.replaceShaderColor=function(e,r,a){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,i=e.Geometry,l=e.Fragment,s=t.lastBoundBO.getReferenceByName("lastLightComplexity"),c=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];s&&(c=c.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var g=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];s&&(g=g.concat([" vec3 specularColor;"," float specularPower;"])),g=g.concat([" opacity = opacityUniform;"]),s&&(g=g.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(c=c.concat(["varying vec4 vertexColorVSOutput;"]),o=Hg.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=Hg.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,i=Hg.substitute(i,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,i=Hg.substitute(i,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,g=g.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),l=Hg.substitute(l,"//VTK::Color::Impl",g).result,l=Hg.substitute(l,"//VTK::Color::Dec",c).result,e.Vertex=o,e.Geometry=i,e.Fragment=l}n.replaceShaderColor(e,r,a)},e.replaceShaderPositionVC=function(e,r,a){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=Hg.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,a)},e.replaceShaderPicking=function(e,r,a){if(t.hardwareSupport){var o=e.Fragment,i=e.Vertex;i=Hg.substitute(i,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,i=Hg.substitute(i,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=i,o=Hg.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=Hg.substitute(o,"//VTK::Picking::Impl",[" vec4 pickColor = picking == 2 ? vec4(mapperIndexVSOutput,1.0) : vec4(mapperIndex,1.0);"," gl_FragData[0] = picking != 0 ? pickColor : gl_FragData[0];"]).result,e.Fragment=o}else n.replaceShaderPicking(e,r,a)},e.updateGlyphShaderParameters=function(n,r,a,o,i,l,s,c){var g=a.getProgram();if(n){var u=t.normalMatrix,d=l,m=9*s,f=t.tmpMat3,p=u[0],C=u[1],I=u[2],h=u[3],b=u[4],y=u[5],v=u[6],Z=u[7],A=u[8],G=d[m],S=d[m+1],B=d[m+2],V=d[m+3],R=d[m+4],w=d[m+5],k=d[m+6],W=d[m+7],x=d[m+8];f[0]=G*p+S*h+B*v,f[1]=G*C+S*b+B*Z,f[2]=G*I+S*y+B*A,f[3]=V*p+R*h+w*v,f[4]=V*C+R*b+w*Z,f[5]=V*I+R*y+w*A,f[6]=k*p+W*h+x*v,f[7]=k*C+W*b+x*Z,f[8]=k*I+W*y+x*A,g.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,i,16*s),g.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,i,16*s),g.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var T=o.getData();t.tmpColor[0]=T[4*s]/255,t.tmpColor[1]=T[4*s+1]/255,t.tmpColor[2]=T[4*s+2]/255,g.setUniform3fArray("ambientColorUniform",t.tmpColor),g.setUniform3fArray("diffuseColorUniform",t.tmpColor)}c&&g.setUniform3fArray("mapperIndex",c.getPropColorValue())},e.renderPieceDraw=function(n,r){var a=r.getProperty().getRepresentation(),o=t.context,i=r.getProperty().getEdgeVisibility()&&a===id.SURFACE,l=t.openGLCamera.getKeyMatrices(n),s=t.openGLActor.getKeyMatrices();_l(t.normalMatrix,l.normalMatrix,s.normalMatrix),Object(Yo.l)(t.mcpcMatrix,l.wcpc,s.mcwc),Object(Yo.l)(t.mcvcMatrix,l.wcvc,s.mcwc);var c=t.renderable.getMatrixArray(),g=t.renderable.getNormalArray(),u=t.renderable.getColorArray(),d=c.length/16,m=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===sd.COMPOSITE_INDEX_PASS&&(m=!0);for(var f=t.primTypes.Start;fe.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime()))return e.getProgram().isAttributeUsed("gMatrix")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.matrixBuffer,"gMatrix",0,64,t.context.FLOAT,4,!1,1)||od("Error setting gMatrix in shader VAO."):e.getVAO().removeAttributeArray("gMatrix"),e.getProgram().isAttributeUsed("gNormal")?e.getVAO().addAttributeMatrixWithDivisor(e.getProgram(),t.normalBuffer,"gNormal",0,36,t.context.FLOAT,3,!1,1)||od("Error setting gNormal in shader VAO."):e.getVAO().removeAttributeArray("gNormal"),e.getProgram().isAttributeUsed("gColor")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.colorBuffer,"gColor",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting gColor in shader VAO."):e.getVAO().removeAttributeArray("gColor"),e.getProgram().isAttributeUsed("mapperIndexVS")?e.getVAO().addAttributeArrayWithDivisor(e.getProgram(),t.pickBuffer,"mapperIndexVS",0,4,t.context.UNSIGNED_BYTE,4,!0,1,!1)||od("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,a),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,a)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(a,ld.ARRAY_BUFFER),t.normalBuffer.upload(o,ld.ARRAY_BUFFER),i?t.colorBuffer.upload(i.getData(),ld.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var l=a.length/16,s=new Uint8Array(4*l),c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),rd.extend(e,t,n),t.tmpMat3=El(new Float64Array(9)),t.normalMatrix=El(new Float64Array(9)),t.mcpcMatrix=Object(Yo.h)(new Float64Array(16)),t.mcvcMatrix=Object(Yo.h)(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},ln.c.obj(t.glyphBOBuildTime,{mtime:0}),ud(e,t)}var fd={newInstance:ln.c.newInstance(md,"vtkOpenGLGlyph3DMapper"),extend:md},pd={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}},Cd={NEAREST:0,LINEAR:1},Id={InterpolationType:Cd},hd=ln.c.vtkErrorMacro,bd=pd.SlicingMode;function yd(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function vd(e,t){t.classHierarchy.push("vtkOpenGLImageMapper"),e.buildPass=function(n){if(n){t.openGLImageSlice=e.getFirstAncestorOfType("vtkOpenGLImageSlice"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.pwfTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera()),t.renderable.getSliceAtFocalPoint()&&t.renderable.setSliceFromCamera(r.getActiveCamera())}},e.translucentPass=function(t){t&&e.render()},e.opaqueZBufferPass=function(n){n&&(t.haveSeenDepthRequest=!0,t.renderDepth=!0,e.render(),t.renderDepth=!1)},e.opaquePass=function(t){t&&e.render()},e.getCoincidentParameters=function(e,n){return t.renderable.getResolveCoincidentTopology()?t.renderable.getCoincidentTopologyPolygonOffsetParameters():null},e.render=function(){var n=t.openGLImageSlice.getRenderable(),r=t.openGLRenderer.getRenderable();e.renderPiece(r,n)},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=Ku,e.Fragment=Mu,e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Vertex,i=n.Fragment;o=Hg.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=Hg.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=Hg.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=Hg.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var l=t.openGLTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=["varying vec2 tcoordVCVSOutput;","uniform float cshift0;","uniform float cscale0;","uniform float pwfshift0;","uniform float pwfscale0;","uniform sampler2D texture1;","uniform sampler2D colorTexture1;","uniform sampler2D pwfTexture1;","uniform float opacity;"];if(s){for(var g=1;gn.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(n.getProgram().isAttributeUsed("vertexMC")&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"vertexMC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||hd("Error setting vertexMC in shader VAO.")),n.getProgram().isAttributeUsed("tcoordMC")&&n.getCABO().getTCoordOffset()&&(n.getVAO().addAttributeArray(n.getProgram(),n.getCABO(),"tcoordMC",n.getCABO().getTCoordOffset(),n.getCABO().getStride(),t.context.FLOAT,n.getCABO().getTCoordComponents(),t.context.FALSE)||hd("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var i=t.openGLTexture.getComponents(),l=a.getProperty().getIndependentComponents();if(l)for(var s=0;s1?1:0;var M=o.getData(),L=null;if(T===bd.I){L=new M.constructor(H[2]*H[1]*s);for(var D=0,E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zd,n),_s.extend(e,t,n),Lu.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=Eg.newInstance(),t.openGLTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.pwfTexture=ic.newInstance(),t.imagemat=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,[]),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime),vd(e,t)}var Gd={newInstance:ln.c.newInstance(Ad,"vtkOpenGLImageMapper"),extend:Ad};function Sd(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getPickable()||(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;t.renderable.getIsOpaque()?n.incrementOpaqueActorCount():n.incrementTranslucentActorCount()}},e.opaqueZBufferPass=function(t,n){return e.opaquePass(t,n)},e.opaquePass=function(n,r){n&&(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!0))},e.translucentPass=function(n,r){n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(Object(Yo.d)(t.keyMatrices.mcwc,t.renderable.getMatrix()),Object(Yo.i)(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}var Bd={context:null,keyMatrixTime:null,keyMatrices:null};function Vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bd,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),Sd(e,t)}var Rd={newInstance:ln.c.newInstance(Vd,"vtkOpenGLImageSlice"),extend:Vd},wd=ln.c.vtkDebugMacro;function kd(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var a=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,i=t.openGLRenderer.getTiledSizeAndOrigin(),l=null;if(t.renderable.getUseZValues()){var s=r.getZBufferTexture(),c=Math.floor(s.getWidth()),g=Math.floor(s.getHeight()),u=t.openGLRenderWindow.getContext();s.bind();var d=r.getFramebuffer();d?d.saveCurrentBindingsAndBuffers():wd("No framebuffer to save/restore");var m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,s.getHandle(),0),u.checkFramebufferStatus(u.FRAMEBUFFER)===u.FRAMEBUFFER_COMPLETE&&(l=new Uint8Array(c*g*4),u.viewport(0,0,c,g),u.readPixels(0,0,c,g,u.RGBA,u.UNSIGNED_BYTE,l)),d&&d.restorePreviousBindingsAndBuffers(),u.deleteFramebuffer(m)}t.renderable.invokeCallback(t.renderable.getInputData(),o,a,i,l)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var Wd={};function xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),_s.extend(e,t,n),kd(e,t)}var Td={newInstance:ln.c.newInstance(xd,"vtkOpenGLPixelSpaceCallbackMapper"),extend:xd},Jd=ln.c.vtkDebugMacro;function Xd(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;t.renderable.isActiveCameraCreated()||t.renderable.resetCamera(),e.updateLights(),e.prepareNodes(),e.addMissingNode(t.renderable.getActiveCamera()),e.addMissingNodes(t.renderable.getViewPropsWithNestedProps()),e.removeUnusedNodes()}},e.updateLights=function(){for(var e=0,n=t.renderable.getLightsByReference(),r=0;r0&&e++;return e||(Jd("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,a=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=a.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(a.clearDepth(1),r|=a.DEPTH_BUFFER_BIT,a.depthMask(!0));var o=e.getTiledSizeAndOrigin();a.enable(a.SCISSOR_TEST),a.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),a.colorMask(!0,!0,!0,!0),a.clear(r),a.enable(a.DEPTH_TEST)}},e.cameraPass=function(t){t&&e.clear()},e.getAspectRatio=function(){var e=t.parent.getSizeByReference(),n=t.renderable.getViewportByReference();return e[0]*(n[2]-n[0])/((n[3]-n[1])*e[1])},e.getTiledSizeAndOrigin=function(){var e=t.renderable.getViewportByReference(),n=[0,0,1,1],r=Object(Xo.a)(e[0]-n[0],0,1),a=Object(Xo.a)(e[1]-n[1],0,1),o=t.parent.normalizedDisplayToDisplay(r,a),i=Math.round(o[0]),l=Math.round(o[1]),s=Object(Xo.a)(e[2]-n[0],0,1),c=Object(Xo.a)(e[3]-n[1],0,1);s>n[2]-n[0]&&(s=n[2]-n[0]),c>n[3]-n[1]&&(c=n[3]-n[1]);var g=t.parent.normalizedDisplayToDisplay(s,c),u=Math.round(g[0])-i,d=Math.round(g[1])-l;return u<0&&(u=0),d<0&&(d=0),{usize:u,vsize:d,lowerLeftU:i,lowerLeftV:l}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var a=t.renderable.getBackgroundByReference();t.context.clearColor(a[0],a[1],a[2],a[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,r.depthMask(!0)),r.colorMask(!0,!0,!0,!0);var o=e.getTiledSizeAndOrigin();r.enable(r.SCISSOR_TEST),r.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),r.clear(n),r.enable(r.DEPTH_TEST)},e.releaseGraphicsResources=function(){null!==t.selector&&t.selector.releaseGraphicsResources()},e.setOpenGLRenderWindow=function(n){t.openGLRenderWindow!==n&&(e.releaseGraphicsResources(),t.openGLRenderWindow=n,t.context=null,n&&(t.context=t.openGLRenderWindow.getContext()))}}var Od={context:null,openGLRenderWindow:null,selector:null};function Nd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),_s.extend(e,t,n),ln.c.get(e,t,["shaderCache"]),ln.c.setGet(e,t,["selector"]),Xd(e,t)}var Hd={newInstance:ln.c.newInstance(Nd,"vtkOpenGLRenderer"),extend:Nd},Yd=ln.c.vtkErrorMacro;function Fd(e,t){t.classHierarchy.push("vtkOpenGLSkybox"),e.buildPass=function(n){if(n){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent(),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLTexture.setOpenGLRenderWindow(t.openGLRenderWindow);var r=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(r.getActiveCamera())}},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementOpaqueActorCount()}},e.opaquePass=function(n,r){if(n&&!t.openGLRenderer.getSelector()){e.updateBufferObjects(),t.openGLRenderWindow.enableDepthMask(),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var a=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",a);var o=t.openGLRenderer.getRenderable(),i=t.openGLCamera.getKeyMatrices(o),l=new Float64Array(16);if(Object(Yo.g)(l,i.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",l),"box"===t.lastFormat){var s=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",s[0],s[1],s[2])}t.tris.getVAO().bind(),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.openGLTexture.deactivate()}},e.updateBufferObjects=function(){if(!t.tris.getCABO().getElementCount()){for(var e=new Float32Array(12),n=0;n<4;n++)e[3*n]=n%2*2-1,e[3*n+1]=n>1?1:-1,e[3*n+2]=1;var r=Bo.a.newInstance({numberOfComponents:3,values:e});r.setName("points");var a=new Uint16Array(8);a[0]=3,a[1]=0,a[2]=1,a[3]=3,a[4]=3,a[5]=0,a[6]=3,a[7]=2;var o=Bo.a.newInstance({numberOfComponents:1,values:a});t.tris.getCABO().createVBO(o,"polys",sg.SURFACE,{points:r,cellOffset:0})}t.renderable.getFormat()!==t.lastFormat&&(t.lastFormat=t.renderable.getFormat(),"box"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec3 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = wpos.xyz/wpos.w;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec3 TexCoords;\n uniform samplerCube sbtexture;\n uniform vec3 camPos;\n void main () {\n // skybox looks from inside out\n // which means we have to adjust\n // our tcoords. Otherwise text would\n // be flipped\n vec3 tc = normalize(TexCoords - camPos);\n if (abs(tc.z) < max(abs(tc.x),abs(tc.y)))\n {\n tc = vec3(1.0, 1.0, -1.0) * tc;\n }\n else\n {\n tc = vec3(-1.0, 1.0, 1.0) * tc;\n }\n gl_FragData[0] = textureCube(sbtexture, tc);\n }","")),"background"===t.lastFormat&&t.tris.setProgram(t.openGLRenderWindow.getShaderCache().readyShaderProgramArray("//VTK::System::Dec\n attribute vec3 vertexMC;\n uniform mat4 IMCPCMatrix;\n varying vec2 TexCoords;\n void main () {\n gl_Position = vec4(vertexMC.xyz, 1.0);\n vec4 wpos = IMCPCMatrix * gl_Position;\n TexCoords = vec2(vertexMC.x, vertexMC.y)*0.5 + 0.5;\n }","//VTK::System::Dec\n //VTK::Output::Dec\n varying vec2 TexCoords;\n uniform sampler2D sbtexture;\n void main () {\n gl_FragData[0] = texture2D(sbtexture, TexCoords);\n }","")),t.tris.getShaderSourceTime().modified(),t.tris.getVAO().bind(),t.tris.getVAO().addAttributeArray(t.tris.getProgram(),t.tris.getCABO(),"vertexMC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Yd("Error setting vertexMC in shader VAO."));var i=t.renderable.getTextures();i.length||Yd("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==i[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(i[0]))}}var Pd={context:null};function Kd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),_s.extend(e,t,n),t.openGLTexture=ic.newInstance(),t.tris=Eg.newInstance(),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:El(new Float64Array(9)),mcwc:Object(Yo.h)(new Float64Array(16))},ln.c.setGet(e,t,["context"]),ln.c.get(e,t,["activeTextures"]),Fd(e,t)}var Md={newInstance:ln.c.newInstance(Kd),extend:Kd};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Dd=ln.c.vtkErrorMacro;function Ed(e,t){t.classHierarchy.push("vtkOpenGLSphereMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float b = 2.0*dot(EyePos,EyeDir);\n"," float c = dot(EyePos,EyePos) - 1.0;\n"," float d = b*b - 4.0*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - invertedDepth*sqrt(d))*0.5;\n"," normalVCVSOutput = invertedDepth*normalize(EyePos + t*EyeDir);\n"," vertexVC.xyz = normalVCVSOutput*radiusVCVSOutput + centerVCVSOutput;\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"offsetMC",12,e.getCABO().getStride(),t.context.FLOAT,2,!1)||Dd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),a.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())a.setUniformMatrix("MCVCMatrix",i.wcvc);else{var l=t.openGLActor.getKeyMatrices(),s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(g=i.getArray(t.renderable.getScaleArray()).getData());var u=null,d=0,m=null;a?(d=a.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),u=a.getData(),m=new Uint8Array(3*s*4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(d);var f=new Float32Array(5*s*3);o.setStride(20);for(var p=Math.cos(Object(Xo.B)(30)),C=0,I=0,h=0,b=0,y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ud,n),rd.extend(e,t,n),Ed(e,t)}var _d={newInstance:ln.c.newInstance(zd,"vtkOpenGLSphereMapper"),extend:zd};function jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qd=ln.m;function qd(e,t){t.classHierarchy.push("vtkOpenGLStickMapper");var n=function(e){for(var t=1;t radiusVCVSOutput*3.0) {\n"," EyePos = vertexVC.xyz - EyeDir*3.0*radiusVCVSOutput; }\n"," }\n"," EyePos = EyePos - centerVCVSOutput;\n"," vec3 base1;\n"," if (abs(orientVCVSOutput.z) < 0.99) {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,0.0,1.0))); }\n"," else {\n"," base1 = normalize(cross(orientVCVSOutput,vec3(0.0,1.0,0.0))); }\n"," vec3 base2 = cross(orientVCVSOutput,base1);\n"," EyePos = vec3(dot(EyePos,base1),dot(EyePos,base2),dot(EyePos,orientVCVSOutput));\n"," EyeDir = vec3(dot(EyeDir,base1),dot(EyeDir,base2),dot(EyeDir,orientVCVSOutput));\n"," EyePos = EyePos/radiusVCVSOutput;\n"," float a = EyeDir.x*EyeDir.x + EyeDir.y*EyeDir.y;\n"," float b = 2.0*(EyePos.x*EyeDir.x + EyePos.y*EyeDir.y);\n"," float c = EyePos.x*EyePos.x + EyePos.y*EyePos.y - 1.0;\n"," float d = b*b - 4.0*a*c;\n"," vec3 normalVCVSOutput = vec3(0.0,0.0,1.0);\n"," if (d < 0.0) { discard; }\n"," else {\n"," float t = (-b - sqrt(d))/(2.0*a);\n"," float tz = EyePos.z + t*EyeDir.z;\n"," vec3 iPoint = EyePos + t*EyeDir;\n"," if (abs(iPoint.z)*radiusVCVSOutput > lengthVCVSOutput*0.5) {\n"," float t2 = (-b + sqrt(d))/(2.0*a);\n"," float tz2 = EyePos.z + t2*EyeDir.z;\n"," if (tz2*radiusVCVSOutput > lengthVCVSOutput*0.5 || tz*radiusVCVSOutput < -0.5*lengthVCVSOutput) { discard; }\n"," else {\n"," normalVCVSOutput = orientVCVSOutput;\n"," float t3 = (lengthVCVSOutput*0.5/radiusVCVSOutput - EyePos.z)/EyeDir.z;\n"," iPoint = EyePos + t3*EyeDir;\n"," vertexVC.xyz = radiusVCVSOutput*(iPoint.x*base1 + iPoint.y*base2 + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," else {\n"," normalVCVSOutput = iPoint.x*base1 + iPoint.y*base2;\n"," vertexVC.xyz = radiusVCVSOutput*(normalVCVSOutput + iPoint.z*orientVCVSOutput) + centerVCVSOutput;\n"," }\n"," }\n"," vec4 pos = VCPCMatrix * vertexVC;\n",l]).result,i=Hg.substitute(i,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(i=Hg.substitute(i,"//VTK::ZBuffer::Impl",["if (depthRequest == 1) {","float computedZ = (pos.z / pos.w + 1.0) / 2.0;","float iz = floor(computedZ * 65535.0 + 0.1);","float rf = floor(iz/256.0)/255.0;","float gf = mod(iz,256.0)/255.0;","gl_FragData[0] = vec4(rf, gf, 0.0, 1.0); }"]).result),e.Vertex=o,e.Fragment=i,n.replaceShaderValues(e,r,a)},e.setMapperShaderParameters=function(e,r,a){e.getCABO().getElementCount()&&(t.VBOBuildTime>e.getAttributeUpdateTime().getMTime()||e.getShaderSourceTime().getMTime()>e.getAttributeUpdateTime().getMTime())&&(e.getProgram().isAttributeUsed("orientMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"orientMC",12,e.getCABO().getStride(),t.context.FLOAT,3,!1)||Qd("Error setting 'orientMC' in shader VAO.")),e.getProgram().isAttributeUsed("offsetMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO().getColorBO(),"offsetMC",0,e.getCABO().getColorBOStride(),t.context.UNSIGNED_BYTE,3,!0)||Qd("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isAttributeUsed("radiusMC")&&(e.getVAO().addAttributeArray(e.getProgram(),e.getCABO(),"radiusMC",24,e.getCABO().getStride(),t.context.FLOAT,1,!1)||Qd("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,a)},e.setCameraShaderParameters=function(e,n,r){var a=e.getProgram(),o=n.getActiveCamera(),i=t.openGLCamera.getKeyMatrices(n);if(a.isUniformUsed("VCPCMatrix")&&a.setUniformMatrix("VCPCMatrix",i.vcpc),r.getIsIdentity())a.isUniformUsed("MCVCMatrix")&&a.setUniformMatrix("MCVCMatrix",i.wcvc),a.isUniformUsed("normalMatrix")&&a.setUniformMatrix3x3("normalMatrix",i.normalMatrix);else{var l=t.openGLActor.getKeyMatrices();if(a.isUniformUsed("MCVCMatrix")){var s=new Float64Array(16);Object(Yo.l)(s,i.wcvc,l.mcwc),a.setUniformMatrix("MCVCMatrix",s)}if(a.isUniformUsed("normalMatrix")){var c=new Float64Array(9);_l(c,i.normalMatrix,l.normalMatrix),a.setUniformMatrix3x3("normalMatrix",c)}}a.isUniformUsed("cameraParallel")&&e.getProgram().setUniformi("cameraParallel",o.getParallelProjection())},e.getOpenGLMode=function(e,n){return t.context.TRIANGLES},e.buildBufferObjects=function(e,n){var r=t.currentInput;if(null!==r){t.renderable.mapScalars(r,1);var a=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),i=r.getPointData(),l=r.getPoints(),s=l.getNumberOfPoints(),c=l.getData(),g=null,u=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(Mc.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),a&&(u=a.getNumberOfComponents(),o.setColorOffset(4),g=a.getData(),o.setColorBOStride(8)),o.setColorComponents(u),o.setStride(28);var d=new Float32Array(7*s*12),m=new Uint8Array(12*s*(g?8:4)),f=null,p=null;null!=t.renderable.getScaleArray()&&i.hasArray(t.renderable.getScaleArray())&&(f=i.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&i.hasArray(t.renderable.getOrientationArray())?p=i.getArray(t.renderable.getOrientationArray()).getData():Qd(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var C=[0,1,3,0,3,2,2,3,5,2,5,4],I=0,h=0,b=0,y=0,v=0;v=4?255:0,m[y++]=C[G]>=2?255:0,m[y++]=255,h=v*u,g&&(m[y++]=g[h],m[y++]=g[h+1],m[y++]=g[h+2],m[y++]=g[h+3])}o.setElementCount(b/7),o.upload(d,Xc.ARRAY_BUFFER),o.getColorBO().upload(m,Xc.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var $d={};function em(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),rd.extend(e,t,n),qd(e,t)}var tm={newInstance:Object(ln.g)(em,"vtkOpenGLStickMapper"),extend:em},nm="//VTK::System::Dec\n\n/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtktextureObjectVS.glsl\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\nattribute vec4 vertexDC;\nattribute vec2 tcoordDC;\nvarying vec2 tcoordVC;\n\nvoid main()\n{\n tcoordVC = tcoordDC;\n gl_Position = vertexDC;\n}\n",rm=hg.Representation;function am(e,t,n,r){var o=Object(a.a)(t,2),i=o[0],l=o[1],s=e.getContext(),c=ic.newInstance({autoParameters:!1,wrapS:r,wrapT:r,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:s.FLOAT,baseLevel:0,maxLevel:0});return c.setOpenGLRenderWindow(e),c.setInternalFormat(s.RGBA32F),c.create2DFromRaw(i,l,4,"Float32Array",null),c.activate(),c.sendParameters(),c.deactivate(),c}function om(e,t){return am(e,t,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE)}function im(e,t){t.classHierarchy.push("vtkLICPingPongBufferManager"),t.openGLRenderWindow?(t.quad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",rm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow),t.context=t.openGLRenderWindow.getContext(),t.licTexture0=om(t.openGLRenderWindow,t.size),t.seedTexture0=om(t.openGLRenderWindow,t.size),t.licTexture1=om(t.openGLRenderWindow,t.size),t.seedTexture1=om(t.openGLRenderWindow,t.size),t.eeTexture=t.doEEPass?am(t.openGLRenderWindow,t.size,ic.Filter.NEAREST,ic.Wrap.CLAMP_TO_EDGE):null,t.imageVectorTexture=t.doVTPass?function(e,t){return am(e,t,ic.Filter.LINEAR,ic.Wrap.CLAMP_TO_EDGE)}(t.openGLRenderWindow,t.size):null,t.pingTextures[0]=t.licTexture0,t.pingTextures[1]=t.seedTexture0,t.pongTextures[0]=t.licTexture1,t.pongTextures[1]=t.seedTexture1,t.textures[0]=t.pingTextures,t.textures[1]=t.pongTextures,e.swap=function(){t.readIndex=1-t.readIndex},e.renderQuad=function(e,n){var r=t.quad,a=t.context,o=t.quadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.quadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.getLastLICBuffer=function(){return 0===t.readIndex?t.licTexture0:t.licTexture1},e.getLastSeedBuffer=function(){return 0===t.readIndex?t.seedTexture0:t.seedTexture1},e.getLICBuffer=function(){return 1-t.readIndex==0?t.licTexture0:t.licTexture1},e.getSeedBuffer=function(){return 1-t.readIndex==0?t.seedTexture0:t.seedTexture1},e.getLICTextureUnit=function(){var e=t.textures[t.readIndex][0];return e.activate(),e.getTextureUnit()},e.getSeedTextureUnit=function(){var e=t.textures[t.readIndex][1];return e.activate(),e.getTextureUnit()},e.getNoiseTextureUnit=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return 0===e?(t.noiseTexture.activate(),t.noiseTexture.getTextureUnit()):(t.eeTexture.activate(),t.eeTexture.getTextureUnit())},e.getVectorTextureUnit=function(){return t.vectorTexture.activate(),t.vectorTexture.getTextureUnit()},e.getImageVectorTextureUnit=function(){return t.imageVectorTexture?(t.imageVectorTexture.activate(),t.imageVectorTexture.getTextureUnit()):e.getVectorTextureUnit()},e.getMaskVectorTextureUnit=function(){return t.maskVectorTexture?(t.maskVectorTexture.activate(),t.maskVectorTexture.getTextureUnit()):e.getImageVectorTextureUnit()},e.clearBuffers=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),n.setColorBuffer(t.licTexture0,0),n.setColorBuffer(t.seedTexture0,1),n.setColorBuffer(t.licTexture1,2),n.setColorBuffer(t.seedTexture1,3);var a=[r.COLOR_ATTACHMENT0,r.COLOR_ATTACHMENT1,r.COLOR_ATTACHMENT2,r.COLOR_ATTACHMENT3];e&&(n.removeColorBuffer(4),n.setColorBuffer(t.eeTexture,4),a.push(r.COLOR_ATTACHMENT4)),r.drawBuffers(a),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeColorBuffer(3),e&&n.removeColorBuffer(4),r.drawBuffers([r.NONE])},e.clearBuffer=function(e){var n=t.framebuffer,r=t.context;n.removeColorBuffer(0),n.setColorBuffer(e,0),r.drawBuffers([r.COLOR_ATTACHMENT0]),r.clearColor(0,1,0,0),r.disable(r.SCISSOR_TEST),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT),n.removeColorBuffer(e,0),r.drawBuffers([r.NONE])},e.activateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.activate():t.vectorTexture.activate(),t.maskVectorTexture&&t.maskVectorTexture.activate()},e.deactivateVectorTextures=function(){t.imageVectorTexture?t.imageVectorTexture.deactivate():t.vectorTexture.deactivate(),t.maskVectorTexture&&t.maskVectorTexture.deactivate()},e.activateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.activate();break;case 1:t.eeTexture.activate();break;default:console.error("Wrong LIC pass number")}},e.deactivateNoiseTexture=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch(e){case 0:t.noiseTexture.deactivate();break;case 1:t.eeTexture.deactivate();break;default:console.error("Wrong LIC pass number")}},e.attachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.textures[1-t.readIndex],r=t.framebuffer,a=t.context;e[0].activate(),e[1].activate(),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(n[0],0),r.setColorBuffer(n[1],1),a.drawBuffers([a.COLOR_ATTACHMENT0,a.COLOR_ATTACHMENT1])},e.detachLICBuffers=function(){var e=t.textures[t.readIndex],n=t.context,r=t.framebuffer;e[0].deactivate(),e[1].deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE])},e.attachImageVectorBuffer=function(){var e=t.framebuffer,n=t.context;t.vectorTexture.activate(),e.removeColorBuffer(0),e.setColorBuffer(t.imageVectorTexture,0),n.drawBuffers([n.COLOR_ATTACHMENT0])},e.detachImageVectorBuffer=function(){var e=t.context,n=t.framebuffer;t.vectorTexture.deactivate(),n.removeColorBuffer(0),e.drawBuffers([e.NONE])},e.attachEEBuffer=function(){t.textures[t.readIndex][0].activate(),t.framebuffer.removeColorBuffer(0),t.framebuffer.setColorBuffer(t.eeTexture,0);var e=t.context;e.drawBuffers([e.COLOR_ATTACHMENT0])},e.detachEEBuffer=function(){var e=t.context;t.framebuffer.removeColorBuffer(0),e.drawBuffers([e.NONE]),t.textures[t.readIndex][0].deactivate()},e.detachBuffers=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),e.drawBuffers([e.NONE]);var r=t.textures[t.readIndex],a=t.textures[1-t.readIndex];r[0]&&r[0].deactivate(),r[1]&&r[1].deactivate(),a[0]&&a[0].deactivate(),a[1]&&a[1].deactivate(),t.eeTexture&&t.eeTexture.deactivate(),t.noiseTexture&&t.noiseTexture.deactivate()},e.getWriteIndex=function(){return 1-t.readIndex},e.detachBuffers()):console.error("Pass renderwindow to ping pong manager")}var lm={openGLRenderWindow:null,vectorTexture:null,maskVectorTexture:null,noiseTexture:null,doEEPass:!1,doVTPass:!1,readIndex:0,quad:null,lastProgramHash:null,framebuffer:null,size:null,pingTextures:[],pongTextures:[],textures:[]};function sm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lm,n),ln.c.obj(e,t),ln.c.get(e,t,["readIndex"]),ln.c.setGet(e,t,["doEEPass","doVTPass","openGLRenderWindow","vectorTexture","maskVectorTexture","noiseTexture","framebuffer","size"]),im(e,t)}var cm={newInstance:ln.c.newInstance(sm,"vtkLICPingPongBufferManager"),extend:sm},gm=0,um=1,dm=2,mm=3,fm=0,pm=1;function Cm(e,t){function n(e,t){e.setUniformi("texLIC",t.getLICTextureUnit()),e.setUniformi("texSeedPts",t.getSeedTextureUnit())}function r(e,t,n){e.attachLICBuffers(),e.renderQuad(t,n),e.detachLICBuffers(),e.swap()}t.classHierarchy.push("vtkLineIntegralConvolution2D"),e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.dumpTextureValues=function(e,n){var r=Object(a.a)(n,2),o=r[0],i=r[1],l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:4,g=gc.newInstance(),u=l,d=null;return g.setOpenGLRenderWindow(s),g.saveCurrentBindingsAndBuffers(),g.create(o,i),g.populateFramebuffer(),g.setColorBuffer(e),d=new Float32Array(o*i*c),u.readPixels(0,0,o,i,4===c?u.RGBA:u.RGB,u.FLOAT,d),g.restorePreviousBindingsAndBuffers(),d},e.getTextureMinMax=function(n,r){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.context,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.openGLRenderWindow,i=e.dumpTextureValues(n,r,a,o,4),l=Number.MAX_VALUE,s=Number.MIN_VALUE,c=0;cs&&(s=g)}return{min:l,max:s}},e.getComponentSelectionProgram=function(e){var t="xyzw";return".".concat(t[e[0]]).concat(t[e[1]])},e.buildShaders=function(){t.LIC0ShaderProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LIC0.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n/**\nThis shader initializes the convolution for the LIC computation.\n*/\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texMaskVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\n\nuniform int uStepNo; // in step 0 initialize lic and seeds, else just seeds\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uMaskThreshold; // if |V| < uMaskThreshold render transparent\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the *whole* domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value. this\n// depends on the pass number.\nvec2 getNoiseTC(vec2 vectc)\n{\n // in pass 1 : convert from vector tc to noise tc\n // in pass 2 : use vector tc\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(vectc);\n }\n else\n {\n return vectc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the\n// need to convert to noise texture coordinates.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\nvoid main(void)\n{\n vec2 vectc = tcoordVC.st;\n\n // lic => (convolution, mask, 0, step count)\n if (uStepNo == 0)\n {\n float maskCriteria = length(texture2D(texMaskVectors, vectc).xyz);\n float maskFlag;\n if (maskCriteria <= uMaskThreshold)\n {\n maskFlag = 1.0;\n }\n else\n {\n maskFlag = 0.0;\n }\n float noise = getNoise(vectc);\n LICOutput = vec4(noise, maskFlag, 0.0, 1.0);\n }\n else\n {\n LICOutput = texture2D(texLIC, vectc);\n }\n\n // initial seed\n SeedOutput = vec4(vectc, 0.0, 1.0);\n}\n");var n=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_VT.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// move vector field to normalized image space\n// pre-processing for vtkLineIntegralConvolution2D\n\n// the output of this shader\n//VTK::Output::Dec\n\n// Fragment shader used by the gaussian blur filter render pass.\n\nuniform sampler2D texVectors; // input texture\nuniform vec2 uTexSize; // size of texture\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n //VTK::LICComponentSelection::Impl\n V = V/uTexSize;\n gl_FragData[0] = vec4(V, 0.0, 1.0);\n}\n","//VTK::LICComponentSelection::Impl","vec2 V = texture2D(texVectors, tcoordVC.st)".concat(e.getComponentSelectionProgram(t.componentIds),";")).result;t.VTProgram=e.buildAShader(n);var r=Hg.substitute("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs1.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texVectors;\nuniform sampler2D texNoise;\nuniform sampler2D texLIC;\nuniform sampler2D texSeedPts;\n\nuniform int uPassNo; // in pass 1 hpf of pass 0 is convolved.\nuniform float uStepSize; // step size in parametric space\n\nuniform vec2 uNoiseBoundsPt1; // tc of upper right pt of noise texture\n\nin vec2 tcoordVC;\n\n//VTK::LICVectorLookup::Impl\n\n// We need to do this manually since CLAMP_TO_BORDER and and borderColor\n// are very poorly supported in webgl\nvec2 clampToBorder(vec2 uv){\n if(uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0)\n {\n return vec2(0.0, 0.0);\n }\n return getVector(uv);\n}\n\n// convert from vector coordinate space to noise coordinate space.\n// the noise texture is tiled across the whole domain\nvec2 VectorTCToNoiseTC(vec2 vectc)\n{\n return vectc/uNoiseBoundsPt1;\n}\n\n// get the texture coordidnate to lookup noise value.\n// in pass 1 repeatedly tile the noise texture across\n// the computational domain.\nvec2 getNoiseTC(vec2 tc)\n{\n if (uPassNo == 0)\n {\n return VectorTCToNoiseTC(tc);\n }\n else\n {\n return tc;\n }\n}\n\n// look up noise value at the given location. The location\n// is supplied in vector texture coordinates, hence the need\n// to convert to either noise or lic texture coordinates in\n// pass 1 and 2 respectively.\nfloat getNoise(vec2 vectc)\n{\n return texture2D(texNoise, getNoiseTC(vectc)).r;\n}\n\n// fourth-order Runge-Kutta streamline integration\n// no bounds checks are made, therefore it's essential\n// to have the entire texture initialized to 0\n// and set clamp to border and have border color 0\n// an integer is set if the step was taken, keeping\n// an accurate step count is necessary to prevent\n// boundary artifacts. Don't count the step if\n// all vector lookups are identically 0. This is\n// a proxy for \"stepped outside valid domain\"\nvec2 rk4(vec2 pt0, float dt, out bool count)\n{\n count=true;\n float dtHalf = dt * 0.5;\n vec2 pt1;\n\n vec2 v0 = clampToBorder(pt0);\n pt1 = pt0 + v0 * dtHalf;\n\n vec2 v1 = clampToBorder(pt1);\n pt1 = pt0 + v1 * dtHalf;\n\n vec2 v2 = clampToBorder(pt1);\n pt1 = pt0 + v2 * dt;\n\n vec2 v3 = clampToBorder(pt1);\n vec2 vSum = v0 + v1 + v1 + v2 + v2 + v3;\n\n if (vSum == vec2(0.0, 0.0))\n {\n count = false;\n }\n\n pt1 = pt0 + (vSum) * (dt * (1.0/6.0));\n\n return pt1;\n}\n\nvoid main(void)\n{\n vec2 lictc = tcoordVC.st;\n vec4 lic = texture2D(texLIC, lictc);\n vec2 pt0 = texture2D(texSeedPts, lictc).st;\n\n bool count;\n vec2 pt1 = rk4(pt0, uStepSize, count);\n\n if (count)\n {\n // accumulate lic step\n // (lic, mask, 0, step count)\n float noise = getNoise(pt1);\n LICOutput = vec4(lic.r + noise, lic.g, 0.0, lic.a + 1.0);\n SeedOutput = vec4(pt1, 0.0, 1.0);\n }\n else\n {\n // keep existing values\n LICOutput = lic;\n SeedOutput = vec4(pt0, 0.0, 1.0);\n }\n}\n","//VTK::LICVectorLookup::Impl",function(){var e="\n vec2 getVector( vec2 vectc )\n\n {\n\n vec2 V = texture2D( texVectors, vectc ).xy;\n\n // normalize if |V| not 0\n\n float lenV = length( V );\n\n if ( lenV > 1.0e-8 )\n\n {\n\n return V/lenV;\n\n }\n\n else\n\n {\n\n return vec2( 0.0, 0.0 );\n\n }\n\n }\n\n ",t="\n vec2 getVector( vec2 vectc )\n\n {\n\n return texture2D( texVectors, vectc ).xy;\n\n }\n\n ";return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?t:e}(t.normalizeVectors),!0).result;t.LICIShaderProgram=e.buildAShader(r),t.LICNShaderProgram=e.buildAShader(" //VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_LICN.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n/**\nThis shader finalizes the convolution for the LIC computation\napplying the normalization. eg. if box kernel is used the this\nis the number of steps taken.\n*/\n\nuniform sampler2D texLIC;\n\nin vec2 tcoordVC;\n\nvoid main(void)\n{\n vec4 conv = texture2D(texLIC, tcoordVC.st);\n conv.r = conv.r/conv.a;\n // lic => (convolution, mask, 0, 1)\n LICOutput = vec4(conv.rg , 0.0, 1.0);\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.CEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// gray scale contrast enhance stage implemented via histogram stretching\n// if the min and max are tweaked it can generate out-of-range values\n// these will be clamped in 0 to 1\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uMin; // min gray scale color value\nuniform float uMaxMinDiff; // max-min\n\nin vec2 tcoordVC;\n\nvoid main( void )\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g!=0.0)\n {\n LICOutput = lic;\n }\n else\n {\n float CElic = clamp((lic.r - uMin)/uMaxMinDiff, 0.0, 1.0);\n LICOutput = vec4(CElic, lic.gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.EEProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// high-pass filter stage employed by vtkLineIntegralConvolution2D\n// between LIC pass 1 and LIC pass 2. filtered LIC pass 1, becomes\n// noise for pass2.\n\n// the output of this shader\nlayout(location = 0) out vec4 EEOutput;\n\nuniform sampler2D texLIC; // most recent lic pass\nuniform float uDx; // fragment size\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n// kernel for simple laplace edge enhancement.\n// p=Laplace(p)+p\nfloat K[9] = float[9](\n -1.0, -1.0, -1.0,\n -1.0, 9.0, -1.0,\n -1.0, -1.0, -1.0\n );\n\n// determine if the fragment was masked\nbool Masked(float val) { return val != 0.0; }\n\nvoid main(void)\n{\n // tex coord neighbor offsets\n vec2 fragDx[9] = vec2[9](\n vec2(-uDx, uDy), vec2(0.0, uDy), vec2(uDx, uDy),\n vec2(-uDx, 0.0), vec2(0.0, 0.0), vec2(uDx, 0.0),\n vec2(-uDx,-uDy), vec2(0.0,-uDy), vec2(uDx,-uDy)\n );\n\n vec2 lictc = tcoordVC.st;\n\n // compute the convolution but don't use convovled values if\n // any masked fragments on the stencil. Fragments outside\n // the valid domain are masked during initialization, and\n // texture wrap parameters are clamp to border with border\n // color that contains masked flag\n float conv = 0.0;\n bool dontUse = false;\n for (int i=0; i<9; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n vec4 lic = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic.g);\n conv = conv + K[i] * lic.r;\n }\n\n if (dontUse)\n {\n EEOutput = vec4(texture2D(texLIC, lictc).rg, 0.0, 1.0);\n }\n else\n {\n conv = clamp(conv, 0.0, 1.0);\n EEOutput = vec4(conv,texture2D(texLIC, lictc).g, 0.0, 1.0);\n }\n\n}\n"),t.AAHProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAH.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// horizontal pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDx; // fragment size\n\nin vec2 tcoordVC;\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDx[3] = vec2[3](vec2(-uDx,0.0), vec2(0.0,0.0), vec2(uDx,0.0));\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDx[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n"),t.AAVProgram=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkLineIntegralConvolution2D_AAV.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// Anti-alias stage in vtkLineIntegralConvolution2D\n// vertical pass of a Gaussian convolution\n\n// the output of this shader\nlayout(location = 0) out vec4 LICOutput;\nlayout(location = 1) out vec4 SeedOutput;\n\nuniform sampler2D texLIC; // input texture\nuniform float uDy; // fragment size\n\nin vec2 tcoordVC;\n\n\n// factored 3x3 Gaussian kernel\n// K^T*K = G\nfloat K[3] = float[3](0.141421356, 0.707106781, 0.141421356);\n\n// determine if the fragment was masked\nbool Masked(float val){ return val != 0.0; }\n\nvoid main(void)\n{\n// neighbor offsets\nvec2 fragDy[3] = vec2[3](vec2(0.0,-uDy), vec2(0.0,0.0), vec2(0.0,uDy));\n\n\n vec2 lictc = tcoordVC.st;\n vec4 lic[3];\n bool dontUse = false;\n float conv = 0.0;\n for (int i=0; i<3; ++i)\n {\n vec2 tc = lictc + fragDy[i];\n lic[i] = texture2D(texLIC, tc);\n dontUse = dontUse || Masked(lic[i].g);\n conv = conv + K[i] * lic[i].r;\n }\n // output is (conv, mask, skip, 1)\n if (dontUse)\n {\n LICOutput = vec4(lic[1].rg, 1.0, 1.0);\n }\n else\n {\n LICOutput = vec4(conv, lic[1].gb, 1.0);\n }\n SeedOutput = vec4(0.0, 0.0, 0.0, 0.0);\n}\n")},e.executeLIC=function(a,o,i,l,s,c){if(t.openGLRenderWindow=s,t.context=s.getContext(),Object.assign(t,c),a[0]<=0||a[1]<=0)return null;var g=[1/a[0],1/a[1]],u=t.stepSize*Math.sqrt(g[0]*g[0]+g[1]*g[1]);u<=0&&(u=1e-10);var d,m=t.context,f=t.framebuffer;f&&a[0]===f.getSize()[0]&&a[1]===f.getSize()[1]||((f=gc.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),f.saveCurrentBindingsAndBuffers(),(d=f).create.apply(d,Object(Ao.a)(a)),f.populateFramebuffer(),f.restorePreviousBindingsAndBuffers(),t.framebuffer=f),f.saveCurrentBindingsAndBuffers(),f.bind(),m.viewport.apply(m,[0,0].concat(Object(Ao.a)(a))),m.scissor.apply(m,[0,0].concat(Object(Ao.a)(a))),t.shadersNeedBuild&&(e.buildShaders(),t.shadersNeedBuild=!1),t.bufs?(t.bufs.setVectorTexture(o),t.bufs.setMaskVectorTexture(i),t.bufs.setNoiseTexture(l)):t.bufs=cm.newInstance({openGLRenderWindow:s,doEEPass:t.enhancedLIC,doVTPass:t.transformVectors,vectorTexture:o,maskVectorTexture:i,noiseTexture:l,framebuffer:f,size:a});var p=[(l.getWidth()+1)/a[0],(l.getHeight()+1)/a[1]],C=1/a[0],I=1/a[1],h=t.openGLRenderWindow.getShaderCache();if(t.transformVectors){var b=t.VTProgram;h.readyShaderProgram(b),t.bufs.attachImageVectorBuffer(),b.setUniform2f.apply(b,["uTexSize"].concat(Object(Ao.a)(a))),b.setUniformi("texVectors",t.bufs.getVectorTextureUnit()),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),t.bufs.renderQuad(a,b),t.bufs.detachImageVectorBuffer()}t.bufs.clearBuffers(t.enhancedLIC),t.bufs.activateVectorTextures(),t.bufs.activateNoiseTexture(0);var y=t.LIC0ShaderProgram;h.readyShaderProgram(y),y.setUniformi("uStepNo",0),y.setUniformi("uPassNo",0),y.setUniformf("uMaskThreshold",t.maskThreshold),y.setUniform2f.apply(y,["uNoiseBoundsPt1"].concat(p)),y.setUniformi("texMaskVectors",t.bufs.getMaskVectorTextureUnit()),y.setUniformi("texLIC",t.bufs.getLICTextureUnit()),y.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0)),r(t.bufs,a,y);var v=t.LICIShaderProgram;h.readyShaderProgram(v),v.setUniformi("uPassNo",0),v.setUniformf("uStepSize",-u),v.setUniform2f.apply(v,["uNoiseBoundsPt1"].concat(p)),v.setUniformi("texVectors",t.bufs.getImageVectorTextureUnit()),v.setUniformi("texNoise",t.bufs.getNoiseTextureUnit(0));for(var Z=0;Z1||l<0)&&(console.error("Invalid color range: ",l,s),l=0,s=1);var c=s-l;n&&(l+=c*t.lowLICContrastEnhancementFactor,c=(s-=c*t.highLICContrastEnhancementFactor)-l);var g=t.CEProgram;o.readyShaderProgram(g),g.setUniformi("texLIC",t.bufs.getLICTextureUnit()),g.setUniformf("uMin",l),g.setUniformf("uMaxMinDiff",c),r(t.bufs,a,g)}}var Im={shadersNeedBuild:!0,stepSize:1,numberOfSteps:10,enhancedLIC:!0,enhanceContrast:!1,lowContrastEnhancementFactor:0,highContrastEnhancementFactor:0,antiAlias:0,componentIds:[0,1],normalizeVectors:!0,maskThreshold:0,transformVectors:!0,bufs:null,isComposite:!0};function hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Im,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","nuberOfSteps","stepSize","normalizeVectors","maskThreshold","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","componentIds","isComposite"]),Cm(e,t)}var bm={newInstance:ln.c.newInstance(hm,"vtkLineIntegralConvolution2D"),extend:hm},ym=n(53);function vm(e,t){t.classHierarchy.push("vtkSurfaceLICInterface")}var Zm={enableLIC:!1,nuberOfSteps:40,stepSize:.25,transformVectors:!0,normalizeVectors:!0,maskOnSurface:!1,maskThreshold:0,maskColor:[0,0,0],maskIntensity:0,enhancedLIC:!0,enhanceContrast:gm,lowLICContrastEnhancementFactor:0,highLICContrastEnhancementFactor:0,lowColorContrastEnhancementFactor:0,highColorContrastEnhancementFactor:0,antiAlias:0,colorMode:0,LICIntensity:1,mapModeBias:0,noiseTextureSize:200,noiseTextureType:pm,noiseGrainSize:8,noiseImpulseProbability:.1,noiseImpulseBackgroundValue:0,noiseGeneratorSeed:0,minNoiseValue:0,maxNoiseValue:1,numberOfNoiseLevels:2,shadersNeedBuilding:!0,reallocateTextures:!0,rebuildNoiseTexture:!1,viewPortScale:1};function Am(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),ln.c.obj(e,t),ln.c.setGet(e,t,["enableLIC","numberOfSteps","stepSize","normalizeVectors","transformVectors","maskOnSurface","maskThreshold","maskColor","maskIntensity","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor","antiAlias","colorMode","LICIntensity","mapModeBias","noiseTextureSize","noiseTextureType","noiseGrainSize","minNoiseValue","maxNoiseValue","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","noiseGeneratorSeed","viewPortScale","rebuildNoiseTexture"]),vm(0,t)}var Gm={newInstance:ln.c.newInstance(Am,"vtkSurfaceLICInterface"),extend:Am},Sm=hg.Representation;function Bm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICInterface"),e.renderQuad=function(e,n){var r=t.licQuad,a=t.context,o=t.licQuadVAO;o||((o=Kg.newInstance()).setOpenGLRenderWindow(t.openGLRenderWindow),t.licQuadVAO=o),t.previousProgramHash!==n.getMd5Hash()&&(o.shaderProgramChanged(),r.getCABO().bind(),o.addAttributeArray(n,r.getCABO(),"vertexDC",r.getCABO().getVertexOffset(),r.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE),o.addAttributeArray(n,r.getCABO(),"tcoordDC",r.getCABO().getTCoordOffset(),r.getCABO().getStride(),t.context.FLOAT,2,t.context.FALSE),t.previousProgramHash=n.getMd5Hash()),a.drawArrays(a.TRIANGLES,0,r.getCABO().getElementCount()),o.release()},e.generateNoiseTexture=function(e){if(!t.noiseTexture||t.licInterface.getRebuildNoiseTexture()){t.licInterface.setRebuildNoiseTexture(!1),t.noiseTexture&&t.noiseTexture.releaseGraphicsResources(),Object(ym.a)(t.noiseGeneratorSeed,{global:!0});var n=[],r=t.licInterface.get("noiseTextureType","noiseGrainSize","numberOfNoiseLevels","noiseImpulseProbability","noiseImpulseBackgroundValue","minNoiseValue","maxNoiseValue"),o=r.noiseTextureType,i=r.noiseGrainSize,l=r.numberOfNoiseLevels,s=r.noiseImpulseProbability,c=r.noiseImpulseBackgroundValue,g=r.minNoiseValue,u=r.maxNoiseValue;switch(o){case pm:n=function(e,t,n,r,a,o){var i=Math.max(0,Math.min(1,n)),l=Float32Array.from({length:e*e},(function(){var e=0;if(1===i||Math.random()>1-i)for(var t=0;t<2048;++t)e+=Math.random();return e})),s=0,c=2049;l.forEach((function(e){c=1===i?e0?e:c,s=e>s?e:s}));var g=s-c;0===g&&(c=0,g=0===s?1:s);var u=t-1,d=0!==u?1/u:0,m=o-a;return l.map((function(e){var n=e=c?1===t?o:a+(i>u?u:i)*d*m:r}))}(Math.floor(e/i),l,s,c,g,u);break;case fm:default:n=function(e,t,n,r){var o=Object(a.a)(e,2),i=o[0],l=o[1],s=r-n;return Float32Array.from({length:i*l},(function(){var e=Math.random();return(e=(e=Math.floor(e*t)/t)*s+n)>1?1:e<0?0:e}))}([Math.ceil(e/i),Math.ceil(e/i)],l,g,u)}var d=1/i,m=Float32Array.from({length:e*e*4},(function(t,r){var a=r/4;if(r%4==0){var o=Math.floor(a%e*d),l=Math.floor(a/e*d);return n[l*(e/i)+o]}return r%4==1||r%4==3?1:0})),f=ic.newInstance({wrapS:ic.Wrap.REPEAT,wrapT:ic.Wrap.REPEAT,minificationFilter:ic.Filter.NEAREST,magnificationFilter:ic.Filter.NEAREST,generateMipMap:!1,openGLDataType:t.context.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});f.setOpenGLRenderWindow(t.openGLRenderWindow),f.create2DFromRaw(e,e,4,"Float32Array",m),f.activate(),f.sendParameters(),f.deactivate(),t.noiseTexture=f}},e.buildAShader=function(e){return t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(nm,e,"")},e.allocateTextures=function(){var n=ic.Filter.NEAREST,r=ic.Filter.LINEAR,a=t.openGLRenderWindow;t.geometryImage||(t.geometryImage=e.allocateTexture(a,n)),t.vectorImage||(t.vectorImage=e.allocateTexture(a,r)),t.maskVectorImage||(t.maskVectorImage=e.allocateTexture(a,r)),t.LICImage||(t.LICImage=e.allocateTexture(a,n)),t.RGBColorImage||(t.RGBColorImage=e.allocateTexture(a,n)),t.HSLColorImage||(t.HSLColorImage=e.allocateTexture(a,n)),t.depthTexture||(t.depthTexture=e.allocateDepthTexture(a))},e.allocateTexture=function(e,n){var r=t.context,a=ic.newInstance({wrapS:ic.Wrap.CLAMP_TO_EDGE,wrapT:ic.Wrap.CLAMP_TO_EDGE,minificationFilter:n,magnificationFilter:n,generateMipmap:!1,openGLDataType:r.FLOAT,baseLevel:0,maxLevel:0,autoParameters:!1});return a.setOpenGLRenderWindow(e),a.setInternalFormat(r.RGBA32F),a.create2DFromRaw.apply(a,Object(Ao.a)(t.size).concat([4,"Float32Array",null])),a.activate(),a.sendParameters(),a.deactivate(),a},e.allocateDepthTexture=function(e){var n=t.context,r=ic.newInstance({generateMipmap:!1,openGLDataType:n.FLOAT,autoParameters:!1});return r.setOpenGLRenderWindow(e),r.createDepthFromRaw.apply(r,Object(Ao.a)(t.size).concat(["Float32Array",null])),r.activate(),r.sendParameters(),r.deactivate(),r},e.createFBO=function(){if(!t.framebuffer){t.licHelper=null;var e=gc.newInstance();e.setOpenGLRenderWindow(t.openGLRenderWindow),e.saveCurrentBindingsAndBuffers(),e.create.apply(e,Object(Ao.a)(t.size)),e.populateFramebuffer(),t.framebuffer=e,e.restorePreviousBindingsAndBuffers()}},e.completedGeometry=function(){var e=t.context,n=t.framebuffer;n.removeColorBuffer(0),n.removeColorBuffer(1),n.removeColorBuffer(2),n.removeDepthBuffer(),e.drawBuffers([e.NONE]),n.restorePreviousBindingsAndBuffers()},e.buildAllShaders=function(){t.shadersNeedBuilding&&(t.licColorPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_fs2.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader combines surface geometry, LIC, and scalar colors.\n\n// the output of this shader\nlayout(location = 0) out vec4 RGBOutput;\nlayout(location = 1) out vec4 HSLOutput;\n\nuniform sampler2D texVectors; // vectors, depth\nuniform sampler2D texGeomColors; // scalar colors + lighting\nuniform sampler2D texLIC; // image lic\nuniform int uScalarColorMode; // select between blend, and map shader\nuniform float uLICIntensity; // blend shader: blending factor for lic'd colors\nuniform float uMapBias; // map shader: adjust the brightness of the result\nuniform float uMaskIntensity; // blending factor for mask color\nuniform vec3 uMaskColor; // color for the masked out fragments\n\nin vec2 tcoordVC;\n\n/**\nConvert from RGB color space into HSL colorspace.\n*/\nvec3 RGBToHSL(vec3 RGB)\n{\n vec3 HSL = vec3(0.0, 0.0, 0.0);\n\n float RGBMin = min(min(RGB.r, RGB.g), RGB.b);\n float RGBMax = max(max(RGB.r, RGB.g), RGB.b);\n float RGBMaxMinDiff = RGBMax - RGBMin;\n\n HSL.z = (RGBMax + RGBMin) / 2.0;\n\n if (RGBMaxMinDiff == 0.0)\n {\n // Gray scale\n HSL.x = 0.0;\n HSL.y = 0.0;\n }\n else\n {\n // Color\n if (HSL.z < 0.5)\n HSL.y = RGBMaxMinDiff / (RGBMax + RGBMin);\n else\n HSL.y = RGBMaxMinDiff / (2.0 - RGBMax - RGBMin);\n\n float dR\n = (((RGBMax - RGB.r) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dG\n = (((RGBMax - RGB.g) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n float dB\n = (((RGBMax - RGB.b) / 6.0) + (RGBMaxMinDiff / 2.0)) / RGBMaxMinDiff;\n\n if (RGB.r == RGBMax)\n HSL.x = dB - dG;\n else\n if (RGB.g == RGBMax)\n HSL.x = (1.0 / 3.0) + dR - dB;\n else\n if (RGB.b == RGBMax)\n HSL.x = (2.0 / 3.0) + dG - dR;\n\n if (HSL.x < 0.0)\n HSL.x += 1.0;\n\n if (HSL.x > 1.0)\n HSL.x -= 1.0;\n }\n\n return HSL;\n}\n\n/**\nHelper for HSL to RGB conversion.\n*/\nfloat Util(float v1, float v2, float vH)\n{\n if (vH < 0.0)\n vH += 1.0;\n\n if (vH > 1.0)\n vH -= 1.0;\n\n if ((6.0 * vH) < 1.0)\n return (v1 + (v2 - v1) * 6.0 * vH);\n\n if ((2.0 * vH) < 1.0)\n return (v2);\n\n if ((3.0 * vH) < 2.0)\n return (v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0);\n\n return v1;\n}\n\n/**\nConvert from HSL space into RGB space.\n*/\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n if (HSL.y == 0.0)\n {\n // Gray\n RGB.r = HSL.z;\n RGB.g = HSL.z;\n RGB.b = HSL.z;\n }\n else\n {\n // Chromatic\n float v2;\n if (HSL.z < 0.5)\n v2 = HSL.z * (1.0 + HSL.y);\n else\n v2 = (HSL.z + HSL.y) - (HSL.y * HSL.z);\n\n float v1 = 2.0 * HSL.z - v2;\n\n RGB.r = Util(v1, v2, HSL.x + (1.0 / 3.0));\n RGB.g = Util(v1, v2, HSL.x);\n RGB.b = Util(v1, v2, HSL.x - (1.0 / 3.0));\n }\n\n return RGB.rgb;\n}\n\nvoid main()\n{\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n\n // depth is used to determine which fragment belong to us\n // and we can change\n float depth = texture2D(texVectors, tcoordVC.st).a;\n\n vec3 fragColorRGB;\n float valid;\n if (depth > 1.0e-3)\n {\n // we own it\n // shade LIC'ed geometry, or apply mask\n if (lic.g!=0.0)\n {\n // it's masked\n // apply fragment mask\n fragColorRGB = uMaskIntensity * uMaskColor + (1.0 - uMaskIntensity) * geomColor.rgb;\n valid = 0.0;\n }\n else\n {\n if (uScalarColorMode==0)\n {\n // blend with scalars\n fragColorRGB = lic.rrr * uLICIntensity + geomColor.rgb * (1.0 - uLICIntensity);\n }\n else\n {\n // multiply with scalars\n fragColorRGB = geomColor.rgb * clamp((uMapBias + lic.r), 0.0, 1.0);\n }\n if (lic.b != 0.0)\n {\n // didn't have the required guard pixels\n // don't consider it in min max estimation\n // for histpgram stretching\n valid = 0.0;\n }\n else\n {\n // ok to use in min/max estimates for histogram\n // stretching\n valid = 1.0;\n }\n }\n }\n else\n {\n // we don't own it\n // pass through scalars\n fragColorRGB = geomColor.rgb;\n valid = 0.0;\n }\n\n // if no further stages this texture is\n // copied to the screen\n RGBOutput = vec4(fragColorRGB, geomColor.a);\n\n // if further stages, move to hsl space for contrast\n // enhancement. encoding validity saves moving a texture to the cpu\n vec3 fragColorHSL = RGBToHSL(fragColorRGB);\n HSLOutput = vec4(fragColorHSL, valid);\n}\n"),t.licCopyPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_DCpy.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// This shader copies fragments and depths to the output buffer\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texDepth; // z values from vertex shader\nuniform sampler2D texRGBColors; // final rgb LIC colors\n\nin vec2 tcoordVC;\n\nvoid main()\n{\n gl_FragDepth = texture2D(texDepth, tcoordVC).x;\n gl_FragData[0] = texture2D(texRGBColors, tcoordVC);\n\n // since we render a screen aligned quad\n // we're going to be writing fragments\n // not touched by the original geometry\n // it's critical not to modify those\n // fragments.\n if (gl_FragDepth == 1.0)\n {\n discard;\n }\n}\n"),t.enhanceContrastPass=e.buildAShader("//VTK::System::Dec\n\n//=========================================================================\n//\n// Program: Visualization Toolkit\n// Module: vtkSurfaceLICMapper_CE.glsl\n//\n// Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n// All rights reserved.\n// See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n//\n// This software is distributed WITHOUT ANY WARRANTY; without even\n// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n// PURPOSE. See the above copyright notice for more information.\n//\n//=========================================================================\n\n// color contrast enhance stage implemented via histogram stretching\n// on lightness channel. if the min and max are tweaked it can generate\n// out-of-range values these will be clamped in 0 to 1\n\n// the output of this shader\n//VTK::Output::Dec\n\nuniform sampler2D texGeomColors; // scalars + lighting\nuniform sampler2D texLIC; // image lic, mask\nuniform sampler2D texHSLColors; // hsla colors\n\nuniform float uLMin; // min lightness over all fragments\nuniform float uLMaxMinDiff; // max - min lightness over all fragments\n\nin vec2 tcoordVC;\n\nvec3 HSLToRGB(vec3 HSL)\n{\n vec3 RGB;\n float v;\n float h = HSL.x;\n float sl = HSL.y;\n float l = HSL.z;\n\n v = (l <= 0.5) ? (l * (1.0 + sl)) : (l + sl - l * sl);\n if (v <= 0.0) {\n RGB = vec3(0.0,0.0,0.0);\n } else {\n float m;\n int sextant;\n float fract, vsf, mid1, mid2;\n\n m = l + l - v;\n h *= 6.0;\n sextant = int(h);\n fract = h - float(sextant);\n\n vsf = (v - m) * fract;\n mid1 = m + vsf;\n mid2 = v - vsf;\n switch (sextant) {\n case 0: RGB.r = v; RGB.g = mid1; RGB.b = m; break;\n case 1: RGB.r = mid2; RGB.g = v; RGB.b = m; break;\n case 2: RGB.r = m; RGB.g = v; RGB.b = mid1; break;\n case 3: RGB.r = m; RGB.g = mid2; RGB.b = v; break;\n case 4: RGB.r = mid1; RGB.g = m; RGB.b = v; break;\n case 5: RGB.r = v; RGB.g = m; RGB.b = mid2; break;\n }\n }\n return RGB;\n}\n\nvoid main()\n{\n // lookup hsl color , mask\n vec4 fragColor = texture2D(texHSLColors, tcoordVC.st);\n\n // don't modify masked fragments (masked => lic.g==1)\n vec4 lic = texture2D(texLIC, tcoordVC.st);\n if (lic.g==0.0)\n {\n // normalize lightness channel\n fragColor.z = clamp((fragColor.z - uLMin)/uLMaxMinDiff, 0.0, 1.0);\n }\n\n // back into rgb space\n fragColor.rgb = HSLToRGB(fragColor.xyz);\n\n // add alpha\n vec4 geomColor = texture2D(texGeomColors, tcoordVC.st);\n fragColor.a = geomColor.a;\n\n gl_FragData[0] = fragColor;\n}\n"),t.shadersNeedBuilding=!1)},e.initializeResources=function(){e.createFBO(),e.generateNoiseTexture(t.licInterface.getNoiseTextureSize()),e.allocateTextures(),e.buildAllShaders(),t.licQuad||(t.licQuad=function(e){var t=Eg.newInstance();t.setOpenGLRenderWindow(e);for(var n=new Float32Array(12),r=0;r<4;r++)n[3*r]=r%2*2-1,n[3*r+1]=r>1?1:-1,n[3*r+2]=0;var a=new Float32Array([0,0,1,0,0,1,1,1]),o=new Uint16Array(8);o[0]=3,o[1]=0,o[2]=1,o[3]=3,o[4]=3,o[5]=0,o[6]=3,o[7]=2;var i=Bo.a.newInstance({numberOfComponents:3,values:n});i.setName("points");var l=Bo.a.newInstance({numberOfComponents:1,values:o}),s=Bo.a.newInstance({numberOfComponents:2,values:a});return t.getCABO().createVBO(l,"polys",Sm.SURFACE,{points:i,cellOffset:0,tcoords:s}),t}(t.openGLRenderWindow)),t.licHelper||(t.licHelper=bm.newInstance())},e.prepareForGeometry=function(){var e=t.framebuffer;e.saveCurrentBindingsAndBuffers(),e.bind(),t.geometryImage.activate(),t.vectorImage.activate(),t.maskVectorImage.activate(),e.removeColorBuffer(0),e.removeColorBuffer(1),e.removeColorBuffer(2),e.setColorBuffer(t.geometryImage,0),e.setColorBuffer(t.vectorImage,1),e.setColorBuffer(t.maskVectorImage,2),e.setDepthBuffer(t.depthTexture);var n=t.context;n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1,n.COLOR_ATTACHMENT2]),n.viewport.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.scissor.apply(n,[0,0].concat(Object(Ao.a)(t.size))),n.disable(n.BLEND),n.disable(n.DEPTH_TEST),n.disable(n.SCISSOR_TEST),n.clearColor(0,0,0,0),n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT)},e.copyToScreen=function(n){t.RGBColorImage.activate(),t.depthTexture.activate(),t.licCopyPass||e.initializeResources();var r=t.licCopyPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(r);var a=t.context;a.viewport.apply(a,[0,0].concat(Object(Ao.a)(n))),a.scissor.apply(a,[0,0].concat(Object(Ao.a)(n))),a.disable(a.BLEND),a.enable(a.DEPTH_TEST),a.disable(a.SCISSOR_TEST),r.setUniformi("texDepth",t.depthTexture.getTextureUnit()),r.setUniformi("texRGBColors",t.RGBColorImage.getTextureUnit()),e.renderQuad(n,r),t.RGBColorImage.deactivate(),t.depthTexture.deactivate()},e.combineColorsAndLIC=function(){var n=t.context,r=t.framebuffer;r.saveCurrentBindingsAndBuffers(),r.bind(),r.create.apply(r,Object(Ao.a)(t.size)),r.removeColorBuffer(0),r.removeColorBuffer(1),r.setColorBuffer(t.RGBColorImage,0),r.setColorBuffer(t.HSLColorImage,1),n.drawBuffers([n.COLOR_ATTACHMENT0,n.COLOR_ATTACHMENT1]),n.disable(n.DEPTH_TEST),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),t.vectorImage.activate(),t.geometryImage.activate(),t.LICImage.activate(),t.licColorPass||e.initializeResources();var a=t.licColorPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(a),a.setUniformi("texVectors",t.vectorImage.getTextureUnit()),a.setUniformi("texGeomColors",t.geometryImage.getTextureUnit());var o=t.licInterface.get("colorMode","LICIntensity","mapModeBias","maskIntensity","maskColor","enhanceContrast","lowColorContrastEnhancementFactor","highColorContrastEnhancementFactor"),i=o.colorMode,l=o.LICIntensity,s=o.mapModeBias,c=o.maskIntensity,g=o.maskColor,u=o.enhanceContrast,d=o.lowColorContrastEnhancementFactor,m=o.highColorContrastEnhancementFactor;if(a.setUniformi("texLIC",t.LICImage.getTextureUnit()),a.setUniformi("uScalarColorMode",i),a.setUniformf("uLICIntensity",l),a.setUniformf("uMapBias",s),a.setUniformf("uMaskIntensity",c),a.setUniform3f.apply(a,["uMaskColor"].concat(Object(Ao.a)(g))),e.renderQuad(t.size,a),t.vectorImage.deactivate(),t.geometryImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),r.removeColorBuffer(1),n.drawBuffers([n.NONE]),u===dm||u===mm){var f=0,p=1,C=p-f;C=(p-=C*m)-(f+=C*d),r.setColorBuffer(t.RGBColorImage),n.drawBuffers([n.COLOR_ATTACHMENT0]),t.geometryImage.activate(),t.HSLColorImage.activate(),t.LICImage.activate(),t.enhanceContrastPass||e.initializeResources();var I=t.enhanceContrastPass;t.openGLRenderWindow.getShaderCache().readyShaderProgram(I),I.setUniformi("texGeomColors",t.geometryImage.getTextureUnit()),I.setUniformi("texHSLColors",t.HSLColorImage.getTextureUnit()),I.setUniformi("texLIC",t.LICImage.getTextureUnit()),I.setUniformf("uLMin",f),I.setUniformf("uLMaxMinDiff",C),e.renderQuad(t.size,I),t.geometryImage.deactivate(),t.HSLColorImage.deactivate(),t.LICImage.deactivate(),r.removeColorBuffer(0),n.drawBuffers([n.NONE])}r.restorePreviousBindingsAndBuffers()},e.applyLIC=function(){var e=t.licInterface.get("stepSize","numberOfSteps","enhancedLIC","enhanceContrast","lowLICContrastEnhancementFactor","highLICContrastEnhancementFactor","antiAlias","normalizeVectors","maskThreshold","transformVectors"),n=t.licHelper.executeLIC(t.size,t.vectorImage,t.maskVectorImage,t.noiseTexture,t.openGLRenderWindow,e);if(!n)return console.error("Failed to compute image LIC"),void(t.LICImage=null);t.LICImage=n},e.setSize=function(n){Array.isArray(n)&&2===n.length&&(t.size&&t.size[0]===n[0]&&t.size[1]===n[1]||(t.size=n,e.releaseGraphicsResources()))},e.releaseGraphicsResources=function(){t.geometryImage&&(t.geometryImage.releaseGraphicsResources(),t.geometryImage=null),t.vectorImage&&(t.vectorImage.releaseGraphicsResources(),t.vectorImage=null),t.maskVectorImage&&(t.maskVectorImage.releaseGraphicsResources(),t.maskVectorImage=null),t.LICImage&&(t.LICImage.releaseGraphicsResources(),t.LICImage=null),t.RGBColorImage&&(t.RGBColorImage.releaseGraphicsResources(),t.RGBColorImage=null),t.HSLColorImage&&(t.HSLColorImage.releaseGraphicsResources(),t.HSLColorImage=null),t.depthTexture&&(t.depthTexture.releaseGraphicsResources(),t.depthTexture=null),t.framebuffer&&(t.framebuffer.releaseGraphicsResources(),t.framebuffer=null)}}var Vm={context:null,openGLRenderWindow:null,shadersNeedBuilding:!0,reallocateTextures:!0,size:null,licInterface:null};function Rm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vm,n),Gm.extend(e,t,n),ln.c.obj(e,t),ln.c.setGet(e,t,["context","openGLRenderWindow","reallocateTextures","licInterface","size"]),Bm(e,t)}var wm={newInstance:ln.c.newInstance(Rm,"vtkSurfaceLICInterface"),extend:Rm};function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=ln.c.vtkErrorMacro;function xm(e,t){t.classHierarchy.push("vtkOpenGLSurfaceLICMapper");var n=function(e){for(var t=1;t1&&t.renderable.setCustomShaderAttributes([a.getName()])}t.rebuildLICBuffers=!1,n.buildBufferObjects(e,r)},e.pushState=function(e){var n;t.stateCache=(Object(qi.a)(n={},e.BLEND,e.isEnabled(e.BLEND)),Object(qi.a)(n,e.DEPTH_TEST,e.isEnabled(e.DEPTH_TEST)),Object(qi.a)(n,e.SCISSOR_TEST,e.isEnabled(e.SCISSOR_TEST)),n)},e.popState=function(e){var n=function(n){return t.stateCache[n]?e.enable(n):e.disable(n)};n(e.BLEND),n(e.DEPTH_TEST),n(e.SCISSOR_TEST)},e.renderPiece=function(r,a){var o=!0;t.openGLRenderWindow.getWebgl2()||(Wm("SurfaceLICMapper Requires WebGL 2"),o=!1),t.context.getExtension("EXT_color_buffer_float")&&t.context.getExtension("OES_texture_float_linear")||(Wm("SurfaceLICMapper requires the EXT_color_buffer_float and OES_texture_float_linear WebGL2 extensions."),o=!1),t.currentInput=t.renderable.getInputData(),t.currentInput||(Wm("No input"),o=!1);var i=t.renderable.getLicInterface();i||(i=Gm.newInstance(),t.renderable.setLicInterface(i)),t.openGLLicInterface||(t.openGLLicInterface=wm.newInstance()),i!==t.openGLLicInterface.getLicInterface()&&t.openGLLicInterface.setLicInterface(i);var l=t.renderable.getInputArrayToProcess(0);if(i.getEnableLIC()&&(!l||l.getNumberOfComponents()<2)&&(Wm("No vector input array"),o=!1),i.getEnableLIC()||(o=!1),t.canDrawLIC!==o&&(t.rebuildLICShaders=!0,t.rebuildLICBuffers=!0),t.canDrawLIC=o,o&&i.getEnableLIC()){var s=t.openGLRenderWindow.getSize(),c=s.map((function(e){return Math.round(e*i.getViewPortScale())}));t.openGLLicInterface.setSize(c),t.openGLLicInterface.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLLicInterface.setContext(t.context),e.pushState(t.context),t.openGLLicInterface.initializeResources(),t.openGLLicInterface.prepareForGeometry(),e.popState(t.context),n.renderPieceStart(r,a),n.renderPieceDraw(r,a),n.renderPieceFinish(r,a),e.pushState(t.context),t.VBOBuildTime.modified(),t.openGLLicInterface.completedGeometry(),t.openGLLicInterface.applyLIC(),t.openGLLicInterface.combineColorsAndLIC(),t.openGLLicInterface.copyToScreen(s),e.popState(t.context)}else n.renderPiece(r,a)}}var Tm={canDrawLIC:!1,rebuildLICShaders:!1,rebuildLICBuffers:!1,openGLLicInterface:null};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tm,n),rd.extend(e,t,n),xm(e,t),ln.c.setGet(e,t,["openGLLicInterface"])}var Xm={newInstance:ln.c.newInstance(Jm,"vtkOpenGLSurfaceLICMapper"),extend:Jm};function Om(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes())},e.queryPass=function(e,n){if(e){if(!t.renderable||!t.renderable.getVisibility())return;n.incrementVolumeCount()}},e.traverseVolumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(n){t.renderable&&t.renderable.getVisibility()&&(n?(t.context=e.getFirstAncestorOfType("vtkOpenGLRenderWindow").getContext(),t.context.depthMask(!1)):t.context.depthMask(!0))},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),Object(Yo.d)(t.MCWCMatrix,t.renderable.getMatrix()),Object(Yo.i)(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?El(t.normalMatrix):(Dl(t.normalMatrix,t.MCWCMatrix),zl(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}var Nm={};function Hm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nm,n),_s.extend(e,t,n),t.keyMatrixTime={},ln.c.obj(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),ln.c.setGet(e,t,["context"]),Om(e,t)}var Ym={newInstance:ln.c.newInstance(Hm,"vtkOpenGLVolume"),extend:Hm},Fm={NEAREST:0,LINEAR:1,FAST_LINEAR:2},Pm={FRACTIONAL:0,PROPORTIONAL:1},Km={InterpolationType:Fm,OpacityMode:Pm},Mm={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3},Lm={BlendMode:Mm};function Dm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Em=ln.c.vtkWarningMacro,Um=ln.c.vtkErrorMacro;function zm(e,t){if(e.length!==t.length)return!1;for(var n=0;n 0\nuniform float vSpecularPower;\nuniform float vAmbient;\nuniform float vDiffuse;\nuniform float vSpecular;\n//VTK::Light::Dec\n#endif\n\n// possibly define vtkGradientOpacityOn\n//VTK::GradientOpacityOn\n#ifdef vtkGradientOpacityOn\nuniform float goscale0;\nuniform float goshift0;\nuniform float gomin0;\nuniform float gomax0;\n#if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\nuniform float goscale1;\nuniform float goshift1;\nuniform float gomin1;\nuniform float gomax1;\n#if vtkNumComponents >= 3\nuniform float goscale2;\nuniform float goshift2;\nuniform float gomin2;\nuniform float gomax2;\n#endif\n#if vtkNumComponents >= 4\nuniform float goscale3;\nuniform float goshift3;\nuniform float gomin3;\nuniform float gomax3;\n#endif\n#endif\n#endif\n\n// if you want to see the raw tiled\n// data in webgl1 uncomment the following line\n// #define debugtile\n\n// camera values\nuniform float camThick;\nuniform float camNear;\nuniform float camFar;\nuniform int cameraParallel;\n\n// values describing the volume geometry\nuniform vec3 vOriginVC;\nuniform vec3 vSpacing;\nuniform ivec3 volumeDimensions; // 3d texture dimensions\nuniform vec3 vPlaneNormal0;\nuniform float vPlaneDistance0;\nuniform vec3 vPlaneNormal1;\nuniform float vPlaneDistance1;\nuniform vec3 vPlaneNormal2;\nuniform float vPlaneDistance2;\nuniform vec3 vPlaneNormal3;\nuniform float vPlaneDistance3;\nuniform vec3 vPlaneNormal4;\nuniform float vPlaneDistance4;\nuniform vec3 vPlaneNormal5;\nuniform float vPlaneDistance5;\n\n//VTK::ClipPlane::Dec\n\n// opacity and color textures\nuniform sampler2D otexture;\nuniform float oshift0;\nuniform float oscale0;\nuniform sampler2D ctexture;\nuniform float cshift0;\nuniform float cscale0;\n\n// jitter texture\nuniform sampler2D jtexture;\n\n// some 3D texture values\nuniform float sampleDistance;\nuniform vec3 vVCToIJK;\n\n// the heights defined below are the locations\n// for the up to four components of the tfuns\n// the tfuns have a height of 2XnumComps pixels so the\n// values are computed to hit the middle of the two rows\n// for that component\n#ifdef vtkIndependentComponentsOn\n#if vtkNumComponents == 2\nuniform float mix0;\nuniform float mix1;\n#define height0 0.25\n#define height1 0.75\n#endif\n#if vtkNumComponents == 3\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\n#define height0 0.17\n#define height1 0.5\n#define height2 0.83\n#endif\n#if vtkNumComponents == 4\nuniform float mix0;\nuniform float mix1;\nuniform float mix2;\nuniform float mix3;\n#define height0 0.125\n#define height1 0.375\n#define height2 0.625\n#define height3 0.875\n#endif\n#endif\n\n#if vtkNumComponents >= 2\nuniform float oshift1;\nuniform float oscale1;\nuniform float cshift1;\nuniform float cscale1;\n#endif\n#if vtkNumComponents >= 3\nuniform float oshift2;\nuniform float oscale2;\nuniform float cshift2;\nuniform float cscale2;\n#endif\n#if vtkNumComponents >= 4\nuniform float oshift3;\nuniform float oscale3;\nuniform float cshift3;\nuniform float cscale3;\n#endif\n\n// declaration for intermixed geometry\n//VTK::ZBuffer::Dec\n\n// Lighting values\n//VTK::Light::Dec\n\n//=======================================================================\n// Webgl2 specific version of functions\n#if __VERSION__ == 300\n\nuniform highp sampler3D texture1;\n\nvec4 getTextureValue(vec3 pos)\n{\n vec4 tmp = texture(texture1, pos);\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.a = tmp.g;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n return tmp;\n}\n\n//=======================================================================\n// WebGL1 specific version of functions\n#else\n\nuniform sampler2D texture1;\n\nuniform float texWidth;\nuniform float texHeight;\nuniform int xreps;\nuniform int xstride;\nuniform int ystride;\n\n// if computing triliear values from multiple z slices\n#ifdef vtkTriliearOn\nvec4 getTextureValue(vec3 ijk)\n{\n float zoff = 1.0/float(volumeDimensions.z);\n vec4 val1 = getOneTextureValue(ijk);\n vec4 val2 = getOneTextureValue(vec3(ijk.xy, ijk.z + zoff));\n\n float indexZ = float(volumeDimensions)*ijk.z;\n float zmix = indexZ - floor(indexZ);\n\n return mix(val1, val2, zmix);\n}\n\nvec4 getOneTextureValue(vec3 ijk)\n#else // nearest or fast linear\nvec4 getTextureValue(vec3 ijk)\n#endif\n{\n vec3 tdims = vec3(volumeDimensions);\n\n#ifdef debugtile\n vec2 tpos = vec2(ijk.x, ijk.y);\n vec4 tmp = texture2D(texture1, tpos);\n tmp.a = 1.0;\n\n#else\n int z = int(ijk.z * tdims.z);\n int yz = z / xreps;\n int xz = z - yz*xreps;\n\n int tileWidth = volumeDimensions.x/xstride;\n int tileHeight = volumeDimensions.y/ystride;\n\n xz *= tileWidth;\n yz *= tileHeight;\n\n float ni = float(xz) + (ijk.x*float(tileWidth));\n float nj = float(yz) + (ijk.y*float(tileHeight));\n\n vec2 tpos = vec2(ni/texWidth, nj/texHeight);\n\n vec4 tmp = texture2D(texture1, tpos);\n\n#if vtkNumComponents == 1\n tmp.a = tmp.r;\n#endif\n#if vtkNumComponents == 2\n tmp.g = tmp.a;\n#endif\n#if vtkNumComponents == 3\n tmp.a = length(tmp.rgb);\n#endif\n#endif\n\n return tmp;\n}\n\n// End of Webgl1 specific code\n//=======================================================================\n#endif\n\n//=======================================================================\n// compute the normal and gradient magnitude for a position\nvec4 computeNormal(vec3 pos, float scalar, vec3 tstep)\n{\n vec4 result;\n\n result.x = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)).a - scalar;\n result.y = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)).a - scalar;\n result.z = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)).a - scalar;\n\n // divide by spacing\n result.xyz /= vSpacing;\n\n result.w = length(result.xyz);\n\n // rotate to View Coords\n result.xyz =\n result.x * vPlaneNormal0 +\n result.y * vPlaneNormal2 +\n result.z * vPlaneNormal4;\n\n if (result.w > 0.0)\n {\n result.xyz /= result.w;\n }\n return result;\n}\n\n#ifdef vtkImageLabelOutlineOn\nvec3 fragCoordToIndexSpace(vec4 fragCoord) {\n vec4 pcPos = vec4(\n (fragCoord.x / vpWidth - 0.5) * 2.0,\n (fragCoord.y / vpHeight - 0.5) * 2.0,\n (fragCoord.z - 0.5) * 2.0,\n 1.0);\n\n vec4 worldCoord = PCWCMatrix * pcPos;\n vec4 vertex = (worldCoord/worldCoord.w);\n\n return (vWCtoIDX * vertex).xyz / vec3(volumeDimensions);\n}\n#endif\n\n//=======================================================================\n// compute the normals and gradient magnitudes for a position\n// for independent components\nmat4 computeMat4Normal(vec3 pos, vec4 tValue, vec3 tstep)\n{\n mat4 result;\n vec4 distX = getTextureValue(pos + vec3(tstep.x, 0.0, 0.0)) - tValue;\n vec4 distY = getTextureValue(pos + vec3(0.0, tstep.y, 0.0)) - tValue;\n vec4 distZ = getTextureValue(pos + vec3(0.0, 0.0, tstep.z)) - tValue;\n\n // divide by spacing\n distX /= vSpacing.x;\n distY /= vSpacing.y;\n distZ /= vSpacing.z;\n\n mat3 rot;\n rot[0] = vPlaneNormal0;\n rot[1] = vPlaneNormal2;\n rot[2] = vPlaneNormal4;\n\n#if !defined(vtkComponent0Proportional)\n result[0].xyz = vec3(distX.r, distY.r, distZ.r);\n result[0].a = length(result[0].xyz);\n result[0].xyz *= rot;\n if (result[0].w > 0.0)\n {\n result[0].xyz /= result[0].w;\n }\n#endif\n\n// optionally compute the 2nd component\n#if vtkNumComponents >= 2 && !defined(vtkComponent1Proportional)\n result[1].xyz = vec3(distX.g, distY.g, distZ.g);\n result[1].a = length(result[1].xyz);\n result[1].xyz *= rot;\n if (result[1].w > 0.0)\n {\n result[1].xyz /= result[1].w;\n }\n#endif\n\n// optionally compute the 3rd component\n#if vtkNumComponents >= 3 && !defined(vtkComponent2Proportional)\n result[2].xyz = vec3(distX.b, distY.b, distZ.b);\n result[2].a = length(result[2].xyz);\n result[2].xyz *= rot;\n if (result[2].w > 0.0)\n {\n result[2].xyz /= result[2].w;\n }\n#endif\n\n// optionally compute the 4th component\n#if vtkNumComponents >= 4 && !defined(vtkComponent3Proportional)\n result[3].xyz = vec3(distX.a, distY.a, distZ.a);\n result[3].a = length(result[3].xyz);\n result[3].xyz *= rot;\n if (result[3].w > 0.0)\n {\n result[3].xyz /= result[3].w;\n }\n#endif\n\n return result;\n}\n\n//=======================================================================\n// Given a normal compute the gradient opacity factors\n//\nfloat computeGradientOpacityFactor(\n vec4 normal, float goscale, float goshift, float gomin, float gomax)\n{\n#if defined(vtkGradientOpacityOn)\n return clamp(normal.a*goscale + goshift, gomin, gomax);\n#else\n return 1.0;\n#endif\n}\n\n#if vtkLightComplexity > 0\nvoid applyLighting(inout vec3 tColor, vec4 normal)\n{\n vec3 diffuse = vec3(0.0, 0.0, 0.0);\n vec3 specular = vec3(0.0, 0.0, 0.0);\n //VTK::Light::Impl\n tColor.rgb = tColor.rgb*(diffuse*vDiffuse + vAmbient) + specular*vSpecular;\n}\n#endif\n\n//=======================================================================\n// Given a texture value compute the color and opacity\n//\nvec4 getColorForValue(vec4 tValue, vec3 posIS, vec3 tstep)\n{\n#ifdef vtkImageLabelOutlineOn\n vec3 centerPosIS = fragCoordToIndexSpace(gl_FragCoord); // pos in texture space\n vec4 centerValue = getTextureValue(centerPosIS);\n bool pixelOnBorder = false;\n vec4 tColor = texture2D(ctexture, vec2(centerValue.r * cscale0 + cshift0, 0.5));\n\n // Get alpha of segment from opacity function.\n tColor.a = texture2D(otexture, vec2(centerValue.r * oscale0 + oshift0, 0.5)).r;\n\n // Only perform outline check on fragments rendering voxels that aren't invisible.\n // Saves a bunch of needless checks on the background.\n // TODO define epsilon when building shader?\n if (float(tColor.a) > 0.01) {\n for (int i = -outlineThickness; i <= outlineThickness; i++) {\n for (int j = -outlineThickness; j <= outlineThickness; j++) {\n if (i == 0 || j == 0) {\n continue;\n }\n\n vec4 neighborPixelCoord = vec4(gl_FragCoord.x + float(i),\n gl_FragCoord.y + float(j),\n gl_FragCoord.z, gl_FragCoord.w);\n\n vec3 neighborPosIS = fragCoordToIndexSpace(neighborPixelCoord);\n vec4 value = getTextureValue(neighborPosIS);\n\n // If any of my neighbours are not the same value as I\n // am, this means I am on the border of the segment.\n // We can break the loops\n if (any(notEqual(value, centerValue))) {\n pixelOnBorder = true;\n break;\n }\n }\n\n if (pixelOnBorder == true) {\n break;\n }\n }\n\n // If I am on the border, I am displayed at full opacity\n if (pixelOnBorder == true) {\n tColor.a = 1.0;\n }\n }\n\n#else\n // compute the normal and gradient magnitude if needed\n // We compute it as a vec4 if possible otherwise a mat4\n //\n vec4 goFactor = vec4(1.0,1.0,1.0,1.0);\n\n // compute the normal vectors as needed\n #if (vtkLightComplexity > 0) || defined(vtkGradientOpacityOn)\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n mat4 normalMat = computeMat4Normal(posIS, tValue, tstep);\n #if !defined(vtkComponent0Proportional)\n vec4 normal0 = normalMat[0];\n #endif\n #if !defined(vtkComponent1Proportional)\n vec4 normal1 = normalMat[1];\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n vec4 normal2 = normalMat[2];\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n vec4 normal3 = normalMat[3];\n #endif\n #endif\n #endif\n #else\n vec4 normal0 = computeNormal(posIS, tValue.a, tstep);\n #endif\n #endif\n\n // compute gradient opacity factors as needed\n #if defined(vtkGradientOpacityOn)\n #if !defined(vtkComponent0Proportional)\n goFactor.x =\n computeGradientOpacityFactor(normal0, goscale0, goshift0, gomin0, gomax0);\n #endif\n #if defined(vtkIndependentComponentsOn) && (vtkNumComponents > 1)\n #if !defined(vtkComponent1Proportional)\n goFactor.y =\n computeGradientOpacityFactor(normal1, goscale1, goshift1, gomin1, gomax1);\n #endif\n #if vtkNumComponents > 2\n #if !defined(vtkComponent2Proportional)\n goFactor.z =\n computeGradientOpacityFactor(normal2, goscale2, goshift2, gomin2, gomax2);\n #endif\n #if vtkNumComponents > 3\n #if !defined(vtkComponent3Proportional)\n goFactor.w =\n computeGradientOpacityFactor(normal3, goscale3, goshift3, gomin3, gomax3);\n #endif\n #endif\n #endif\n #endif\n #endif\n\n // single component is always independent\n #if vtkNumComponents == 1\n vec4 tColor = texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, 0.5));\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, 0.5)).r;\n #endif\n\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n vec4 tColor = mix0*texture2D(ctexture, vec2(tValue.r * cscale0 + cshift0, height0));\n #if !defined(vtkComponent0Proportional)\n tColor.a = goFactor.x*mix0*texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.r * oscale0 + oshift0, height0)).r;\n tColor *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix0));\n #endif\n\n vec3 tColor1 = mix1*texture2D(ctexture, vec2(tValue.g * cscale1 + cshift1, height1)).rgb;\n #if !defined(vtkComponent1Proportional)\n tColor.a += goFactor.y*mix1*texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.g * oscale1 + oshift1, height1)).r;\n tColor1 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix1));\n #endif\n\n #if vtkNumComponents >= 3\n vec3 tColor2 = mix2*texture2D(ctexture, vec2(tValue.b * cscale2 + cshift2, height2)).rgb;\n #if !defined(vtkComponent2Proportional)\n tColor.a += goFactor.z*mix2*texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.b * oscale2 + oshift2, height2)).r;\n tColor2 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix2));\n #endif\n\n #if vtkNumComponents >= 4\n vec3 tColor3 = mix3*texture2D(ctexture, vec2(tValue.a * cscale3 + cshift3, height3)).rgb;\n #if !defined(vtkComponent3Proportional)\n tColor.a += goFactor.w*mix3*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n #else\n float pwfValue = texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, height3)).r;\n tColor3 *= pwfValue;\n tColor.a *= mix(pwfValue, 1.0, (1.0 - mix3));\n #endif\n #endif\n #endif\n #else // then not independent\n\n #if vtkNumComponents == 2\n float lum = tValue.r * cscale0 + cshift0;\n float alpha = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale1 + oshift1, 0.5)).r;\n vec4 tColor = vec4(lum, lum, lum, alpha);\n #endif\n #if vtkNumComponents == 3\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale0 + oshift0, 0.5)).r;\n #endif\n #if vtkNumComponents == 4\n vec4 tColor;\n tColor.r = tValue.r * cscale0 + cshift0;\n tColor.g = tValue.g * cscale1 + cshift1;\n tColor.b = tValue.b * cscale2 + cshift2;\n tColor.a = goFactor.x*texture2D(otexture, vec2(tValue.a * oscale3 + oshift3, 0.5)).r;\n #endif\n #endif // dependent\n\n // apply lighting if requested as appropriate\n #if vtkLightComplexity > 0\n #if !defined(vtkComponent0Proportional)\n applyLighting(tColor.rgb, normal0);\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n #if !defined(vtkComponent1Proportional)\n applyLighting(tColor1, normal1);\n #endif\n #if vtkNumComponents >= 3\n #if !defined(vtkComponent2Proportional)\n applyLighting(tColor2, normal2);\n #endif\n #if vtkNumComponents >= 4\n #if !defined(vtkComponent3Proportional)\n applyLighting(tColor3, normal3);\n #endif\n #endif\n #endif\n #endif\n#endif\n\n// perform final independent blend as needed\n#if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 2\n tColor.rgb += tColor1;\n#if vtkNumComponents >= 3\n tColor.rgb += tColor2;\n#if vtkNumComponents >= 4\n tColor.rgb += tColor3;\n#endif\n#endif\n#endif\n\n#endif\n\n\n\n\n\n\n\nreturn tColor;\n}\n\n\n\n//=======================================================================\n// Apply the specified blend mode operation along the ray's path.\n//\nvoid applyBlend(vec3 posIS, vec3 endIS, float sampleDistanceIS, vec3 tdims)\n{\n vec3 tstep = 1.0/tdims;\n\n // start slightly inside and apply some jitter\n vec3 delta = endIS - posIS;\n vec3 stepIS = normalize(delta)*sampleDistanceIS;\n float raySteps = length(delta)/sampleDistanceIS;\n\n // avoid 0.0 jitter\n float jitter = 0.01 + 0.99*texture2D(jtexture, gl_FragCoord.xy/32.0).r;\n float stepsTraveled = jitter;\n\n // local vars for the loop\n vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n vec4 tValue;\n vec4 tColor;\n\n // if we have less than one step then pick the middle point\n // as our value\n // if (raySteps <= 1.0)\n // {\n // posIS = (posIS + endIS)*0.5;\n // }\n\n // Perform initial step at the volume boundary\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n #if vtkBlendMode == 0 // COMPOSITE_BLEND\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n // handle very thin volumes\n if (raySteps <= 1.0)\n {\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps);\n gl_FragData[0] = tColor;\n return;\n }\n\n tColor.a = 1.0 - pow(1.0 - tColor.a, jitter);\n color = vec4(tColor.rgb*tColor.a, tColor.a);\n posIS += (jitter*stepIS);\n\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n\n float mix = (1.0 - color.a);\n\n // this line should not be needed but nvidia seems to not handle\n // the break correctly on windows/chrome 58 angle\n //mix = mix * sign(max(raySteps - stepsTraveled - 1.0, 0.0));\n\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n stepsTraveled++;\n posIS += stepIS;\n if (color.a > 0.99) { color.a = 1.0; break; }\n }\n\n if (color.a < 0.99 && (raySteps - stepsTraveled) > 0.0)\n {\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // now map through opacity and color\n tColor = getColorForValue(tValue, posIS, tstep);\n tColor.a = 1.0 - pow(1.0 - tColor.a, raySteps - stepsTraveled);\n\n float mix = (1.0 - color.a);\n color = color + vec4(tColor.rgb*tColor.a, tColor.a)*mix;\n }\n\n gl_FragData[0] = vec4(color.rgb/color.a, color.a);\n #endif\n #if vtkBlendMode == 1 || vtkBlendMode == 2\n // MAXIMUM_INTENSITY_BLEND || MINIMUM_INTENSITY_BLEND\n // Find maximum/minimum intensity along the ray.\n\n // Define the operation we will use (min or max)\n #if vtkBlendMode == 1\n #define OP max\n #else\n #define OP min\n #endif\n\n // If the clipping range is shorter than the sample distance\n // we can skip the sampling loop along the ray.\n if (raySteps <= 1.0)\n {\n gl_FragData[0] = getColorForValue(tValue, posIS, tstep);\n return;\n }\n\n vec4 value = tValue;\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // Update the maximum value if necessary\n value = OP(tValue, value);\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n tValue = getTextureValue(posIS);\n value = OP(tValue, value);\n\n // Now map through opacity and color\n gl_FragData[0] = getColorForValue(value, posIS, tstep);\n #endif\n #if vtkBlendMode == 3 //AVERAGE_INTENSITY_BLEND\n vec4 averageIPScalarRangeMin = vec4 (\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n //VTK::AverageIPScalarRangeMin,\n 1.0);\n vec4 averageIPScalarRangeMax = vec4(\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n //VTK::AverageIPScalarRangeMax,\n 1.0);\n\n vec4 sum = vec4(0.);\n\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n }\n\n if (raySteps <= 1.0) {\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n return;\n }\n\n posIS += (jitter*stepIS);\n\n // Sample along the ray until MaximumSamplesValue,\n // ending slightly inside the total distance\n for (int i = 0; i < //VTK::MaximumSamplesValue ; ++i)\n {\n // If we have reached the last step, break\n if (stepsTraveled + 1.0 >= raySteps) { break; }\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation.\n // Notes:\n // - We are comparing all values in the texture to see if any of them\n // are outside of the scalar range. In the future we might want to allow\n // scalar ranges for each component.\n // - We are setting the alpha channel for averageIPScalarRangeMin and\n // averageIPScalarRangeMax so that we do not trigger this 'continue'\n // based on the alpha channel comparison.\n // - There might be a better way to do this. I'm not sure if there is an\n // equivalent of 'any' which only operates on RGB, though I suppose\n // we could write an 'anyRGB' function and see if that is faster.\n averageIPScalarRangeMin.a = tValue.a;\n averageIPScalarRangeMax.a = tValue.a;\n if (any(lessThan(tValue, averageIPScalarRangeMin)) ||\n any(greaterThan(tValue, averageIPScalarRangeMax))) {\n continue;\n }\n\n // Sum the values across each step in the path\n sum += tValue;\n\n // Otherwise, continue along the ray\n stepsTraveled++;\n posIS += stepIS;\n }\n\n // Perform the last step along the ray using the\n // residual distance\n posIS = endIS;\n\n // compute the scalar\n tValue = getTextureValue(posIS);\n\n // One can control the scalar range by setting the AverageIPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (all(greaterThanEqual(tValue, averageIPScalarRangeMin)) &&\n all(lessThanEqual(tValue, averageIPScalarRangeMax))) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n\n gl_FragData[0] = getColorForValue(sum, posIS, tstep);\n #endif\n}\n\n//=======================================================================\n// Compute a new start and end point for a given ray based\n// on the provided bounded clipping plane (aka a rectangle)\nvoid getRayPointIntersectionBounds(\n vec3 rayPos, vec3 rayDir,\n vec3 planeDir, float planeDist,\n inout vec2 tbounds, vec3 vPlaneX, vec3 vPlaneY,\n float vSize1, float vSize2)\n{\n float result = dot(rayDir, planeDir);\n if (result == 0.0)\n {\n return;\n }\n result = -1.0 * (dot(rayPos, planeDir) + planeDist) / result;\n vec3 xposVC = rayPos + rayDir*result;\n vec3 vxpos = xposVC - vOriginVC;\n vec2 vpos = vec2(\n dot(vxpos, vPlaneX),\n dot(vxpos, vPlaneY));\n\n // on some apple nvidia systems this does not work\n // if (vpos.x < 0.0 || vpos.x > vSize1 ||\n // vpos.y < 0.0 || vpos.y > vSize2)\n // even just\n // if (vpos.x < 0.0 || vpos.y < 0.0)\n // fails\n // so instead we compute a value that represents in and out\n //and then compute the return using this value\n float xcheck = max(0.0, vpos.x * (vpos.x - vSize1)); // 0 means in bounds\n float check = sign(max(xcheck, vpos.y * (vpos.y - vSize2))); // 0 means in bounds, 1 = out\n\n tbounds = mix(\n vec2(min(tbounds.x, result), max(tbounds.y, result)), // in value\n tbounds, // out value\n check); // 0 in 1 out\n}\n\n//=======================================================================\n// given a\n// - ray direction (rayDir)\n// - starting point (vertexVCVSOutput)\n// - bounding planes of the volume\n// - optionally depth buffer values\n// - far clipping plane\n// compute the start/end distances of the ray we need to cast\nvec2 computeRayDistances(vec3 rayDir, vec3 tdims)\n{\n vec2 dists = vec2(100.0*camFar, -1.0);\n\n vec3 vSize = vSpacing*(tdims - 1.0);\n\n // all this is in View Coordinates\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal0, vPlaneDistance0, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal1, vPlaneDistance1, dists, vPlaneNormal2, vPlaneNormal4,\n vSize.y, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal2, vPlaneDistance2, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal3, vPlaneDistance3, dists, vPlaneNormal0, vPlaneNormal4,\n vSize.x, vSize.z);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal4, vPlaneDistance4, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n getRayPointIntersectionBounds(vertexVCVSOutput, rayDir,\n vPlaneNormal5, vPlaneDistance5, dists, vPlaneNormal0, vPlaneNormal2,\n vSize.x, vSize.y);\n\n //VTK::ClipPlane::Impl\n\n // do not go behind front clipping plane\n dists.x = max(0.0,dists.x);\n\n // do not go PAST far clipping plane\n float farDist = -camThick/rayDir.z;\n dists.y = min(farDist,dists.y);\n\n // Do not go past the zbuffer value if set\n // This is used for intermixing opaque geometry\n //VTK::ZBuffer::Impl\n\n return dists;\n}\n\n//=======================================================================\n// Compute the index space starting position (pos) and end\n// position\n//\nvoid computeIndexSpaceValues(out vec3 pos, out vec3 endPos, out float sampleDistanceIS, vec3 rayDir, vec2 dists)\n{\n // compute starting and ending values in volume space\n pos = vertexVCVSOutput + dists.x*rayDir;\n pos = pos - vOriginVC;\n // convert to volume basis and origin\n pos = vec3(\n dot(pos, vPlaneNormal0),\n dot(pos, vPlaneNormal2),\n dot(pos, vPlaneNormal4));\n\n endPos = vertexVCVSOutput + dists.y*rayDir;\n endPos = endPos - vOriginVC;\n endPos = vec3(\n dot(endPos, vPlaneNormal0),\n dot(endPos, vPlaneNormal2),\n dot(endPos, vPlaneNormal4));\n\n float delta = length(endPos - pos);\n\n pos *= vVCToIJK;\n endPos *= vVCToIJK;\n\n float delta2 = length(endPos - pos);\n sampleDistanceIS = sampleDistance*delta2/delta;\n}\n\nvoid main()\n{\n\n vec3 rayDirVC;\n\n if (cameraParallel == 1)\n {\n // Camera is parallel, so the rayDir is just the direction of the camera.\n rayDirVC = vec3(0.0, 0.0, -1.0);\n } else {\n // camera is at 0,0,0 so rayDir for perspective is just the vc coord\n rayDirVC = normalize(vertexVCVSOutput);\n }\n\n vec3 tdims = vec3(volumeDimensions);\n\n // compute the start and end points for the ray\n vec2 rayStartEndDistancesVC = computeRayDistances(rayDirVC, tdims);\n\n // do we need to composite? aka does the ray have any length\n // If not, bail out early\n if (rayStartEndDistancesVC.y <= rayStartEndDistancesVC.x)\n {\n discard;\n }\n\n // IS = Index Space\n vec3 posIS;\n vec3 endIS;\n float sampleDistanceIS;\n computeIndexSpaceValues(posIS, endIS, sampleDistanceIS, rayDirVC, rayStartEndDistancesVC);\n\n // Perform the blending operation along the ray\n applyBlend(posIS, endIS, sampleDistanceIS, tdims);\n}\n",e.Geometry=""},e.replaceShaderValues=function(n,r,a){var o=n.Fragment;a.getProperty().getInterpolationType()===Fm.LINEAR&&(o=Hg.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===a.getProperty().getUseLabelOutline()&&(o=Hg.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var i=t.scalarTexture.getComponents();o=Hg.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(i)).result;var l=a.getProperty().getIndependentComponents();if(l){o=Hg.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var s=[],c=0;c0&&(o=Hg.substitute(o,"//VTK::vtkProportionalComponents",s.join("\n")).result)}var g=t.currentInput.getExtent(),u=t.currentInput.getSpacing(),d=new Float64Array(3);Object(Fo.p)(d,(g[1]-g[0])*u[0],(g[3]-g[2])*u[1],(g[5]-g[4])*u[2]);var m=Object(Fo.j)(d)/t.renderable.getSampleDistance();o=Hg.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(m))).result,o=Hg.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=a.getProperty().getUseGradientOpacity(0);for(var f=1;l&&!t.gopacity&&f0&&(a=Hg.substitute(a,"//VTK::Light::Dec",["uniform vec3 lightColor".concat(o,";"),"uniform vec3 lightDirectionVC".concat(o,"; // normalized"),"uniform vec3 lightHalfAngleVC".concat(o,"; // normalized"),"//VTK::Light::Dec"],!1).result,a=Hg.substitute(a,"//VTK::Light::Impl",[" float df = abs(dot(normal.rgb, -lightDirectionVC".concat(o,"));")," diffuse += ((df".concat("",") * lightColor").concat(o,");")," float sf = pow( abs(dot(lightHalfAngleVC".concat(o,",normal.rgb)), vSpecularPower);")," specular += ((sf".concat("",") * lightColor").concat(o,");")," //VTK::Light::Impl"],!1).result,o++)}))}e.Fragment=a},e.replaceShaderClippingPlane=function(e,n,r){var a=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;a=Hg.substitute(a,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,a=Hg.substitute(a,"//VTK::ClipPlane::Impl",["for(int i = 0; i < ".concat(o,"; i++) {")," float rayDirRatio = dot(rayDir, vClipPlaneNormals[i]);"," float equationResult = dot(vertexVCVSOutput, vClipPlaneNormals[i]) + vClipPlaneDistances[i];"," if (rayDirRatio == 0.0)"," {"," if (equationResult < 0.0) dists.x = dists.y;"," continue;"," }"," float result = -1.0 * equationResult / rayDirRatio;"," if (rayDirRatio < 0.0) dists.y = min(dists.y, result);"," else dists.x = max(dists.x, result);","}","//VTK::ClipPlane::Impl"],!1).result}e.Fragment=a},e.getNeedToRebuildShaders=function(n,r,a){var o=0;a.getProperty().getShade()&&t.renderable.getBlendMode()===Mm.COMPOSITE_BLEND&&(o=0,t.numberOfLights=0,r.getLights().forEach((function(e){e.getSwitch()>0&&(t.numberOfLights++,0===o&&(o=1)),1===o&&(t.numberOfLights>1||1!==e.getIntensity()||!e.lightTypeIsHeadLight())&&(o=2),o<3&&e.getPositional()&&(o=3)})));var i=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,i=!0);var l=t.scalarTexture.getComponents(),s=a.getProperty().getIndependentComponents(),c=!1,g=[];if(s){for(var u=0;u0&&(c=!0)}var d=t.currentInput.getExtent(),m=t.currentInput.getSpacing(),f=new Float64Array(3);Object(Fo.p)(f,(d[1]-d[0])*m[0],(d[3]-d[2])*m[1],(d[5]-d[4])*m[2]);var p=Object(Fo.j)(f)/t.renderable.getSampleDistance(),C={interpolationType:a.getProperty().getInterpolationType(),useLabelOutline:a.getProperty().getUseLabelOutline(),numComp:l,usesProportionalComponents:c,iComps:s,maxSamples:p,useGradientOpacity:a.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),averageIPScalarMode:t.renderable.getAverageIPScalarRange(),proportionalComponents:g};return t.previousState&&t.previousState.interpolationType===C.interpolationType&&t.previousState.useLabelOutline===C.useLabelOutline&&t.previousState.numComp===C.numComp&&t.previousState.usesProportionalComponents===C.usesProportionalComponents&&t.previousState.iComps===C.iComps&&t.previousState.maxSamples===C.maxSamples&&t.previousState.useGradientOpacity===C.useGradientOpacity&&t.previousState.blendMode===C.blendMode&&zm(t.previousState.averageIPScalarMode,C.averageIPScalarMode)&&zm(t.previousState.proportionalComponents,C.proportionalComponents)?!!(0===n.getProgram()||i||t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||!!t.lastZBufferTexture!=!!t.zBufferTexture||n.getShaderSourceTime().getMTime()n.getAttributeUpdateTime().getMTime()||n.getShaderSourceTime().getMTime()>n.getAttributeUpdateTime().getMTime())&&(o.isAttributeUsed("vertexDC")&&(n.getVAO().addAttributeArray(o,n.getCABO(),"vertexDC",n.getCABO().getVertexOffset(),n.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance()),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var i=e.getRenderTargetSize();o.setUniformf("vpWidth",i[0]),o.setUniformf("vpHeight",i[1])}},e.setCameraShaderParameters=function(n,r,a){var o=t.openGLCamera.getKeyMatrices(r),i=t.openGLVolume.getKeyMatrices();Object(Yo.l)(t.modelToView,o.wcvc,i.mcwc);var l=n.getProgram(),s=t.openGLCamera.getRenderable(),c=s.getClippingRange();l.setUniformf("camThick",c[1]-c[0]),l.setUniformf("camNear",c[0]),l.setUniformf("camFar",c[1]);for(var g=t.currentInput.getBounds(),u=t.currentInput.getDimensions(),d=new Float64Array(3),m=new Float64Array(3),f=1,p=-1,C=1,I=-1,h=0;h<8;++h){if(Object(Fo.p)(d,g[h%2],g[2+Math.floor(h/2)%2],g[4+Math.floor(h/4)]),Object(Fo.q)(d,d,t.modelToView),!s.getParallelProjection()){Object(Fo.l)(m,d);var b=-c[0]/d[2];Object(Fo.b)(d,m,b)}Object(Fo.q)(d,d,o.vcpc),f=Math.min(d[0],f),p=Math.max(d[0],p),C=Math.min(d[1],C),I=Math.max(d[1],I)}l.setUniformf("dcxmin",f),l.setUniformf("dcxmax",p),l.setUniformf("dcymin",C),l.setUniformf("dcymax",I),l.isUniformUsed("cameraParallel")&&l.setUniformi("cameraParallel",s.getParallelProjection());var y=t.currentInput.getExtent(),v=t.currentInput.getSpacing(),Z=new Float64Array(3);Object(Fo.p)(Z,(y[1]-y[0]+1)*v[0],(y[3]-y[2]+1)*v[1],(y[5]-y[4]+1)*v[2]),l.setUniform3f("vSpacing",v[0],v[1],v[2]),Object(Fo.p)(d,y[0],y[2],y[4]),t.currentInput.indexToWorldVec3(d,d),Object(Fo.q)(d,d,t.modelToView),l.setUniform3f("vOriginVC",d[0],d[1],d[2]);var A=t.currentInput.getIndexToWorld();Object(Yo.l)(t.idxToView,t.modelToView,A),_l(t.idxNormalMatrix,o.normalMatrix,i.normalMatrix),_l(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var G=Object(Fo.j)(Z)/t.renderable.getSampleDistance();G>t.renderable.getMaximumSamplesPerRay()&&Em("The number of steps required ".concat(Math.ceil(G)," is larger than the\n specified maximum number of steps ").concat(t.renderable.getMaximumSamplesPerRay(),".\n Please either change the\n volumeMapper sampleDistance or its maximum number of samples."));var S=new Float64Array(3);if(Object(Fo.p)(S,1,1,1),Object(Fo.k)(S,S,Z),l.setUniform3f("vVCToIJK",S[0],S[1],S[2]),l.setUniform3i("volumeDimensions",u[0],u[1],u[2]),!t.openGLRenderWindow.getWebgl2()){var B=t.scalarTexture.getVolumeInfo();l.setUniformf("texWidth",t.scalarTexture.getWidth()),l.setUniformf("texHeight",t.scalarTexture.getHeight()),l.setUniformi("xreps",B.xreps),l.setUniformi("xstride",B.xstride),l.setUniformi("ystride",B.ystride)}for(var V=new Float64Array(3),R=new Float64Array(3),w=0;w<6;++w){switch(w){default:case 0:Object(Fo.p)(V,1,0,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 1:Object(Fo.p)(V,-1,0,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 2:Object(Fo.p)(V,0,1,0),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 3:Object(Fo.p)(V,0,-1,0),Object(Fo.p)(R,y[0],y[2],y[4]);break;case 4:Object(Fo.p)(V,0,0,1),Object(Fo.p)(R,y[1],y[3],y[5]);break;case 5:Object(Fo.p)(V,0,0,-1),Object(Fo.p)(R,y[0],y[2],y[4])}Object(Fo.m)(V,V,t.idxNormalMatrix),Object(Fo.q)(R,R,t.idxToView);var k=-1*Object(Fo.d)(R,V);if(l.setUniform3f("vPlaneNormal".concat(w),V[0],V[1],V[2]),l.setUniformf("vPlaneDistance".concat(w),k),a.getProperty().getUseLabelOutline()){var W=t.currentInput.getWorldToIndex();l.setUniformMatrix("vWCtoIDX",W),Object(Yo.g)(t.projectionToWorld,o.wcpc),l.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var x=e.getRenderTargetSize();l.setUniformf("vpWidth",x[0]),l.setUniformf("vpHeight",x[1])}}switch(Object(Yo.g)(t.projectionToView,o.vcpc),l.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var T=0,J=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();J[0]=t[0]*n,J[1]=t[1]*n,J[2]=t[2]*n,l.setUniform3fArray("lightColor".concat(T),J);var r=e.getDirection();Object(Fo.p)(V,r[0],r[1],r[2]),Object(Fo.m)(V,V,o.normalMatrix),l.setUniform3f("lightDirectionVC".concat(T),V[0],V[1],V[2]);var a=[-.5*V[0],-.5*V[1],-.5*(V[2]-1)];l.setUniform3fArray("lightHalfAngleVC".concat(T),a),T++}}))}},e.setPropertyShaderParameters=function(e,n,r){var a=e.getProgram();a.setUniformi("ctexture",t.colorTexture.getTextureUnit()),a.setUniformi("otexture",t.opacityTexture.getTextureUnit()),a.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),i=r.getProperty(),l=t.scalarTexture.getComponents(),s=r.getProperty().getIndependentComponents();if(s&&l>=2)for(var c=0;c0&&(a.setUniformf("vAmbient",i.getAmbient()),a.setUniformf("vDiffuse",i.getDiffuse()),a.setUniformf("vSpecular",i.getSpecular()),a.setUniformf("vSpecularPower",i.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var a=t.openGLCamera.getKeyMatrices(n),o=[],i=[],l=t.renderable.getClippingPlanes(),s=l.length,c=0;c1.43){var e=t.framebuffer.getSize();return[t.fvp[0]*e[0],t.fvp[1]*e[1]]}return t.openGLRenderWindow.getFramebufferSize()},e.renderPieceStart=function(n,r){if(t.renderable.getAutoAdjustSampleDistances()){var a=n.getVTKWindow().getInteractor(),o=a.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var i=Math.sqrt(t.avgFrameTime*a.getDesiredUpdateRate()/t.avgWindowArea);i>10&&(i=10),t.targetXYF=i}else t.targetXYF=Math.sqrt(t.avgFrameTime*a.getStillUpdateRate()/t.avgWindowArea);t.targetXYF<1.53&&t.targetXYF>1.33&&(t.targetXYF=t.lastXYF),Math.abs(1-t.targetXYF/t.lastXYF)<.1&&(t.targetXYF=t.lastXYF),t.lastXYF=t.targetXYF}else t.lastXYF=t.renderable.getImageSampleDistance();t.lastXYF<=1.43&&(t.lastXYF=1);var l=t.lastXYF,s=t.openGLRenderWindow.getFramebufferSize();if(l>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer();else{var c=t.framebuffer.getSize();c[0]===Math.floor(.7*s[0])&&c[1]===Math.floor(.7*s[1])||(t.framebuffer.create(Math.floor(.7*s[0]),Math.floor(.7*s[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var g=t.context;g.clearColor(0,0,0,0),g.colorMask(!0,!0,!0,!0),g.clear(g.COLOR_BUFFER_BIT),g.viewport(0,0,s[0]/l,s[1]/l),t.fvp=[Math.floor(s[0]/l)/Math.floor(.7*s[0]),Math.floor(s[1]/l)/Math.floor(.7*s[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===Fm.NEAREST?(t.scalarTexture.setMinificationFilter(Ms.NEAREST),t.scalarTexture.setMagnificationFilter(Ms.NEAREST)):(t.scalarTexture.setMinificationFilter(Ms.LINEAR),t.scalarTexture.setMagnificationFilter(Ms.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var a=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),a.drawArrays(a.TRIANGLES,0,t.tris.getCABO().getElementCount()),t.tris.getVAO().release(),t.scalarTexture.deactivate(),t.colorTexture.deactivate(),t.opacityTexture.deactivate(),t.jitterTexture.deactivate()},e.renderPieceFinish=function(e,n){if(null!==t.zBufferTexture&&t.zBufferTexture.deactivate(),t.lastXYF>1.43){if(t.framebuffer.restorePreviousBindingsAndBuffers(),null===t.copyShader){t.copyShader=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(["//VTK::System::Dec","attribute vec4 vertexDC;","uniform vec2 tfactor;","varying vec2 tcoord;","void main() { tcoord = vec2(vertexDC.x*0.5 + 0.5, vertexDC.y*0.5 + 0.5) * tfactor; gl_Position = vertexDC; }"].join("\n"),["//VTK::System::Dec","//VTK::Output::Dec","uniform sampler2D texture1;","varying vec2 tcoord;","void main() { gl_FragData[0] = texture2D(texture1,tcoord); }"].join("\n"),"");var r=t.copyShader;t.copyVAO=Kg.newInstance(),t.copyVAO.setOpenGLRenderWindow(t.openGLRenderWindow),t.tris.getCABO().bind(),t.copyVAO.addAttributeArray(r,t.tris.getCABO(),"vertexDC",t.tris.getCABO().getVertexOffset(),t.tris.getCABO().getStride(),t.context.FLOAT,3,t.context.FALSE)||Um("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var a=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,a[0],a[1]);var o=t.framebuffer.getColorTexture();o.activate(),t.copyShader.setUniformi("texture",o.getTextureUnit()),t.copyShader.setUniform2f("tfactor",t.fvp[0],t.fvp[1]);var i=t.context;i.blendFuncSeparate(i.ONE,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)}},e.renderPiece=function(n,r){e.invokeEvent({type:"StartEvent"}),t.renderable.update(),t.currentInput=t.renderable.getInputData(),e.invokeEvent({type:"EndEvent"}),t.currentInput?(e.renderPieceStart(n,r),e.renderPieceDraw(n,r),e.renderPieceFinish(n,r)):Um("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():Object(Xo.D)(t.Bounds)},e.updateBufferObjects=function(t,n){e.getNeedToRebuildBufferObjects(t,n)&&e.buildBufferObjects(t,n)},e.getNeedToRebuildBufferObjects=function(n,r){return t.VBOBuildTime.getMTime()1?1:-1,k[3*W+2]=-1;var x=new Uint16Array(8);x[0]=3,x[1]=0,x[2]=1,x[3]=3,x[4]=3,x[5]=0,x[6]=3,x[7]=2;var T=Bo.a.newInstance({numberOfComponents:3,values:k});T.setName("points");var J=Bo.a.newInstance({numberOfComponents:1,values:x});t.tris.getCABO().createVBO(J,"polys",sg.SURFACE,{points:T,cellOffset:0})}t.VBOBuildTime.modified()}}}}var jm={context:null,VBOBuildTime:null,scalarTexture:null,scalarTextureString:null,opacityTexture:null,opacityTextureString:null,colorTexture:null,colorTextureString:null,jitterTexture:null,tris:null,framebuffer:null,copyShader:null,copyVAO:null,lastXYF:1,targetXYF:1,zBufferTexture:null,lastZBufferTexture:null,lastLightComplexity:0,fullViewportTime:1,idxToView:null,idxNormalMatrix:null,modelToView:null,projectionToView:null,avgWindowArea:0,avgFrameTime:0};function Qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jm,n),_s.extend(e,t,n),t.VBOBuildTime={},ln.c.obj(t.VBOBuildTime,{mtime:0}),t.tris=Eg.newInstance(),t.scalarTexture=ic.newInstance(),t.opacityTexture=ic.newInstance(),t.colorTexture=ic.newInstance(),t.jitterTexture=ic.newInstance(),t.jitterTexture.setWrapS(Ks.REPEAT),t.jitterTexture.setWrapT(Ks.REPEAT),t.framebuffer=gc.newInstance(),t.idxToView=Object(Yo.h)(new Float64Array(16)),t.idxNormalMatrix=El(new Float64Array(9)),t.modelToView=Object(Yo.h)(new Float64Array(16)),t.projectionToView=Object(Yo.h)(new Float64Array(16)),t.projectionToWorld=Object(Yo.h)(new Float64Array(16)),ln.c.setGet(e,t,["context"]),_m(e,t)}var qm={newInstance:ln.c.newInstance(Qm,"vtkOpenGLVolumeMapper"),extend:Qm};function $m(e,t){t.overrides={},t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,a=n.getClassName(r++),o=!1,i=Object.keys(t.overrides);a&&!o;)-1!==i.indexOf(a)?o=!0:a=n.getClassName(r++);if(!o)return null;var l=t.overrides[a]();return l.setMyFactory(e),l},e.registerOverride=function(e,n){t.overrides[e]=n}}var ef={};function tf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ef,n),ln.c.obj(e,t),$m(e,t)}var nf={newInstance:ln.c.newInstance(tf,"vtkViewNodeFactory"),extend:tf};function rf(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var af={};function of(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,af,n),nf.extend(e,t,n),rf(0,t),e.registerOverride("vtkActor",Bc.newInstance),e.registerOverride("vtkActor2D",kc.newInstance),e.registerOverride("vtkCamera",Jc.newInstance),e.registerOverride("vtkGlyph3DMapper",fd.newInstance),e.registerOverride("vtkImageMapper",Gd.newInstance),e.registerOverride("vtkImageSlice",Rd.newInstance),e.registerOverride("vtkMapper",rd.newInstance),e.registerOverride("vtkPixelSpaceCallbackMapper",Td.newInstance),e.registerOverride("vtkRenderer",Hd.newInstance),e.registerOverride("vtkSkybox",Md.newInstance),e.registerOverride("vtkSphereMapper",_d.newInstance),e.registerOverride("vtkStickMapper",tm.newInstance),e.registerOverride("vtkTexture",ic.newInstance),e.registerOverride("vtkSurfaceLICMapper",Xm.newInstance),e.registerOverride("vtkVolume",Ym.newInstance),e.registerOverride("vtkVolumeMapper",qm.newInstance),e.registerOverride("vtkWidgetRepresentation",Zc.newInstance)}var lf={newInstance:ln.c.newInstance(of,"vtkOpenGLViewNodeFactory"),extend:of},sf=Object(Cn.d)((function(e){!function(t){function n(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function r(e,t,r,a,o,i){return n((l=n(n(t,e),n(a,i)))<<(s=o)|l>>>32-s,r);var l,s}function a(e,t,n,a,o,i,l){return r(t&n|~t&a,e,t,o,i,l)}function o(e,t,n,a,o,i,l){return r(t&a|n&~a,e,t,o,i,l)}function i(e,t,n,a,o,i,l){return r(t^n^a,e,t,o,i,l)}function l(e,t,n,a,o,i,l){return r(n^(t|~a),e,t,o,i,l)}function s(e,t){var r,s,c,g,u;e[t>>5]|=128<>>9<<4)]=t;var d=1732584193,m=-271733879,f=-1732584194,p=271733878;for(r=0;r>5]>>>t%32&255);return n}function g(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(255&e.charCodeAt(t/8))<>>4&15)+r.charAt(15&t);return a}function d(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return c(s(g(e),8*e.length))}(d(e))}function f(e,t){return function(e,t){var n,r,a=g(e),o=[],i=[];for(o[15]=i[15]=void 0,a.length>16&&(a=s(a,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^a[n],i[n]=1549556828^a[n];return r=s(o.concat(g(t)),512+8*t.length),c(s(i.concat(r),640))}(d(e),d(t))}function p(e,t,n){return t?n?f(t,e):u(f(t,e)):n?m(e):u(m(e))}e.exports?e.exports=p:t.md5=p}(Cn.b)}),"/$$rollup_base$$/node_modules/blueimp-md5/js"),cf=["lastShaderBound","context","openGLRenderWindow"];function gf(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var a=n;r.length>0&&(a=Hg.substitute(a,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),i="\n",l="#version 100\n";o?l="#version 300 es\n#define attribute in\n#define textureCube texture\n#define texture2D texture\n#define textureCubeLod textureLod\n#define texture2DLod textureLod\n":(t.context.getExtension("OES_standard_derivatives"),t.context.getExtension("EXT_frag_depth")&&(i="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(i+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),a=Hg.substitute(a,"//VTK::System::Dec",["".concat(l,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",i,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var s=Hg.substitute(e,"//VTK::System::Dec",["".concat(l,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(s=Hg.substitute(s,"varying","out").result,a=Hg.substitute(a,"varying","in").result,a=Hg.substitute(a,"gl_FragData\\[0\\]","fragOutput0").result,a=Hg.substitute(a,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:s,FSSource:a,GSSource:Hg.substitute(r,"//VTK::System::Dec",l).result}},e.readyShaderProgramArray=function(t,n,r){var a=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(a.VSSource,a.FSSource,a.GSSource);return e.readyShaderProgram(o)},e.readyShaderProgram=function(t){return t&&(t.getCompiled()||t.compileShader())&&e.bindShader(t)?t:null},e.getShaderProgram=function(e,n,r){var a="".concat(e).concat(n).concat(r),o=sf(a);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var i=Hg.newInstance();return i.setContext(t.context),i.getVertexShader().setSource(e),i.getFragmentShader().setSource(n),r&&i.getGeometryShader().setSource(r),i.setMd5Hash(o),t.shaderPrograms[o]=i,i}return t.shaderPrograms[o]},e.releaseGraphicsResources=function(n){e.releaseCurrentShader(),Object.keys(t.shaderPrograms).map((function(e){return t.shaderPrograms[e]})).forEach((function(e){return e.releaseGraphicsResources(n)}))},e.releaseGraphicsResources=function(){t.astShaderBound&&(t.lastShaderBound.release(),t.lastShaderBound=null)},e.bindShader=function(e){return t.lastShaderBound===e||(t.lastShaderBound&&t.lastShaderBound.release(),e.bind(),t.lastShaderBound=e),1}}var uf={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function df(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.assign(t,uf,n),t.shaderPrograms={},ln.c.obj(e,t),ln.c.setGet(e,t,cf),gf(e,t),Object.freeze(e)}var mf={newInstance:ln.c.newInstance(df,"vtkShaderCache"),extend:df},ff=ln.c.vtkErrorMacro;function pf(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),ln.c.obj(e,t),t.textureUnits=[],ln.c.get(e,t,["numberOfTextureUnits"]),ln.c.setGet(e,t,["context"]),pf(e,t)}var hf={newInstance:ln.c.newInstance(If,"vtkOpenGLTextureUnitManager"),extend:If},bf=ln.c.vtkDebugMacro,yf=ln.c.vtkErrorMacro,vf=-1!==navigator.userAgent.indexOf("Chrome");function Zf(e,t,n){var r=e.createFramebuffer(),a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texImage2D(e.TEXTURE_2D,0,t,2,2,0,t,n,null),e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0);var o=e.checkFramebufferStatus(e.FRAMEBUFFER);return e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null),o===e.FRAMEBUFFER_COMPLETE}var Af=0,Gf=[];function Sf(){Af++,Gf.forEach((function(e){return e(Af)}))}function Bf(){Af--,Gf.forEach((function(e){return e(Af)}))}function Vf(e,t){t.classHierarchy.push("vtkOpenGLRenderWindow");var n=[0,0];e.onModified((function(){t.renderable&&(t.size[0]===n[0]&&t.size[1]===n[1]||(n[0]=t.size[0],n[1]=t.size[1],t.canvas.setAttribute("width",t.size[0]),t.canvas.setAttribute("height",t.size[1]))),t.viewStream&&t.viewStream.setSize(t.size[0],t.size[1]),t.canvas.style.display=t.useOffScreen?"none":"block",t.el&&(t.el.style.cursor=t.cursorVisibility?t.cursor:"none"),t.containerSize=null})),e.buildPass=function(n){if(n){if(!t.renderable)return;e.prepareNodes(),e.addMissingNodes(t.renderable.getRenderersByReference()),e.removeUnusedNodes(),e.initialize(),t.children.forEach((function(t){t.setOpenGLRenderWindow(e)}))}},e.initialize=function(){if(!t.initialized){t.context=e.get3DContext(),t.textureUnitManager=hf.newInstance(),t.textureUnitManager.setContext(t.context),t.shaderCache.setContext(t.context);var n=t.context;n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE,n.ONE_MINUS_SRC_ALPHA),n.depthFunc(n.LEQUAL),n.enable(n.BLEND),t.initialized=!0}},e.makeCurrent=function(){t.context.makeCurrent()},e.setContainer=function(n){t.el&&t.el!==n&&(t.canvas.parentNode!==t.el&&yf("Error: canvas parent node does not match container"),t.el.removeChild(t.canvas),t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)),t.el!==n&&(t.el=n,t.el&&(t.el.appendChild(t.canvas),t.useBackgroundImage&&t.el.appendChild(t.bgImage)),e.modified())},e.getContainer=function(){return t.el},e.getContainerSize=function(){if(!t.containerSize&&t.el){var e=t.el.getBoundingClientRect(),n=e.width,r=e.height;t.containerSize=[n,r]}return t.containerSize||t.size},e.getFramebufferSize=function(){return t.activeFramebuffer?t.activeFramebuffer.getSize():t.size},e.isInViewport=function(t,n,r){var a=r.getViewportByReference(),o=e.getFramebufferSize();return a[0]*o[0]<=t&&a[2]*o[0]>=t&&a[1]*o[1]<=n&&a[3]*o[1]>=n},e.getViewportSize=function(t){var n=t.getViewportByReference(),r=e.getFramebufferSize();return[(n[2]-n[0])*r[0],(n[3]-n[1])*r[1]]},e.getViewportCenter=function(t){var n=e.getViewportSize(t);return[.5*n[0],.5*n[1]]},e.displayToNormalizedDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t/a[0],n/a[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var a=e.getFramebufferSize();return[t*a[0],n*a[1],r]},e.worldToView=function(e,t,n,r){return r.worldToView(e,t,n)},e.viewToWorld=function(e,t,n,r){return r.viewToWorld(e,t,n)},e.worldToDisplay=function(t,n,r,a){var o=a.worldToView(t,n,r),i=e.getViewportSize(a),l=a.viewToProjection(o[0],o[1],o[2],i[0]/i[1]),s=a.projectionToNormalizedDisplay(l[0],l[1],l[2]);return e.normalizedDisplayToDisplay(s[0],s[1],s[2])},e.displayToWorld=function(t,n,r,a){var o=e.displayToNormalizedDisplay(t,n,r),i=a.normalizedDisplayToProjection(o[0],o[1],o[2]),l=e.getViewportSize(a),s=a.projectionToView(i[0],i[1],i[2],l[0]/l[1]);return a.viewToWorld(s[0],s[1],s[2])},e.normalizedDisplayToViewport=function(t,n,r,a){var o=a.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var i=e.normalizedDisplayToDisplay(t,n,r);return[i[0]-o[0]-.5,i[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,a){var o=e.getViewportSize(a);return o&&0!==o[0]&&0!==o[1]?[t/(o[0]-1),n/(o[1]-1),r]:[t,n,r]},e.normalizedViewportToViewport=function(t,n,r){var a=e.getFramebufferSize();return[t*(a[0]-1),n*(a[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,a){var o=a.getViewportByReference(),i=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,l=n+o[1]+.5;return e.displayToNormalizedDisplay(i,l,r)},e.getPixelData=function(e,n,r,a){var o=new Uint8Array((r-e+1)*(a-n+1)*4);return t.context.readPixels(e,n,r-e+1,a-n+1,t.context.RGBA,t.context.UNSIGNED_BYTE,o),o},e.get3DContext=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,a="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&a&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bf("using webgl2")),r||(bf("using webgl1"),r=t.canvas.getContext("webgl",n)||t.canvas.getContext("experimental-webgl",n)),navigator.getVRDisplays&&navigator.getVRDisplays().then((function(n){n.length>0&&(t.vrDisplay=n[0],t.vrDisplay.depthNear=.01,t.vrDisplay.depthFar=100,e.invokeHaveVRDisplay())})),t.canvas.addEventListener("webglcontextlost",(function(e){e.preventDefault()}),!1),t.canvas.addEventListener("webglcontextrestored",e.restoreContext,!1),r},e.startVR=function(){t.oldCanvasSize=t.size.slice(),t.vrDisplay.capabilities.canPresent?t.vrDisplay.requestPresent([{source:t.canvas}]).then((function(){if(t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&t.hideCanvasInVR&&(t.el.style.display="none"),t.queryVRSize){var n=t.vrDisplay.getEyeParameters("left"),r=t.vrDisplay.getEyeParameters("right"),a=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(a,o)}else e.setSize(t.vrResolution);t.renderable.getRenderers()[0].resetCamera(),t.vrFrameData=new VRFrameData,t.renderable.getInteractor().switchToVRAnimation(),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),vf&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):yf("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,Object(Ao.a)(t.oldCanvasSize)),t.el&&t.vrDisplay.capabilities.hasExternalDisplay&&(t.el.style.display="block");var n=t.renderable.getRenderers()[0];n.getActiveCamera().setProjectionMatrix(null),n.setViewport(0,0,1,1),e.traverseAllPasses()},e.vrRender=function(){if(t.vrDisplay.isPresenting){t.renderable.getInteractor().updateGamepads(t.vrDisplay.displayId),t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender),t.vrDisplay.getFrameData(t.vrFrameData);var n=t.renderable.getRenderers()[0];n.setViewport(0,0,.5,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.leftViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.leftProjectionMatrix),e.traverseAllPasses(),n.setViewport(.5,0,1,1),n.getActiveCamera().computeViewParametersFromPhysicalMatrix(t.vrFrameData.rightViewMatrix),n.getActiveCamera().setProjectionMatrix(t.vrFrameData.rightProjectionMatrix),e.traverseAllPasses(),t.vrDisplay.submitFrame()}},e.restoreContext=function(){var t=fc.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t.textureResourceIds.get(n);if(void 0===r){var a=e.getTextureUnitManager().allocate();a<0?yf("Hardware does not support the number of textures defined."):(t.textureResourceIds.set(n,a),t.context.activeTexture(t.context.TEXTURE0+a))}else t.context.activeTexture(t.context.TEXTURE0+r)},e.deactivateTexture=function(n){var r=t.textureResourceIds.get(n);void 0!==r&&(e.getTextureUnitManager().free(r),t.textureResourceIds.delete(n))},e.getTextureUnitForTexture=function(e){var n=t.textureResourceIds.get(e);return void 0!==n?n:-1},e.getDefaultTextureInternalFormat=function(e,n,r){if(t.webgl2)switch(e){case cn.b.UNSIGNED_CHAR:switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;case 4:default:return t.context.RGBA8}default:case cn.b.FLOAT:switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;case 4:default:return t.context.RGBA16F}}switch(n){case 1:return t.context.LUMINANCE;case 2:return t.context.LUMINANCE_ALPHA;case 3:return t.context.RGB;case 4:default:return t.context.RGBA}},e.setBackgroundImage=function(e){t.bgImage.src=e.src},e.setUseBackgroundImage=function(e){t.useBackgroundImage=e,t.useBackgroundImage&&!t.el.contains(t.bgImage)?t.el.appendChild(t.bgImage):!t.useBackgroundImage&&t.el.contains(t.bgImage)&&t.el.removeChild(t.bgImage)},e.captureNextImage=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"image/png";if(t.deleted)return null;t.imageFormat=n;var r=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,new Promise((function(n,a){var o=e.onImageReady((function(e){t.notifyStartCaptureImage=r,o.unsubscribe(),n(e)}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),o=n.getExtension("OES_texture_half_float"),i=n.getExtension("WEBGL_debug_renderer_info"),l=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),c=[["Max Vertex Attributes","MAX_VERTEX_ATTRIBS",n.getParameter(n.MAX_VERTEX_ATTRIBS)],["Max Varying Vectors","MAX_VARYING_VECTORS",n.getParameter(n.MAX_VARYING_VECTORS)],["Max Vertex Uniform Vectors","MAX_VERTEX_UNIFORM_VECTORS",n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS)],["Max Fragment Uniform Vectors","MAX_FRAGMENT_UNIFORM_VECTORS",n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS)],["Max Fragment Texture Image Units","MAX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)],["Max Vertex Texture Image Units","MAX_VERTEX_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS)],["Max Combined Texture Image Units","MAX_COMBINED_TEXTURE_IMAGE_UNITS",n.getParameter(n.MAX_COMBINED_TEXTURE_IMAGE_UNITS)],["Max 2D Texture Size","MAX_TEXTURE_SIZE",n.getParameter(n.MAX_TEXTURE_SIZE)],["Max Cube Texture Size","MAX_CUBE_MAP_TEXTURE_SIZE",n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE)],["Max Texture Anisotropy","MAX_TEXTURE_MAX_ANISOTROPY_EXT",s&&n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT)],["Point Size Range","ALIASED_POINT_SIZE_RANGE",n.getParameter(n.ALIASED_POINT_SIZE_RANGE).join(" - ")],["Line Width Range","ALIASED_LINE_WIDTH_RANGE",n.getParameter(n.ALIASED_LINE_WIDTH_RANGE).join(" - ")],["Max Viewport Dimensions","MAX_VIEWPORT_DIMS",n.getParameter(n.MAX_VIEWPORT_DIMS).join(" - ")],["Max Renderbuffer Size","MAX_RENDERBUFFER_SIZE",n.getParameter(n.MAX_RENDERBUFFER_SIZE)],["Framebuffer Red Bits","RED_BITS",n.getParameter(n.RED_BITS)],["Framebuffer Green Bits","GREEN_BITS",n.getParameter(n.GREEN_BITS)],["Framebuffer Blue Bits","BLUE_BITS",n.getParameter(n.BLUE_BITS)],["Framebuffer Alpha Bits","ALPHA_BITS",n.getParameter(n.ALPHA_BITS)],["Framebuffer Depth Bits","DEPTH_BITS",n.getParameter(n.DEPTH_BITS)],["Framebuffer Stencil Bits","STENCIL_BITS",n.getParameter(n.STENCIL_BITS)],["Framebuffer Subpixel Bits","SUBPIXEL_BITS",n.getParameter(n.SUBPIXEL_BITS)],["MSAA Samples","SAMPLES",n.getParameter(n.SAMPLES)],["MSAA Sample Buffers","SAMPLE_BUFFERS",n.getParameter(n.SAMPLE_BUFFERS)],["Supported Formats for UByte Render Targets ","UNSIGNED_BYTE RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&Zf(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[o&&Zf(n,n.RGBA,o.HALF_FLOAT_OES)?"RGBA":"",o&&Zf(n,n.RGB,o.HALF_FLOAT_OES)?"RGB":"",o&&Zf(n,n.LUMINANCE,o.HALF_FLOAT_OES)?"LUMINANCE":"",o&&Zf(n,n.ALPHA,o.HALF_FLOAT_OES)?"ALPHA":"",o&&Zf(n,n.LUMINANCE_ALPHA,o.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&Zf(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&Zf(n,n.RGB,n.FLOAT)?"RGB":"",r&&Zf(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&Zf(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&Zf(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",l?n.getParameter(l.MAX_DRAW_BUFFERS_WEBGL):0],["High Float Precision in Vertex Shader","HIGH_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Vertex Shader","MEDIUM_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Vertex Shader","LOW_FLOAT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Float Precision in Fragment Shader","HIGH_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).rangeMax,")"].join("")],["Medium Float Precision in Fragment Shader","MEDIUM_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).rangeMax,")"].join("")],["Low Float Precision in Fragment Shader","LOW_FLOAT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_FLOAT).rangeMax,")"].join("")],["High Int Precision in Vertex Shader","HIGH_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Vertex Shader","MEDIUM_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Vertex Shader","LOW_INT VERTEX_SHADER",[n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.LOW_INT).rangeMax,")"].join("")],["High Int Precision in Fragment Shader","HIGH_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_INT).rangeMax,")"].join("")],["Medium Int Precision in Fragment Shader","MEDIUM_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_INT).rangeMax,")"].join("")],["Low Int Precision in Fragment Shader","LOW_INT FRAGMENT_SHADER",[n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).precision," (-2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMin," - 2",n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.LOW_INT).rangeMax,")"].join("")],["Supported Extensions","EXTENSIONS",n.getSupportedExtensions().join("
\t\t\t\t\t ")],["WebGL Renderer","RENDERER",n.getParameter(n.RENDERER)],["WebGL Vendor","VENDOR",n.getParameter(n.VENDOR)],["WebGL Version","VERSION",n.getParameter(n.VERSION)],["Shading Language Version","SHADING_LANGUAGE_VERSION",n.getParameter(n.SHADING_LANGUAGE_VERSION)],["Unmasked Renderer","UNMASKED_RENDERER",i&&n.getParameter(i.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",i&&n.getParameter(i.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],g={};c.length;){var u=c.pop(),d=Object(a.a)(u,3),m=d[0],f=d[1],p=d[2];f&&(g[f]={label:m,value:p})}return g},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),a=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,a.drawImage(t.canvas,0,0);var o=t.canvas.getBoundingClientRect();t.renderable.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rf,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",Sf(),t.bgImage=new Image,t.bgImage.style.position="absolute",t.bgImage.style.left="0",t.bgImage.style.top="0",t.bgImage.style.width="100%",t.bgImage.style.height="100%",t.bgImage.style.zIndex="-1",t.textureResourceIds=new Map,_s.extend(e,t,n),t.myFactory=lf.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",kf),t.shaderCache=mf.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hc.newInstance(),ln.c.event(e,t,"imageReady"),ln.c.event(e,t,"haveVRDisplay"),ln.c.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),ln.c.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),ln.c.setGetArray(e,t,["size","vrResolution"],2),Vf(e,t)}var kf=ln.c.newInstance(wf,"vtkOpenGLRenderWindow");Os("WebGL",kf);var Wf={newInstance:kf,extend:wf,pushMonitorGLContextCount:function(e){Gf.push(e)},popMonitorGLContextCount:function(e){return Gf.pop()}},xf={Device:{Unknown:0,LeftController:1,RightController:2},Input:{Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4}};function Tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,i=n?"addEventListener":"removeEventListener",l=n?"removeEventListener":"addEventListener";!a&&!n&&r>0&&--r,r&&!a||(r=0,t.container&&t.container[l]("mousemove",e.handleMouseMove),o[i]("mouseup",e.handleMouseUp),o[i]("mousemove",e.handleMouseMove),o[i]("touchend",e.handleTouchEnd,!1),o[i]("touchcancel",e.handleTouchEnd,!1),o[i]("touchmove",e.handleTouchMove,!1)),!a&&n&&++r}function g(){t.view&&t.enabled&&t.enableRender&&(t.inRender=!0,t.view.traverseAllPasses(),t.inRender=!1),e.invokeRenderEvent()}e.start=function(){(t.initialized||(e.initialize(),t.initialized))&&e.startEventLoop()},e.setRenderWindow=function(e){Hf("you want to call setView(view) instead of setRenderWindow on a vtk.js interactor")},e.setInteractorStyle=function(n){t.interactorStyle!==n&&(null!=t.interactorStyle&&t.interactorStyle.setInteractor(null),t.interactorStyle=n,null!=t.interactorStyle&&t.interactorStyle.getInteractor()!==e&&t.interactorStyle.setInteractor(e))},e.initialize=function(){t.initialized=!0,e.enable(),e.render()},e.enable=function(){return e.setEnabled(!0)},e.disable=function(){return e.setEnabled(!1)},e.startEventLoop=function(){return Nf("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||a(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Mf),n.addEventListener("wheel",e.handleWheel),n.addEventListener("DOMMouseScroll",e.handleWheel),n.addEventListener("mouseenter",e.handleMouseEnter),n.addEventListener("mouseleave",e.handleMouseLeave),n.addEventListener("mousemove",e.handleMouseMove),n.addEventListener("mousedown",e.handleMouseDown),document.querySelector("body").addEventListener("keypress",e.handleKeyPress),document.querySelector("body").addEventListener("keydown",e.handleKeyDown),document.querySelector("body").addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){c(!1,!0),t.container.removeEventListener("contextmenu",Mf),t.container.removeEventListener("wheel",e.handleWheel),t.container.removeEventListener("DOMMouseScroll",e.handleWheel),t.container.removeEventListener("mouseenter",e.handleMouseEnter),t.container.removeEventListener("mouseleave",e.handleMouseLeave),t.container.removeEventListener("mousemove",e.handleMouseMove),t.container.removeEventListener("mousedown",e.handleMouseDown),document.querySelector("body").removeEventListener("keypress",e.handleKeyPress),document.querySelector("body").removeEventListener("keydown",e.handleKeyDown),document.querySelector("body").removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=s(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=s(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=s(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){c(!0),t.stopPropagation(),t.preventDefault();var n=Jf(Jf({},l(t)),{},{position:o(t)});switch(t.button){case 0:e.leftButtonPressEvent(n);break;case 1:e.middleButtonPressEvent(n);break;case 2:e.rightButtonPressEvent(n);break;default:Hf("Unknown mouse button pressed: ".concat(t.button))}}},e.requestPointerLock=function(){e.getView().getCanvas().requestPointerLock()},e.exitPointerLock=function(){return document.exitPointerLock()},e.isPointerLocked=function(){return!!document.pointerLockElement},e.handlePointerLockChange=function(){e.isPointerLocked()?e.startPointerLockEvent():e.endPointerLockEvent()},e.requestAnimation=function(r){void 0!==r?n.has(r)?Nf("requester is already registered for animating"):(n.add(r),1===n.size&&(t.lastFrameTime=.1,t.lastFrameStart=Date.now(),t.animationRequest=requestAnimationFrame(e.handleAnimation),e.startAnimationEvent())):Hf("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n.has(r))n.delete(r),t.animationRequest&&0===n.size&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null,e.endAnimationEvent(),e.render());else if(!a){var o=r&&r.getClassName?r.getClassName():r;Nf("".concat(o," did not request an animation"))}},e.switchToVRAnimation=function(){t.animationRequest&&(cancelAnimationFrame(t.animationRequest),t.animationRequest=null),t.vrAnimation=!0},e.returnFromVRAnimation=function(){t.vrAnimation=!1,0!==n.size&&(t.FrameTime=-1,t.animationRequest=requestAnimationFrame(e.handleAnimation))},e.updateGamepads=function(n){for(var r=navigator.getGamepads(),a=0;a1){var r=i(n.touches);if(2===n.touches.length){var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(a)}e.recognizeGesture("TouchStart",r)}else{var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}},e.handleTouchMove=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures&&n.touches.length>1){var r=i(n.touches);e.recognizeGesture("TouchMove",r)}else{var a={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(a)}},e.handleTouchEnd=function(n){if(n.stopPropagation(),n.preventDefault(),t.recognizeGestures)if(0===n.touches.length)if(1===n.changedTouches.length){var r={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(r),c(!1)}else{var a=i(n.changedTouches);e.recognizeGesture("TouchEnd",a),c(!1)}else if(1===n.touches.length){var l=i(n.changedTouches);e.recognizeGesture("TouchEnd",l);var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}else{var g=i(n.touches);e.recognizeGesture("TouchMove",g)}else{var u={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(u),c(!1)}},e.setView=function(n){t.view!==n&&(t.view=n,t.view.getRenderable().setInteractor(e),e.modified())},e.getFirstRenderer=function(){return t.view.getRenderable().getRenderersByReference()[0]},e.findPokedRenderer=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!t.view)return null;var r=t.view.getRenderable().getRenderers();r.sort((function(e,t){return e.getLayer()-t.getLayer()}));for(var a=null,o=null,i=null,l=r.length;l--;){var s=r[l];if(t.view.isInViewport(e,n,s)&&s.getInteractive()){i=s;break}null===a&&s.getInteractive()&&(a=s),null===o&&t.view.isInViewport(e,n,s)&&(o=s)}return null===i&&(i=a),null===i&&(i=o),null==i&&(i=r[0]),i},e.render=function(){null!==t.animationRequest||t.inRender||g()},Kf.forEach((function(n){var r=n.charAt(0).toLowerCase()+n.slice(1);e["".concat(r,"Event")]=function(r){if(t.enabled)if(e.getCurrentRenderer()){var a=Jf({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](a)}else Ff("\n Can not forward events without a current renderer on the interactor.\n ")}})),e.recognizeGesture=function(n,r){if(!(Object.keys(r).length>2)){if(t.startingEventPositions||(t.startingEventPositions={}),"TouchStart"===n)return Object.keys(r).forEach((function(e){t.startingEventPositions[e]=r[e]})),void(t.currentGesture="Start");if("TouchEnd"===n)return"Pinch"===t.currentGesture&&(e.render(),e.endPinchEvent()),"Rotate"===t.currentGesture&&(e.render(),e.endRotateEvent()),"Pan"===t.currentGesture&&(e.render(),e.endPanEvent()),t.currentGesture="Start",void(t.startingEventPositions={});var a=0,o=[],i=[];Object.keys(r).forEach((function(e){o[a]=r[e],i[a]=t.startingEventPositions[e],a++}));var l=Math.sqrt((i[0].x-i[1].x)*(i[0].x-i[1].x)+(i[0].y-i[1].y)*(i[0].y-i[1].y)),s=Math.sqrt((o[0].x-o[1].x)*(o[0].x-o[1].x)+(o[0].y-o[1].y)*(o[0].y-o[1].y)),c=Object(Xo.F)(Math.atan2(i[1].y-i[0].y,i[1].x-i[0].x)),g=Object(Xo.F)(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),u=g-c;g=g+180>=360?g-180:g+180,c=c+180>=360?c-180:c+180,Math.abs(g-c)m&&f>p&&f>C){t.currentGesture="Pinch";var I={scale:1,touches:r};e.startPinchEvent(I)}else if(p>m&&p>C){t.currentGesture="Rotate";var h={rotation:0,touches:r};e.startRotateEvent(h)}else if(C>m){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var y={rotation:u,touches:r};e.rotateEvent(y)}if("Pinch"===t.currentGesture){var v={scale:s/l,touches:r};e.pinchEvent(v)}if("Pan"===t.currentGesture){var Z={translation:d,touches:r};e.panEvent(Z)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()};var u=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),u()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Df={renderWindow:null,interactorStyle:null,picker:null,pickingManager:null,initialized:!1,enabled:!1,enableRender:!0,currentRenderer:null,lightFollowCamera:!0,desiredUpdateRate:30,stillUpdateRate:2,container:null,view:null,recognizeGestures:!0,currentGesture:"Start",animationRequest:null,lastFrameTime:.1,wheelTimeoutID:0,moveTimeoutID:0,lastGamepadValues:{}};function Ef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Df,n),ln.c.obj(e,t),ln.c.event(e,t,"RenderEvent"),Kf.forEach((function(n){return ln.c.event(e,t,n)})),ln.c.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),ln.c.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Lf(e,t)}var Uf=Jf({newInstance:ln.c.newInstance(Ef,"vtkRenderWindowInteractor"),extend:Ef,handledEvents:Kf},xf),zf=ln.c.vtkDebugMacro;function _f(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),a=new Float64Array([0,1,0]),o=Object(Yo.h)(new Float64Array(16)),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3),c=Object(Yo.h)(new Float64Array(16)),g=Object(Yo.h)(new Float64Array(16)),u=new Float64Array(3),d=new Float64Array(3);function m(){t.viewPlaneNormal[0]=-t.directionOfProjection[0],t.viewPlaneNormal[1]=-t.directionOfProjection[1],t.viewPlaneNormal[2]=-t.directionOfProjection[2]}e.orthogonalizeViewUp=function(){var n=e.getViewMatrix();t.viewUp[0]=n[4],t.viewUp[1]=n[5],t.viewUp[2]=n[6],e.modified()},e.setPosition=function(n,r,a){n===t.position[0]&&r===t.position[1]&&a===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=a,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,a){n===t.focalPoint[0]&&r===t.focalPoint[1]&&a===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=a,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,zf("Distance is set to minimum."));var r=t.directionOfProjection;t.focalPoint[0]=t.position[0]+r[0]*t.distance,t.focalPoint[1]=t.position[1]+r[1]*t.distance,t.focalPoint[2]=t.position[2]+r[2]*t.distance,e.modified()}},e.computeDistance=function(){var e=t.focalPoint[0]-t.position[0],n=t.focalPoint[1]-t.position[1],r=t.focalPoint[2]-t.position[2];if(t.distance=Math.sqrt(e*e+n*n+r*r),t.distance<1e-20){t.distance=1e-20,zf("Distance is set to minimum.");var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,m()},e.dolly=function(n){if(!(n<=0)){var r=t.distance/n;e.setPosition(t.focalPoint[0]-r*t.directionOfProjection[0],t.focalPoint[1]-r*t.directionOfProjection[1],t.focalPoint[2]-r*t.directionOfProjection[2])}},e.roll=function(n){var r=t.position,a=t.focalPoint,o=t.viewUp,i=new Float64Array([o[0],o[1],o[2],0]);Object(Yo.h)(c);var l=new Float64Array([a[0]-r[0],a[1]-r[1],a[2]-r[2]]);Object(Yo.q)(c,c,Object(Xo.B)(n),l),bg(i,i,c),t.viewUp[0]=i[0],t.viewUp[1]=i[1],t.viewUp[2]=i[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.yaw=function(n){var r=t.position;Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),t.viewUp),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint(d[0],d[1],d[2])},e.elevation=function(n){var r=t.focalPoint,a=e.getViewMatrix(),o=[-a[0],-a[1],-a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(u,t.position,g),e.setPosition(u[0],u[1],u[2])},e.pitch=function(n){var r=t.position,a=e.getViewMatrix(),o=[a[0],a[1],a[2]];Object(Yo.h)(g),Object(Yo.s)(g,g,r),Object(Yo.q)(g,g,Object(Xo.B)(n),o),Object(Yo.s)(g,g,[-r[0],-r[1],-r[2]]),Object(Fo.q)(d,t.focalPoint,g),e.setFocalPoint.apply(e,Object(Ao.a)(d))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,a){var o=[n,r,a];Object(Xo.x)(t.position,o,t.position),Object(Xo.x)(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(Object(Ao.a)(t.viewUp),[1]),a=[],o=[],i=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],bg(a,[].concat(Object(Ao.a)(t.position),[1]),n),bg(o,[].concat(Object(Ao.a)(t.focalPoint),[1]),n),bg(i,r,n),i[0]-=a[0],i[1]-=a[1],i[2]-=a[2],e.setPosition.apply(e,Object(Ao.a)(a.slice(0,3))),e.setFocalPoint.apply(e,Object(Ao.a)(o.slice(0,3))),e.setViewUp.apply(e,Object(Ao.a)(i.slice(0,3)))},e.getThickness=function(){return t.clippingRange[1]-t.clippingRange[0]},e.setThickness=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.clippingRange[0],t.clippingRange[0]+r)},e.setThicknessFromFocalPoint=function(n){var r=n;r<1e-20&&(r=1e-20,zf("Thickness is set to minimum.")),e.setClippingRange(t.distance-r/2,t.distance+r/2)},e.setRoll=function(e){},e.getRoll=function(){},e.setObliqueAngles=function(e,t){},e.getOrientation=function(){},e.getOrientationWXYZ=function(){},e.getFrustumPlanes=function(e){},e.getCameraLightTransformMatrix=function(){},e.deepCopy=function(e){},e.physicalOrientationToWorldDirection=function(e){var t,n,r=Ag(e[0],e[1],e[2],e[3]),a=yg(),o=Ag(0,0,1,0);return n=r,(t=a)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Zg(o,r,o),Zg(o,o,a),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Object(Yo.g)(t,t)},e.getWorldToPhysicalMatrix=function(e){Object(Yo.h)(e);var n=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,n),e[0]=n[0],e[1]=n[1],e[2]=n[2],e[4]=t.physicalViewUp[0],e[5]=t.physicalViewUp[1],e[6]=t.physicalViewUp[2],e[8]=-t.physicalViewNorth[0],e[9]=-t.physicalViewNorth[1],e[10]=-t.physicalViewNorth[2],Object(Yo.i)(e,e),Object(Fo.p)(i,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Object(Yo.r)(e,e,i),Object(Yo.s)(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(c){Object(Yo.g)(o,c),Object(Fo.q)(i,n,o),e.computeDistance();var g=t.distance;e.setPosition(i[0],i[1],i[2]),Object(Fo.q)(l,r,o),Object(Fo.a)(l,l,i),Object(Fo.l)(l,l),e.setDirectionOfProjection(l[0],l[1],l[2]),Object(Fo.q)(s,a,o),Object(Fo.a)(s,s,i),Object(Fo.l)(s,s),e.setViewUp(s[0],s[1],s[2]),e.setDistance(g)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Object(Yo.l)(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Object(Yo.d)(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Object(Yo.i)(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;Object(Yo.k)(o,t.position,t.focalPoint,t.viewUp),Object(Yo.i)(o,o);var e=new Float64Array(16);return Object(Yo.d)(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var a=new Float64Array(16);if(Object(Yo.h)(a),t.projectionMatrix){var l=1/t.physicalScale;return Object(Fo.p)(i,l,l,l),Object(Yo.d)(a,t.projectionMatrix),Object(Yo.r)(a,a,i),Object(Yo.i)(a,a),a}Object(Yo.h)(o);var s=t.clippingRange[1]-t.clippingRange[0],c=[t.clippingRange[0]+(n+1)*s/2,t.clippingRange[0]+(r+1)*s/2];if(t.parallelProjection){var g=t.parallelScale*e,u=t.parallelScale,d=(t.windowCenter[0]-1)*g,m=(t.windowCenter[0]+1)*g,f=(t.windowCenter[1]-1)*u,p=(t.windowCenter[1]+1)*u;Object(Yo.n)(o,d,m,f,p,c[0],c[1]),Object(Yo.i)(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var C,I,h=Math.tan(Object(Xo.B)(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(C=t.clippingRange[0]*h,I=t.clippingRange[0]*h/e):(C=t.clippingRange[0]*h*e,I=t.clippingRange[0]*h);var b=(t.windowCenter[0]-1)*C,y=(t.windowCenter[0]+1)*C,v=(t.windowCenter[1]-1)*I,Z=(t.windowCenter[1]+1)*I,A=c[0],G=c[1];o[0]=2*A/(y-b),o[5]=2*A/(Z-v),o[2]=(b+y)/(y-b),o[6]=(v+Z)/(Z-v),o[10]=-(A+G)/(G-A),o[14]=-1,o[11]=-2*A*G/(G-A),o[15]=0}return Object(Yo.d)(a,o),a},e.getCompositeProjectionMatrix=function(t,n,r){var a=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Object(Yo.l)(o,a,o),o},e.setDirectionOfProjection=function(e,n,r){if(t.directionOfProjection[0]!==e||t.directionOfProjection[1]!==n||t.directionOfProjection[2]!==r){t.directionOfProjection[0]=e,t.directionOfProjection[1]=n,t.directionOfProjection[2]=r;var a=t.directionOfProjection;t.focalPoint[0]=t.position[0]+a[0]*t.distance,t.focalPoint[1]=t.position[1]+a[1]*t.distance,t.focalPoint[2]=t.position[2]+a[2]*t.distance,m()}},e.setDeviceAngles=function(n,r,a,o){var i=[3];Object(Xo.w)(t.physicalViewNorth,t.physicalViewUp,i);var l=Object(Yo.h)(new Float64Array(16));Object(Yo.q)(l,l,Object(Xo.B)(n),t.physicalViewUp),Object(Yo.q)(l,l,Object(Xo.B)(r),i),Object(Yo.q)(l,l,Object(Xo.B)(a),t.physicalViewNorth),Object(Yo.q)(l,l,Object(Xo.B)(-o),t.physicalViewUp);var s=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),c=new Float64Array(t.physicalViewNorth);Object(Fo.q)(s,s,l),Object(Fo.q)(c,c,l),e.setDirectionOfProjection(s[0],s[1],s[2]),e.setViewUp(c[0],c[1],c[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,a){var o=Object(Yo.h)(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==a)){var i=Object(Xo.B)(t),l=yg();vg(l,[n,r,a],i),Object(Yo.j)(o,l)}var s=new Float64Array(3);Object(Fo.q)(s,[0,0,-1],o);var c=new Float64Array(3);Object(Fo.q)(c,[0,1,0],o),e.setDirectionOfProjection.apply(e,Object(Ao.a)(s)),e.setViewUp.apply(e,Object(Ao.a)(c)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var a=-n[0],o=-n[1],i=-n[2],l=-(a*r[0]+o*r[1]+i*r[2]),s=[a*e[0]+o*e[2]+i*e[4]+l,1e-18],c=0;c<2;c++)for(var g=0;g<2;g++)for(var u=0;u<2;u++){var d=a*e[u]+o*e[2+g]+i*e[4+c]+l;s[0]=ds[1]?d:s[1]}return s}}var jf={position:[0,0,1],focalPoint:[0,0,0],viewUp:[0,1,0],directionOfProjection:[0,0,-1],parallelProjection:!1,useHorizontalViewAngle:!1,viewAngle:30,parallelScale:1,clippingRange:[.01,1000.01],windowCenter:[0,0],viewPlaneNormal:[0,0,1],useOffAxisProjection:!1,screenBottomLeft:[-.5,-.5,-.5],screenBottomRight:[.5,-.5,-.5],screenTopRight:[.5,.5,-.5],freezeFocalPoint:!1,projectionMatrix:null,viewMatrix:null,physicalTranslation:[0,0,0],physicalScale:1,physicalViewUp:[0,1,0],physicalViewNorth:[0,0,-1]};function Qf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jf,n),ln.c.obj(e,t),ln.c.get(e,t,["distance"]),ln.c.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),ln.c.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),ln.c.setGetArray(e,t,["clippingRange","windowCenter"],2),ln.c.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),_f(e,t)}var qf={newInstance:ln.c.newInstance(Qf,"vtkCamera"),extend:Qf};function $f(e,t){t.classHierarchy.push("vtkLight"),e.getTransformedPosition=function(){return t.transformMatrix?[]:[].concat(t.position)},e.getTransformedFocalPoint=function(){return t.transformMatrix?[]:[].concat(t.focalPoint)},e.getDirection=function(){return t.directionMTime2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ep,n),ln.c.obj(e,t),ln.c.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),ln.c.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),$f(e,t)}var np={newInstance:ln.c.newInstance(tp,"vtkLight"),extend:tp,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},rp=ln.c.vtkErrorMacro;function ap(e,t){function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.push(e);var r=e.getNestedProps();if(r&&r.length)for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,op,n),ln.c.obj(e,t),ln.c.event(e,t,"event"),ln.c.setGetArray(e,t,["viewport"],4),ln.c.setGetArray(e,t,["background","background2"],3),ap(e,t)}var lp={newInstance:ln.c.newInstance(ip,"vtkViewport"),extend:ip},sp=ln.l,cp=ln.m,gp=ln.n;function up(e){return function(){return cp("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function dp(e,t){for(t.classHierarchy.push("vtkRenderer"),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1);var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},a={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(sp("No cameras are on, creating one."),e.getActiveCameraAndResetIfCreated()),t.activeCamera.render(e),!0},e.updateLightsGeometryToFollowCamera=function(){var n=e.getActiveCameraAndResetIfCreated();t.lights.forEach((function(e){e.lightTypeIsSceneLight()||e.lightTypeIsCameraLight()||(e.lightTypeIsHeadLight()?(e.setPositionFrom(n.getPositionByReference()),e.setFocalPointFrom(n.getFocalPointByReference()),e.modified(n.getMTime())):cp("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=up("allocateTime"),e.updateGeometry=up("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){sp(e.getClassName(),e,"setting Layer to ",n),t.layer!==n&&(t.layer=n,e.modified()),e.setPreserveColorBuffer(!!n)},e.setActiveCamera=function(n){return t.activeCamera!==n&&(t.activeCamera=n,e.modified(),e.invokeEvent({type:"ActiveCameraEvent",camera:n}),!0)},e.makeCamera=function(){var t=qf.newInstance();return e.invokeEvent({type:"CreateCameraEvent",camera:t}),t},e.getActiveCamera=function(){return t.activeCamera||(t.activeCamera=e.makeCamera()),t.activeCamera},e.getActiveCameraAndResetIfCreated=function(){return t.activeCamera||(e.getActiveCamera(),e.resetCamera()),t.activeCamera},e.getActors=function(){return t.actors=[],t.props.forEach((function(e){t.actors=t.actors.concat(e.getActors())})),t.actors},e.addActor=e.addViewProp,e.removeActor=function(n){t.actors=t.actors.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllActors=function(){e.getActors().forEach((function(t){e.removeViewProp(t)})),t.actors=[],e.modified()},e.getVolumes=function(){return t.volumes=[],t.props.forEach((function(e){t.volumes=t.volumes.concat(e.getVolumes())})),t.volumes},e.addVolume=e.addViewProp,e.removeVolume=function(n){t.volumes=t.volumes.filter((function(e){return e!==n})),e.removeViewProp(n),e.modified()},e.removeAllVolumes=function(){e.getVolumes().forEach((function(t){e.removeViewProp(t)})),t.volumes=[],e.modified()},e.addLight=function(n){t.lights=[].concat(t.lights,n),e.modified()},e.removeLight=function(n){t.lights=t.lights.filter((function(e){return e!==n})),e.modified()},e.removeAllLights=function(){t.lights=[],e.modified()},e.setLightCollection=function(n){t.lights=n,e.modified()},e.makeLight=np.newInstance,e.createLight=function(){t.automaticLightCreation&&(t.createdLight&&(e.removeLight(t.createdLight),t.createdLight.delete(),t.createdLight=null),t.createdLight=e.makeLight(),e.addLight(t.createdLight),t.createdLight.setLightTypeToHeadLight(),t.createdLight.setPosition(e.getActiveCamera().getPosition()),t.createdLight.setFocalPoint(e.getActiveCamera().getFocalPoint()))},e.normalizedDisplayToWorld=function(t,n,r,a){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],a),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,a){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],a),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return cp("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.g)(a,a),Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.projectionToView=function(e,n,r,a){if(null===t.activeCamera)return cp("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.g)(o,o),Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.worldToView=function(e,n,r){if(null===t.activeCamera)return cp("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var a=t.activeCamera.getViewMatrix();Object(Yo.i)(a,a);var o=new Float64Array([e,n,r]);return Object(Fo.q)(o,o,a),o},e.viewToProjection=function(e,n,r,a){if(null===t.activeCamera)return cp("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(a,-1,1);Object(Yo.i)(o,o);var i=new Float64Array([e,n,r]);return Object(Fo.q)(i,i,o),i},e.computeVisiblePropBounds=function(){t.allBounds[0]=Ol.INIT_BOUNDS[0],t.allBounds[1]=Ol.INIT_BOUNDS[1],t.allBounds[2]=Ol.INIT_BOUNDS[2],t.allBounds[3]=Ol.INIT_BOUNDS[3],t.allBounds[4]=Ol.INIT_BOUNDS[4],t.allBounds[5]=Ol.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var a=0;at.allBounds[1]&&(t.allBounds[1]=i[1]),i[2]t.allBounds[3]&&(t.allBounds[3]=i[3]),i[4]t.allBounds[5]&&(t.allBounds[5]=i[5]))}}return r&&(Object(Xo.D)(t.allBounds),sp("Can't compute bounds, no 3D props are visible")),t.allBounds},e.resetCamera=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=n||e.computeVisiblePropBounds(),o=[0,0,0];if(!Object(Xo.l)(r))return sp("Cannot reset camera!"),!1;var i=null;if(!e.getActiveCamera())return cp("Trying to reset non-existent camera"),!1;i=t.activeCamera.getViewPlaneNormal(),t.activeCamera.setViewAngle(30),o[0]=(r[0]+r[1])/2,o[1]=(r[2]+r[3])/2,o[2]=(r[4]+r[5])/2;var l=r[1]-r[0],s=r[3]-r[2],c=r[5]-r[4],g=(l*=l)+(s*=s)+(c*=c);g=0===g?1:g,g=.5*Math.sqrt(g);var u=Object(Xo.B)(t.activeCamera.getViewAngle()),d=g,m=g/Math.sin(.5*u),f=t.activeCamera.getViewUp();return Math.abs(Object(Xo.q)(f,i))>.999&&(gp("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-f[2],f[0],f[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+m*i[0],o[1]+m*i[1],o[2]+m*i[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(d),t.activeCamera.setPhysicalScale(g),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(a),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=n||e.computeVisiblePropBounds();if(!Object(Xo.l)(a))return sp("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return cp("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(a),i=0;if(t.activeCamera.getParallelProjection())i=.1*t.activeCamera.getParallelScale();else{var l=Object(Xo.B)(t.activeCamera.getViewAngle());i=.2*Math.tan(l/2)*o[1]}return o[1]-o[0]=o[1]?.01*o[1]:o[0],t.nearClippingPlaneTolerance||(t.nearClippingPlaneTolerance=.01),o[0]e&&(e=n);var r=t.createdLight?t.createdLight.getMTime():0;return r>e&&(e=r),e},e.getTransparent=function(){return!!t.preserveColorBuffer},e.isActiveCameraCreated=function(){return!!t.activeCamera}}var mp={pickedProp:null,activeCamera:null,allBounds:[],ambient:[1,1,1],allocatedRenderTime:100,timeFactor:1,createdLight:null,automaticLightCreation:!0,twoSidedLighting:!0,lastRenderTimeInSeconds:-1,renderWindow:null,lights:[],actors:[],volumes:[],lightFollowCamera:!0,numberOfPropsRendered:0,propArray:null,pathArray:null,layer:0,preserveColorBuffer:!1,preserveDepthBuffer:!1,computeVisiblePropBounds:Object(Xo.j)(),interactive:!0,nearClippingPlaneTolerance:0,clippingRangeExpansion:.05,erase:!0,draw:!0,useShadows:!1,useDepthPeeling:!1,occlusionRatio:0,maximumNumberOfPeels:4,selector:null,delegate:null,texturedBackground:!1,backgroundTexture:null,pass:0};function fp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mp,n),lp.extend(e,t,n),Object(ln.e)(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Object(ln.j)(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Object(ln.f)(e,t,["actors","volumes","lights"]),Object(ln.k)(e,t,["background"],4,1),dp(e,t)}var pp={newInstance:Object(ln.g)(fp,"vtkRenderer"),extend:fp};function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),ln.c.obj(e,t),ln.c.event(e,t,"InteractionEvent"),ln.c.event(e,t,"StartInteractionEvent"),ln.c.event(e,t,"EndInteractionEvent"),ln.c.get(e,t,["interactor","enabled"]),ln.c.setGet(e,t,["priority","processEvents"]),yp(e,t)}var Ap=Ip({newInstance:ln.c.newInstance(Zp,"vtkInteractorObserver"),extend:Zp},{computeWorldToDisplay:function(e,t,n,r){return e.getRenderWindow().getViews()[0].worldToDisplay(t,n,r,e)},computeDisplayToWorld:function(e,t,n,r){return e.getRenderWindow().getViews()[0].displayToWorld(t,n,r,e)}}),Gp={States:{IS_START:0,IS_NONE:0,IS_ROTATE:1,IS_PAN:2,IS_SPIN:3,IS_DOLLY:4,IS_CAMERA_POSE:11,IS_WINDOW_LEVEL:1024,IS_SLICE:1025}};function Sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Bp=Gp.States,Vp={Rotate:Bp.IS_ROTATE,Pan:Bp.IS_PAN,Spin:Bp.IS_SPIN,Dolly:Bp.IS_DOLLY,CameraPose:Bp.IS_CAMERA_POSE,WindowLevel:Bp.IS_WINDOW_LEVEL,Slice:Bp.IS_SLICE};function Rp(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Vp).forEach((function(n){ln.c.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===Bp.IS_NONE&&(t.state=Vp[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},ln.c.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Vp[n]&&(t.state=Bp.IS_NONE,t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent({type:"EndInteractionEvent"}),e["invokeEnd".concat(n,"Event")]({type:"End".concat(n,"Event")}),t.interactor.render())}})),e.handleKeyPress=function(e){var n=t.interactor;switch(e.key){case"r":case"R":e.pokedRenderer.resetCamera(),n.render();break;case"w":case"W":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToWireframe&&t.setRepresentationToWireframe()})),n.render();break;case"s":case"S":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToSurface&&t.setRepresentationToSurface()})),n.render();break;case"v":case"V":e.pokedRenderer.getActors().forEach((function(e){var t=e.getProperty();t.setRepresentationToPoints&&t.setRepresentationToPoints()})),n.render()}}}var wp={state:Bp.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function kp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wp,n),Ap.extend(e,t,n),Rp(e,t)}var Wp=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pp,n),Wp.extend(e,t,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),ln.c.setGetArray(e,t,["centerOfRotation"],3),Fp(e,t)}var Mp=function(e){for(var t=1;te&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Lp("pick"),e.hasKey=Lp("hasKey"),e.getRedrawMTime=function(){return t.mtime},e.setEstimatedRenderTime=function(e){t.estimatedRenderTime=e,t.savedEstimatedRenderTime=e},e.restoreEstimatedRenderTime=function(){t.estimatedRenderTime=t.savedEstimatedRenderTime},e.addEstimatedRenderTime=function(e){t.estimatedRenderTime+=e},e.setAllocatedRenderTime=function(e){t.allocatedRenderTime=e,t.savedEstimatedRenderTime=t.estimatedRenderTime,t.estimatedRenderTime=0},e.getSupportsSelection=function(){return!1},e.getTextures=function(){return t.textures},e.hasTexture=function(e){return-1!==t.textures.indexOf(e)},e.addTexture=function(n){n&&!e.hasTexture(n)&&(t.textures=t.textures.concat(n),e.modified())},e.removeTexture=function(n){var r=t.textures.filter((function(e){return e!==n}));t.textures.length!==r.length&&(t.textures=r,e.modified())},e.removeAllTextures=function(){t.textures=[],e.modified()}}var Ep={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ep,n),ln.c.obj(e,t),ln.c.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),ln.c.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Dp(e,t)}var zp={newInstance:ln.c.newInstance(Up,"vtkProp"),extend:Up};function _p(e,t){t.classHierarchy.push("vtkProp3D"),e.addPosition=function(n){t.position=t.position.map((function(e,t){return e+n[t]})),e.modified()},e.getOrientationWXYZ=function(){var e=yg();Object(Yo.m)(e,t.rotation);var n=new Float64Array(3),r=function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ml.b?(e[0]=t[0]/r,e[1]=t[1]/r,e[2]=t[2]/r):(e[0]=1,e[1]=0,e[2]=0),n}(n,e);return[Object(Xo.F)(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Object(Yo.a)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateY=function(n){0!==n&&(Object(Yo.b)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Object(Yo.c)(t.rotation,t.rotation,Object(Xo.B)(n)),e.modified())},e.rotateWXYZ=function(n,r,a,o){if(0!==n&&(0!==r||0!==a||0!==o)){var i=Object(Xo.B)(n),l=yg();vg(l,[r,a,o],i);var s=new Float64Array(16);Object(Yo.j)(s,l),Object(Yo.l)(t.rotation,t.rotation,s),e.modified()}},e.setOrientation=function(n,r,a){return(n!==t.orientation[0]||r!==t.orientation[1]||a!==t.orientation[2])&&(t.orientation=[n,r,a],Object(Yo.h)(t.rotation),e.rotateZ(a),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Object(Yo.d)(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Object(Yo.h)(t.matrix),t.userMatrix&&Object(Yo.l)(t.matrix,t.matrix,t.userMatrix),Object(Yo.s)(t.matrix,t.matrix,t.origin),Object(Yo.s)(t.matrix,t.matrix,t.position),Object(Yo.l)(t.matrix,t.matrix,t.rotation),Object(Yo.r)(t.matrix,t.matrix,t.scale),Object(Yo.s)(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Object(Yo.i)(t.matrix,t.matrix),t.isIdentity=!0;for(var n=0;n<4;++n)for(var r=0;r<4;++r)(n===r?1:0)!==t.matrix[n+4*r]&&(t.isIdentity=!1);t.matrixMTime.modified()}},e.getCenter=function(){return Ol.getCenter(t.bounds)},e.getLength=function(){return Ol.getLength(t.bounds)},e.getXRange=function(){return Ol.getXRange(t.bounds)},e.getYRange=function(){return Ol.getYRange(t.bounds)},e.getZRange=function(){return Ol.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var jp={origin:[0,0,0],position:[0,0,0],orientation:[0,0,0],rotation:null,scale:[1,1,1],bounds:[1,-1,1,-1,1,-1],userMatrix:null,userMatrixMTime:null,cachedProp3D:null,isIdentity:!0,matrixMTime:null};function Qp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jp,n),zp.extend(e,t,n),t.matrixMTime={},ln.c.obj(t.matrixMTime),ln.c.get(e,t,["bounds","isIdentity"]),ln.c.getArray(e,t,["orientation"]),ln.c.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Object(Yo.h)(new Float64Array(16)),t.rotation=Object(Yo.h)(new Float64Array(16)),t.userMatrix=Object(Yo.h)(new Float64Array(16)),t.transform=null,_p(e,t)}var qp={newInstance:ln.c.newInstance(Qp,"vtkProp3D"),extend:Qp};function $p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var eC=ln.c.vtkDebugMacro;function tC(e,t){t.classHierarchy.push("vtkActor");var n=function(e){for(var t=1;t=1;return(n=n&&(!t.texture||!t.texture.isTranslucent()))&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return null!==t.mapper&&(null===t.property&&e.setProperty(e.makeProperty()),!e.getIsOpaque())},e.makeProperty=hg.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n=t.mapper.getBounds();if(!n||6!==n.length)return n;if(n[0]>n[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;if(!t.mapperBounds||n[0]!==t.mapperBounds[0]||n[1]!==t.mapperBounds[1]||n[2]!==t.mapperBounds[2]||n[3]!==t.mapperBounds[3]||n[4]!==t.mapperBounds[4]||n[5]!==t.mapperBounds[5]||e.getMTime()>t.boundsMTime.getMTime()){eC("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Ol.getCorners(n,r),e.computeMatrix();var a=new Float64Array(16);Object(Yo.i)(a,t.matrix),r.forEach((function(e){return Object(Fo.q)(e,e,a)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?r.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):r.reduce((function(e,n){return ee?r:e}if(null!==t.backfaceProperty){var a=t.backfaceProperty.getMTime();e=a>e?a:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var nC={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function rC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nC,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),tC(e,t)}var aC={newInstance:ln.c.newInstance(rC,"vtkActor"),extend:rC};function oC(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,a,o){if(t.callback){var i=n.getCompositeProjectionMatrix(r,-1,1);Object(Yo.i)(i,i);for(var l=e.getPoints(),s=new Float64Array(3),c=a.usize,g=a.vsize,u=c/2,d=g/2,m=[],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iC,n),Pu.extend(e,t,n),ln.c.setGet(e,t,["callback","useZValues"]),oC(e,t)}var sC={newInstance:ln.c.newInstance(lC,"vtkPixelSpaceCallbackMapper"),extend:lC};function cC(e,t){t.classHierarchy.push("vtkTexture"),e.imageLoaded=function(){t.image.removeEventListener("load",e.imageLoaded),t.imageLoaded=!0,e.modified()},e.setImage=function(n){t.image!==n&&(null!==n&&(e.setInputData(null),e.setInputConnection(null)),t.image=n,t.imageLoaded=!1,n.complete?e.imageLoaded():n.addEventListener("load",e.imageLoaded),e.modified())}}var gC={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function uC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gC,n),ln.c.obj(e,t),ln.c.algo(e,t,6,0),ln.c.get(e,t,["imageLoaded"]),ln.c.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),cC(e,t)}var dC={newInstance:ln.c.newInstance(uC,"vtkTexture"),extend:uC};function mC(e){return+e}function fC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function pC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var CC=e=>()=>e;function IC(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):CC(isNaN(e)?t:e)}function hC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bC(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yC(){}var vC="\\s*([+-]?\\d+)\\s*",ZC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",AC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GC=/^#([0-9a-f]{3,8})$/,SC=new RegExp("^rgb\\("+[vC,vC,vC]+"\\)$"),BC=new RegExp("^rgb\\("+[AC,AC,AC]+"\\)$"),VC=new RegExp("^rgba\\("+[vC,vC,vC,ZC]+"\\)$"),RC=new RegExp("^rgba\\("+[AC,AC,AC,ZC]+"\\)$"),wC=new RegExp("^hsl\\("+[ZC,AC,AC]+"\\)$"),kC=new RegExp("^hsla\\("+[ZC,AC,AC,ZC]+"\\)$"),WC={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function xC(){return this.rgb().formatHex()}function TC(){return this.rgb().formatRgb()}function JC(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=GC.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?XC(t):3===n?new YC(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?OC(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?OC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=SC.exec(e))?new YC(t[1],t[2],t[3],1):(t=BC.exec(e))?new YC(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=VC.exec(e))?OC(t[1],t[2],t[3],t[4]):(t=RC.exec(e))?OC(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wC.exec(e))?MC(t[1],t[2]/100,t[3]/100,1):(t=kC.exec(e))?MC(t[1],t[2]/100,t[3]/100,t[4]):WC.hasOwnProperty(e)?XC(WC[e]):"transparent"===e?new YC(NaN,NaN,NaN,0):null}function XC(e){return new YC(e>>16&255,e>>8&255,255&e,1)}function OC(e,t,n,r){return r<=0&&(e=t=n=NaN),new YC(e,t,n,r)}function NC(e){return e instanceof yC||(e=JC(e)),e?new YC((e=e.rgb()).r,e.g,e.b,e.opacity):new YC}function HC(e,t,n,r){return 1===arguments.length?NC(e):new YC(e,t,n,null==r?1:r)}function YC(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function FC(){return"#"+KC(this.r)+KC(this.g)+KC(this.b)}function PC(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function KC(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function MC(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new DC(e,t,n,r)}function LC(e){if(e instanceof DC)return new DC(e.h,e.s,e.l,e.opacity);if(e instanceof yC||(e=JC(e)),!e)return new DC;if(e instanceof DC)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,l=o-a,s=(o+a)/2;return l?(i=t===o?(n-r)/l+6*(n0&&s<1?0:i,new DC(i,l,s,e.opacity)}function DC(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function EC(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hC(yC,JC,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:xC,formatHex:xC,formatHsl:function(){return LC(this).formatHsl()},formatRgb:TC,toString:TC}),hC(YC,HC,bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new YC(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:FC,formatHex:FC,formatRgb:PC,toString:PC})),hC(DC,(function(e,t,n,r){return 1===arguments.length?LC(e):new DC(e,t,n,null==r?1:r)}),bC(yC,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new DC(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new YC(EC(e>=240?e-240:e+120,a,r),EC(e,a,r),EC(e<120?e+240:e-120,a,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var UC=function e(t){var n=function(e){return 1==(e=+e)?IC:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):CC(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=HC(e)).r,(t=HC(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=IC(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function zC(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;ni&&(a=t.slice(i,a),s[l]?s[l]+=a:s[++l]=a),(n=n[0])===(r=r[0])?s[l]?s[l]+=r:s[++l]=r:(s[++l]=null,c.push({i:l,x:fC(n,r)})),i=qC.lastIndex;return it?1:e>=t?0:NaN}function rI(e){let t=e,n=e;function r(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)<0?r=o+1:a=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>nI(e(t),n)}(e)),{left:r,center:function(e,n,a,o){null==a&&(a=0),null==o&&(o=e.length);const i=r(e,n,a,o-1);return i>a&&t(e[i-1],n)>-t(e[i],n)?i-1:i},right:function(e,t,r,a){for(null==r&&(r=0),null==a&&(a=e.length);r>>1;n(e[o],t)>0?a=o:r=o+1}return r}}}const aI=rI(nI).right;rI((function(e){return null===e?NaN:+e})).center;var oI=[0,1];function iI(e){return e}function lI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:(n=isNaN(t)?NaN:.5,function(){return n});var n}function sI(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return at&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=s>2?cI:sI,a=o=null,u}function u(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),l,s)))(e(c(t)))}return u.invert=function(n){return c(t((o||(o=r(l,i.map(e),fC)))(n)))},u.domain=function(e){return arguments.length?(i=Array.from(e,mC),g()):i.slice()},u.range=function(e){return arguments.length?(l=Array.from(e),g()):l.slice()},u.rangeRound=function(e){return l=Array.from(e),s=pC,g()},u.clamp=function(e){return arguments.length?(c=!!e||iI,g()):c!==iI},u.interpolate=function(e){return arguments.length?(s=e,g()):s},u.unknown=function(e){return arguments.length?(n=e,u):n},function(n,r){return e=n,t=r,g()}}()(iI,iI)}function dI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var mI,fI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pI(e){if(!(t=fI.exec(e)))throw new Error("invalid format: "+e);var t;return new CI({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CI(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function II(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function hI(e){return(e=II(Math.abs(e)))?e[1]:NaN}function bI(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}pI.prototype=CI.prototype,CI.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var yI={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>bI(100*e,t),r:bI,s:function(e,t){var n=II(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(mI=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+II(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function vI(e){return e}var ZI,AI,GI,SI=Array.prototype.map,BI=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ZI=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?vI:(t=SI.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,l=t[0],s=0;a>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(e.substring(a-=l,a+l)),!((s+=l+1)>r));)l=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",l=void 0===e.numerals?vI:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(SI.call(e.numerals,String)),s=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",g=void 0===e.nan?"NaN":e.nan+"";function u(e){var t=(e=pI(e)).fill,n=e.align,u=e.sign,d=e.symbol,m=e.zero,f=e.width,p=e.comma,C=e.precision,I=e.trim,h=e.type;"n"===h?(p=!0,h="g"):yI[h]||(void 0===C&&(C=12),I=!0,h="g"),(m||"0"===t&&"="===n)&&(m=!0,t="0",n="=");var b="$"===d?a:"#"===d&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",y="$"===d?o:/[%p]/.test(h)?s:"",v=yI[h],Z=/[defgprs%]/.test(h);function A(e){var a,o,s,d=b,A=y;if("c"===h)A=v(e)+A,e="";else{var G=(e=+e)<0||1/e<0;if(e=isNaN(e)?g:v(Math.abs(e),C),I&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),G&&0==+e&&"+"!==u&&(G=!1),d=(G?"("===u?u:c:"-"===u||"("===u?"":u)+d,A=("s"===h?BI[8+mI/3]:"")+A+(G&&"("===u?")":""),Z)for(a=-1,o=e.length;++a(s=e.charCodeAt(a))||s>57){A=(46===s?i+e.slice(a+1):e.slice(a))+A,e=e.slice(0,a);break}}p&&!m&&(e=r(e,1/0));var S=d.length+e.length+A.length,B=S>1)+d+e+A+B.slice(S);break;default:e=B+d+e+A}return l(e)}return C=void 0===C?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,C)):Math.max(0,Math.min(20,C)),A.toString=function(){return e+""},A}return{format:u,formatPrefix:function(e,t){var n=u(((e=pI(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(hI(t)/3))),a=Math.pow(10,-r),o=BI[8+r/3];return function(e){return n(a*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),AI=ZI.format,GI=ZI.formatPrefix;var VI=Math.sqrt(50),RI=Math.sqrt(10),wI=Math.sqrt(2);function kI(e,t,n){var r=(t-e)/Math.max(0,n),a=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,a);return a>=0?(o>=VI?10:o>=RI?5:o>=wI?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(o>=VI?10:o>=RI?5:o>=wI?2:1)}function WI(e,t,n,r){var a,o,i,l,s=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/a;return o>=VI?a*=10:o>=RI?a*=5:o>=wI&&(a*=2),t0)return[e];if((r=t0){let n=Math.round(e/i),r=Math.round(t/i);for(n*it&&--r,o=new Array(a=r-n+1);++lt&&--r,o=new Array(a=r-n+1);++l0;){if((a=kI(s,c,n))===r)return o[i]=s,o[l]=c,t(o);if(a>0)s=Math.floor(s/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;s=Math.ceil(s*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function TI(){var e=uI();return e.copy=function(){return gI(e,TI())},dI.apply(e,arguments),xI(e)}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XI(e){for(var t=1;ta,t.camera.getParallelProjection()||(Object(Fo.l)(LI,LI),i=Object(Fo.d)(LI,MI)>a)),i!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=i,n=!0)}return n},e.updatePolyData=function(e,n,r){var a=0,o=0;a+=8;for(var i=0,l=0;l<12;l++)n[l]>0&&i++;if(o+=i,t.gridLines)for(var s=0;s<6;s++)e[s]&&(a+=2*r[FI[s][0]].length+2*r[FI[s][1]].length,o+=r[FI[s][0]].length+r[FI[s][1]].length);for(var c=new Float64Array(3*a),g=new Uint32Array(3*o),u=0,d=0,m=0;m<2;m++)for(var f=0;f<2;f++)for(var p=0;p<2;p++)c[3*u]=t.dataBounds[p],c[3*u+1]=t.dataBounds[2+f],c[3*u+2]=t.dataBounds[4+m],u++;for(var C=0;C<12;C++)n[C]>0&&(g[3*d]=2,g[3*d+1]=HI[C][0],g[3*d+2]=HI[C][1],d++);if(t.gridLines)for(var I=0;I<6;I++)if(e[I]){for(var h=Math.floor(I/2),b=r[FI[I][0]],y=0;y.5?Object(Fo.b)(MI,DI,i[0]*l):Object(Fo.b)(MI,DI,i[0]*l-c.width/2),Object(Fo.g)(PI,PI,MI),Object(Fo.b)(MI,EI,i[1]*l-c.height/2),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[0],s.tcoords[2*m+1]=c.tcoords[1],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[2],s.tcoords[2*m+1]=c.tcoords[3],m++,Object(Fo.b)(MI,EI,c.height),Object(Fo.g)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[4],s.tcoords[2*m+1]=c.tcoords[5],m++,Object(Fo.b)(MI,DI,c.width),Object(Fo.a)(PI,PI,MI),s.points[3*m]=PI[0],s.points[3*m+1]=PI[1],s.points[3*m+2]=PI[2],s.tcoords[2*m]=c.tcoords[6],s.tcoords[2*m+1]=c.tcoords[7],m++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-3,s.polys[4*f+3]=m-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=m-4,s.polys[4*f+2]=m-2,s.polys[4*f+3]=m-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n);var r=t.textValues.length,a=4*r,o=2*r,i=new Float64Array(3*a),l=new Uint16Array(4*o),s=new Float32Array(2*a);Object(Yo.g)(UI,n);for(var c={ptIdx:0,cellIdx:0,polys:l,points:i,tcoords:s},g=0,u=0,d=0,m=t.textPolyData.getPoints().getData();g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jI(n)),aC.extend(e,t,n),t.lastSize=[800,800],t.lastAspectRatio=1,t.lastFacesToDraw=[!1,!1,!1,!1,!1,!1],t.axisLabels=["X-Axis","Y-Axis","Z-Axis"],t.tickCounts=[],t.textValues=[],t.lastTickBounds=[],t.mapper=Pu.newInstance(),t.polyData=Go.a.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,a,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=aC.newInstance(),t.pixelActor.setMapper(t.pixelMapper),ln.c.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),ln.c.setGetArray(e,t,["dataBounds"],6),ln.c.setGetArray(e,t,["axisLabels"],3),ln.c.get(e,t,["axisTextStyle","tickTextStyle","camera"]),_I(e,t)}var qI={newInstance:ln.c.newInstance(QI,"vtkCubeAxesActor"),extend:QI};function $I(e,t){t.classHierarchy.push("vtkCompositeCameraManipulator"),e.computeDisplayCenter=function(e,n){var r=e.computeWorldToDisplay(n,t.center[0],t.center[1],t.center[2]);t.displayCenter[0]=r[0],t.displayCenter[1]=r[1]}}var eh={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var th={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eh,n),ln.c.setGet(e,t,["rotationFactor"]),ln.c.setGetArray(e,t,["displayCenter"],2),ln.c.setGetArray(e,t,["center"],3),$I(e,t)}};function nh(e,t){t.classHierarchy.push("vtkCompositeMouseManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onButtonDown=function(e,t,n){},e.onButtonUp=function(e){},e.onMouseMove=function(e,t,n){},e.onStartScroll=function(e,t,n){},e.onScroll=function(e,t,n){},e.onEndScroll=function(e){},e.isDragEnabled=function(){return t.dragEnabled},e.isScrollEnabled=function(){return t.scrollEnabled}}var rh={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var ah={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rh,n),ln.c.setGet(e,t,["button","shift","control","alt"]),ln.c.set(e,t,["dragEnabled","scrollEnabled"]),nh(e,t)}};function oh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,c,g){if(g){var u=c.getActiveCamera(),d=u.getPosition(),m=u.getFocalPoint();Object(Yo.h)(o);var f=t.center,p=t.rotationFactor;Object(Yo.s)(o,o,f);var C=t.previousPosition.x-g.x,I=t.previousPosition.y-g.y,h=e.getView().getSize(),b=u.getViewUp();Object(Yo.q)(o,o,Object(Xo.B)(360*C/h[0]*p),b),Object(Xo.w)(u.getDirectionOfProjection(),b,i),Object(Yo.q)(o,o,Object(Xo.B)(-360*I/h[1]*p),i),l[0]=-f[0],l[1]=-f[1],l[2]=-f[2],Object(Yo.s)(o,o,l),Object(Fo.q)(n,d,o),Object(Fo.q)(r,m,o),s[0]=b[0]+d[0],s[1]=b[1]+d[1],s[2]=b[2]+d[2],Object(Fo.q)(a,s,o),u.setPosition(n[0],n[1],n[2]),u.setFocalPoint(r[0],r[1],r[2]),u.setViewUp(a[0]-n[0],a[1]-n[1],a[2]-n[2]),u.orthogonalizeViewUp(),c.resetCameraClippingRange(),e.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=g}}}var ih={};function lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ih,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),oh(e,t)}var sh={newInstance:ln.c.newInstance(lh,"vtkMouseCameraTrackballRotateManipulator"),extend:lh};function ch(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),a=new Float64Array(3),o=new Float64Array(16),i=new Float64Array(3),l=new Float64Array(3),s=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(c,g,u){if(u){var d=g.getActiveCamera(),m=d.getPosition(),f=d.getFocalPoint(),p=d.getViewUp();n[0]=f[0]-m[0],n[1]=f[1]-m[1],n[2]=f[2]-m[2],e.computeDisplayCenter(c.getInteractorStyle(),g);var C=t.previousPosition.x-t.displayCenter[0],I=u.x-t.displayCenter[0],h=t.previousPosition.y-t.displayCenter[1],b=u.y-t.displayCenter[1];if(!(0===I&&0===b||0===C&&0===h)){var y=Object(Xo.F)((C*b-h*I)/(Math.sqrt(C*C+h*h)*Math.sqrt(I*I+b*b))),v=t.center;Object(Yo.h)(o),a[0]=-v[0],a[1]=-v[1],a[2]=-v[2],Object(Yo.s)(o,o,v),Object(Yo.q)(o,o,Object(Xo.B)(y),n),Object(Yo.s)(o,o,a),Object(Fo.q)(i,m,o),Object(Fo.q)(l,f,o),r[0]=p[0]+m[0],r[1]=p[1]+m[1],r[2]=p[2]+m[2],Object(Fo.q)(s,r,o),d.setPosition(i[0],i[1],i[2]),d.setFocalPoint(l[0],l[1],l[2]),d.setViewUp(s[0]-i[0],s[1]-i[1],s[2]-i[2]),d.orthogonalizeViewUp(),g.resetCameraClippingRange(),c.getLightFollowCamera()&&g.updateLightsGeometryToFollowCamera(),t.previousPosition=u}}}}var gh={};function uh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),ch(e,t)}var dh={newInstance:ln.c.newInstance(uh,"vtkMouseCameraTrackballRollManipulator"),extend:uh};function mh(e){return e*e}function fh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=sh.newInstance(),r=dh.newInstance(),a=null;e.onButtonDown=function(t,o,i){var l,s,c=t.getView().getSize(),g=[.5*c[0],.5*c[1]],u=.9*((l=g[0])<(s=g[1])?s:l),d=mh(g[0]-i.x)+mh(g[1]-i.y);(a=u*u>d?n:r).setButton(e.getButton()),a.setShift(e.getShift()),a.setControl(e.getControl()),a.setCenter(e.getCenter()),a.onButtonDown(t,i)},e.onButtonUp=function(e){a&&a.onButtonUp(e)},e.onMouseMove=function(e,t,n){a&&a.onMouseMove(e,t,n)}}var ph={};function Ch(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ph,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),fh(e,t)}var Ih={newInstance:ln.c.newInstance(Ch,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ch};function hh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var a=r,o=t.previousPosition;t.previousPosition=r;var i=n.getActiveCamera(),l=i.getPosition(),s=i.getFocalPoint();if(i.getParallelProjection()){i.orthogonalizeViewUp();var c=i.getViewUp(),g=i.getViewPlaneNormal(),u=[0,0,0];Object(Xo.w)(g,c,u);var d=e.getView().getSize()[1],m=(a.x-o.x)/d,f=(o.y-a.y)/d,p=i.getParallelScale();f*=2*p;var C=u[0]*(m*=2*p)+c[0]*f;l[0]+=C,s[0]+=C,C=u[1]*m+c[1]*f,l[1]+=C,s[1]+=C,C=u[2]*m+c[2]*f,l[2]+=C,s[2]+=C,i.setPosition(l[0],l[1],l[2]),i.setFocalPoint(s[0],s[1],s[2])}else{var I=t.center,h=e.getInteractorStyle(),b=h.computeWorldToDisplay(n,I[0],I[1],I[2])[2],y=h.computeDisplayToWorld(n,a.x,a.y,b),v=h.computeDisplayToWorld(n,o.x,o.y,b),Z=[l[0]+(v[0]-y[0]),l[1]+(v[1]-y[1]),l[2]+(v[2]-y[2])],A=[s[0]+(v[0]-y[0]),s[1]+(v[1]-y[1]),s[2]+(v[2]-y[2])];i.setPosition(Z[0],Z[1],Z[2]),i.setFocalPoint(A[0],A[1],A[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var bh={};function yh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bh,n),ln.c.obj(e,t),th.extend(e,t,n),ah.extend(e,t,n),hh(e,t)}var vh={newInstance:ln.c.newInstance(yh,"vtkMouseCameraTrackballPanManipulator"),extend:yh};function Zh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var a=e.getView().getSize(),o=n.getActiveCamera(),i=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/a[1]*i;else{var l=o.getClippingRange();t.zoomScale=l[1]/a[1]*1.5*i}},e.onMouseMove=function(e,n,r){if(r){var a=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var i=a*t.zoomScale;o.setParallelScale((1-i)*o.getParallelScale())}else{var l=o.getPosition(),s=o.getFocalPoint(),c=o.getDirectionOfProjection(),g=a*t.zoomScale,u=g*c[0];l[0]+=u,s[0]+=u,u=g*c[1],l[1]+=u,s[1]+=u,u=g*c[2],l[2]+=u,s[2]+=u,o.getFreezeFocalPoint()||o.setFocalPoint(s[0],s[1],s[2]),o.setPosition(l[0],l[1],l[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),a=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/a):(r.dolly(a),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Ah={zoomScale:0,flipDirection:!1};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ah,n),ln.c.obj(e,t),ah.extend(e,t,n),th.extend(e,t,n),ln.c.setGet(e,t,["flipDirection"]),Zh(e,t)}var Sh={newInstance:ln.c.newInstance(Gh,"vtkMouseCameraTrackballZoomManipulator"),extend:Gh};function Bh(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,a){n(e,r,a),t.zoomPosition=a},e.onMouseMove=function(e,n,r){if(r){var a=(t.previousPosition.y-r.y)*t.zoomScale;Mp.dollyToPosition(1-a,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var a=1-.1*n;Mp.dollyToPosition(a,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Vh={zoomPosition:null};function Rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vh,n),Sh.extend(e,t,n),Bh(e,t)}var wh={newInstance:ln.c.newInstance(Rh,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Rh};function kh(e,t){t.classHierarchy.push("vtkCompositeGestureManipulator"),e.startInteraction=function(){},e.endInteraction=function(){},e.onStartPinch=function(e,t){},e.onStartRotate=function(e,t){},e.onStartPan=function(e,t){},e.onPinch=function(e,t,n){},e.onRotate=function(e,t,n){},e.onPan=function(e,t,n){},e.onEndPinch=function(e){},e.onEndRotate=function(e){},e.onEndPan=function(e){},e.isPinchEnabled=function(){return t.pinchEnabled},e.isPanEnabled=function(){return t.panEnabled},e.isRotateEnabled=function(){return t.rotateEnabled}}var Wh={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var xh={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wh,n),ln.c.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),ln.c.setGet(e,t,["interactorStyle"]),kh(e,t)}};function Th(e,t){t.classHierarchy.push("vtkGestureCameraManipulator"),e.onStartPinch=function(e,n){t.previousScale=n},e.onStartRotate=function(e,n){t.previousRotation=n},e.onStartPan=function(e,n){t.previousTranslation=n},e.onPinch=function(e,n,r){Mp.dollyByFactor(e,n,r/t.previousScale),t.previousScale=r},e.onPan=function(e,n,r){var a=n.getActiveCamera(),o=e.getInteractorStyle(),i=a.getFocalPoint(),l=(i=o.computeWorldToDisplay(n,i[0],i[1],i[2]))[2],s=r,c=t.previousTranslation,g=o.computeDisplayToWorld(n,i[0]+s[0]-c[0],i[1]+s[1]-c[1],l),u=o.computeDisplayToWorld(n,i[0],i[1],l),d=[];d[0]=u[0]-g[0],d[1]=u[1]-g[1],d[2]=u[2]-g[2],i=a.getFocalPoint();var m=a.getPosition();a.setFocalPoint(d[0]+i[0],d[1]+i[1],d[2]+i[2]),a.setPosition(d[0]+m[0],d[1]+m[1],d[2]+m[2]),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),a.orthogonalizeViewUp(),t.previousTranslation=r},e.onRotate=function(e,n,r){var a=n.getActiveCamera();a.roll(r-t.previousRotation),a.orthogonalizeViewUp(),t.previousRotation=r}}var Jh={};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jh,n),ln.c.obj(e,t),xh.extend(e,t,n),th.extend(e,t,n),Th(e,t)}var Oh={newInstance:ln.c.newInstance(Xh,"vtkGestureCameraManipulator"),extend:Xh};function Nh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh(n)),Object(ln.h)(e,t),ah.extend(e,t,n),Object(ln.d)(e,t,"BoxSelectChange"),Object(ln.d)(e,t,"BoxSelectInput"),Object(ln.j)(e,t,["renderSelection","selectionStyle"]),Ph(e,t)}var Lh={newInstance:Object(ln.g)(Mh,"vtkMouseBoxSelectionManipulator"),extend:Mh},Dh=n(38);function Eh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uh(e){for(var t=1;t.001?Math.acos(n/o):0,l=i>.001?Math.atan2(a,r):0;t[0]=o,t[1]=i,t[2]=l}function db(e,t){if(e[0]>=t-.1)return e[2];var n=e[1]*Math.sqrt(t*t-e[0]*e[0])/(e[0]*Math.sin(e[1]));return e[2]>-.3*Math.PI?e[2]+n:e[2]-n}function mb(e,t,n,r){var a=[],o=[];Object(Xo.e)(t,a),Object(Xo.e)(n,o);var i=[],l=[];ub(a,i),ub(o,l);var s=e;if(i[1]>.05&&l[1]>.05&&function(e,t){var n=e-t;for(n<0&&(n=-n);n>=2*Math.PI;)n-=2*Math.PI;return n>Math.PI&&(n=2*Math.PI-n),n}(i[2],l[2])>.33*Math.PI){var c=Math.max(i[0],l[0]);c=Math.max(88,c),e<.5?(l[0]=c,l[1]=0,l[2]=0,s*=2):(i[0]=c,i[1]=0,i[2]=0,s=2*s-1)}i[1]<.05&&l[1]>.05?i[2]=db(l,i[0]):l[1]<.05&&i[1]>.05&&(l[2]=db(i,l[0]));var g=[];g[0]=(1-s)*i[0]+s*l[0],g[1]=(1-s)*i[1]+s*l[1],g[2]=(1-s)*i[2]+s*l[2];var u=[];!function(e,t){var n=e[0],r=e[1],a=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(a),t[2]=n*Math.sin(r)*Math.sin(a)}(g,u),Object(Xo.f)(u,r)}function fb(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,a){return e.addRGBPointLong(t,n,r,a,.5,0)},e.addRGBPointLong=function(n,r,a,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(i<0||i>1)return cb("Midpoint outside range [0.0, 1.0]"),-1;if(l<0||l>1)return cb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var s={x:n,r:r,g:a,b:o,midpoint:i,sharpness:l};t.nodes.push(s),e.sortAndUpdateRange();for(var c=0;c4&&void 0!==arguments[4]?arguments[4]:.5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,l=[],s=[n,r,a];return Object(Xo.u)(s,l),e.addRGBPoint(t,l[0],l[1],l[2],o,i)},e.setNodes=function(n){t.nodes!==n&&(t.nodes=n,e.sortAndUpdateRange())},e.sortAndUpdateRange=function(){t.nodes.sort((function(e,t){return e.x-t.x})),e.updateRange()||e.modified()},e.updateRange=function(){var n=[2];n[0]=t.mappingRange[0],n[1]=t.mappingRange[1];var r=t.nodes.length;return r?(t.mappingRange[0]=t.nodes[0].x,t.mappingRange[1]=t.nodes[r-1].x):(t.mappingRange[0]=0,t.mappingRange[1]=0),(n[0]!==t.mappingRange[0]||n[1]!==t.mappingRange[1])&&(e.modified(),!0)},e.removePoint=function(n){for(var r=0;r=t.nodes.length)return-1;var o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var a=0;a=n&&t.nodes[g].x<=i?t.nodes.splice(g,1):g++;e.addRGBPointLong(n,r,a,o,.5,0),e.addRGBPointLong(i,l,s,c,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,a,o,i,l,s){var c=[i,l,s],g=[],u=[];Object(Xo.u)([n,r,a],g),Object(Xo.u)(c,u),e.addRGBSegment(t,g[0],g[1],g[2],o,u[0],u[1],u[2])},e.mapValue=function(t){var n=[];return e.getColor(t,n),[Math.floor(255*n[0]+.5),Math.floor(255*n[1]+.5),Math.floor(255*n[2]+.5),255]},e.getColor=function(n,r){if(t.indexedLookup){var a=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===a)e.getNanColor(r);else{var i=[];e.getNodeValue(o%a,i),r[0]=i.r,r[1]=i.g,r[2]=i.b}}else e.getTable(n,n,1,r)},e.getRedValue=function(t){var n=[];return e.getColor(t,n),n[0]},e.getGreenValue=function(t){var n=[];return e.getColor(t,n),n[1]},e.getBlueValue=function(t){var n=[];return e.getColor(t,n),n[2]},e.getTable=function(n,r,a,o){if(Object(Xo.v)(n)||Object(Xo.v)(r))for(var i=0;i0);var v=0,Z=0,A=0;y&&(v=Math.log10(n),Z=Math.log10(r));for(var G=0;G1?y?(A=v+G/(a-1)*(Z-v),d=Math.pow(10,A)):d=n+G/(a-1)*(r-n):y?(A=.5*(v+Z),d=Math.pow(10,A)):d=.5*(n+r),t.discretize){var B=t.mappingRange;if(d>=B[0]&&d<=B[1]){var V=t.numberOfValues,R=B[1]-B[0];if(V<=1)d=B[0]+R/2;else{var w=(d-B[0])/R,k=Object(Xo.g)(V*w);d=B[0]+k/(V-1)*R}}}for(;lt.nodes[l].x;)++l.99999&&(I=.99999));if(d>t.mappingRange[1])o[S]=0,o[S+1]=0,o[S+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[S]=t.aboveRangeColor[0],o[S+1]=t.aboveRangeColor[1],o[S+2]=t.aboveRangeColor[2]):(o[S]=c,o[S+1]=g,o[S+2]=u));else if(d0&&(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b));else if(0===l&&(Math.abs(d-n)<1e-6||t.discretize))s>0?(o[S]=t.nodes[0].r,o[S+1]=t.nodes[0].g,o[S+2]=t.nodes[0].b):(o[S]=0,o[S+1]=0,o[S+2]=0);else{var W=0;if(W=(W=y?(A-m)/(f-m):(d-m)/(f-m)).99){if(W<.5){o[S]=p[0],o[S+1]=p[1],o[S+2]=p[2];continue}o[S]=C[0],o[S+1]=C[1],o[S+2]=C[2];continue}if(h<.01){if(t.colorSpace===ob.RGB)o[S]=(1-W)*p[0]+W*C[0],o[S+1]=(1-W)*p[1]+W*C[1],o[S+2]=(1-W)*p[2]+W*C[2];else if(t.colorSpace===ob.HSV){var x=[],T=[];Object(Xo.d)(p,x),Object(Xo.d)(C,T),t.hSVWrap&&(x[0]-T[0]>.5||T[0]-x[0]>.5)&&(x[0]>T[0]?x[0]-=1:T[0]-=1);var J=[];J[0]=(1-W)*x[0]+W*T[0],J[0]<0&&(J[0]+=1),J[1]=(1-W)*x[1]+W*T[1],J[2]=(1-W)*x[2]+W*T[2],Object(Xo.u)(J,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var X=[],O=[];Object(Xo.e)(p,X),Object(Xo.e)(C,O);var N=[];N[0]=(1-W)*X[0]+W*O[0],N[1]=(1-W)*X[1]+W*O[1],N[2]=(1-W)*X[2]+W*O[2],Object(Xo.f)(N,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.",t.colorSpace);continue}W<.5?W=.5*Math.pow(2*W,1+10*h):W>.5&&(W=1-.5*Math.pow(2*(1-W),1+10*h));var H=W*W,Y=H*W,F=2*Y-3*H+1,P=-2*Y+3*H,K=Y-2*H+W,M=Y-H,L=void 0;if(t.colorSpace===ob.RGB)for(var D=0;D<3;D++)L=(1-h)*(C[D]-p[D]),o[S+D]=F*p[D]+P*C[D]+K*L+M*L;else if(t.colorSpace===ob.HSV){var E=[],U=[];Object(Xo.d)(p,E),Object(Xo.d)(C,U),t.hSVWrap&&(E[0]-U[0]>.5||U[0]-E[0]>.5)&&(E[0]>U[0]?E[0]-=1:U[0]-=1);for(var z=[],_=0;_<3;_++)L=(1-h)*(U[_]-E[_]),z[_]=F*E[_]+P*U[_]+K*L+M*L,0===_&&z[_]<0&&(z[_]+=1);Object(Xo.u)(z,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else if(t.colorSpace===ob.LAB){var j=[],Q=[];Object(Xo.e)(p,j),Object(Xo.e)(C,Q);for(var q=[],$=0;$<3;$++)L=(1-h)*(Q[$]-j[$]),q[$]=F*j[$]+P*Q[$]+K*L+M*L;Object(Xo.f)(q,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]}else t.colorSpace===ob.DIVERGING?(mb(W,p,C,b),o[S]=b[0],o[S+1]=b[1],o[S+2]=b[2]):cb("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[S+ee]=o[S+ee]<0?0:o[S+ee],o[S+ee]=o[S+ee]>1?1:o[S+ee]}}}},e.getUint8Table=function(n,r,a){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===a&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return cb("Attempting to lookup a value with no points in the function"),t.table;var i=o?4:3;t.tableSize===a&&t.tableWithAlpha===o||(t.table=new Uint8Array(a*i),t.tableSize=a,t.tableWithAlpha=o);var l=[];e.getTable(n,r,a,l);for(var s=0;s1&&(i=(r-n)/(a-1));for(var l=0;l=t.nodes.length?(cb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].r,n[2]=t.nodes[e].g,n[3]=t.nodes[e].b,n[4]=t.nodes[e].midpoint,n[5]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){if(n<0||n>=t.nodes.length)return cb("Index out of range!"),-1;var a=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].r=r[1],t.nodes[n].g=r[2],t.nodes[n].b=r[3],t.nodes[n].midpoint=r[4],t.nodes[n].sharpness=r[5],a!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.getNumberOfAvailableColors=function(){return t.indexedLookup&&e.getSize()?e.getSize():t.tableSize?t.tableSize:16777216},e.getIndexedColor=function(t,n){var r=e.getSize();if(r>0&&t>=0){var a=[];e.getNodeValue(t%r,a);for(var o=0;o<3;++o)n[o]=a[o+1];n[3]=1}else e.getNanColor(n),n[3]=1},e.fillFromDataPointer=function(t,n){if(!(t<=0)&&n){e.removeAllPoints();for(var r=0;rn[1]?(e.getColor(n[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])):(e.getColor(r[1],a),e.addRGBPoint(n[1],a[0],a[1],a[2])),e.sortAndUpdateRange();for(var o=0;o=n[0]&&t.nodes[o].x<=n[1]?t.nodes.splice(o,1):++o;return 1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){if(t.nodes.length<2)return-1;for(var e=Number.MAX_VALUE,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pb,n),mu.extend(e,t,n),t.table=[],t.nodes=[],t.nanColor=[.5,0,0,1],t.belowRangeColor=[0,0,0,1],t.aboveRangeColor=[1,1,1,1],t.buildTime={},ln.c.obj(t.buildTime),ln.c.get(e,t,["buildTime","mappingRange"]),ln.c.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),ln.c.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),ln.c.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),fb(e,t)}var Ib=function(e){for(var t=1;t0&&(n=t.nodes[0].y);for(var a=1;an)switch(r){case 0:case 1:r=1;break;default:case 2:r=3}else switch(r){case 0:case 2:r=2;break;default:case 1:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default:case 3:return"Varied"}},e.getDataPointer=function(){var e=t.nodes.length;if(t.function=null,e>0){t.function=[];for(var n=0;n0?t.nodes[n-1].x:t.clamping?-Number.MAX_VALUE:t.nodes[0].x},e.getNodeValue=function(e,n){var r=t.nodes.length;return e<0||e>=r?(hb("Index out of range!"),-1):(n[0]=t.nodes[e].x,n[1]=t.nodes[e].y,n[2]=t.nodes[e].midpoint,n[3]=t.nodes[e].sharpness,1)},e.setNodeValue=function(n,r){var a=t.nodes.length;if(n<0||n>=a)return hb("Index out of range!"),-1;var o=t.nodes[n].x;return t.nodes[n].x=r[0],t.nodes[n].y=r[1],t.nodes[n].midpoint=r[2],t.nodes[n].sharpness=r[3],o!==r[0]?e.sortAndUpdateRange():e.modified(),1},e.addPoint=function(t,n){return e.addPointLong(t,n,.5,0)},e.addPointLong=function(n,r,a,o){if(a<0||a>1)return hb("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return hb("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var i,l={x:n,y:r,midpoint:a,sharpness:o};for(t.nodes.push(l),e.sortAndUpdateRange(),i=0;i=t.nodes.length)return-1;var a=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),a},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,a,o){e.sortAndUpdateRange();for(var i=0;i=n&&t.nodes[i].x<=a?t.nodes.splice(i,1):i++;e.addPoint(n,r,.5,0),e.addPoint(a,o,.5,0)},e.getValue=function(t){var n=[];return e.getTable(t,t,1,n),n[0]},e.adjustRange=function(n){if(n.length<2)return 0;var r=e.getRange();r[0]n[1]?e.addPoint(n[1],e.getValue(n[1])):e.addPoint(n[1],e.getValue(r[1])),e.sortAndUpdateRange();for(var a=0;a=n[0]&&t.nodes[a].x<=n[1]?t.nodes.splice(a,1):++a;return e.sortAndUpdateRange(),1},e.estimateMinNumberOfSamples=function(t,n){var r=e.findMinimumXDistance();return Math.ceil((n-t)/r)},e.findMinimumXDistance=function(){var e=t.nodes.length;if(e<2)return-1;for(var n=t.nodes[1].x-t.nodes[0].x,r=0;r4&&void 0!==arguments[4]?arguments[4]:1,l=0,s=t.nodes.length,c=0;0!==s&&(c=t.nodes[s-1].y);var g=0,u=0,d=0,m=0,f=0,p=0,C=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);lt.nodes[l].x;)++l.99999&&(p=.99999));if(l>=s)a[I]=t.clamping?c:0;else if(0===l)a[I]=t.clamping?t.nodes[0].y:0;else{var h=(g-u)/(d-u);if(h=h.99){if(h<.5){a[I]=m;continue}a[I]=f;continue}if(C<.01){a[I]=(1-h)*m+h*f;continue}h<.5?h=.5*Math.pow(2*h,1+10*C):h>.5&&(h=1-.5*Math.pow(2*(1-h),1+10*C));var b=h*h,y=b*h,v=2*y-3*b+1,Z=-2*y+3*b,A=y-2*b+h,G=y-b,S=f-m,B=(1-C)*S;a[I]=v*m+Z*f+A*B+G*B;var V=mf?m:f;a[I]=a[I]R?R:a[I]}}}}var yb={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yb,n),ln.c.obj(e,t),t.nodes=[],ln.c.setGet(e,t,["allowDuplicateScalars","clamping"]),ln.c.setArray(e,t,["range"],2),ln.c.getArray(e,t,["range"]),bb(e,t)}var Zb={newInstance:ln.c.newInstance(vb,"vtkPiecewiseFunction"),extend:vb};function Ab(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Gb=Km.InterpolationType,Sb=Km.OpacityMode,Bb=ln.c.vtkErrorMacro;function Vb(e,t){t.classHierarchy.push("vtkVolumeProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)1===t.componentData[r].colorChannels?t.componentData[r].grayTransferFunction&&(n=n>(e=t.componentData[r].grayTransferFunction.getMTime())?n:e):3===t.componentData[r].colorChannels&&t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].scalarOpacity&&(n=n>(e=t.componentData[r].scalarOpacity.getMTime())?n:e),t.componentData[r].gradientOpacity&&(t.componentData[r].disableGradientOpacity||(n=n>(e=t.componentData[r].gradientOpacity.getMTime())?n:e));return n},e.getColorChannels=function(e){return e<0||e>3?(Bb("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var a=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,a=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,a=!0),a&&e.modified(),a},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Zb.newInstance(),t.componentData[n].grayTransferFunction.addPoint(0,0),t.componentData[n].grayTransferFunction.addPoint(1024,1),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1),e.modified()),t.componentData[n].grayTransferFunction},e.setRGBTransferFunction=function(n,r){var a=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,a=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,a=!0),a&&e.modified(),a},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=Ib.newInstance(),t.componentData[n].rGBTransferFunction.addRGBPoint(0,0,0,0),t.componentData[n].rGBTransferFunction.addRGBPoint(1024,1,1,1),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3),e.modified()),t.componentData[n].rGBTransferFunction},e.setScalarOpacity=function(n,r){return t.componentData[n].scalarOpacity!==r&&(t.componentData[n].scalarOpacity=r,e.modified(),!0)},e.getScalarOpacity=function(n){return null===t.componentData[n].scalarOpacity&&(t.componentData[n].scalarOpacity=Zb.newInstance(),t.componentData[n].scalarOpacity.addPoint(0,1),t.componentData[n].scalarOpacity.addPoint(1024,1),e.modified()),t.componentData[n].scalarOpacity},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Bb("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Bb("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Gb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Gb.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(Gb.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Gb,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["set".concat(r)]=function(r,a){return t.componentData[r]["".concat(n)]!==a&&(t.componentData[r]["".concat(n)]=a,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=ln.c.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var Rb={independentComponents:!0,interpolationType:Gb.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function wb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rb,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;++r)t.componentData.push({colorChannels:1,grayTransferFunction:null,rGBTransferFunction:null,scalarOpacity:null,scalarOpacityUnitDistance:1,opacityMode:Sb.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),Vb(e,t)}var kb=function(e){for(var t=1;tr[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){Wb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}return e}}var Tb={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function Jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Tb,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),xb(e,t)}var Xb={newInstance:ln.c.newInstance(Jb,"vtkVolume"),extend:Jb},Ob=Lm.BlendMode;function Nb(e,t){t.classHierarchy.push("vtkVolumeMapper"),e.getBounds=function(){var n=e.getInputData();return n?(t.static||e.update(),t.bounds=n.getBounds()):t.bounds=Object(Xo.j)(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(Ob.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(Ob.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(Ob.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(Ob.AVERAGE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return ln.c.enumToString(Ob,t.blendMode)}}var Hb={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:Ob.COMPOSITE_BLEND,averageIPScalarRange:[-1e6,1e6]};function Yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),_g.extend(e,t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,0),ln.c.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),ln.c.setGetArray(e,t,["averageIPScalarRange"],2),ln.c.event(e,t,"lightingActivated"),Nb(e,t)}var Fb={newInstance:ln.c.newInstance(Yb,"vtkVolumeMapper"),extend:Yb},Pb=Object.create(null);[{Name:"KAAMS",IndexedColors:[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,.63,.63,1,.67,.5,.33,1,.5,.75,.53,.35,.7,1,.75,.5],Annotations:[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11]},{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Cool to Warm (Extended)",NanColor:[.25,0,0],RGBPoints:[0,0,0,.34902,.03125,.039216,.062745,.380392,.0625,.062745,.117647,.411765,.09375,.090196,.184314,.45098,.125,.12549,.262745,.501961,.15625,.160784,.337255,.541176,.1875,.2,.396078,.568627,.21875,.239216,.454902,.6,.25,.286275,.521569,.65098,.28125,.337255,.592157,.701961,.3125,.388235,.654902,.74902,.34375,.466667,.737255,.819608,.375,.572549,.819608,.878431,.40625,.654902,.866667,.909804,.4375,.752941,.917647,.941176,.46875,.823529,.956863,.968627,.5,.988235,.960784,.901961,.5,.941176,.984314,.988235,.52,.988235,.945098,.85098,.54,.980392,.898039,.784314,.5625,.968627,.835294,.698039,.59375,.94902,.733333,.588235,.625,.929412,.65098,.509804,.65625,.909804,.564706,.435294,.6875,.878431,.458824,.352941,.71875,.839216,.388235,.286275,.75,.760784,.294118,.211765,.78125,.701961,.211765,.168627,.8125,.65098,.156863,.129412,.84375,.6,.094118,.094118,.875,.54902,.066667,.098039,.90625,.501961,.05098,.12549,.9375,.45098,.054902,.172549,.96875,.4,.054902,.192157,1,.34902,.070588,.211765]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Warm to Cool (Extended)",NanColor:[.250004,0,0],RGBPoints:[0,.34902,0,.129412,.025,.4,.00392157,.101961,.05,.470588,.0156863,.0901961,.075,.54902,.027451,.0705882,.1,.619608,.0627451,.0431373,.125,.690196,.12549,.0627451,.15,.741176,.184314,.0745098,.175,.788235,.266667,.0941176,.2,.811765,.345098,.113725,.225,.831373,.411765,.133333,.25,.85098,.47451,.145098,.275,.870588,.54902,.156863,.3,.878431,.619608,.168627,.325,.890196,.658824,.196078,.35,.909804,.717647,.235294,.375,.929412,.776471,.278431,.395522,.94902,.823529,.321569,.418905,.968627,.87451,.407843,.444278,.980392,.917647,.509804,.470149,.988235,.956863,.643137,.483582,.992157,.964706,.713725,.499,.988235,.980392,.870588,.5,1,1,1,.501,.913725,.988235,.937255,.516418,.827451,.980392,.886275,.531343,.764706,.980392,.866667,.546766,.658824,.980392,.843137,.564179,.572549,.964706,.835294,.587562,.423529,.941176,.87451,.60597,.262745,.901961,.862745,.629851,.0705882,.854902,.870588,.651741,.0509804,.8,.85098,.681592,.0235294,.709804,.831373,.712935,.0313725,.615686,.811765,.75,.0313725,.537255,.788235,.775,.0392157,.466667,.768627,.8,.0509804,.396078,.741176,.825,.054902,.317647,.709804,.85,.054902,.243137,.678431,.875,.0431373,.164706,.639216,.9,.0313725,.0980392,.6,.925,.0392157,.0392157,.560784,.95,.105882,.0509804,.509804,.975,.113725,.0235294,.45098,1,.12549,0,.380392]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"BkRd",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,1,0,0]},{ColorSpace:"RGB",Name:"BkGn",NanColor:[1,0,1],RGBPoints:[0,0,0,0,1,0,1,0]},{ColorSpace:"RGB",Name:"BkBu",NanColor:[1,1,0],RGBPoints:[0,0,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"BkMa",NanColor:[0,1,0],RGBPoints:[0,0,0,0,1,1,0,1]},{ColorSpace:"RGB",Name:"BkCy",NanColor:[0,1,1],RGBPoints:[0,0,0,0,1,0,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear YGB 1211g",NanColor:[.25,0,0],RGBPoints:[0,1,.988235,.968627,.02,1,.952941,.878431,.05,.968627,.905882,.776471,.1,.94902,.898039,.647059,.15,.901961,.878431,.556863,.2,.847059,.858824,.482353,.25,.690196,.819608,.435294,.3,.513725,.768627,.384314,.35,.337255,.721569,.337255,.4,.278431,.658824,.392157,.45,.231373,.639216,.435294,.5,.203922,.6,.486275,.55,.172549,.568627,.537255,.6,.141176,.517647,.54902,.65,.133333,.458824,.541176,.7,.12549,.396078,.529412,.75,.117647,.321569,.521569,.8,.121569,.258824,.509804,.85,.133333,.227451,.501961,.9,.145098,.192157,.490196,.95,.188235,.164706,.470588,1,.258824,.196078,.439216]},{ColorSpace:"CIELAB",Creator:"Francesca Samsel",Name:"Linear Green (Gr4L)",NanColor:[.25,0,0],RGBPoints:[0,.054902,.109804,.121569,.05,.07451,.172549,.180392,.1,.086275,.231373,.219608,.15,.094118,.278431,.25098,.2,.109804,.34902,.278431,.25,.113725,.4,.278431,.3,.117647,.45098,.270588,.35,.117647,.490196,.243137,.4,.113725,.521569,.203922,.45,.109804,.54902,.152941,.5,.082353,.588235,.082353,.55,.109804,.631373,.05098,.6,.211765,.678431,.082353,.65,.317647,.721569,.113725,.7,.431373,.760784,.160784,.75,.556863,.8,.239216,.8,.666667,.839216,.294118,.85,.784314,.878431,.396078,.9,.886275,.921569,.533333,.95,.960784,.94902,.670588,1,1,.984314,.901961]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Linear Blue (8_31f)",NanColor:[.25,0,0],RGBPoints:[0,.960784,1,.980392,.05,.815686,.960784,.913725,.1,.670588,.929412,.870588,.15,.556863,.901961,.843137,.2,.478431,.870588,.823529,.25,.439216,.831373,.803922,.3,.4,.8,.788235,.35,.376471,.768627,.768627,.4,.34902,.709804,.729412,.45,.32549,.654902,.690196,.5,.301961,.607843,.658824,.55,.247059,.545098,.619608,.6,.239216,.494118,.580392,.65,.227451,.439216,.541176,.7,.227451,.403922,.521569,.75,.231373,.368627,.501961,.8,.227451,.321569,.470588,.85,.219608,.282353,.439216,.9,.192157,.235294,.4,.95,.160784,.184314,.34902,1,.133333,.12549,.301961]},{ColorSpace:"HSV",Name:"Blue to Red Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,0,0,1,1,1,0,0]},{ColorSpace:"HSV",Name:"Red to Blue Rainbow",NanColor:[.498039215686,.498039215686,.498039215686],RGBPoints:[0,1,0,0,1,0,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended White",NanColor:[1,1,0],RGBPoints:[0,1,1,1,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Grey",NanColor:[1,1,0],RGBPoints:[0,.317647058824,.341176470588,.43137254902,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Rainbow Blended Black",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.17,0,0,1,.34,0,1,1,.5,0,1,0,.67,1,1,0,.84,1,0,0,1,.878431372549,0,1]},{ColorSpace:"RGB",Name:"Blue to Yellow",NanColor:[1,0,0],RGBPoints:[0,.0392156862745,.0392156862745,.949019607843,1,.949019607843,.949019607843,.0392156862745]},{ColorSpace:"HSV",Name:"blot",RGBPoints:[0,0,0,1,.166,0,0,1,.167,1,0,1,.332,1,0,1,.333,0,1,1,.5,0,1,1,.501,0,1,0,.666,0,1,0,.667,1,1,0,.832,1,1,0,.833,1,0,0,1,1,0,0]},{ColorSpace:"Lab",Name:"CIELab Blue to Red",NanColor:[1,1,0],RGBPoints:[0,0,.6,.749019607843,1,.76862745098,.466666666667,.341176470588]},{ColorSpace:"RGB",Name:"jet",RGBPoints:[-1,0,0,.5625,-.777778,0,0,1,-.269841,0,1,1,-.015873,.5,1,.5,.238095,1,1,0,.746032,1,0,0,1,.5,0,0]},{ColorSpace:"RGB",Name:"rainbow",RGBPoints:[-1,0,0,1,-.5,0,1,1,0,0,1,0,.5,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"nic_CubicL",RGBPoints:[-1,.479965,.0118108,.5307,-.87451,.522213,.0551282,.706919,-.74902,.50839,.237278,.867764,-.623529,.451617,.373834,.987255,-.498039,.39365,.497255,.97506,-.372549,.328631,.599639,.891843,-.247059,.250043,.690286,.778553,-.121569,.249656,.764905,.645857,.00392157,.297954,.821466,.50449,.129412,.337509,.872595,.358447,.254902,.430011,.913789,.297079,.380392,.587191,.931381,.333353,.505882,.727937,.93591,.353742,.631373,.826403,.921081,.365066,.756863,.893201,.846317,.372662,.882353,.965347,.73884,.378506,1,.983235,.597451,.366856]},{ColorSpace:"Lab",Name:"nic_CubicYF",RGBPoints:[-1,.5151,.0482,.6697,-.87451,.520711,.168955,.800574,-.74902,.493694,.278596,.911824,-.623529,.440026,.369475,.984978,-.498039,.398932,.457593,.987053,-.372549,.350651,.540644,.929608,-.247059,.298827,.615625,.857729,-.121569,.239928,.685061,.769531,.00392157,.228832,.739349,.673287,.129412,.263297,.78608,.569988,.254902,.298107,.828337,.460214,.380392,.33092,.864071,.352674,.505882,.38306,.898169,.287309,.631373,.49023,.917481,.307961,.756863,.62372,.926026,.332309,.882353,.717458,.92527,.342476,1,.8,.9255,.3529]},{ColorSpace:"Lab",Name:"gist_earth",RGBPoints:[-1,0,0,0,-.87451,.239216,.027451,.415686,-.74902,.0901961,.254902,.556863,-.623529,.0941176,.352941,.54902,-.498039,.105882,.435294,.533333,-.372549,.12549,.52549,.501961,-.247059,.156863,.596078,.443137,-.121569,.196078,.65098,.380392,.00392157,.282353,.717647,.301961,.129412,.466667,.772549,.27451,.254902,.678431,.784314,.309804,.380392,.901961,.756863,.376471,.505882,.992157,.705882,.521569,.631373,1,.721569,.701961,.756863,1,.784314,.784314,.882353,1,.866667,.866667,1,1,1,1]},{ColorSpace:"Lab",Name:"2hot",RGBPoints:[-1,.0416667,0,0,-.873016,.208333,0,0,-.746032,.375,0,0,-.619048,.541667,0,0,-.492063,.708333,0,0,-.365079,.854137,0,0,-.238095,.937488,.039062,0,-.111111,1,.208333,0,.015873,1,.375,0,.142857,1,.541667,0,.269841,1,.708333,0,.396825,1,.858805,.03125,.52381,1,.947392,.15625,.650794,1,1,.3125,.777778,1,1,.5625,.904762,1,1,.8125,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_red2yellow_BW",RGBPoints:[-1,7.54296e-7,0,109827e-10,-.87451,.18285,.0264094,0,-.74902,.3066,0,0,-.623529,.422841,0,0,-.498039,.522945,0,0,-.372549,.605721,0,0,-.247059,.672502,.14168,0,-.121569,.728167,.244025,0,.00392157,.781215,.333454,0,.129412,.825,.423586,0,.254902,.855893,.516793,0,.380392,.880491,.608846,0,.505882,.910305,.695505,0,.631373,.94109,.779067,.223528,.756863,.967873,.858572,.473521,.882353,.986815,.933211,.751583,1,1,1,.999997]},{ColorSpace:"Lab",Name:"erdc_marine2gold_BW",RGBPoints:[-1,1.11641e-7,0,162551e-11,-.87451,.0413146,.0619808,.209857,-.74902,.0185557,.101341,.350684,-.623529,.00486405,.149847,.461054,-.498039,.0836345,.210845,.517906,-.372549,.173222,.276134,.541793,-.247059,.259857,.343877,.535869,-.121569,.362299,.408124,.504293,.00392157,.468266,.468276,.468257,.129412,.582781,.527545,.374914,.254902,.691591,.585251,.274266,.380392,.784454,.645091,.247332,.505882,.862299,.710383,.27518,.631373,.920863,.782923,.351563,.756863,.955792,.859699,.533541,.882353,.976162,.93433,.780671,1,1,1,.999983]},{ColorSpace:"Lab",Name:"erdc_blue2gold_BW",RGBPoints:[-1,0,0,0,-.87451,.0742735,.0440331,.230013,-.74902,.125276,.0258685,.415826,-.623529,.143879,.0163031,.591346,-.498039,.212261,.0627855,.705239,-.372549,.306048,.141178,.763636,-.247059,.391537,.232286,.773263,-.121569,.461734,.336633,.708321,.00392157,.54209,.427581,.590007,.129412,.61704,.508623,.460978,.254902,.702703,.579586,.309117,.380392,.790336,.644811,.170397,.505882,.870173,.710733,.117134,.631373,.93656,.781991,.157144,.756863,.965672,.862068,.409836,.882353,.985751,.936296,.714162,1,1,1,.999999]},{ColorSpace:"Lab",Name:"erdc_sapphire2gold_BW",RGBPoints:[-1,.107704,.107708,.107694,-.87451,.1851,.112354,.308554,-.74902,.236782,.114233,.48788,-.623529,.28296,.126187,.639464,-.498039,.344787,.171643,.739713,-.372549,.413325,.242371,.76913,-.247059,.481863,.3131,.719841,-.121569,.550402,.383829,.612222,.00392157,.61894,.454558,.51126,.129412,.687478,.525287,.39993,.254902,.756017,.596016,.289923,.380392,.824555,.666745,.255498,.505882,.892979,.736822,.27696,.631373,.938851,.804966,.351734,.756863,.966491,.874853,.53572,.882353,.982105,.94153,.782579,1,1,1,.999986]},{ColorSpace:"Lab",Name:"erdc_red2purple_BW",RGBPoints:[-1,0,0,0,-.87451,.167793,.0166271,.0431278,-.74902,.262608,.0107595,.0791181,-.623529,.351902,.0101858,.100926,-.498039,.441257,.0160835,.131919,-.372549,.5221,.0555972,.195625,-.247059,.593852,.104294,.310234,-.121569,.654628,.158115,.448486,.00392157,.707443,.220914,.570253,.129412,.749504,.293268,.67897,.254902,.781587,.370517,.779269,.380392,.809951,.451099,.855831,.505882,.84424,.531462,.900451,.631373,.865174,.620901,.91606,.756863,.875041,.714054,.910284,.882353,.880764,.80554,.896276,1,.887572,.887591,.887556]},{ColorSpace:"Lab",Name:"erdc_purple2pink_BW",RGBPoints:[-1,0,0,0,-.87451,.117562,.0291202,.175876,-.74902,.178368,.0458476,.285454,-.623529,.237731,.0680173,.387717,-.498039,.300877,.0956291,.484802,-.372549,.370929,.136858,.554985,-.247059,.449033,.189273,.58863,-.121569,.529971,.245796,.598587,.00392157,.609914,.300643,.610244,.129412,.697079,.351286,.616371,.254902,.785858,.401991,.617376,.380392,.862517,.45745,.64463,.505882,.91359,.525462,.705336,.631373,.932583,.61064,.767412,.756863,.922478,.706966,.817522,.882353,.901302,.803071,.856311,1,.887571,.887591,.887549]},{ColorSpace:"Lab",Name:"erdc_pbj_lin",RGBPoints:[-1,0,0,0,-.87451,.091821,.0611476,.10617,-.74902,.160311,.0900022,.192713,-.623529,.22484,.12126,.272128,-.498039,.291263,.157469,.340828,-.372549,.360015,.200388,.388903,-.247059,.437497,.250058,.387201,-.121569,.512636,.304969,.355955,.00392157,.582603,.360874,.33488,.129412,.655126,.416374,.306351,.254902,.725889,.473329,.279051,.380392,.778125,.537928,.302697,.505882,.815894,.606931,.382431,.631373,.839159,.679308,.497608,.756863,.854748,.751666,.631792,.882353,.869483,.822508,.768592,1,.887572,.887589,.887565]},{ColorSpace:"Lab",Name:"erdc_blue2green_muted",RGBPoints:[-1,.107704,.107708,.107695,-.87451,.141522,.13066,.270741,-.74902,.180123,.146119,.42308,-.623529,.210161,.169674,.551795,-.498039,.239701,.212939,.634969,-.372549,.253916,.282947,.653641,-.247059,.242791,.366933,.608521,-.121569,.226302,.446776,.52693,.00392157,.236237,.514689,.458798,.129412,.274641,.577589,.376069,.254902,.349625,.633993,.288131,.380392,.4437,.683677,.260497,.505882,.536247,.731214,.285424,.631373,.628472,.777128,.349151,.756863,.718259,.819287,.496825,.882353,.804768,.856164,.703299,1,.887571,.887591,.887548]},{ColorSpace:"Lab",Name:"erdc_blue2green_BW",RGBPoints:[-1,3.63578e-7,0,529374e-11,-.87451,.0539915,.0577948,.212806,-.74902,.0620393,.0758942,.388959,-.623529,.0697499,.102032,.54177,-.498039,.113295,.156156,.64334,-.372549,.152047,.243196,.670283,-.247059,.158096,.344084,.622864,-.121569,.151142,.43922,.532767,.00392157,.17155,.521588,.457719,.129412,.225861,.599141,.363997,.254902,.32328,.67007,.259083,.380392,.442344,.733697,.223754,.505882,.558409,.794941,.257411,.631373,.673875,.854344,.340822,.756863,.787244,.909326,.524717,.882353,.896483,.958063,.775914,1,1,1,.999982]},{ColorSpace:"Lab",Name:"GREEN-WHITE_LINEAR",RGBPoints:[-1,0,0,0,-.87451,0,.062745,0,-.74902,0,.12549,0,-.623529,0,.188235,0,-.498039,0,.25098,0,-.372549,0,.313725,0,-.247059,0,.376471,0,-.121569,.094118,.439216,0,.00392157,.196078,.501961,0,.129412,.294118,.564706,0,.254902,.396078,.627451,0,.380392,.498039,.690196,0,.505882,.6,.752941,.145098,.631373,.701961,.815686,.364706,.756863,.8,.878431,.580392,.882353,.901961,.941176,.796078,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_green2yellow_BW",RGBPoints:[-1,0,0,0,-.87451,0,.105542,.0603919,-.74902,0,.159454,.104148,-.623529,0,.219502,.15542,-.498039,0,.282276,.203811,-.372549,0,.346331,.235652,-.247059,0,.411765,.235428,-.121569,0,.477177,.217977,.00392157,.0593644,.541635,.21361,.129412,.233081,.604722,.210591,.254902,.369803,.664942,.226536,.380392,.498446,.722367,.288237,.505882,.601929,.782244,.380815,.631373,.703207,.840497,.512134,.756863,.803186,.896433,.674462,.882353,.903834,.950266,.846715,1,1,1,.999981]},{ColorSpace:"Lab",Name:"blue2cyan",RGBPoints:[-1,0,0,0,-.87451,0,.152941,.364706,-.74902,0,.254902,.470588,-.623529,0,.34902,.572549,-.498039,0,.443137,.670588,-.372549,0,.537255,.772549,-.247059,0,.627451,.870588,-.121569,0,.717647,.964706,.00392157,.0784314,.772549,1,.129412,.207843,.858824,1,.254902,.32549,.941176,1,.380392,.45098,1,1,.505882,.560784,1,1,.631373,.662745,1,1,.756863,.760784,1,1,.882353,.870588,1,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_blue2cyan_BW",RGBPoints:[-1,4.05298e-7,0,59012e-10,-.87451,.0207526,.0740933,.18093,-.74902,0,.121033,.30343,-.623529,0,.166892,.416095,-.498039,0,.216768,.524796,-.372549,.0164769,.275471,.608585,-.247059,.0544527,.344824,.659267,-.121569,.0880643,.419118,.688675,.00392157,.127938,.492556,.720256,.129412,.149476,.566946,.756918,.254902,.188961,.641333,.792122,.380392,.245482,.715336,.827609,.505882,.329216,.786235,.874761,.631373,.453558,.852803,.918466,.756863,.626281,.910493,.954,.882353,.82257,.958709,.980146,1,1,1,.999989]},{ColorSpace:"Lab",Name:"erdc_blue_BW",RGBPoints:[-1,0,0,0,-.87451,.0425591,.0763529,.150682,-.74902,.0569472,.119154,.275403,-.623529,.0635978,.164772,.395427,-.498039,.0774342,.213851,.510014,-.372549,.106815,.267034,.615102,-.247059,.122093,.324649,.720068,-.121569,.160851,.387068,.806956,.00392157,.213754,.453516,.878012,.129412,.26722,.524656,.932436,.254902,.326844,.599279,.968038,.380392,.403403,.674712,.984784,.505882,.499703,.745519,1,.631373,.615055,.813983,1,.756863,.74405,.879228,1,.882353,.877909,.941913,1,1,1,1,.999996]},{ColorSpace:"Lab",Name:"BLUE-WHITE",RGBPoints:[-1,0,0,0,-.87451,0,0,.082353,-.74902,0,0,.168627,-.623529,0,0,.254902,-.498039,0,0,.337255,-.372549,0,0,.423529,-.247059,0,0,.509804,-.121569,0,.101961,.592157,.00392157,0,.203922,.678431,.129412,0,.301961,.764706,.254902,0,.403922,.85098,.380392,0,.505882,.933333,.505882,0,.603922,1,.631373,.254902,.705882,1,.756863,.509804,.807843,1,.882353,.764706,.905882,1,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_purple_BW",RGBPoints:[-1,4.264e-8,0,6.20844e-7,-.87451,.100579,.0593111,.145666,-.74902,.167794,.0889224,.254953,-.623529,.231446,.123339,.360511,-.498039,.296699,.163027,.461278,-.372549,.363211,.209286,.55306,-.247059,.431136,.260776,.637195,-.121569,.498202,.320012,.705799,.00392157,.567456,.380459,.778091,.129412,.629381,.445284,.8448,.254902,.688373,.517374,.895694,.380392,.74891,.590906,.93976,.505882,.805017,.667956,.977626,.631373,.850914,.752618,.992396,.756863,.89724,.838454,.994093,.882353,.948461,.922603,.994449,1,1,1,.999967]},{ColorSpace:"Lab",Name:"erdc_magenta_BW",RGBPoints:[-1,0,0,254023e-10,-.87451,.128696,.0456782,.11635,-.74902,.228133,.0476299,.201452,-.623529,.327273,.0374065,.282107,-.498039,.420953,.0408166,.35709,-.372549,.511562,.0642203,.430511,-.247059,.599552,.102686,.504257,-.121569,.684646,.150536,.579429,.00392157,.765817,.205978,.656062,.129412,.839176,.27229,.731807,.254902,.89536,.357594,.797309,.380392,.930238,.457825,.846984,.505882,.945921,.564536,.880571,.631373,.948995,.670753,.902279,.756863,.947124,.772819,.918171,.882353,.947265,.869424,.934352,1,.954719,.95475,.954726]},{ColorSpace:"Lab",Name:"magenta",RGBPoints:[-1,0,0,0,-.87451,.364706,0,.152941,-.74902,.470588,0,.254902,-.623529,.572549,0,.34902,-.498039,.670588,0,.443137,-.372549,.772549,0,.537255,-.247059,.870588,0,.627451,-.121569,.964706,0,.717647,.00392157,1,.0784314,.772549,.129412,1,.207843,.858824,.254902,1,.32549,.941176,.380392,1,.45098,1,.505882,1,.560784,1,.631373,1,.662745,1,.756863,1,.760784,1,.882353,1,.870588,1,1,1,1,1]},{ColorSpace:"Lab",Name:"RED-PURPLE",RGBPoints:[-1,0,0,0,-.87451,.188235,0,.007843,-.74902,.345098,0,.035294,-.623529,.439216,0,.098039,-.498039,.533333,0,.152941,-.372549,.627451,.015686,.211765,-.247059,.721569,.031373,.266667,-.121569,.8,.047059,.329412,.00392157,.862745,.047059,.403922,.129412,.941176,.062745,.466667,.254902,.988235,.078431,.54902,.380392,.988235,.141176,.643137,.505882,.988235,.25098,.729412,.631373,.988235,.376471,.811765,.756863,.988235,.54902,.886275,.882353,.988235,.752941,.952941,1,.996078,.996078,.996078]},{ColorSpace:"Lab",Name:"erdc_red_BW",RGBPoints:[-1,0,0,0,-.87451,.147204,.0480135,.0401815,-.74902,.253411,.0617478,.0301333,-.623529,.356059,.0746331,.0446897,-.498039,.457731,.0934935,.0636931,-.372549,.557199,.122714,.0860013,-.247059,.665179,.144238,.105585,-.121569,.763833,.187056,.138326,.00392157,.847035,.254558,.189407,.129412,.905663,.345937,.258215,.254902,.941431,.447111,.346277,.380392,.962608,.546927,.457571,.505882,.987833,.637276,.569944,.631373,.994202,.732176,.687958,.756863,.993304,.826268,.800567,.882353,.994413,.917205,.906393,1,1,1,.999979]},{ColorSpace:"Lab",Name:"RED_TEMPERATURE",RGBPoints:[-1,0,0,0,-.87451,.090196,0,0,-.74902,.180392,0,0,-.623529,.270588,0,0,-.498039,.360784,0,0,-.372549,.45098,0,0,-.247059,.545098,0,0,-.121569,.635294,0,0,.00392157,.72549,.058824,0,.129412,.815686,.176471,0,.254902,.905882,.294118,0,.380392,1,.411765,0,.505882,1,.533333,.027451,.631373,1,.65098,.27451,.756863,1,.768627,.521569,.882353,1,.886275,.768627,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_orange_BW",RGBPoints:[-1,0,0,253806e-10,-.87451,.135871,.0593824,0,-.74902,.224328,.0907216,0,-.623529,.318083,.119647,0,-.498039,.414443,.150246,0,-.372549,.511077,.184884,0,-.247059,.605501,.226033,0,-.121569,.695274,.275491,0,.00392157,.777826,.334445,0,.129412,.851498,.402441,0,.254902,.915899,.47759,602975e-9,.380392,.971984,.557882,.0361443,.505882,1,.641287,.135967,.631373,1,.725198,.27997,.756863,1,.808205,.438135,.882353,1,.89306,.587036,1,1,.977928,.721599]},{ColorSpace:"Lab",Name:"heated_object",RGBPoints:[-1,0,0,0,-.87451,.34902,.0862745,0,-.74902,.45098,.172549,0,-.623529,.52549,.231373,0,-.498039,.580392,.278431,0,-.372549,.623529,.313725,0,-.247059,.670588,.352941,0,-.121569,.717647,.392157,0,.00392157,.772549,.439216,0,.129412,.839216,.494118,0,.254902,.901961,.541176,0,.380392,.968627,.6,0,.505882,1,.658824,0,.631373,1,.721569,0,.756863,1,.827451,.298039,.882353,1,.976471,.72549,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_gold_BW",RGBPoints:[-1,0,0,190933e-10,-.87451,.128363,.0636265,0,-.74902,.193795,.111057,0,-.623529,.25976,.15987,0,-.498039,.328546,.210589,0,-.372549,.399726,.26332,0,-.247059,.472969,.318261,0,-.121569,.546245,.375827,0,.00392157,.61745,.436719,0,.129412,.685545,.501113,0,.254902,.749578,.568799,0,.380392,.80962,.6394,0,.505882,.865572,.712699,.10257,.631373,.917709,.787569,.233665,.756863,.966914,.863138,.369608,.882353,1,.939405,.496104,1,.999225,1,.612275]},{ColorSpace:"Lab",Name:"erdc_brown_BW",RGBPoints:[-1,3.3216e-7,0,483629e-11,-.87451,.14693,.0518172,0,-.74902,.225806,.0814996,0,-.623529,.301681,.111452,0,-.498039,.370487,.150664,0,-.372549,.43108,.199477,0,-.247059,.4849,.255107,0,-.121569,.536798,.313486,0,.00392157,.59286,.371167,0,.129412,.653119,.428135,0,.254902,.714589,.485917,.0379541,.380392,.774667,.54565,.116634,.505882,.831222,.608047,.183895,.631373,.880305,.674199,.260298,.756863,.922314,.742472,.367086,.882353,.959408,.811222,.497258,1,.993548,.875183,.622093]},{ColorSpace:"Lab",Name:"copper_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0784314,.0501961,.0313725,-.74902,.156863,.100392,.0627451,-.623529,.235294,.150588,.0941176,-.498039,.313725,.200784,.12549,-.372549,.392157,.25098,.156863,-.247059,.470588,.301176,.188235,-.121569,.54902,.351373,.219608,.00392157,.627451,.401569,.25098,.129412,.705882,.451765,.282353,.254902,.784314,.501961,.313725,.380392,.862745,.552157,.345098,.505882,.941176,.602353,.376471,.631373,1,.652549,.407843,.756863,1,.702745,.439216,.882353,1,.752941,.470588,1,1,.8,.5]},{ColorSpace:"Lab",Name:"pink_Matlab",RGBPoints:[-1,0,0,0,-.87451,.312416,.204524,.204524,-.74902,.441822,.289241,.289241,-.623529,.54112,.354246,.354246,-.498039,.624831,.409048,.409048,-.372549,.698582,.45733,.45733,-.247059,.764404,.502282,.500979,-.121569,.791292,.591516,.54112,.00392157,.817297,.66895,.578481,.129412,.842499,.738308,.613572,.254902,.866968,.801687,.646762,.380392,.890766,.86041,.678329,.505882,.913944,.913944,.711254,.631373,.936549,.936549,.79459,.756863,.958621,.958621,.869979,.882353,.980196,.980196,.939336,1,1,1,1]},{ColorSpace:"Lab",Name:"bone_Matlab",RGBPoints:[-1,0,0,0,-.87451,.054902,.054902,.075817,-.74902,.109804,.109804,.151634,-.623529,.164706,.164706,.227451,-.498039,.219608,.219608,.303268,-.372549,.27451,.27451,.379085,-.247059,.329412,.329902,.454412,-.121569,.384314,.405719,.509314,.00392157,.439216,.481536,.564216,.129412,.494118,.557353,.619118,.254902,.54902,.63317,.67402,.380392,.603922,.708987,.728922,.505882,.660294,.783824,.783824,.631373,.746569,.838725,.838725,.756863,.832843,.893627,.893627,.882353,.919118,.948529,.948529,1,1,1,1]},{ColorSpace:"Lab",Name:"gray_Matlab",RGBPoints:[-1,0,0,0,-.87451,.0627451,.0627451,.0627451,-.74902,.12549,.12549,.12549,-.623529,.188235,.188235,.188235,-.498039,.25098,.25098,.25098,-.372549,.313725,.313725,.313725,-.247059,.376471,.376471,.376471,-.121569,.439216,.439216,.439216,.00392157,.501961,.501961,.501961,.129412,.564706,.564706,.564706,.254902,.627451,.627451,.627451,.380392,.690196,.690196,.690196,.505882,.752941,.752941,.752941,.631373,.815686,.815686,.815686,.756863,.878431,.878431,.878431,.882353,.941176,.941176,.941176,1,1,1,1]},{ColorSpace:"Lab",Name:"Purples",RGBPoints:[-1,.247059,0,.490196,-.87451,.288397,.07677,.525629,-.74902,.32975,.153587,.561092,-.623529,.373057,.236263,.600461,-.498039,.416363,.319,.639923,-.372549,.459669,.405613,.685198,-.247059,.503345,.491534,.730058,-.121569,.562399,.54862,.757616,.00392157,.621453,.606075,.785544,.129412,.680508,.674971,.824914,.254902,.739562,.743406,.863899,.380392,.798616,.800492,.893426,.505882,.85684,.856655,.922491,.631373,.898178,.894056,.942176,.756863,.938654,.930919,.961646,.882353,.964245,.958478,.977393,1,.988235,.984314,.992157]},{ColorSpace:"Lab",Name:"Blues",RGBPoints:[-1,.031373,.188235,.419608,-.87451,.031373,.253195,.516063,-.74902,.031757,.318139,.612149,-.623529,.080969,.38113,.661361,-.498039,.130427,.444152,.710327,-.372549,.195386,.509112,.743791,-.247059,.260715,.573841,.777209,-.121569,.341423,.628958,.808704,.00392157,.422745,.684075,.839892,.129412,.523137,.739193,.861546,.254902,.622684,.793464,.883429,.380392,.701423,.826928,.910988,.505882,.778685,.8603,.937993,.631373,.825928,.891795,.953741,.756863,.87328,.923291,.969489,.882353,.922491,.954787,.985236,1,.968627,.984314,1]},{ColorSpace:"Lab",Name:"Greens",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546082,.271326,-.372549,.197232,.609073,.31857,-.247059,.257255,.671742,.365859,-.121569,.357647,.720953,.415071,.00392157,.45767,.769919,.465021,.129412,.546251,.811257,.537855,.254902,.634295,.852211,.610688,.380392,.709097,.883706,.683522,.505882,.78316,.914833,.755894,.631373,.842215,.938454,.818885,.756863,.899977,.961538,.880692,.882353,.935409,.975317,.92203,1,.968627,.988235,.960784]},{ColorSpace:"Lab",Name:"PuBu",RGBPoints:[-1,.301961,0,.294118,-.87451,.404321,.029527,.390573,-.74902,.50599,.059592,.486782,-.623529,.519769,.158016,.551742,-.498039,.533456,.256194,.616301,-.372549,.54133,.33887,.655671,-.247059,.54902,.421592,.695087,-.121569,.54902,.506236,.736424,.00392157,.550127,.590573,.777701,.129412,.585559,.665375,.81707,.254902,.622145,.739023,.855825,.380392,.687105,.784298,.879446,.505882,.752065,.829758,.903253,.631373,.817024,.87897,.930811,.756863,.880907,.927213,.957832,.882353,.926182,.958708,.975548,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"BuPu",RGBPoints:[-1,.007843,.219608,.345098,-.87451,.01178,.286536,.449427,-.74902,.015702,.35328,.553479,-.623529,.01767,.396586,.622376,-.498039,.021115,.4402,.690688,-.372549,.11757,.503191,.722184,-.247059,.214625,.565859,.753633,-.121569,.336671,.615071,.78316,.00392157,.457978,.663975,.812503,.129412,.556401,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821638,.903068,.631373,.873387,.864944,.92669,.756863,.927536,.907605,.949988,.882353,.964937,.9391,.967705,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGn",RGBPoints:[-1,.031373,.25098,.505882,-.87451,.031373,.329719,.590527,-.74902,.031911,.408397,.674787,-.623529,.100807,.479262,.710219,-.498039,.169704,.550219,.745744,-.372549,.238601,.62699,.787082,-.247059,.307958,.703114,.826759,-.121569,.39654,.752326,.797232,.00392157,.485121,.801046,.767705,.129412,.573702,.83451,.738178,.254902,.661592,.867743,.711034,.380392,.732457,.895302,.74253,.505882,.801845,.922307,.774579,.631373,.841215,.938055,.817885,.756863,.880907,.95391,.861084,.882353,.926182,.971626,.902422,1,.968627,.988235,.941176]},{ColorSpace:"Lab",Name:"GnBu",RGBPoints:[-1,0,.266667,.105882,-.87451,0,.347374,.139346,-.74902,538e-6,.427912,.172933,-.623529,.069435,.486967,.222145,-.498039,.138178,.546175,.272095,-.372549,.197232,.615071,.368551,-.247059,.256609,.683276,.464867,-.121569,.329443,.722645,.555417,.00392157,.403137,.762138,.645413,.129412,.503529,.805444,.718247,.254902,.603922,.848597,.790465,.380392,.704314,.887966,.847551,.505882,.802307,.926321,.903714,.631373,.851519,.944037,.941115,.756863,.899977,.961538,.976901,.882353,.935409,.975317,.984775,1,.968627,.988235,.992157]},{ColorSpace:"Lab",Name:"GnBuPu",RGBPoints:[-1,.003922,.27451,.211765,-.87451,.003922,.349312,.280661,-.74902,.003937,.423852,.349773,-.623529,.005905,.46519,.446228,-.498039,.009443,.506344,.542837,-.372549,.111803,.535871,.649135,-.247059,.214025,.565859,.753633,-.121569,.310481,.615071,.78316,.00392157,.407797,.663975,.812503,.129412,.531811,.703345,.836125,.254902,.65421,.742714,.859669,.380392,.736886,.782084,.881323,.505882,.81827,.821176,.902884,.631373,.873387,.854641,.922568,.756863,.927536,.888535,.942361,.882353,.964937,.929873,.964014,1,1,.968627,.984314]},{ColorSpace:"Lab",Name:"BuGnYl",RGBPoints:[-1,.031373,.113725,.345098,-.87451,.088458,.159,.463206,-.74902,.145052,.204567,.5807,-.623529,.139146,.287243,.620069,-.498039,.13318,.370196,.659562,-.372549,.123337,.470588,.706805,-.247059,.115386,.570335,.753126,-.121569,.186251,.643168,.761,.00392157,.258716,.71514,.768074,.129412,.380761,.760415,.750358,.254902,.503576,.806075,.732795,.380392,.645306,.861192,.719016,.505882,.783899,.91511,.705606,.631373,.858701,.944637,.6997,.756863,.931349,.973303,.698424,.882353,.966782,.987082,.777163,1,1,1,.85098]},{ColorSpace:"Lab",Name:"PuRd",RGBPoints:[-1,.286275,0,.415686,-.87451,.38273,.001968,.441276,-.74902,.479231,.003922,.466774,-.623529,.581592,.003922,.480554,-.498039,.683799,.00549,.494887,-.372549,.776317,.105882,.544098,-.247059,.867866,.206321,.592618,-.121569,.919047,.308681,.612303,.00392157,.968812,.411226,.632603,.129412,.974717,.519493,.671972,.254902,.980546,.626451,.71065,.380392,.984483,.701253,.732303,.505882,.988328,.77504,.755617,.631373,.990296,.828189,.812703,.756863,.992372,.880907,.869035,.882353,.996309,.926182,.912341,1,1,.968627,.952941]},{ColorSpace:"Lab",Name:"RdPu",RGBPoints:[-1,.403922,0,.121569,-.87451,.500377,0,.192434,-.74902,.596909,277e-6,.263037,-.623529,.703206,.035709,.300438,-.498039,.808612,.071296,.338854,-.372549,.857824,.116571,.441215,-.247059,.905513,.163552,.54293,-.121569,.889765,.281661,.617732,.00392157,.873156,.39897,.691611,.129412,.82985,.491488,.736886,.254902,.789081,.583237,.781853,.380392,.810734,.656071,.819254,.505882,.833126,.729181,.85684,.631373,.870527,.80792,.898178,.756863,.907605,.884398,.938331,.882353,.9391,.921799,.958016,1,.968627,.956863,.976471]},{ColorSpace:"Lab",Name:"Oranges",RGBPoints:[-1,.498039,.152941,.015686,-.87451,.57481,.182468,.013718,-.74902,.651765,.212042,.011734,-.623529,.752157,.247474,.007797,-.498039,.851719,.283368,.004475,-.372549,.898962,.348328,.039908,-.247059,.945652,.413426,.076401,-.121569,.969273,.484291,.157109,.00392157,.992157,.554971,.238185,.129412,.992157,.619931,.330704,.254902,.992157,.684967,.423837,.380392,.992157,.751895,.532103,.505882,.992249,.817716,.639354,.631373,.994218,.861023,.725967,.756863,.996186,.903576,.810965,.882353,.998155,.933103,.868051,1,1,.960784,.921569]},{ColorSpace:"Lab",Name:"Reds",RGBPoints:[-1,.403922,0,.05098,-.87451,.525967,.029527,.066728,-.74902,.647643,.058962,.082476,-.623529,.722445,.076678,.098224,-.498039,.797186,.095194,.114187,-.372549,.868051,.164091,.143714,-.247059,.937809,.233541,.173933,-.121569,.96143,.326059,.232987,.00392157,.984375,.418147,.292657,.129412,.986344,.496886,.371396,.254902,.988235,.575702,.450673,.380392,.988235,.656409,.543191,.505882,.98842,.736747,.635894,.631373,.992357,.809581,.732349,.756863,.996186,.880692,.826759,.882353,.998155,.92203,.885813,1,1,.960784,.941176]},{ColorSpace:"Lab",Name:"RdOr",RGBPoints:[-1,.498039,0,0,-.87451,.6004,0,0,-.74902,.702514,738e-6,477e-6,-.623529,.773379,.095225,.061499,-.498039,.843875,.189865,.12283,-.372549,.891119,.294195,.203537,-.247059,.937855,.397924,.283137,-.121569,.963445,.476663,.316601,.00392157,.988297,.555771,.351665,.129412,.990265,.646321,.436309,.254902,.992157,.735256,.519646,.380392,.992157,.784468,.570827,.505882,.992249,.833218,.623483,.631373,.994218,.872587,.706159,.756863,.996186,.911419,.788189,.882353,.998155,.940946,.859054,1,1,.968627,.92549]},{ColorSpace:"Lab",Name:"BrOrYl",RGBPoints:[-1,.4,.145098,.023529,-.87451,.500392,.174625,.019592,-.74902,.600784,.204291,.015656,-.623529,.701176,.251534,.011719,-.498039,.800984,.299146,.008397,-.372549,.863975,.370012,.043829,-.247059,.926321,.441107,.0794,-.121569,.961753,.521815,.120738,.00392157,.996078,.602645,.163122,.129412,.996078,.68729,.237924,.254902,.996078,.771011,.314879,.380392,.996078,.832034,.444798,.505882,.996171,.892042,.572595,.631373,.998139,.931411,.65724,.756863,1,.969489,.741669,.882353,1,.985236,.822376,1,1,1,.898039]},{ColorSpace:"Lab",Name:"RdOrYl",RGBPoints:[-1,.501961,0,.14902,-.87451,.622038,0,.14902,-.74902,.741761,4e-4,.148866,-.623529,.816563,.05158,.129181,-.498039,.890965,.10356,.110235,-.372549,.940177,.205921,.137793,-.247059,.988281,.308789,.165536,-.121569,.99025,.432803,.200969,.00392157,.992218,.555217,.236278,.129412,.994187,.628051,.267774,.254902,.996078,.701038,.301269,.380392,.996078,.777809,.383945,.505882,.996171,.852826,.466621,.631373,.998139,.892195,.549296,.756863,1,.931349,.632188,.882353,1,.966782,.7188,1,1,1,.8]},{ColorSpace:"Lab",Name:"CIELab_blue2red",RGBPoints:[-1,0,.6,.74902,1,.76863,.46667,.34118]},{ColorSpace:"Lab",Name:"blue2yellow",RGBPoints:[-1,0,0,1,0,.5,.5,.5,1,1,1,0]},{ColorSpace:"Lab",Name:"erdc_blue2gold",RGBPoints:[-1,.175119,.0438468,1,-.874016,.22383,.159771,.94557,-.748031,.27254,.233611,.891216,-.622047,.321251,.296526,.836857,-.496063,.369962,.354296,.782359,-.370079,.418672,.409139,.72754,-.244094,.467383,.462152,.672148,-.11811,.51609,.51396,.615825,.00787402,.572863,.55452,.559172,.133858,.630269,.593822,.517729,.259843,.689588,.624668,.47446,.385827,.745394,.656113,.428638,.511811,.798624,.688104,.379105,.637795,.849926,.720593,.323834,.76378,.899765,.753543,.258657,.889764,.948487,.78692,.171778,1,.990413,.816451,.00729848]},{ColorSpace:"Lab",Name:"erdc_blue2yellow",RGBPoints:[-1,.0830122,0,.495617,-.87451,.141973,.0551288,.57363,-.74902,.193048,.110258,.604561,-.623529,.234231,.165386,.57643,-.498039,.275413,.220515,.548299,-.372549,.316596,.275644,.520169,-.247059,.357778,.330773,.492038,-.121569,.398961,.385901,.463908,.00392157,.449929,.438487,.426815,.129412,.511572,.488299,.379944,.254902,.581222,.53603,.325741,.380392,.650871,.583761,.271538,.505882,.720521,.631493,.217335,.631373,.79017,.679224,.163132,.756863,.85982,.726955,.108929,.882353,.910254,.774159,.14112,1,.927513,.81759,.306289]},{ColorSpace:"Lab",Name:"erdc_cyan2orange",RGBPoints:[-1,.0471513,.213874,.414329,-.87451,.0674702,.256648,.439027,-.74902,.0959957,.299331,.462089,-.623529,.132428,.341872,.483212,-.498039,.188743,.38277,.500597,-.372549,.268511,.420229,.512179,-.247059,.352945,.455602,.519101,-.121569,.43893,.489368,.521538,.00392157,.522445,.522495,.522436,.129412,.600089,.555682,.53205,.254902,.67988,.587981,.539163,.380392,.761011,.619586,.544439,.505882,.84278,.650741,.548567,.631373,.910713,.687347,.557822,.756863,.952232,.734972,.577775,.882353,.975642,.789858,.604868,1,.990752,.843643,.632857]},{ColorSpace:"Lab",Name:"erdc_purple2green",RGBPoints:[-1,.235006,.0483128,.530899,-.87451,.302968,.108419,.552391,-.74902,.360241,.166059,.569502,-.623529,.406746,.226782,.579373,-.498039,.444073,.28964,.582094,-.372549,.473648,.353774,.577947,-.247059,.497636,.418154,.567911,-.121569,.519086,.481741,.553968,.00392157,.542884,.542914,.542875,.129412,.566303,.603989,.527499,.254902,.595218,.662965,.516857,.380392,.628641,.720701,.510673,.505882,.665373,.777849,.508165,.631373,.704182,.834921,.508303,.756863,.743846,.892328,.50999,.882353,.783158,.950422,.512181,1,.818617,1,.513888]},{ColorSpace:"Lab",Name:"erdc_purple2green_dark",RGBPoints:[-1,.107656,0,.428682,-.87451,.1924,0,.449799,-.74902,.255118,.0648939,.466726,-.623529,.304256,.133066,.476703,-.498039,.343202,.19716,.479793,-.372549,.373876,.260353,.476241,-.247059,.398497,.322872,.466953,-.121569,.420016,.384252,.453785,.00392157,.44319,.443216,.443186,.129412,.465553,.502139,.428233,.254902,.492959,.559151,.417591,.380392,.524654,.615092,.411016,.505882,.55959,.670583,.40779,.631373,.596614,.726102,.406948,.756863,.634544,.782032,.407439,.882353,.672183,.838703,.408237,1,.706131,.892759,.408452]},{ColorSpace:"Lab",Name:"coolwarm",RGBPoints:[-1,.229806,.298718,.753683,-.875,.303869,.406535,.844959,-.75,.383013,.509419,.917388,-.625,.466667,.604563,.968155,-.5,.552953,.688929,.995376,-.375,.639176,.7596,.998151,-.25,.722193,.813953,.976575,-.125,.798692,.849786,.931689,0,.865395,.86541,.865396,.125,.924128,.827385,.774508,.25,.958853,.769768,.678008,.375,.969954,.694267,.579375,.5,.958003,.602842,.481776,.625,.923945,.497309,.38797,.75,.869187,.378313,.300267,.875,.795632,.241284,.220526,1,.705673,.0155562,.150233]},{ColorSpace:"Lab",Name:"BuRd",RGBPoints:[-1,.019608,.188235,.380392,-.87451,.088504,.321107,.564937,-.74902,.163399,.444983,.697501,-.623529,.247059,.555709,.754095,-.498039,.420684,.676432,.818685,-.372549,.606459,.789773,.880277,-.247059,.761476,.868512,.924567,-.121569,.878047,.925721,.951942,.00392157,.969089,.966474,.964937,.129412,.983852,.897578,.846828,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"Spectral_lowBlue",RGBPoints:[-1,.368627,.309804,.635294,-.87451,.260361,.450058,.70173,-.74902,.248058,.591311,.717186,-.623529,.376009,.734025,.658132,-.498039,.537947,.814764,.64506,-.372549,.702345,.879585,.636678,-.247059,.84752,.938639,.607151,-.121569,.940408,.976163,.656055,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.937793,.398539,.270127,.756863,.861515,.282891,.299654,.882353,.746482,.144637,.288812,1,.619608,.003922,.258824]},{ColorSpace:"Lab",Name:"GnRP",RGBPoints:[-1,0,.266667,.105882,-.87451,.066436,.394617,.174779,-.74902,.168858,.524567,.25767,-.623529,.323875,.657439,.361015,-.498039,.504883,.772318,.506344,-.372549,.678431,.870127,.654902,-.247059,.803922,.921799,.780392,-.121569,.897116,.951942,.882814,.00392157,.967397,.965936,.967474,.129412,.928028,.879815,.930565,.254902,.866052,.780777,.882891,.380392,.77501,.665129,.821376,.505882,.675663,.537024,.737024,.631373,.57847,.396155,.645982,.756863,.492349,.223914,.547559,.882353,.375548,.096886,.423299,1,.25098,0,.294118]},{ColorSpace:"Lab",Name:"GYPi",RGBPoints:[-1,.152941,.392157,.098039,-.87451,.246444,.505344,.117724,-.74902,.351942,.614533,.161399,-.623529,.474971,.717878,.240138,-.498039,.611995,.811226,.392849,-.372549,.746328,.893118,.565321,-.247059,.859516,.94233,.747405,-.121569,.928105,.96386,.875663,.00392157,.969089,.966859,.968012,.129412,.983852,.910265,.948328,.254902,.979239,.833218,.914648,.380392,.949712,.729873,.862976,.505882,.905652,.58293,.763552,.631373,.85521,.410073,.652211,.756863,.793695,.183699,.531642,.882353,.683737,.063899,.420761,1,.556863,.003922,.321569]},{ColorSpace:"Lab",Name:"GnYlRd",RGBPoints:[-1,0,.407843,.215686,-.87451,.063975,.525952,.277201,-.74902,.177932,.633064,.332718,-.623529,.364937,.724106,.379469,-.498039,.527951,.797155,.40223,-.372549,.678431,.862822,.433449,-.247059,.803922,.916955,.514648,-.121569,.909419,.961861,.625067,.00392157,.999923,.997616,.745021,.129412,.997463,.921338,.61707,.254902,.995002,.824606,.499885,.380392,.992541,.701576,.39654,.505882,.973472,.547405,.318108,.631373,.939023,.389927,.245521,.756863,.867666,.239831,.176624,.882353,.762399,.110727,.151326,1,.647059,0,.14902]},{ColorSpace:"Lab",Name:"GBBr",RGBPoints:[-1,0,.235294,.188235,-.87451,.002461,.338639,.301423,-.74902,.055902,.448981,.417609,-.623529,.183852,.56955,.538178,-.498039,.357785,.700115,.660746,-.372549,.540177,.819531,.77624,-.247059,.714879,.890888,.864821,-.121569,.851134,.934564,.922645,.00392157,.960861,.959785,.95694,.129412,.963322,.927797,.83391,.254902,.939946,.868897,.68935,.380392,.883353,.775394,.517109,.505882,.808074,.625836,.324106,.631373,.717647,.476355,.15494,.756863,.592157,.358247,.06882,.882353,.458593,.26436,.031142,1,.329412,.188235,.019608]},{ColorSpace:"Lab",Name:"PuOr",RGBPoints:[-1,.498039,.231373,.031373,-.87451,.62599,.30273,.026451,-.74902,.746943,.387082,.037524,-.623529,.85767,.490427,.071972,-.498039,.936409,.617762,.236371,-.372549,.992695,.743099,.43291,-.247059,.995156,.841523,.63714,-.121569,.985313,.913802,.813687,.00392157,.966244,.966398,.967705,.129412,.889965,.89504,.938178,.254902,.806151,.804306,.894656,.380392,.712649,.688658,.833141,.505882,.594233,.554325,.744637,.631373,.474894,.404229,.652364,.756863,.366628,.217224,.563783,.882353,.266436,.089965,.434833,1,.176471,0,.294118]},{ColorSpace:"Lab",Name:"PRGn",RGBPoints:[-1,.25098,0,.294118,-.87451,.383852,.103345,.431911,-.74902,.497732,.234679,.55371,-.623529,.583852,.40692,.652134,-.498039,.681968,.545175,.742561,-.372549,.7807,.672357,.825221,-.247059,.871742,.788005,.886736,-.121569,.930488,.885198,.932872,.00392157,.966321,.968089,.965859,.129412,.892503,.950865,.877278,.254902,.796078,.91857,.772549,.380392,.670588,.866897,.647059,.505882,.493195,.765398,.496655,.631373,.314187,.649135,.354556,.756863,.15917,.516263,.251211,.882353,.062284,.386621,.170473,1,0,.266667,.105882]},{ColorSpace:"Lab",Name:"PiYG",RGBPoints:[-1,.556863,.003922,.321569,-.87451,.692195,.067897,.427374,-.74902,.797539,.197847,.539177,-.623529,.859054,.424221,.659746,-.498039,.908574,.592618,.770319,-.372549,.951557,.736332,.866205,-.247059,.981084,.839677,.917878,-.121569,.98293,.913802,.949558,.00392157,.96732,.968474,.965629,.129412,.92549,.963552,.869666,.254902,.852441,.939254,.736025,.380392,.739254,.890042,.553941,.505882,.60323,.805536,.382238,.631373,.467282,.711419,.235217,.756863,.344252,.608074,.156478,.882353,.2406,.49827,.116494,1,.152941,.392157,.098039]},{ColorSpace:"Lab",Name:"OrPu",RGBPoints:[-1,.176471,0,.294118,-.87451,.272434,.095963,.444214,-.74902,.373395,.228912,.56932,-.623529,.481661,.415917,.657901,-.498039,.601922,.562937,.750481,-.372549,.718493,.695886,.836986,-.247059,.811995,.811534,.898501,-.121569,.894733,.8995,.940023,.00392157,.969166,.966859,.963629,.129412,.98639,.910265,.803691,.254902,.995002,.835371,.624375,.380392,.992541,.736947,.420146,.505882,.931949,.609458,.224221,.631373,.85075,.483968,.069819,.756863,.740023,.380623,.035371,.882353,.617993,.29827,.026759,1,.498039,.231373,.031373]},{ColorSpace:"Lab",Name:"BrBG",RGBPoints:[-1,.329412,.188235,.019608,-.87451,.467205,.269435,.031911,-.74902,.6,.365629,.074202,-.623529,.72549,.483737,.160323,-.498039,.812995,.635832,.336409,-.372549,.88689,.781238,.527874,-.247059,.943483,.87474,.700115,-.121569,.963168,.929796,.841599,.00392157,.957247,.959938,.959554,.129412,.84406,.932872,.920185,.254902,.70396,.886428,.859285,.380392,.529258,.815071,.770704,.505882,.346251,.691811,.653057,.631373,.175855,.562015,.530642,.756863,.047905,.441446,.410073,.882353,.002307,.33218,.294348,1,0,.235294,.188235]},{ColorSpace:"Lab",Name:"GyRd",RGBPoints:[-1,.101961,.101961,.101961,-.87451,.227451,.227451,.227451,-.74902,.359939,.359939,.359939,-.623529,.502653,.502653,.502653,-.498039,.631373,.631373,.631373,-.372549,.749865,.749865,.749865,-.247059,.843368,.843368,.843368,-.121569,.926105,.926105,.926105,.00392157,.999846,.997232,.995694,.129412,.994925,.908651,.857901,.254902,.982468,.800692,.706113,.380392,.960323,.66782,.536332,.505882,.894579,.503806,.399769,.631373,.81707,.33218,.281046,.756863,.728489,.155017,.197386,.882353,.576932,.055363,.14925,1,.403922,0,.121569]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen",RGBPoints:[-1,.297553,0,.489074,-.87451,.40259,.151146,.567754,-.74902,.516038,.284843,.658231,-.623529,.629783,.423646,.750938,-.498039,.735198,.563697,.835956,-.372549,.82408,.695541,.903582,-.247059,.889091,.807454,.944862,-.121569,.92334,.886917,.951839,.00392157,.921045,.921084,.921003,.129412,.877324,.907455,.845381,.254902,.797649,.849713,.734695,.380392,.691646,.75964,.600532,.505882,.568981,.649159,.453807,.631373,.438945,.529756,.304259,.756863,.30973,.412001,.158303,.882353,.187078,.305111,.00251458,1,.101655,.220836,0]},{ColorSpace:"Lab",Name:"erdc_divHi_purpleGreen_dim",RGBPoints:[-1,.404088,.131038,.592767,-.87451,.486469,.230957,.651243,-.74902,.575165,.339335,.717723,-.623529,.662741,.454332,.784263,-.498039,.742071,.570213,.842918,-.372549,.806935,.678992,.886227,-.247059,.852219,.771315,.90763,-.121569,.873345,.837327,.901572,.00392157,.866783,.86682,.866745,.129412,.82839,.858225,.796812,.254902,.762578,.814287,.700202,.380392,.676429,.744229,.585735,.505882,.577033,.65732,.461526,.631373,.47128,.562476,.33476,.756863,.365461,.467957,.21076,.882353,.264758,.381138,.0878313,1,.182591,.312249,0]},{ColorSpace:"Lab",Name:"erdc_divLow_icePeach",RGBPoints:[-1,.480048,.817441,.998056,-.87451,.425898,.726921,.883187,-.74902,.366682,.629445,.761936,-.623529,.308756,.531002,.640217,-.498039,.258021,.43705,.523433,-.372549,.219244,.352381,.416348,-.247059,.195127,.281032,.322979,-.121569,.186286,.22627,.246525,.00392157,.192352,.19236,.192364,.129412,.255927,.214469,.191756,.254902,.340459,.254426,.206666,.380392,.444655,.309315,.234029,.505882,.565353,.376004,.270969,.631373,.697917,.450748,.314293,.756863,.836657,.529064,.360227,.882353,.972695,.614884,.413123,1,1,.705904,.472699]},{ColorSpace:"Lab",Name:"erdc_divLow_purpleGreen",RGBPoints:[-1,.956034,.666487,.952663,-.87451,.874457,.572698,.936352,-.74902,.753465,.488253,.909063,-.623529,.63309,.413507,.763833,-.498039,.514491,.345878,.620015,-.372549,.405008,.288141,.484376,-.247059,.311388,.241986,.363556,-.121569,.238722,.209044,.263449,.00392157,.192352,.192366,.192362,.129412,.200379,.233201,.168618,.254902,.230151,.291737,.165227,.380392,.279481,.366076,.178607,.505882,.344927,.453267,.205703,.631373,.421554,.549449,.242643,.756863,.503334,.649999,.284377,.882353,.583497,.749672,.324969,1,.650705,.837228,.356264]},{ColorSpace:"Lab",Name:"Haze_green",RGBPoints:[-1,1,.835294,.886275,-.87451,.937255,.756863,.870443,-.74902,.875817,.666376,.857807,-.623529,.778359,.583007,.808134,-.498039,.676253,.494118,.745098,-.372549,.561365,.390123,.682353,-.247059,.438344,.262745,.621496,-.121569,.321133,.141031,.558751,.00392157,.203922,.0217865,.495861,.129412,.265505,.129412,.433261,.254902,.311692,.255338,.37008,.380392,.356282,.377342,.310821,.505882,.39971,.488889,.258243,.631373,.442556,.604357,.205519,.756863,.48671,.71968,.152941,.882353,.529847,.830356,.100944,1,.572549,.933333,.054902]},{ColorSpace:"Lab",Name:"Haze_lime",RGBPoints:[-1,.704034,.784196,1,-.87451,.633111,.691418,.956078,-.74902,.564021,.600606,.912157,-.623529,.496827,.51189,.868235,-.498039,.43157,.425416,.824314,-.372549,.368248,.341347,.780392,-.247059,.306767,.259855,.736471,-.121569,.246862,.181069,.692549,.00392157,.191619,.109542,.648627,.129412,.257404,.194031,.604706,.254902,.321794,.278775,.560784,.380392,.387909,.364617,.516863,.505882,.456569,.451881,.472941,.631373,.527424,.540773,.42902,.756863,.599759,.631427,.385098,.882353,.673065,.723898,.341176,1,.742751,.812252,.3]},{ColorSpace:"RGB",Name:"Haze",RGBPoints:[-1,1,.835294,.996078,-.00392157,.023529,.141176,.498039,.00392157,.015686,.137255,.494118,1,.984314,.764706,0]},{ColorSpace:"Lab",Name:"Haze_cyan",RGBPoints:[-1,.956863,1,.835294,-.87451,.933188,.921714,.760784,-.74902,.870588,.803486,.671605,-.623529,.807843,.684096,.583297,-.498039,.745098,.569208,.494118,-.372549,.682353,.437763,.390123,-.247059,.621496,.288163,.262745,-.121569,.558751,.144517,.141031,.00392157,.495861,.0217865,.0413943,.129412,.433261,.137255,.129412,.254902,.37008,.263181,.255338,.380392,.306318,.381845,.372694,.505882,.243137,.503994,.494263,.631373,.180392,.629484,.619753,.756863,.117647,.754975,.747131,.882353,.054902,.876398,.866812,1,0,.988235,.976471]},{ColorSpace:"Lab",Name:"nic_Edge",RGBPoints:[-1,.191208,.191208,.191208,-.87451,.239484,.00545035,.614821,-.74902,.220593,.0617459,.863547,-.623529,.17509,.278988,.97794,-.498039,.143526,.576069,.998553,-.372549,.166456,.871883,.96594,-.247059,.376202,.993555,.981833,-.121569,.681996,.991297,.999239,.00392157,.954172,.952734,.94374,.129412,.999735,.99301,.662896,.254902,.979399,.991466,.357973,.380392,.968771,.854967,.162659,.505882,.999245,.556697,.144323,.631373,.973959,.26223,.177946,.756863,.852358,.0526707,.222974,.882353,.593889,.00912724,.238855,1,.191208,.191208,.191208]},{ColorSpace:"Lab",Name:"erdc_iceFire_H",RGBPoints:[-1,4.05432e-7,0,590122e-11,-.87451,0,.120401,.302675,-.74902,0,.216583,.524574,-.623529,.0552475,.345025,.6595,-.498039,.128047,.492588,.720288,-.372549,.188955,.641309,.792092,-.247059,.327673,.784935,.873434,-.121569,.60824,.892164,.935547,.00392157,.881371,.912178,.818099,.129412,.951407,.835621,.449279,.254902,.904481,.690489,0,.380392,.85407,.510864,0,.505882,.777093,.33018,88199e-8,.631373,.672862,.139087,.00269398,.756863,.508815,0,0,.882353,.299417,366289e-9,547829e-9,1,.0157519,.00332021,4.55569e-8]},{ColorSpace:"Lab",Name:"erdc_iceFire_L",RGBPoints:[-1,.870485,.913768,.832905,-.87451,.586919,.887865,.934003,-.74902,.31583,.776442,.867858,-.623529,.18302,.632034,.787722,-.498039,.117909,.484134,.713825,-.372549,.0507239,.335979,.654741,-.247059,0,.209874,.511832,-.121569,0,.114689,.28935,.00392157,.0157519,.00332021,4.55569e-8,.129412,.312914,0,0,.254902,.520865,0,0,.380392,.680105,.15255,.0025996,.505882,.785109,.339479,797922e-9,.631373,.857354,.522494,0,.756863,.910974,.699774,0,.882353,.951921,.842817,.478545,1,.881371,.912178,.818099]},{ColorSpace:"RGB",Name:"hsv",RGBPoints:[-1,1,0,0,-.666666,1,0,1,-.333333,0,0,1,0,0,1,1,.33333,0,1,0,.66666,1,1,0,1,1,0,0]},{ColorSpace:"Lab",Name:"hue_L60",RGBPoints:[-1,.964784,.400592,.349549,-.87451,.964915,.372498,.53785,-.74902,.892353,.401039,.759569,-.623529,.79263,.446956,.903017,-.498039,.682208,.49954,.966673,-.372549,.56392,.553082,.968836,-.247059,.442031,.606396,.901601,-.121569,.305499,.65701,.765784,.00392157,.197251,.687914,.620914,.129412,.193882,.701887,.472654,.254902,.249866,.706123,.320005,.380392,.35132,.697417,.202919,.505882,.498097,.669467,.125232,.631373,.637477,.626239,.107431,.756863,.762115,.56872,.155812,.882353,.889434,.481116,.240445,1,.964784,.400592,.349549]},{IndexedColors:[0,0,0,.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,.6509803921568628,.3372549019607843,.1568627450980392],Name:"Spectrum",NanColor:[.6509803921568628,.3372549019607843,.1568627450980392]},{IndexedColors:[.4745098039215686,.09019607843137255,.09019607843137255,.7098039215686275,.00392156862745098,.00392156862745098,.9372549019607843,.2784313725490196,.09803921568627451,.9764705882352941,.5137254901960784,.1411764705882353,1,.7058823529411765,0,1,.8980392156862745,.02352941176470588],Name:"Warm",NanColor:[1,.8980392156862745,.02352941176470588]},{IndexedColors:[.4588235294117647,.6941176470588235,.00392156862745098,.3450980392156863,.5019607843137255,.1607843137254902,.3137254901960784,.8431372549019608,.7490196078431373,.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.6039215686274509,.407843137254902,1,.3725490196078431,.2,.5019607843137255],Name:"Cool",NanColor:[.3725490196078431,.2,.5019607843137255]},{IndexedColors:[.2313725490196079,.407843137254902,.6705882352941176,.1098039215686274,.5843137254901961,.803921568627451,.3058823529411765,.8509803921568627,.9176470588235294,.4509803921568628,.6039215686274509,.8352941176470589,.2588235294117647,.2392156862745098,.6627450980392157,.3137254901960784,.3294117647058823,.5294117647058824,.06274509803921569,.1647058823529412,.3215686274509804],Name:"Blues",NanColor:[.06274509803921569,.1647058823529412,.3215686274509804]},{IndexedColors:[.1098039215686274,.5843137254901961,.803921568627451,.2313725490196079,.407843137254902,.6705882352941176,.4,.2431372549019608,.7176470588235294,.6352941176470588,.3294117647058823,.8117647058823529,.8705882352941177,.3803921568627451,.807843137254902,.8627450980392157,.3803921568627451,.5843137254901961,.2392156862745098,.06274509803921569,.3215686274509804],Name:"Wild Flower",NanColor:[.2392156862745098,.06274509803921569,.3215686274509804]},{IndexedColors:[.396078431372549,.4862745098039216,.2156862745098039,.4588235294117647,.6941176470588235,.00392156862745098,.6980392156862745,.7294117647058823,.1882352941176471,1,.8980392156862745,.02352941176470588,1,.7058823529411765,0,.9764705882352941,.5137254901960784,.1411764705882353],Name:"Citrus",NanColor:[.9764705882352941,.5137254901960784,.1411764705882353]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (11)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.4980392156862745,.2313725490196079,.03137254901960784,.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333,.1764705882352941,0,.2941176470588235],Name:"Brewer Diverging Purple-Orange (10)",NanColor:[.1764705882352941,0,.2941176470588235]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (9)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.8784313725490196,.5098039215686274,.0784313725490196,.9921568627450981,.7215686274509804,.3882352941176471,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6980392156862745,.6705882352941176,.8235294117647058,.5019607843137255,.4509803921568628,.6745098039215687,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (8)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.9686274509803922,.9686274509803922,.9686274509803922,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (7)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.7019607843137254,.3450980392156863,.02352941176470588,.9450980392156862,.6392156862745098,.2509803921568627,.996078431372549,.8784313725490196,.7137254901960784,.8470588235294118,.8549019607843137,.9215686274509803,.6,.5568627450980392,.7647058823529411,.3294117647058823,.1529411764705882,.5333333333333333],Name:"Brewer Diverging Purple-Orange (6)",NanColor:[.3294117647058823,.1529411764705882,.5333333333333333]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.9686274509803922,.9686274509803922,.9686274509803922,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (5)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9019607843137255,.3803921568627451,.00392156862745098,.9921568627450981,.7215686274509804,.3882352941176471,.6980392156862745,.6705882352941176,.8235294117647058,.3686274509803922,.2352941176470588,.6],Name:"Brewer Diverging Purple-Orange (4)",NanColor:[.3686274509803922,.2352941176470588,.6]},{IndexedColors:[.9450980392156862,.6392156862745098,.2509803921568627,.9686274509803922,.9686274509803922,.9686274509803922,.6,.5568627450980392,.7647058823529411],Name:"Brewer Diverging Purple-Orange (3)",NanColor:[.6,.5568627450980392,.7647058823529411]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (11)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.6196078431372549,.00392156862745098,.2588235294117647,.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353,.3686274509803922,.3098039215686275,.6352941176470588],Name:"Brewer Diverging Spectral (10)",NanColor:[.3686274509803922,.3098039215686275,.6352941176470588]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (9)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9568627450980393,.4274509803921568,.2627450980392157,.9921568627450981,.6823529411764706,.3803921568627451,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6705882352941176,.8666666666666667,.6431372549019608,.4,.7607843137254902,.6470588235294118,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (8)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,1,1,.7490196078431373,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (7)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8352941176470589,.2431372549019608,.3098039215686275,.9882352941176471,.5529411764705883,.3490196078431372,.996078431372549,.8784313725490196,.5450980392156862,.9019607843137255,.9607843137254902,.596078431372549,.6,.8352941176470589,.5803921568627451,.196078431372549,.5333333333333333,.7411764705882353],Name:"Brewer Diverging Spectral (6)",NanColor:[.196078431372549,.5333333333333333,.7411764705882353]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,1,1,.7490196078431373,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (5)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.8431372549019608,.09803921568627451,.1098039215686274,.9921568627450981,.6823529411764706,.3803921568627451,.6705882352941176,.8666666666666667,.6431372549019608,.1686274509803922,.5137254901960784,.7294117647058823],Name:"Brewer Diverging Spectral (4)",NanColor:[.1686274509803922,.5137254901960784,.7294117647058823]},{IndexedColors:[.9882352941176471,.5529411764705883,.3490196078431372,1,1,.7490196078431373,.6,.8352941176470589,.5803921568627451],Name:"Brewer Diverging Spectral (3)",NanColor:[.6,.8352941176470589,.5803921568627451]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (11)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.3294117647058823,.1882352941176471,.0196078431372549,.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922,0,.2352941176470588,.1882352941176471],Name:"Brewer Diverging Brown-Blue-Green (10)",NanColor:[0,.2352941176470588,.1882352941176471]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (9)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.7490196078431373,.5058823529411764,.1764705882352941,.8745098039215686,.7607843137254902,.4901960784313725,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.5019607843137255,.803921568627451,.7568627450980392,.207843137254902,.592156862745098,.5607843137254902,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (8)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.9607843137254902,.9607843137254902,.9607843137254902,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (7)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.5490196078431373,.3176470588235294,.0392156862745098,.8470588235294118,.7019607843137254,.396078431372549,.9647058823529412,.9098039215686274,.7647058823529411,.7803921568627451,.9176470588235294,.8980392156862745,.3529411764705883,.7058823529411765,.6745098039215687,.00392156862745098,.4,.3686274509803922],Name:"Brewer Diverging Brown-Blue-Green (6)",NanColor:[.00392156862745098,.4,.3686274509803922]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.9607843137254902,.9607843137254902,.9607843137254902,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (5)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.6509803921568628,.3803921568627451,.1019607843137255,.8745098039215686,.7607843137254902,.4901960784313725,.5019607843137255,.803921568627451,.7568627450980392,.00392156862745098,.5215686274509804,.4431372549019608],Name:"Brewer Diverging Brown-Blue-Green (4)",NanColor:[.00392156862745098,.5215686274509804,.4431372549019608]},{IndexedColors:[.8470588235294118,.7019607843137254,.396078431372549,.9607843137254902,.9607843137254902,.9607843137254902,.3529411764705883,.7058823529411765,.6745098039215687],Name:"Brewer Diverging Brown-Blue-Green (3)",NanColor:[.3529411764705883,.7058823529411765,.6745098039215687]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.4274509803921568,.1725490196078431,0,.2666666666666667,.1058823529411765],Name:"Brewer Sequential Blue-Green (9)",NanColor:[0,.2666666666666667,.1058823529411765]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8980392156862745,.9607843137254902,.9764705882352941,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (8)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.8,.9254901960784314,.9019607843137255,.4,.7607843137254902,.6431372549019608,.2549019607843137,.6823529411764706,.4627450980392157,.1372549019607843,.5450980392156862,.2705882352941176,0,.3450980392156863,.1411764705882353],Name:"Brewer Sequential Blue-Green (7)",NanColor:[0,.3450980392156863,.1411764705882353]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.8,.9254901960784314,.9019607843137255,.6,.8470588235294118,.788235294117647,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (6)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1725490196078431,.6352941176470588,.3725490196078431,0,.4274509803921568,.1725490196078431],Name:"Brewer Sequential Blue-Green (5)",NanColor:[0,.4274509803921568,.1725490196078431]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.6980392156862745,.8862745098039215,.8862745098039215,.4,.7607843137254902,.6431372549019608,.1372549019607843,.5450980392156862,.2705882352941176],Name:"Brewer Sequential Blue-Green (4)",NanColor:[.1372549019607843,.5450980392156862,.2705882352941176]},{IndexedColors:[.8980392156862745,.9607843137254902,.9764705882352941,.6,.8470588235294118,.788235294117647,.1725490196078431,.6352941176470588,.3725490196078431],Name:"Brewer Sequential Blue-Green (3)",NanColor:[.1725490196078431,.6352941176470588,.3725490196078431]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.6,.203921568627451,.01568627450980392,.4,.1450980392156863,.02352941176470588],Name:"Brewer Sequential Yellow-Orange-Brown (9)",NanColor:[.4,.1450980392156863,.02352941176470588]},{IndexedColors:[1,1,.8980392156862745,1,.9686274509803922,.7372549019607844,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (8)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.9254901960784314,.4392156862745098,.0784313725490196,.8,.2980392156862745,.00784313725490196,.5490196078431373,.1764705882352941,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (7)",NanColor:[.5490196078431373,.1764705882352941,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8901960784313725,.5686274509803921,.996078431372549,.7686274509803922,.3098039215686275,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (6)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8509803921568627,.3725490196078431,.05490196078431372,.6,.203921568627451,.01568627450980392],Name:"Brewer Sequential Yellow-Orange-Brown (5)",NanColor:[.6,.203921568627451,.01568627450980392]},{IndexedColors:[1,1,.8313725490196079,.996078431372549,.8509803921568627,.5568627450980392,.996078431372549,.6,.1607843137254902,.8,.2980392156862745,.00784313725490196],Name:"Brewer Sequential Yellow-Orange-Brown (4)",NanColor:[.8,.2980392156862745,.00784313725490196]},{IndexedColors:[1,.9686274509803922,.7372549019607844,.996078431372549,.7686274509803922,.3098039215686275,.8509803921568627,.3725490196078431,.05490196078431372],Name:"Brewer Sequential Yellow-Orange-Brown (3)",NanColor:[.8509803921568627,.3725490196078431,.05490196078431372]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.5058823529411764,.05882352941176471,.4862745098039216,.3019607843137255,0,.2941176470588235],Name:"Brewer Sequential Blue-Purple (9)",NanColor:[.3019607843137255,0,.2941176470588235]},{IndexedColors:[.9686274509803922,.9882352941176471,.9921568627450981,.8784313725490196,.9254901960784314,.9568627450980393,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (8)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5490196078431373,.4196078431372549,.6941176470588235,.5333333333333333,.2549019607843137,.615686274509804,.4313725490196079,.00392156862745098,.4196078431372549],Name:"Brewer Sequential Blue-Purple (7)",NanColor:[.4313725490196079,.00392156862745098,.4196078431372549]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7490196078431373,.8274509803921568,.9019607843137255,.6196078431372549,.7372549019607844,.8549019607843137,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (6)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.3372549019607843,.6549019607843137,.5058823529411764,.05882352941176471,.4862745098039216],Name:"Brewer Sequential Blue-Purple (5)",NanColor:[.5058823529411764,.05882352941176471,.4862745098039216]},{IndexedColors:[.9294117647058824,.9725490196078431,.984313725490196,.7019607843137254,.803921568627451,.8901960784313725,.5490196078431373,.5882352941176471,.7764705882352941,.5333333333333333,.2549019607843137,.615686274509804],Name:"Brewer Sequential Blue-Purple (4)",NanColor:[.5333333333333333,.2549019607843137,.615686274509804]},{IndexedColors:[.8784313725490196,.9254901960784314,.9568627450980393,.6196078431372549,.7372549019607844,.8549019607843137,.5333333333333333,.3372549019607843,.6549019607843137],Name:"Brewer Sequential Blue-Purple (3)",NanColor:[.5333333333333333,.3372549019607843,.6549019607843137]},{IndexedColors:[.4980392156862745,.788235294117647,.4980392156862745,.7450980392156863,.6823529411764706,.8313725490196079,.9921568627450981,.7529411764705882,.5254901960784314,1,1,.6,.2196078431372549,.4235294117647059,.6901960784313725,.9411764705882353,.00784313725490196,.4980392156862745,.7490196078431373,.3568627450980392,.09019607843137255,.4,.4,.4],Name:"Brewer Qualitative Accent",NanColor:[.4,.4,.4]},{IndexedColors:[.1058823529411765,.6196078431372549,.4666666666666667,.8509803921568627,.3725490196078431,.00784313725490196,.4588235294117647,.4392156862745098,.7019607843137254,.9058823529411765,.1607843137254902,.5411764705882353,.4,.6509803921568628,.1176470588235294,.9019607843137255,.6705882352941176,.00784313725490196,.6509803921568628,.4627450980392157,.1137254901960784,.4,.4,.4],Name:"Brewer Qualitative Dark2",NanColor:[.4,.4,.4]},{IndexedColors:[.4,.7607843137254902,.6470588235294118,.9882352941176471,.5529411764705883,.3843137254901961,.5529411764705883,.6274509803921569,.796078431372549,.9058823529411765,.5411764705882353,.7647058823529411,.6509803921568628,.8470588235294118,.3294117647058823,1,.8509803921568627,.1843137254901961,.8980392156862745,.7686274509803922,.5803921568627451,.7019607843137254,.7019607843137254,.7019607843137254],Name:"Brewer Qualitative Set2",NanColor:[.7019607843137254,.7019607843137254,.7019607843137254]},{IndexedColors:[.7019607843137254,.8862745098039215,.803921568627451,.9921568627450981,.803921568627451,.6745098039215687,.796078431372549,.8352941176470589,.9098039215686274,.9568627450980393,.792156862745098,.8941176470588236,.9019607843137255,.9607843137254902,.788235294117647,1,.9490196078431372,.6823529411764706,.9450980392156862,.8862745098039215,.8,.8,.8,.8],Name:"Brewer Qualitative Pastel2",NanColor:[.8,.8,.8]},{IndexedColors:[.984313725490196,.7058823529411765,.6823529411764706,.7019607843137254,.803921568627451,.8901960784313725,.8,.9215686274509803,.7725490196078432,.8705882352941177,.796078431372549,.8941176470588236,.996078431372549,.8509803921568627,.6509803921568628,1,1,.8,.8980392156862745,.8470588235294118,.7411764705882353,.9921568627450981,.8549019607843137,.9254901960784314,.9490196078431372,.9490196078431372,.9490196078431372],Name:"Brewer Qualitative Pastel1",NanColor:[.9490196078431372,.9490196078431372,.9490196078431372]},{IndexedColors:[.8941176470588236,.1019607843137255,.1098039215686274,.2156862745098039,.4941176470588236,.7215686274509804,.3019607843137255,.6862745098039216,.2901960784313726,.596078431372549,.3058823529411765,.6392156862745098,1,.4980392156862745,0,1,1,.2,.6509803921568628,.3372549019607843,.1568627450980392,.9686274509803922,.5058823529411764,.7490196078431373,.6,.6,.6],Name:"Brewer Qualitative Set1",NanColor:[.6,.6,.6]},{IndexedColors:[.6509803921568628,.807843137254902,.8901960784313725,.1215686274509804,.4705882352941176,.7058823529411765,.6980392156862745,.8745098039215686,.5411764705882353,.2,.6274509803921569,.1725490196078431,.984313725490196,.6039215686274509,.6,.8901960784313725,.1019607843137255,.1098039215686274,.9921568627450981,.7490196078431373,.4352941176470588,1,.4980392156862745,0,.792156862745098,.6980392156862745,.8392156862745098,.4156862745098039,.2392156862745098,.6039215686274509,1,1,.6],Name:"Brewer Qualitative Paired",NanColor:[1,1,.6]},{IndexedColors:[.5529411764705883,.8274509803921568,.7803921568627451,1,1,.7019607843137254,.7450980392156863,.7294117647058823,.8549019607843137,.984313725490196,.5019607843137255,.4470588235294118,.5019607843137255,.6941176470588235,.8274509803921568,.9921568627450981,.7058823529411765,.3843137254901961,.7019607843137254,.8705882352941177,.4117647058823529,.9882352941176471,.803921568627451,.8980392156862745,.8509803921568627,.8509803921568627,.8509803921568627,.7372549019607844,.5019607843137255,.7411764705882353,.8,.9215686274509803,.7725490196078432,1,.9294117647058824,.4352941176470588],Name:"Brewer Qualitative Set3",NanColor:[1,.9294117647058824,.4352941176470588]},{IndexedColors:[1,0,0,1,.862745,0,0,.695201,0],Name:"Traffic Lights",NanColor:[.803922,0,.803922]},{IndexedColors:[.908659,.604013,.581857,1,.862745,0,0,.695201,0],Name:"Traffic Lights For Deuteranopes",NanColor:[.803922,0,.803922]},{IndexedColors:[.4196078431372549,0,.07058823529411765,.9019607843137255,.9411764705882353,.0196078431372549,.01568627450980392,.6196078431372549,.00784313725490196],Name:"Traffic Lights For Deuteranopes 2",NanColor:[.803922,0,.803922]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Muted Blue-Green",NanColor:[.25,0,0],RGBPoints:[0,.109804,.27451,.301961,.02,.129412,.309804,.341176,.05,.14902,.341176,.380392,.1,.188235,.403922,.458824,.15,.227451,.447059,.521569,.2,.290196,.494118,.588235,.25,.368627,.552941,.670588,.3,.458824,.619608,.74902,.35,.588235,.713725,.85098,.4,.72549,.815686,.941176,.45,.831373,.882353,.980392,.475,.909804,.933333,1,.5,.980392,.984314,1,.5,.996078,1,.94902,.5,1,1,.980392,.5,.980392,.984314,1,.525,.972549,.988235,.890196,.55,.917647,.960784,.835294,.6,.835294,.921569,.772549,.65,.768627,.901961,.737255,.7,.670588,.831373,.654902,.75,.576471,.760784,.584314,.8,.498039,.678431,.521569,.85,.392157,.560784,.427451,.9,.294118,.45098,.333333,.95,.211765,.34902,.254902,1,.152941,.278431,.196078]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Green-Blue Asymmetric Divergent (62Blbc)",NanColor:[.25,0,0],RGBPoints:[0,.121569,.2,.145098,.05,.196078,.301961,.223529,.1,.258824,.4,.278431,.2,.341176,.54902,.341176,.25,.419608,.619608,.376471,.3,.545098,.701961,.392157,.35,.643137,.780392,.403922,.4,.729412,.819608,.45098,.45,.811765,.870588,.521569,.5,.898039,.909804,.564706,.55,.941176,.92549,.686275,.6,.960784,.94902,.776471,.64,1,1,1,.65,.890196,.988235,.972549,.7,.721569,.894118,.901961,.75,.631373,.823529,.839216,.8,.517647,.662745,.701961,.85,.384314,.494118,.54902,.9,.298039,.360784,.45098,.95,.223529,.25098,.34902,.99,.156863,.172549,.25098,1,.137255,.137255,.188235]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Asymmtrical Earth Tones (6_21b)",NanColor:[.25,0,0],RGBPoints:[0,.141176,.14902,.2,.05,.215686,.258824,.321569,.1,.243137,.368627,.380392,.15,.27451,.439216,.4,.2,.32549,.501961,.384314,.25,.403922,.6,.419608,.3,.486275,.701961,.454902,.35,.556863,.74902,.494118,.4,.670588,.8,.545098,.5,.854902,.901961,.631373,.55,.92549,.941176,.694118,.6,.960784,.94902,.776471,.65,.988235,.968627,.909804,.7,.839216,.815686,.772549,.75,.701961,.662745,.615686,.8,.6,.529412,.478431,.85,.501961,.403922,.360784,.9,.439216,.313725,.290196,1,.301961,.164706,.176471]},{ColorSpace:"Lab",Creator:"Francesca Samsel",Name:"Yellow 15",NanColor:[.25,0,0],RGBPoints:[0,1,1,.988235,.002,1,1,.988235,.05,.984314,.988235,.843137,.1,.988235,.988235,.741176,.15,.980392,.968627,.654902,.2,.980392,.945098,.576471,.25,.968627,.905882,.486275,.3,.968627,.862745,.388235,.35,.960784,.803922,.286275,.4,.94902,.741176,.219608,.45,.941176,.678431,.14902,.5,.929412,.607843,.094118,.55,.921569,.545098,.054902,.6,.909804,.486275,.035294,.65,.890196,.411765,.019608,.7,.8,.305882,0,.75,.760784,.239216,0,.8,.678431,.180392,.011765,.85,.6,.121569,.023529,.9,.501961,.054902,.031373,.95,.4,.039216,.058824,1,.301961,.047059,.090196]},{ColorSpace:"Diverging",Name:"Magma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002258,.001295,.018331,.007843,.003279,.002305,.023708,.011765,.004512,.00349,.029965,.015686,.00595,.004843,.03713,.019608,.007588,.006356,.044973,.023529,.009426,.008022,.052844,.027451,.011465,.009828,.06075,.031373,.013708,.011771,.068667,.035294,.016156,.01384,.076603,.039216,.018815,.016026,.084584,.043137,.021692,.01832,.09261,.047059,.024792,.020715,.100676,.05098,.028123,.023201,.108787,.054902,.031696,.025765,.116965,.058824,.03552,.028397,.125209,.062745,.039608,.03109,.133515,.066667,.04383,.03383,.141886,.070588,.048062,.036607,.150327,.07451,.05232,.039407,.158841,.078431,.056615,.04216,.167446,.082353,.060949,.044794,.176129,.086275,.06533,.047318,.184892,.090196,.069764,.049726,.193735,.094118,.074257,.052017,.20266,.098039,.078815,.054184,.211667,.101961,.083446,.056225,.220755,.105882,.088155,.058133,.229922,.109804,.092949,.059904,.239164,.113725,.097833,.061531,.248477,.117647,.102815,.06301,.257854,.121569,.107899,.064335,.267289,.12549,.113094,.065492,.276784,.129412,.118405,.066479,.286321,.133333,.123833,.067295,.295879,.137255,.12938,.067935,.305443,.141176,.135053,.068391,.315,.145098,.140858,.068654,.324538,.14902,.146785,.068738,.334011,.152941,.152839,.068637,.343404,.156863,.159018,.068354,.352688,.160784,.165308,.067911,.361816,.164706,.171713,.067305,.370771,.168627,.178212,.066576,.379497,.172549,.184801,.065732,.387973,.176471,.19146,.064818,.396152,.180392,.198177,.063862,.404009,.184314,.204935,.062907,.411514,.188235,.211718,.061992,.418647,.192157,.218512,.061158,.425392,.196078,.225302,.060445,.431742,.2,.232077,.059889,.437695,.203922,.238826,.059517,.443256,.207843,.245543,.059352,.448436,.211765,.25222,.059415,.453248,.215686,.258857,.059706,.45771,.219608,.265447,.060237,.46184,.223529,.271994,.060994,.46566,.227451,.278493,.061978,.46919,.231373,.284951,.063168,.472451,.235294,.291366,.064553,.475462,.239216,.29774,.066117,.478243,.243137,.304081,.067835,.480812,.247059,.310382,.069702,.483186,.25098,.316654,.07169,.48538,.254902,.322899,.073782,.487408,.258824,.329114,.075972,.489287,.262745,.335308,.078236,.491024,.266667,.341482,.080564,.492631,.270588,.347636,.082946,.494121,.27451,.353773,.085373,.495501,.278431,.359898,.087831,.496778,.282353,.366012,.090314,.49796,.286275,.372116,.092816,.499053,.290196,.378211,.095332,.500067,.294118,.384299,.097855,.501002,.298039,.390384,.100379,.501864,.301961,.396467,.102902,.502658,.305882,.402548,.10542,.503386,.309804,.408629,.10793,.504052,.313725,.414709,.110431,.504662,.317647,.420791,.11292,.505215,.321569,.426877,.115395,.505714,.32549,.432967,.117855,.50616,.329412,.439062,.120298,.506555,.333333,.445163,.122724,.506901,.337255,.451271,.125132,.507198,.341176,.457386,.127522,.507448,.345098,.463508,.129893,.507652,.34902,.46964,.132245,.507809,.352941,.47578,.134577,.507921,.356863,.481929,.136891,.507989,.360784,.488088,.139186,.508011,.364706,.494258,.141462,.507988,.368627,.500438,.143719,.50792,.372549,.506629,.145958,.507806,.376471,.512831,.148179,.507648,.380392,.519045,.150383,.507443,.384314,.52527,.152569,.507192,.388235,.531507,.154739,.506895,.392157,.537755,.156894,.506551,.396078,.544015,.159033,.506159,.4,.550287,.161158,.505719,.403922,.556571,.163269,.50523,.407843,.562866,.165368,.504692,.411765,.569172,.167454,.504105,.415686,.57549,.16953,.503466,.419608,.581819,.171596,.502777,.423529,.588158,.173652,.502035,.427451,.594508,.175701,.501241,.431373,.600868,.177743,.500394,.435294,.607238,.179779,.499492,.439216,.613617,.181811,.498536,.443137,.620005,.18384,.497524,.447059,.626401,.185867,.496456,.45098,.632805,.187893,.495332,.454902,.639216,.189921,.49415,.458824,.645633,.191952,.49291,.462745,.652056,.193986,.491611,.466667,.658483,.196027,.490253,.470588,.664915,.198075,.488836,.47451,.671349,.200133,.487358,.478431,.677786,.202203,.485819,.482353,.684224,.204286,.484219,.486275,.690661,.206384,.482558,.490196,.697098,.208501,.480835,.494118,.703532,.210638,.479049,.498039,.709962,.212797,.477201,.501961,.716387,.214982,.47529,.505882,.722805,.217194,.473316,.509804,.729216,.219437,.471279,.513725,.735616,.221713,.46918,.517647,.742004,.224025,.467018,.521569,.748378,.226377,.464794,.52549,.754737,.228772,.462509,.529412,.761077,.231214,.460162,.533333,.767398,.233705,.457755,.537255,.773695,.236249,.455289,.541176,.779968,.238851,.452765,.545098,.786212,.241514,.450184,.54902,.792427,.244242,.447543,.552941,.798608,.24704,.444848,.556863,.804752,.249911,.442102,.560784,.810855,.252861,.439305,.564706,.816914,.255895,.436461,.568627,.822926,.259016,.433573,.572549,.828886,.262229,.430644,.576471,.834791,.26554,.427671,.580392,.840636,.268953,.424666,.584314,.846416,.272473,.421631,.588235,.852126,.276106,.418573,.592157,.857763,.279857,.415496,.596078,.86332,.283729,.412403,.6,.868793,.287728,.409303,.603922,.874176,.291859,.406205,.607843,.879464,.296125,.403118,.611765,.884651,.30053,.400047,.615686,.889731,.305079,.397002,.619608,.8947,.309773,.393995,.623529,.899552,.314616,.391037,.627451,.904281,.31961,.388137,.631373,.908884,.324755,.385308,.635294,.913354,.330052,.382563,.639216,.917689,.3355,.379915,.643137,.921884,.341098,.377376,.647059,.925937,.346844,.374959,.65098,.929845,.352734,.372677,.654902,.933606,.358764,.370541,.658824,.937221,.364929,.368567,.662745,.940687,.371224,.366762,.666667,.944006,.377643,.365136,.670588,.94718,.384178,.363701,.67451,.95021,.39082,.362468,.678431,.953099,.397563,.361438,.682353,.955849,.4044,.360619,.686275,.958464,.411324,.360014,.690196,.960949,.418323,.35963,.694118,.96331,.42539,.359469,.698039,.965549,.432519,.359529,.701961,.967671,.439703,.35981,.705882,.96968,.446936,.360311,.709804,.971582,.45421,.36103,.713725,.973381,.46152,.361965,.717647,.975082,.468861,.363111,.721569,.97669,.476226,.364466,.72549,.97821,.483612,.366025,.729412,.979645,.491014,.367783,.733333,.981,.498428,.369734,.737255,.982279,.505851,.371874,.741176,.983485,.51328,.374198,.745098,.984622,.520713,.376698,.74902,.985693,.528148,.379371,.752941,.9867,.535582,.38221,.756863,.987646,.543015,.38521,.760784,.988533,.550446,.388365,.764706,.989363,.557873,.391671,.768627,.990138,.565296,.395122,.772549,.990871,.572706,.398714,.776471,.991558,.580107,.402441,.780392,.992196,.587502,.406299,.784314,.992785,.594891,.410283,.788235,.993326,.602275,.41439,.792157,.993834,.609644,.418613,.796078,.994309,.616999,.42295,.8,.994738,.62435,.427397,.803922,.995122,.631696,.431951,.807843,.99548,.639027,.436607,.811765,.99581,.646344,.441361,.815686,.996096,.653659,.446213,.819608,.996341,.660969,.45116,.823529,.99658,.668256,.456192,.827451,.996775,.675541,.461314,.831373,.996925,.682828,.466526,.835294,.997077,.690088,.471811,.839216,.997186,.697349,.477182,.843137,.997254,.704611,.482635,.847059,.997325,.711848,.488154,.85098,.997351,.719089,.493755,.854902,.997351,.726324,.499428,.858824,.997341,.733545,.505167,.862745,.997285,.740772,.510983,.866667,.997228,.747981,.516859,.870588,.997138,.75519,.522806,.87451,.997019,.762398,.528821,.878431,.996898,.769591,.534892,.882353,.996727,.776795,.541039,.886275,.996571,.783977,.547233,.890196,.996369,.791167,.553499,.894118,.996162,.798348,.55982,.898039,.995932,.805527,.566202,.901961,.99568,.812706,.572645,.905882,.995424,.819875,.57914,.909804,.995131,.827052,.585701,.913725,.994851,.834213,.592307,.917647,.994524,.841387,.598983,.921569,.994222,.84854,.605696,.92549,.993866,.855711,.612482,.929412,.993545,.862859,.619299,.933333,.99317,.870024,.626189,.937255,.992831,.877168,.633109,.941176,.99244,.88433,.640099,.945098,.992089,.89147,.647116,.94902,.991688,.898627,.654202,.952941,.991332,.905763,.661309,.956863,.99093,.912915,.668481,.960784,.99057,.920049,.675675,.964706,.990175,.927196,.682926,.968627,.989815,.934329,.690198,.972549,.989434,.94147,.697519,.976471,.989077,.948604,.704863,.980392,.988717,.955742,.712242,.984314,.988367,.962878,.719649,.988235,.988033,.970012,.727077,.992157,.987691,.977154,.734536,.996078,.987387,.984288,.742002,1,.987053,.991438,.749504]},{ColorSpace:"Diverging",Name:"Inferno (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.001462,466e-6,.013866,.003922,.002267,.00127,.01857,.007843,.003299,.002249,.024239,.011765,.004547,.003392,.030909,.015686,.006006,.004692,.038558,.019608,.007676,.006136,.046836,.023529,.009561,.007713,.055143,.027451,.011663,.009417,.06346,.031373,.013995,.011225,.071862,.035294,.016561,.013136,.080282,.039216,.019373,.015133,.088767,.043137,.022447,.017199,.097327,.047059,.025793,.019331,.10593,.05098,.029432,.021503,.114621,.054902,.033385,.023702,.123397,.058824,.037668,.025921,.132232,.062745,.042253,.028139,.141141,.066667,.046915,.030324,.150164,.070588,.051644,.032474,.159254,.07451,.056449,.034569,.168414,.078431,.06134,.03659,.177642,.082353,.066331,.038504,.186962,.086275,.071429,.040294,.196354,.090196,.076637,.041905,.205799,.094118,.081962,.043328,.215289,.098039,.087411,.044556,.224813,.101961,.09299,.045583,.234358,.105882,.098702,.046402,.243904,.109804,.104551,.047008,.25343,.113725,.110536,.047399,.262912,.117647,.116656,.047574,.272321,.121569,.122908,.047536,.281624,.12549,.129285,.047293,.290788,.129412,.135778,.046856,.299776,.133333,.142378,.046242,.308553,.137255,.149073,.045468,.317085,.141176,.15585,.044559,.325338,.145098,.162689,.043554,.333277,.14902,.169575,.042489,.340874,.152941,.176493,.041402,.348111,.156863,.183429,.040329,.354971,.160784,.190367,.039309,.361447,.164706,.197297,.0384,.367535,.168627,.204209,.037632,.373238,.172549,.211095,.03703,.378563,.176471,.217949,.036615,.383522,.180392,.224763,.036405,.388129,.184314,.231538,.036405,.3924,.188235,.238273,.036621,.396353,.192157,.244967,.037055,.400007,.196078,.25162,.037705,.403378,.2,.258234,.038571,.406485,.203922,.26481,.039647,.409345,.207843,.271347,.040922,.411976,.211765,.27785,.042353,.414392,.215686,.284321,.043933,.416608,.219608,.290763,.045644,.418637,.223529,.297178,.04747,.420491,.227451,.303568,.049396,.422182,.231373,.309935,.051407,.423721,.235294,.316282,.05349,.425116,.239216,.32261,.055634,.426377,.243137,.328921,.057827,.427511,.247059,.335217,.06006,.428524,.25098,.3415,.062325,.429425,.254902,.347771,.064616,.430217,.258824,.354032,.066925,.430906,.262745,.360284,.069247,.431497,.266667,.366529,.071579,.431994,.270588,.372768,.073915,.4324,.27451,.379001,.076253,.432719,.278431,.385228,.078591,.432955,.282353,.391453,.080927,.433109,.286275,.397674,.083257,.433183,.290196,.403894,.08558,.433179,.294118,.410113,.087896,.433098,.298039,.416331,.090203,.432943,.301961,.422549,.092501,.432714,.305882,.428768,.09479,.432412,.309804,.434987,.097069,.432039,.313725,.441207,.099338,.431594,.317647,.447428,.101597,.43108,.321569,.453651,.103848,.430498,.32549,.459875,.106089,.429846,.329412,.4661,.108322,.429125,.333333,.472328,.110547,.428334,.337255,.478558,.112764,.427475,.341176,.484789,.114974,.426548,.345098,.491022,.117179,.425552,.34902,.497257,.119379,.424488,.352941,.503493,.121575,.423356,.356863,.50973,.123769,.422156,.360784,.515967,.12596,.420887,.364706,.522206,.12815,.419549,.368627,.528444,.130341,.418142,.372549,.534683,.132534,.416667,.376471,.54092,.134729,.415123,.380392,.547157,.136929,.413511,.384314,.553392,.139134,.411829,.388235,.559624,.141346,.410078,.392157,.565854,.143567,.408258,.396078,.572081,.145797,.406369,.4,.578304,.148039,.404411,.403922,.584521,.150294,.402385,.407843,.590734,.152563,.40029,.411765,.59694,.154848,.398125,.415686,.603139,.157151,.395891,.419608,.60933,.159474,.393589,.423529,.615513,.161817,.391219,.427451,.621685,.164184,.388781,.431373,.627847,.166575,.386276,.435294,.633998,.168992,.383704,.439216,.640135,.171438,.381065,.443137,.64626,.173914,.378359,.447059,.652369,.176421,.375586,.45098,.658463,.178962,.372748,.454902,.66454,.181539,.369846,.458824,.670599,.184153,.366879,.462745,.676638,.186807,.363849,.466667,.682656,.189501,.360757,.470588,.688653,.192239,.357603,.47451,.694627,.195021,.354388,.478431,.700576,.197851,.351113,.482353,.7065,.200728,.347777,.486275,.712396,.203656,.344383,.490196,.718264,.206636,.340931,.494118,.724103,.20967,.337424,.498039,.729909,.212759,.333861,.501961,.735683,.215906,.330245,.505882,.741423,.219112,.326576,.509804,.747127,.222378,.322856,.513725,.752794,.225706,.319085,.517647,.758422,.229097,.315266,.521569,.76401,.232554,.311399,.52549,.769556,.236077,.307485,.529412,.775059,.239667,.303526,.533333,.780517,.243327,.299523,.537255,.785929,.247056,.295477,.541176,.791293,.250856,.29139,.545098,.796607,.254728,.287264,.54902,.801871,.258674,.283099,.552941,.807082,.262692,.278898,.556863,.812239,.266786,.274661,.560784,.817341,.270954,.27039,.564706,.822386,.275197,.266085,.568627,.827372,.279517,.26175,.572549,.832299,.283913,.257383,.576471,.837165,.288385,.252988,.580392,.841969,.292933,.248564,.584314,.846709,.297559,.244113,.588235,.851384,.30226,.239636,.592157,.855992,.307038,.235133,.596078,.860533,.311892,.230606,.6,.865006,.316822,.226055,.603922,.869409,.321827,.221482,.607843,.873741,.326906,.216886,.611765,.878001,.33206,.212268,.615686,.882188,.337287,.207628,.619608,.886302,.342586,.202968,.623529,.890341,.347957,.198286,.627451,.894305,.353399,.193584,.631373,.898192,.358911,.18886,.635294,.902003,.364492,.184116,.639216,.905735,.37014,.17935,.643137,.90939,.375856,.174563,.647059,.912966,.381636,.169755,.65098,.916462,.387481,.164924,.654902,.919879,.393389,.16007,.658824,.923215,.399359,.155193,.662745,.92647,.405389,.150292,.666667,.929644,.411479,.145367,.670588,.932737,.417627,.140417,.67451,.935747,.423831,.13544,.678431,.938675,.430091,.130438,.682353,.941521,.436405,.125409,.686275,.944285,.442772,.120354,.690196,.946965,.449191,.115272,.694118,.949562,.45566,.110164,.698039,.952075,.462178,.105031,.701961,.954506,.468744,.099874,.705882,.956852,.475356,.094695,.709804,.959114,.482014,.089499,.713725,.961293,.488716,.084289,.717647,.963387,.495462,.079073,.721569,.965397,.502249,.073859,.72549,.967322,.509078,.068659,.729412,.969163,.515946,.063488,.733333,.970919,.522853,.058367,.737255,.97259,.529798,.053324,.741176,.974176,.53678,.048392,.745098,.975677,.543798,.043618,.74902,.977092,.55085,.03905,.752941,.978422,.557937,.034931,.756863,.979666,.565057,.031409,.760784,.980824,.572209,.028508,.764706,.981895,.579392,.02625,.768627,.982881,.586606,.024661,.772549,.983779,.593849,.02377,.776471,.984591,.601122,.023606,.780392,.985315,.608422,.024202,.784314,.985952,.61575,.025592,.788235,.986502,.623105,.027814,.792157,.986964,.630485,.030908,.796078,.987337,.63789,.034916,.8,.987622,.64532,.039886,.803922,.987819,.652773,.045581,.807843,.987926,.66025,.05175,.811765,.987945,.667748,.058329,.815686,.987874,.675267,.065257,.819608,.987714,.682807,.072489,.823529,.987464,.690366,.07999,.827451,.987124,.697944,.087731,.831373,.986694,.70554,.095694,.835294,.986175,.713153,.103863,.839216,.985566,.720782,.112229,.843137,.984865,.728427,.120785,.847059,.984075,.736087,.129527,.85098,.983196,.743758,.138453,.854902,.982228,.751442,.147565,.858824,.981173,.759135,.156863,.862745,.980032,.766837,.166353,.866667,.978806,.774545,.176037,.870588,.977497,.782258,.185923,.87451,.976108,.789974,.196018,.878431,.974638,.797692,.206332,.882353,.973088,.805409,.216877,.886275,.971468,.813122,.227658,.890196,.969783,.820825,.238686,.894118,.968041,.828515,.249972,.898039,.966243,.836191,.261534,.901961,.964394,.843848,.273391,.905882,.962517,.851476,.285546,.909804,.960626,.859069,.29801,.913725,.95872,.866624,.31082,.917647,.956834,.874129,.323974,.921569,.954997,.881569,.337475,.92549,.953215,.888942,.351369,.929412,.951546,.896226,.365627,.933333,.950018,.903409,.380271,.937255,.948683,.910473,.395289,.941176,.947594,.917399,.410665,.945098,.946809,.924168,.426373,.94902,.946392,.930761,.442367,.952941,.946403,.937159,.458592,.956863,.946903,.943348,.47497,.960784,.947937,.949318,.491426,.964706,.949545,.955063,.50786,.968627,.95174,.960587,.524203,.972549,.954529,.965896,.540361,.976471,.957896,.971003,.556275,.980392,.961812,.975924,.571925,.984314,.966249,.980678,.587206,.988235,.971162,.985282,.602154,.992157,.976511,.989753,.61676,.996078,.982257,.994109,.631017,1,.988362,.998364,.644924]},{ColorSpace:"Diverging",Name:"Plasma (matplotlib)",NanColor:[0,1,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Nathaniel J. Smith & Stefan van der Walt",RGBPoints:[0,.050383,.029803,.527975,.003922,.063536,.028426,.533124,.007843,.075353,.027206,.538007,.011765,.086222,.026125,.542658,.015686,.096379,.025165,.547103,.019608,.10598,.024309,.551368,.023529,.115124,.023556,.555468,.027451,.123903,.022878,.559423,.031373,.132381,.022258,.56325,.035294,.140603,.021687,.566959,.039216,.148607,.021154,.570562,.043137,.156421,.020651,.574065,.047059,.16407,.020171,.577478,.05098,.171574,.019706,.580806,.054902,.17895,.019252,.584054,.058824,.186213,.018803,.587228,.062745,.193374,.018354,.59033,.066667,.200445,.017902,.593364,.070588,.207435,.017442,.596333,.07451,.21435,.016973,.599239,.078431,.221197,.016497,.602083,.082353,.227983,.016007,.604867,.086275,.234715,.015502,.607592,.090196,.241396,.014979,.610259,.094118,.248032,.014439,.612868,.098039,.254627,.013882,.615419,.101961,.261183,.013308,.617911,.105882,.267703,.012716,.620346,.109804,.274191,.012109,.622722,.113725,.280648,.011488,.625038,.117647,.287076,.010855,.627295,.121569,.293478,.010213,.62949,.12549,.299855,.009561,.631624,.129412,.30621,.008902,.633694,.133333,.312543,.008239,.6357,.137255,.318856,.007576,.63764,.141176,.32515,.006915,.639512,.145098,.331426,.006261,.641316,.14902,.337683,.005618,.643049,.152941,.343925,.004991,.64471,.156863,.35015,.004382,.646298,.160784,.356359,.003798,.64781,.164706,.362553,.003243,.649245,.168627,.368733,.002724,.650601,.172549,.374897,.002245,.651876,.176471,.381047,.001814,.653068,.180392,.387183,.001434,.654177,.184314,.393304,.001114,.655199,.188235,.399411,859e-6,.656133,.192157,.405503,678e-6,.656977,.196078,.41158,577e-6,.65773,.2,.417642,564e-6,.65839,.203922,.423689,646e-6,.658956,.207843,.429719,831e-6,.659425,.211765,.435734,.001127,.659797,.215686,.441732,.00154,.660069,.219608,.447714,.00208,.66024,.223529,.453677,.002755,.66031,.227451,.459623,.003574,.660277,.231373,.46555,.004545,.660139,.235294,.471457,.005678,.659897,.239216,.477344,.00698,.659549,.243137,.48321,.00846,.659095,.247059,.489055,.010127,.658534,.25098,.494877,.01199,.657865,.254902,.500678,.014055,.657088,.258824,.506454,.016333,.656202,.262745,.512206,.018833,.655209,.266667,.517933,.021563,.654109,.270588,.523633,.024532,.652901,.27451,.529306,.027747,.651586,.278431,.534952,.031217,.650165,.282353,.54057,.03495,.64864,.286275,.546157,.038954,.64701,.290196,.551715,.043136,.645277,.294118,.557243,.047331,.643443,.298039,.562738,.051545,.641509,.301961,.568201,.055778,.639477,.305882,.573632,.060028,.637349,.309804,.579029,.064296,.635126,.313725,.584391,.068579,.632812,.317647,.589719,.072878,.630408,.321569,.595011,.07719,.627917,.32549,.600266,.081516,.625342,.329412,.605485,.085854,.622686,.333333,.610667,.090204,.619951,.337255,.615812,.094564,.61714,.341176,.620919,.098934,.614257,.345098,.625987,.103312,.611305,.34902,.631017,.107699,.608287,.352941,.636008,.112092,.605205,.356863,.640959,.116492,.602065,.360784,.645872,.120898,.598867,.364706,.650746,.125309,.595617,.368627,.65558,.129725,.592317,.372549,.660374,.134144,.588971,.376471,.665129,.138566,.585582,.380392,.669845,.142992,.582154,.384314,.674522,.147419,.578688,.388235,.67916,.151848,.575189,.392157,.683758,.156278,.57166,.396078,.688318,.160709,.568103,.4,.69284,.165141,.564522,.403922,.697324,.169573,.560919,.407843,.701769,.174005,.557296,.411765,.706178,.178437,.553657,.415686,.710549,.182868,.550004,.419608,.714883,.187299,.546338,.423529,.719181,.191729,.542663,.427451,.723444,.196158,.538981,.431373,.72767,.200586,.535293,.435294,.731862,.205013,.531601,.439216,.736019,.209439,.527908,.443137,.740143,.213864,.524216,.447059,.744232,.218288,.520524,.45098,.748289,.222711,.516834,.454902,.752312,.227133,.513149,.458824,.756304,.231555,.509468,.462745,.760264,.235976,.505794,.466667,.764193,.240396,.502126,.470588,.76809,.244817,.498465,.47451,.771958,.249237,.494813,.478431,.775796,.253658,.491171,.482353,.779604,.258078,.487539,.486275,.783383,.2625,.483918,.490196,.787133,.266922,.480307,.494118,.790855,.271345,.476706,.498039,.794549,.27577,.473117,.501961,.798216,.280197,.469538,.505882,.801855,.284626,.465971,.509804,.805467,.289057,.462415,.513725,.809052,.293491,.45887,.517647,.812612,.297928,.455338,.521569,.816144,.302368,.451816,.52549,.819651,.306812,.448306,.529412,.823132,.311261,.444806,.533333,.826588,.315714,.441316,.537255,.830018,.320172,.437836,.541176,.833422,.324635,.434366,.545098,.836801,.329105,.430905,.54902,.840155,.33358,.427455,.552941,.843484,.338062,.424013,.556863,.846788,.342551,.420579,.560784,.850066,.347048,.417153,.564706,.853319,.351553,.413734,.568627,.856547,.356066,.410322,.572549,.85975,.360588,.406917,.576471,.862927,.365119,.403519,.580392,.866078,.36966,.400126,.584314,.869203,.374212,.396738,.588235,.872303,.378774,.393355,.592157,.875376,.383347,.389976,.596078,.878423,.387932,.3866,.6,.881443,.392529,.383229,.603922,.884436,.397139,.37986,.607843,.887402,.401762,.376494,.611765,.89034,.406398,.37313,.615686,.89325,.411048,.369768,.619608,.896131,.415712,.366407,.623529,.898984,.420392,.363047,.627451,.901807,.425087,.359688,.631373,.904601,.429797,.356329,.635294,.907365,.434524,.35297,.639216,.910098,.439268,.34961,.643137,.9128,.444029,.346251,.647059,.915471,.448807,.34289,.65098,.918109,.453603,.339529,.654902,.920714,.458417,.336166,.658824,.923287,.463251,.332801,.662745,.925825,.468103,.329435,.666667,.928329,.472975,.326067,.670588,.930798,.477867,.322697,.67451,.933232,.48278,.319325,.678431,.93563,.487712,.315952,.682353,.93799,.492667,.312575,.686275,.940313,.497642,.309197,.690196,.942598,.502639,.305816,.694118,.944844,.507658,.302433,.698039,.947051,.512699,.299049,.701961,.949217,.517763,.295662,.705882,.951344,.52285,.292275,.709804,.953428,.52796,.288883,.713725,.95547,.533093,.28549,.717647,.957469,.53825,.282096,.721569,.959424,.543431,.278701,.72549,.961336,.548636,.275305,.729412,.963203,.553865,.271909,.733333,.965024,.559118,.268513,.737255,.966798,.564396,.265118,.741176,.968526,.5697,.261721,.745098,.970205,.575028,.258325,.74902,.971835,.580382,.254931,.752941,.973416,.585761,.25154,.756863,.974947,.591165,.248151,.760784,.976428,.596595,.244767,.764706,.977856,.602051,.241387,.768627,.979233,.607532,.238013,.772549,.980556,.613039,.234646,.776471,.981826,.618572,.231287,.780392,.983041,.624131,.227937,.784314,.984199,.629718,.224595,.788235,.985301,.63533,.221265,.792157,.986345,.640969,.217948,.796078,.987332,.646633,.214648,.8,.98826,.652325,.211364,.803922,.989128,.658043,.2081,.807843,.989935,.663787,.204859,.811765,.990681,.669558,.201642,.815686,.991365,.675355,.198453,.819608,.991985,.681179,.195295,.823529,.992541,.68703,.19217,.827451,.993032,.692907,.189084,.831373,.993456,.69881,.186041,.835294,.993814,.704741,.183043,.839216,.994103,.710698,.180097,.843137,.994324,.716681,.177208,.847059,.994474,.722691,.174381,.85098,.994553,.728728,.171622,.854902,.994561,.734791,.168938,.858824,.994495,.74088,.166335,.862745,.994355,.746995,.163821,.866667,.994141,.753137,.161404,.870588,.993851,.759304,.159092,.87451,.993482,.765499,.156891,.878431,.993033,.77172,.154808,.882353,.992505,.777967,.152855,.886275,.991897,.784239,.151042,.890196,.991209,.790537,.149377,.894118,.990439,.796859,.14787,.898039,.989587,.803205,.146529,.901961,.988648,.809579,.145357,.905882,.987621,.815978,.144363,.909804,.986509,.822401,.143557,.913725,.985314,.828846,.142945,.917647,.984031,.835315,.142528,.921569,.982653,.841812,.142303,.92549,.98119,.848329,.142279,.929412,.979644,.854866,.142453,.933333,.977995,.861432,.142808,.937255,.976265,.868016,.143351,.941176,.974443,.874622,.144061,.945098,.97253,.88125,.144923,.94902,.970533,.887896,.145919,.952941,.968443,.894564,.147014,.956863,.966271,.901249,.14818,.960784,.964021,.90795,.14937,.964706,.961681,.914672,.15052,.968627,.959276,.921407,.151566,.972549,.956808,.928152,.152409,.976471,.954287,.934908,.152921,.980392,.951726,.941671,.152925,.984314,.949151,.948435,.152178,.988235,.946602,.95519,.150328,.992157,.944152,.961916,.146861,.996078,.941896,.96859,.140956,1,.940015,.975158,.131326]},{ColorSpace:"Diverging",Name:"Viridis (matplotlib)",NanColor:[1,0,0],Source:"https://github.com/BIDS/colormap/blob/master/colormaps.py",License:"CC0",Creator:"Eric Firing",RGBPoints:[0,.267004,.004874,.329415,.003922,.26851,.009605,.335427,.007843,.269944,.014625,.341379,.011765,.271305,.019942,.347269,.015686,.272594,.025563,.353093,.019608,.273809,.031497,.358853,.023529,.274952,.037752,.364543,.027451,.276022,.044167,.370164,.031373,.277018,.050344,.375715,.035294,.277941,.056324,.381191,.039216,.278791,.062145,.386592,.043137,.279566,.067836,.391917,.047059,.280267,.073417,.397163,.05098,.280894,.078907,.402329,.054902,.281446,.08432,.407414,.058824,.281924,.089666,.412415,.062745,.282327,.094955,.417331,.066667,.282656,.100196,.42216,.070588,.28291,.105393,.426902,.07451,.283091,.110553,.431554,.078431,.283197,.11568,.436115,.082353,.283229,.120777,.440584,.086275,.283187,.125848,.44496,.090196,.283072,.130895,.449241,.094118,.282884,.13592,.453427,.098039,.282623,.140926,.457517,.101961,.28229,.145912,.46151,.105882,.281887,.150881,.465405,.109804,.281412,.155834,.469201,.113725,.280868,.160771,.472899,.117647,.280255,.165693,.476498,.121569,.279574,.170599,.479997,.12549,.278826,.17549,.483397,.129412,.278012,.180367,.486697,.133333,.277134,.185228,.489898,.137255,.276194,.190074,.493001,.141176,.275191,.194905,.496005,.145098,.274128,.199721,.498911,.14902,.273006,.20452,.501721,.152941,.271828,.209303,.504434,.156863,.270595,.214069,.507052,.160784,.269308,.218818,.509577,.164706,.267968,.223549,.512008,.168627,.26658,.228262,.514349,.172549,.265145,.232956,.516599,.176471,.263663,.237631,.518762,.180392,.262138,.242286,.520837,.184314,.260571,.246922,.522828,.188235,.258965,.251537,.524736,.192157,.257322,.25613,.526563,.196078,.255645,.260703,.528312,.2,.253935,.265254,.529983,.203922,.252194,.269783,.531579,.207843,.250425,.27429,.533103,.211765,.248629,.278775,.534556,.215686,.246811,.283237,.535941,.219608,.244972,.287675,.53726,.223529,.243113,.292092,.538516,.227451,.241237,.296485,.539709,.231373,.239346,.300855,.540844,.235294,.237441,.305202,.541921,.239216,.235526,.309527,.542944,.243137,.233603,.313828,.543914,.247059,.231674,.318106,.544834,.25098,.229739,.322361,.545706,.254902,.227802,.326594,.546532,.258824,.225863,.330805,.547314,.262745,.223925,.334994,.548053,.266667,.221989,.339161,.548752,.270588,.220057,.343307,.549413,.27451,.21813,.347432,.550038,.278431,.21621,.351535,.550627,.282353,.214298,.355619,.551184,.286275,.212395,.359683,.55171,.290196,.210503,.363727,.552206,.294118,.208623,.367752,.552675,.298039,.206756,.371758,.553117,.301961,.204903,.375746,.553533,.305882,.203063,.379716,.553925,.309804,.201239,.38367,.554294,.313725,.19943,.387607,.554642,.317647,.197636,.391528,.554969,.321569,.19586,.395433,.555276,.32549,.1941,.399323,.555565,.329412,.192357,.403199,.555836,.333333,.190631,.407061,.556089,.337255,.188923,.41091,.556326,.341176,.187231,.414746,.556547,.345098,.185556,.41857,.556753,.34902,.183898,.422383,.556944,.352941,.182256,.426184,.55712,.356863,.180629,.429975,.557282,.360784,.179019,.433756,.55743,.364706,.177423,.437527,.557565,.368627,.175841,.44129,.557685,.372549,.174274,.445044,.557792,.376471,.172719,.448791,.557885,.380392,.171176,.45253,.557965,.384314,.169646,.456262,.55803,.388235,.168126,.459988,.558082,.392157,.166617,.463708,.558119,.396078,.165117,.467423,.558141,.4,.163625,.471133,.558148,.403922,.162142,.474838,.55814,.407843,.160665,.47854,.558115,.411765,.159194,.482237,.558073,.415686,.157729,.485932,.558013,.419608,.15627,.489624,.557936,.423529,.154815,.493313,.55784,.427451,.153364,.497,.557724,.431373,.151918,.500685,.557587,.435294,.150476,.504369,.55743,.439216,.149039,.508051,.55725,.443137,.147607,.511733,.557049,.447059,.14618,.515413,.556823,.45098,.144759,.519093,.556572,.454902,.143343,.522773,.556295,.458824,.141935,.526453,.555991,.462745,.140536,.530132,.555659,.466667,.139147,.533812,.555298,.470588,.13777,.537492,.554906,.47451,.136408,.541173,.554483,.478431,.135066,.544853,.554029,.482353,.133743,.548535,.553541,.486275,.132444,.552216,.553018,.490196,.131172,.555899,.552459,.494118,.129933,.559582,.551864,.498039,.128729,.563265,.551229,.501961,.127568,.566949,.550556,.505882,.126453,.570633,.549841,.509804,.125394,.574318,.549086,.513725,.124395,.578002,.548287,.517647,.123463,.581687,.547445,.521569,.122606,.585371,.546557,.52549,.121831,.589055,.545623,.529412,.121148,.592739,.544641,.533333,.120565,.596422,.543611,.537255,.120092,.600104,.54253,.541176,.119738,.603785,.5414,.545098,.119512,.607464,.540218,.54902,.119423,.611141,.538982,.552941,.119483,.614817,.537692,.556863,.119699,.61849,.536347,.560784,.120081,.622161,.534946,.564706,.120638,.625828,.533488,.568627,.12138,.629492,.531973,.572549,.122312,.633153,.530398,.576471,.123444,.636809,.528763,.580392,.12478,.640461,.527068,.584314,.126326,.644107,.525311,.588235,.128087,.647749,.523491,.592157,.130067,.651384,.521608,.596078,.132268,.655014,.519661,.6,.134692,.658636,.517649,.603922,.137339,.662252,.515571,.607843,.14021,.665859,.513427,.611765,.143303,.669459,.511215,.615686,.146616,.67305,.508936,.619608,.150148,.676631,.506589,.623529,.153894,.680203,.504172,.627451,.157851,.683765,.501686,.631373,.162016,.687316,.499129,.635294,.166383,.690856,.496502,.639216,.170948,.694384,.493803,.643137,.175707,.6979,.491033,.647059,.180653,.701402,.488189,.65098,.185783,.704891,.485273,.654902,.19109,.708366,.482284,.658824,.196571,.711827,.479221,.662745,.202219,.715272,.476084,.666667,.20803,.718701,.472873,.670588,.214,.722114,.469588,.67451,.220124,.725509,.466226,.678431,.226397,.728888,.462789,.682353,.232815,.732247,.459277,.686275,.239374,.735588,.455688,.690196,.24607,.73891,.452024,.694118,.252899,.742211,.448284,.698039,.259857,.745492,.444467,.701961,.266941,.748751,.440573,.705882,.274149,.751988,.436601,.709804,.281477,.755203,.432552,.713725,.288921,.758394,.428426,.717647,.296479,.761561,.424223,.721569,.304148,.764704,.419943,.72549,.311925,.767822,.415586,.729412,.319809,.770914,.411152,.733333,.327796,.77398,.40664,.737255,.335885,.777018,.402049,.741176,.344074,.780029,.397381,.745098,.35236,.783011,.392636,.74902,.360741,.785964,.387814,.752941,.369214,.788888,.382914,.756863,.377779,.791781,.377939,.760784,.386433,.794644,.372886,.764706,.395174,.797475,.367757,.768627,.404001,.800275,.362552,.772549,.412913,.803041,.357269,.776471,.421908,.805774,.35191,.780392,.430983,.808473,.346476,.784314,.440137,.811138,.340967,.788235,.449368,.813768,.335384,.792157,.458674,.816363,.329727,.796078,.468053,.818921,.323998,.8,.477504,.821444,.318195,.803922,.487026,.823929,.312321,.807843,.496615,.826376,.306377,.811765,.506271,.828786,.300362,.815686,.515992,.831158,.294279,.819608,.525776,.833491,.288127,.823529,.535621,.835785,.281908,.827451,.545524,.838039,.275626,.831373,.555484,.840254,.269281,.835294,.565498,.84243,.262877,.839216,.575563,.844566,.256415,.843137,.585678,.846661,.249897,.847059,.595839,.848717,.243329,.85098,.606045,.850733,.236712,.854902,.616293,.852709,.230052,.858824,.626579,.854645,.223353,.862745,.636902,.856542,.21662,.866667,.647257,.8584,.209861,.870588,.657642,.860219,.203082,.87451,.668054,.861999,.196293,.878431,.678489,.863742,.189503,.882353,.688944,.865448,.182725,.886275,.699415,.867117,.175971,.890196,.709898,.868751,.169257,.894118,.720391,.87035,.162603,.898039,.730889,.871916,.156029,.901961,.741388,.873449,.149561,.905882,.751884,.874951,.143228,.909804,.762373,.876424,.137064,.913725,.772852,.877868,.131109,.917647,.783315,.879285,.125405,.921569,.79376,.880678,.120005,.92549,.804182,.882046,.114965,.929412,.814576,.883393,.110347,.933333,.82494,.88472,.106217,.937255,.83527,.886029,.102646,.941176,.845561,.887322,.099702,.945098,.85581,.888601,.097452,.94902,.866013,.889868,.095953,.952941,.876168,.891125,.09525,.956863,.886271,.892374,.095374,.960784,.89632,.893616,.096335,.964706,.906311,.894855,.098125,.968627,.916242,.896091,.100717,.972549,.926106,.89733,.104071,.976471,.935904,.89857,.108131,.980392,.945636,.899815,.112838,.984314,.9553,.901065,.118128,.988235,.964894,.902323,.123941,.992157,.974417,.90359,.130215,.996078,.983868,.904867,.136897,1,.993248,.906157,.143936]},{ShowIndexedColorActiveValues:1,IndexedColors:[.07,.5,.7,1,1,1,.85,1,1,.8,.5,1,.76,1,0,1,.71,.71,.5,.5,.5,.05,.05,1,1,.05,.05,.7,1,1,.7,.89,.96,.67,.36,.95,.54,1,0,.75,.65,.65,.5,.6,.6,1,.5,0,1,1,.19,.12,.94,.12,.5,.82,.89,.56,.25,.83,.24,1,0,.9,.9,.9,.75,.76,.78,.65,.65,.67,.54,.6,.78,.61,.48,.78,.5,.48,.78,.44,.48,.78,.36,.48,.76,1,.48,.38,.49,.5,.69,.76,.56,.56,.4,.56,.56,.74,.5,.89,1,.63,0,.65,.16,.16,.36,.72,.82,.44,.18,.69,0,1,0,.58,1,1,.58,.88,.88,.45,.76,.79,.33,.71,.71,.23,.62,.62,.14,.56,.56,.04,.49,.55,0,.41,.52,.88,.88,1,1,.85,.56,.65,.46,.45,.4,.5,.5,.62,.39,.71,.83,.48,0,.58,0,.58,.26,.62,.69,.34,.09,.56,0,.79,0,.44,.83,1,1,1,.78,.85,1,.78,.78,1,.78,.64,1,.78,.56,1,.78,.38,1,.78,.27,1,.78,.19,1,.78,.12,1,.78,0,1,.61,0,.9,.46,0,.83,.32,0,.75,.22,0,.67,.14,.3,.76,1,.3,.65,1,.13,.58,.84,.15,.49,.67,.15,.4,.59,.09,.33,.53,.96,.93,.82,.8,.82,.12,.71,.71,.76,.65,.33,.3,.34,.35,.38,.62,.31,.71,.67,.36,0,.46,.31,.27,.26,.51,.59,.26,0,.4,0,.49,0,.44,.67,.98,0,.73,1,0,.63,1,0,.56,1,0,.5,1,0,.42,1,.33,.36,.95,.47,.36,.89,.54,.31,.89,.63,.21,.83,.7,.12,.83,.7,.12,.73,.7,.05,.65,.74,.05,.53,.78,0,.4,.8,0,.35,.82,0,.31,.85,0,.27,.88,0,.22,.9,0,.18,.91,0,.15,.92,0,.14,.93,0,.13,.94,0,.12,.95,0,.11,.96,0,.1,.97,0,.09,.98,0,.08,.99,0,.07,1,0,.06],Annotations:[0,"Xx",1,"H",2,"He",3,"Li",4,"Be",5,"B",6,"C",7,"N",8,"O",9,"F",10,"Ne",11,"Na",12,"Mg",13,"Al",14,"Si",15,"P",16,"S",17,"Cl",18,"Ar",19,"K",20,"Ca",21,"Sc",22,"Ti",23,"V",24,"Cr",25,"Mn",26,"Fe",27,"Co",28,"Ni",29,"Cu",30,"Zn",31,"Ga",32,"Ge",33,"As",34,"Se",35,"Br",36,"Kr",37,"Rb",38,"Sr",39,"Y",40,"Zr",41,"Nb",42,"Mo",43,"Tc",44,"Ru",45,"Rh",46,"Pd",47,"Ag",48,"Cd",49,"In",50,"Sn",51,"Sb",52,"Te",53,"I",54,"Xe",55,"Cs",56,"Ba",57,"La",58,"Ce",59,"Pr",60,"Nd",61,"Pm",62,"Sm",63,"Eu",64,"Gd",65,"Tb",66,"Dy",67,"Ho",68,"Er",69,"Tm",70,"Yb",71,"Lu",72,"Hf",73,"Ta",74,"W",75,"Re",76,"Os",77,"Ir",78,"Pt",79,"Au",80,"Hg",81,"Tl",82,"Pb",83,"Bi",84,"Po",85,"At",86,"Rn",87,"Fr",88,"Ra",89,"Ac",90,"Th",91,"Pa",92,"U",93,"Np",94,"Pu",95,"Am",96,"Cm",97,"Bk",98,"Cf",99,"Es",100,"Fm",101,"Md",102,"No",103,"Lr",104,"Rf",105,"Db",106,"Sg",107,"Bh",108,"Hs",109,"Mt",110,"Ds",111,"Rg",112,"Cn",113,"Uut",114,"Uuq",115,"Uup",116,"Uuh",117,"Uus",118,"Uuo"],Name:"BlueObeliskElements"}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Pb[e.Name]=e}));var Kb=Object.keys(Pb);Kb.sort();var Mb={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Pb[e.Name]||(Kb.push(e.Name),Kb.sort()),Pb[e.Name]=e)},removePresetByName:function(e){var t=Kb.indexOf(e);t>-1&&Kb.splice(t,1),delete Pb[e]},getPresetByName:function(e){return Pb[e]},rgbPresetNames:Kb};var Lb=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.volume=Xb.newInstance({visibility:!1}),t.mapper=Fb.newInstance(),t.volume.setMapper(t.mapper),t.volume.getProperty().setRGBTransferFunction(0,t.lookupTable),t.volume.getProperty().setScalarOpacity(0,t.piecewiseFunction),t.volume.getProperty().setInterpolationTypeToLinear(),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addVolume(e.volume),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&(this.view.renderer.removeVolume(this.volume),this.view=null),this.volume.delete(),this.volume=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.volume,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange;if(!r||t&&r===t.volume||this.volume.set(r),!a||t&&a===t.property||this.volume.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var s,c=Mb.getPresetByName(i);this.lookupTable.applyColorMap(c),(s=this.lookupTable).setMappingRange.apply(s,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?(console.log("from update"),this.dataChanged()):(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.volume.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.volume.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();Lb.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},Lb.propTypes={id:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Db=Lb,Eb=Id.InterpolationType,Ub=ln.c.vtkErrorMacro;function zb(e,t){t.classHierarchy.push("vtkImageProperty"),e.getMTime=function(){for(var e,n=t.mtime,r=0;r<4;r++)t.componentData[r].rGBTransferFunction&&(n=n>(e=t.componentData[r].rGBTransferFunction.getMTime())?n:e),t.componentData[r].piecewiseFunction&&(n=n>(e=t.componentData[r].piecewiseFunction.getMTime())?n:e);return n},e.setRGBTransferFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].rGBTransferFunction!==o&&(t.componentData[a].rGBTransferFunction=o,e.modified(),!0)},e.getRGBTransferFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].rGBTransferFunction},e.setPiecewiseFunction=function(n,r){var a=n,o=r;return Number.isInteger(n)||(o=n,a=0),t.componentData[a].piecewiseFunction!==o&&(t.componentData[a].piecewiseFunction=o,e.modified(),!0)},e.getPiecewiseFunction=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.componentData[e].piecewiseFunction},e.setScalarOpacity=function(t,n){var r=t,a=n;return Number.isInteger(t)||(a=t,r=0),e.setPiecewiseFunction(r,a)},e.getScalarOpacity=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e.getPiecewiseFunction(t)},e.setComponentWeight=function(n,r){if(n<0||n>=4)return Ub("Invalid index"),!1;var a=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==a&&(t.componentData[n].componentWeight=a,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(Ub("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(Eb.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(Eb.LINEAR)},e.getInterpolationTypeAsString=function(){return ln.c.enumToString(Eb,t.interpolationType)}}var _b={independentComponents:!1,interpolationType:Eb.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function jb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,_b,n),ln.c.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}ln.c.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),zb(e,t)}var Qb={newInstance:ln.c.newInstance(jb,"vtkImageProperty"),extend:jb},qb=ln.c.vtkDebugMacro;function $b(e,t){t.classHierarchy.push("vtkImageSlice"),e.getActors=function(){return e},e.getImages=function(){return e},e.getIsOpaque=function(){if(t.forceOpaque)return!0;if(t.forceTranslucent)return!1;t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=Qb.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.getBounds=function(){if(null===t.mapper)return t.bounds;var n,r=t.mapper.getBounds();if(!r||6!==r.length)return r;if(r[0]>r[1])return t.mapperBounds=r.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),r;if(!t.mapperBounds||!(n=[r,t.mapperBounds],n[0].map((function(e,t){return n.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){qb("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var a=[];Ol.getCorners(r,a),e.computeMatrix();var o=new Float64Array(16);Object(Yo.i)(o,t.matrix),a.forEach((function(e){return Object(Fo.q)(e,e,o)})),t.bounds[0]=t.bounds[2]=t.bounds[4]=Number.MAX_VALUE,t.bounds[1]=t.bounds[3]=t.bounds[5]=-Number.MAX_VALUE,t.bounds=t.bounds.map((function(e,t){return t%2==0?a.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):a.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,a=t.mapper.getBoundsForSlice(n,r);if(!a||6!==a.length)return a;if(a[0]>a[1])return a;var o=[];Ol.getCorners(a,o),e.computeMatrix();var i=new Float64Array(16);Object(Yo.i)(i,t.matrix),o.forEach((function(e){return Object(Fo.q)(e,e,i)}));var l=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return l.map((function(e,t){return t%2==0?o.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):o.reduce((function(e,n){return ee?n:e}return e},e.getRedrawMTime=function(){var e=t.mtime;if(null!==t.mapper){var n=t.mapper.getMTime();e=n>e?n:e,null!==t.mapper.getInput()&&(t.mapper.getInputAlgorithm().update(),e=(n=t.mapper.getInput().getMTime())>e?n:e)}if(null!==t.property){var r=t.property.getMTime();e=r>e?r:e,null!==t.property.getRGBTransferFunction()&&(e=(r=t.property.getRGBTransferFunction().getMTime())>e?r:e)}return e},e.getSupportsSelection=function(){return!!t.mapper&&t.mapper.getSupportsSelection()}}var ey={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ey,n),qp.extend(e,t,n),t.boundsMTime={},ln.c.obj(t.boundsMTime),ln.c.set(e,t,["property"]),ln.c.setGet(e,t,["mapper"]),ln.c.getArray(e,t,["bounds"],6),$b(e,t)}var ny={newInstance:ln.c.newInstance(ty,"vtkImageSlice"),extend:ty};function ry(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ay(e){for(var t=1;ti&&(i=g,s=r[c]<0,l=c)}if(1!==i){var u="IJKXYZ"[t.slicingMode],d="IJKXYZ"[l];ly("Unaccurate slicing along ".concat(u," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(i,"% aligned). ")+"Necessitates slice reformat that is not yet implemented. You can switch the slicing mode on your mapper to do IJK slicing instead.")}t.closestIJKAxis={ijkMode:l,flip:s}}function r(n,r){var a=e.getInputData(),o=a.getExtent(),i=[o[0],o[2],o[4]],l=e.getClosestIJKAxis().ijkMode,s=t.slice;l!==t.slicingMode&&(s=e.getSliceAtPosition(s)),i[l]+=s;var c=[0,0,0];a.indexToWorld(i,c),i[l]+=1;var g=[0,0,0];a.indexToWorld(i,g),g[0]-=c[0],g[1]-=c[1],g[2]-=c[2],Object(Fo.l)(g,g);var u=tl.a.intersectWithLine(n,r,c,g);if(u.intersection){var d=u.x,m=[0,0,0];return a.worldToIndex(d,m),{t:u.t,absoluteIJK:m}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,a=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=a.getBounds();switch(t.slicingMode){case sy.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case sy.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case sy.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var i=[0,0,0];a.worldToIndex(r,i);var l=a.getExtent(),s=0;switch(e.getClosestIJKAxis().ijkMode){case sy.I:s=Object(Xo.a)(i[0],l[0],l[1]),s=Math.round(s);break;case sy.J:s=Object(Xo.a)(i[1],l[2],l[3]),s=Math.round(s);break;case sy.K:s=Object(Xo.a)(i[2],l[4],l[5]),s=Math.round(s);break;default:return 0}return s},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case sy.I:case sy.J:case sy.K:var a=e.getSliceAtPosition(r);e.setSlice(a);break;case sy.X:e.setSlice(r[0]);break;case sy.Y:e.setSlice(r[1]);break;case sy.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(sy.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(sy.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(sy.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(sy.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(sy.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(sy.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),a=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case sy.X:n[0]=1;break;case sy.Y:n[1]=1;break;case sy.Z:n[2]=1;break;case sy.I:Object(Xo.k)(a,[1,0,0],n);break;case sy.J:Object(Xo.k)(a,[0,1,0],n);break;case sy.K:Object(Xo.k)(a,[0,0,1],n)}return n},e.setSlicingMode=function(r){t.slicingMode!==r&&(t.slicingMode=r,e.getInputData()&&n(),e.modified())},e.getClosestIJKAxis=function(){return void 0!==t.closestIJKAxis&&t.closestIJKAxis.ijkMode!==sy.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return Object(Xo.j)();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),a=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(a!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),a){case sy.I:r[0]=o,r[1]=o;break;case sy.J:r[2]=o,r[3]=o;break;case sy.K:r[4]=o,r[5]=o}return n.extentToBounds(r)},e.getBoundsForSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.slice,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=e.getInputData();if(!a)return Object(Xo.j)();var o=a.getExtent(),i=e.getClosestIJKAxis(),l=i.ijkMode,s=n;switch(l!==t.slicingMode&&(s=e.getSliceAtPosition(n)),l){case sy.I:o[0]=s-r,o[1]=s+r;break;case sy.J:o[2]=s-r,o[3]=s+r;break;case sy.K:o[4]=s-r,o[5]=s+r}return a.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=[Math.round(a.absoluteIJK[0]),Math.round(a.absoluteIJK[1]),Math.round(a.absoluteIJK[2])];return i[0]o[1]||i[1]o[3]||i[2]o[5]?null:{t:a.t,ijk:i}}return null},e.intersectWithLineForCellPicking=function(t,n){var a=r(t,n);if(a){var o=e.getInputData().getExtent(),i=a.absoluteIJK,l=[Math.floor(i[0]),Math.floor(i[1]),Math.floor(i[2])];if(l[0]o[1]-1||l[1]o[3]-1||l[2]o[5]-1)return null;var s=[i[0]-l[0],i[1]-l[1],i[2]-l[2]];return{t:a.t,ijk:l,pCoords:s}}return null}}var gy={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:sy.NONE,closestIJKAxis:{ijkMode:sy.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gy,n),_g.extend(e,t,n),ln.c.get(e,t,["slicingMode"]),ln.c.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),ln.c.setGetArray(e,t,["customDisplayExtent"],4),Vu.implementCoincidentTopologyMethods(e,t),cy(e,t)}var dy=ay(ay(ay({newInstance:ln.c.newInstance(uy,"vtkImageMapper"),extend:uy},oy),iy),pd);var my=function(e){ys(a,Ss.Component);var t,n,r=(t=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Gs(t);if(n){var a=Gs(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return As(this,e)});function a(e){var t;return ps(this,a),(t=r.call(this,e)).validData=!1,t.currentVisibility=!0,t.lookupTable=Ib.newInstance(),t.piecewiseFunction=Zb.newInstance(),t.actor=ny.newInstance({visibility:!1}),t.mapper=dy.newInstance(),t.actor.setMapper(t.mapper),t}return Is(a,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return e.view||(t.renderer.addActor(e.actor),e.view=t),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.mapper},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.view&&this.view.renderer&&this.view.renderer.removeActor(this.actor),this.actor.delete(),this.actor=null,this.mapper.delete(),this.mapper=null}},{key:"update",value:function(e,t){var n,r=e.actor,a=e.property,o=e.mapper,i=e.colorMapPreset,l=e.colorDataRange,s=e.iSlice,c=e.jSlice,g=e.kSlice,u=e.xSlice,d=e.ySlice,m=e.zSlice;if(!r||t&&r===t.actor||this.actor.set(r),!a||t&&a===t.property||this.actor.getProperty().set(a),!o||t&&o===t.mapper||this.mapper.set(o),i&&(!t||i!==t.colorMapPreset)){var f,p=Mb.getPresetByName(i);this.lookupTable.applyColorMap(p),(f=this.lookupTable).setMappingRange.apply(f,fs(l)),this.lookupTable.updateRange()}!l||t&&l===t.colorDataRange||("string"==typeof l?t?this.dataChanged():(this.lookupTable.setMappingRange(0,1),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:0,y:0,midpoint:.5,sharpness:0},{x:1,y:1,midpoint:.5,sharpness:0}])):((n=this.lookupTable).setMappingRange.apply(n,fs(l)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:l[0],y:0,midpoint:.5,sharpness:0},{x:l[1],y:1,midpoint:.5,sharpness:0}]))),!s||t&&s===t.iSlice||this.mapper.setISlice(s),!c||t&&c===t.jSlice||this.mapper.setJSlice(c),!g||t&&g===t.kSlice||this.mapper.setKSlice(g),!u||t&&u===t.xSlice||this.mapper.setXSlice(u),!d||t&&d===t.ySlice||this.mapper.setYSlice(d),!m||t&&m===t.zSlice||this.mapper.setZSlice(m),r&&void 0!==r.visibility&&(this.currentVisibility=r.visibility,this.actor.setVisibility(this.currentVisibility&&this.validData)),this.dataChanged()}},{key:"dataAvailable",value:function(){this.validData||(this.validData=!0,this.actor.setVisibility(this.currentVisibility),this.dataChanged())}},{key:"dataChanged",value:function(){if("auto"===this.props.colorDataRange){this.mapper.update();var e,t=this.mapper.getInputData(),n=t&&t.getPointData().getScalars(),r=n&&n.getRange();r&&((e=this.lookupTable).setMappingRange.apply(e,fs(r)),this.lookupTable.updateRange(),this.piecewiseFunction.setNodes([{x:r[0],y:0,midpoint:.5,sharpness:0},{x:r[1],y:1,midpoint:.5,sharpness:0}])),this.view&&this.view.renderView()}}}]),a}();my.defaultProps={colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto"},my.propTypes={id:Rs.a.string,mapper:Rs.a.object,actor:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string]),iSlice:Rs.a.number,jSlice:Rs.a.number,kSlice:Rs.a.number,xSlice:Rs.a.number,ySlice:Rs.a.number,zSlice:Rs.a.number,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var fy=my,py=Object.create(null);[{ColorSpace:"Diverging",Name:"Cool to Warm",NanColor:[1,1,0],RGBPoints:[0,.23137254902,.298039215686,.752941176471,.5,.865,.865,.865,1,.705882352941,.0156862745098,.149019607843]},{ColorSpace:"Diverging",Name:"Warm to Cool",NanColor:[1,1,0],RGBPoints:[0,.705882352941,.0156862745098,.149019607843,.5,.865,.865,.865,1,.23137254902,.298039215686,.752941176471]},{ColorSpace:"RGB",Name:"Rainbow Desaturated",NanColor:[1,1,0],RGBPoints:[0,.278431372549,.278431372549,.858823529412,.143,0,0,.360784313725,.285,0,1,1,.429,0,.501960784314,0,.571,1,1,0,.714,1,.380392156863,0,.857,.419607843137,0,0,1,.878431372549,.301960784314,.301960784314]},{ColorSpace:"RGB",Name:"Cold and Hot",NanColor:[1,1,0],RGBPoints:[0,0,1,1,.45,0,0,1,.5,0,0,.501960784314,.55,1,0,0,1,1,1,0]},{ColorSpace:"RGB",Name:"Black-Body Radiation",NanColor:[0,.498039215686,1],RGBPoints:[0,0,0,0,.4,.901960784314,0,0,.8,.901960784314,.901960784314,0,1,1,1,1]},{ColorSpace:"RGB",Name:"X Ray",NanColor:[1,0,0],RGBPoints:[0,1,1,1,1,0,0,0]},{ColorSpace:"RGB",Name:"Grayscale",NanColor:[1,0,0],RGBPoints:[0,0,0,0,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Blue and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,0,0,.501960784314,.666,0,.501960784314,1,1,1,1,1]},{ColorSpace:"RGB",Name:"Black, Orange and White",NanColor:[1,1,0],RGBPoints:[0,0,0,0,.333,.501960784314,0,0,.666,1,.501960784314,0,1,1,1,1]},{ColorSpace:"Lab",Name:"erdc_rainbow_bright",RGBPoints:[-1,.32549,.14902,.960784,-.866221,.297047,.375586,.963836,-.732441,.180302,.536818,.964627,-.598662,.1302,.649207,.929647,-.464883,.0445143,.749654,.855998,-.331104,.0271325,.830713,.721527,-.197324,.259504,.866145,.543555,-.0635452,.428364,.890725,.329819,.0702341,.568503,.898508,.187623,.204013,.738259,.890317,.0825461,.337793,.84546,.86136,.0147555,.471572,.912191,.808018,0,.605351,.962848,.710445,0,.73913,.999469,.600258,.0176284,.87291,.994156,.445975,.193912,1,.980407,.247105,.262699]},{ColorSpace:"Lab",Name:"erdc_rainbow_dark",RGBPoints:[-1,0,0,.423499,-.866221,0,.119346,.529237,-.732441,0,.238691,.634976,-.598662,0,.346852,.68788,-.464883,0,.45022,.718141,-.331104,0,.553554,.664839,-.197324,0,.651082,.519303,-.0635452,.115841,.72479,.352857,.0702341,.326771,.781195,.140187,.204013,.522765,.798524,.0284624,.337793,.703162,.788685,.00885756,.471572,.845118,.751133,0,.605351,.955734,.690825,0,.73913,.995402,.567916,.0618524,.87291,.987712,.403398,.164851,1,.980407,.247105,.262699]}].filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){py[e.Name]=e}));var Cy=Object.keys(py);Cy.sort();var Iy={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(py[e.Name]||(Cy.push(e.Name),Cy.sort()),py[e.Name]=e)},removePresetByName:function(e){var t=Cy.indexOf(e);t>-1&&Cy.splice(t,1),delete py[e]},getPresetByName:function(e){return py[e]},rgbPresetNames:Cy},hy=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments[3];return new Promise((function(o,i){var l=n._messageId++;n._messages.set(l,[o,i,a]),n._worker.postMessage([l,t,e],r||[])}))}},{key:"postMessage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return new Promise((function(a,o){var i=t._messageId++;t._messages.set(i,[a,o,r]),t._worker.postMessage([i,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+l||uo+s?d===s?o:o+d/(d-s)*(u-o-s):-d===s?o:o-d/(d+s)*(u-o-s))-o)/d,f=Math.exp(-4*m*m),p=1-m*m,C=1,I=i*(c<1?c*p+(1-c)*f:(2-c)*p+(c-1)*C);I>n[g]&&(n[g]=I)}}return n}function Xy(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},a=t[3],o=t[2]/(n.length-1),i=!!r.fillStyle,l=a+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var s=0;s3&&void 0!==arguments[3]?arguments[3]:[0,1];return[r[0]+(e-n[0])/n[2]*(r[1]-r[0]),(t-n[1])/n[3]]}function Ny(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,Object(Ao.a)(n));return n.indexOf(r)}function Hy(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,a=n.offsetY;t&&n.preventDefault(),e(r,a)}}function Yy(){xy.filter((function(e){return e.ready})).forEach((function(e){e.callbacks.forEach((function(t){t.touches===e.touches&&t.clicks===e.count&&t.action.apply(t,Object(Ao.a)(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return function(a){var o=a.target.getBoundingClientRect(),i=Array.prototype.map.call(a.touches,(function(e){return[e.pageX-o.left,e.pageY-o.top]})).reduce((function(e,t){return[e[0]+t[0],e[1]+t[1]]}),[0,0]).map((function(e){return e/a.touches.length}));"touchstart"===a.type?(clearTimeout(xy[e].timeout),xy[e].ts=a.timeStamp,xy[e].singleTouche=i,xy[e].touches=a.touches.length):"touchmove"===a.type?(xy[e].ts=0,xy[e].count=0,xy[e].ready=!1):"touchend"===a.type&&(a.timeStamp-xy[e].ts1&&void 0!==arguments[1]?arguments[1]:{},o=r.numberOfBinToConsiders,i=void 0===o?1:o,l=r.numberOfBinsToSkip,s=void 0===l?1:l,c=r.numberOfComponents,g=void 0===c?1:c,u=r.component,d=void 0===u?0:u;t.histogram=null,t.histogramArray=n,t.dataRange=Object(Xo.b)(n,d,g);var m=Object(a.a)(t.dataRange,2),f=m[0],p=m[1],C=4,I=Math.floor(n.length/C)||1;I+=I%g;for(var h=0,b=[],y=[];hr;)a.shift();for(var l=a.reduce((function(e,t){return e+t}),0)/r,c=0,g=t.histogram.length;c1){for(var c=t.style.iconSize+t.style.padding,g=c,u=0;r>g;)u+=1,g+=c;switch(u){case 0:var d=e.addGaussian(0,1,.1,0,0),m=t.gaussians[d],f=ky({},m),p=Ty.adjustPosition;t.activeGaussian=d,t.selectedGaussian=d,ln.c.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:p,gaussian:m,originalGaussian:f}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(l<0||l>1||s<0||s>1)t.selectedGaussian=-1,t.dragAction=null;else{var C=Ny(l,t.gaussians);C!==t.selectedGaussian&&(t.selectedGaussian=C,e.modified())}return!0},e.onHover=function(n,r){var o=20/t.canvas.height,i=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),l=Object(a.a)(i,2),s=l[0],c=l[1],g=Oy(n,r,t.graphArea),u=Object(a.a)(g,1)[0],d=s<0?t.selectedGaussian:Ny(s,t.gaussians);t.canvas.style.cursor="default";var m=t.gaussians[d];if(t.enableRangeZoom&&u>=0&&rt.rangeZoom[1]-f?t.canvas.style.cursor=Wy.adjustZoom:t.canvas.style.cursor=Wy.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:Ty.adjustZoom}}else if(m&&u>=0){var p,C=1-c;p=C>m.height+o?"adjustPosition":C>m.height-o?Math.abs(s-m.position).5*m.height+o?"adjustPosition":C>.5*m.height-o?Math.abs(s-m.position)o?"adjustPosition":"adjustWidth",t.canvas.style.cursor=Wy[p];var I=Ty[p],h=ky({},m);t.dragAction={originalXY:[s,c],action:I,gaussian:m,originalGaussian:h}}return d!==t.activeGaussian&&(t.activeGaussian=d,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);t.gaussianSide=0;var i=t.gaussians[o];return i&&(t.gaussianSide=i.position-a),o!==t.selectedGaussian&&a>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];(0,t.dragAction.action)(l,s,ky({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=Jy(t.gaussians,t.piecewiseSize),e.invokeOpacityChange(e,!0)),e.modified()}return!0},e.onUp=function(n,r){return t.mouseIsDown&&e.invokeAnimation(!1),t.mouseIsDown=!1,!0},e.onLeave=function(n,r){return e.onUp(n,r),t.canvas.style.cursor="default",t.activeGaussian=-1,e.modified(),!0},e.onAddGaussian=function(n,r){var o=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),i=Object(a.a)(o,2),l=i[0],s=i[1];return l>=0&&e.addGaussian(l,1-s,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var a=Oy(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Ny(a,t.gaussians);return a>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=xy.length,t=arguments.length,n=new Array(t),r=0;r1){var c=Math.round(t.style.iconSize/2-t.style.strokeWidth),g=Math.round(c+i+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(g-i/2,g,c,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g),e.stroke(),e.moveTo(g-i/2,g-c+t.style.strokeWidth+2),e.lineTo(g-i/2,g+c-t.style.strokeWidth-2),e.stroke(),-1===t.selectedGaussian?(e.fillStyle=t.style.buttonDisableFillColor,e.lineWidth=t.style.buttonDisableStrokeWidth,e.strokeStyle=t.style.buttonDisableStrokeColor):(e.fillStyle=t.style.buttonFillColor,e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor),e.beginPath(),e.arc(g-i/2,g+i/2+t.style.iconSize,c,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(g-c+t.style.strokeWidth+2-i/2,g+i/2+t.style.iconSize),e.lineTo(g+c-t.style.strokeWidth-2-i/2,g+i/2+t.style.iconSize),e.stroke()}if(t.histogram&&Xy(e,l,Ky(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),Xy(e,l,Ky(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var u=t.dataRange||t.colorTransferFunction.getMappingRange();t.colorCanvas&&t.colorCanvasMTime===t.colorTransferFunction.getMTime()||(t.colorCanvasMTime=t.colorTransferFunction.getMTime(),t.colorCanvas=function(e,t,n,r){var a=r||document.createElement("canvas");a.setAttribute("width",t),a.setAttribute("height",256);for(var o=a.getContext("2d"),i=e.getUint8Table(n[0],n[1],t,4),l=o.getImageData(0,0,t,256),s=0;s<256;s++)l.data.set(i,4*s*t);for(var c=256*t*4,g=4*t,u=3;u0&&(a=Math.min(a,i)),t.opacities[i]>0&&(o=Math.max(o,i));return[n[0]+a*r,n[0]+o*r]};var n=e.setEnableRangeZoom;e.setEnableRangeZoom=function(e){var r=n(e);return r&&(t.colorCanvasMTime=0,t.rangeZoom=[0,1]),r};var r=e.setRangeZoom;e.setRangeZoom=function(){var e=r.apply(void 0,arguments);return e&&(t.colorCanvasMTime=0),e},e.onModified((function(){return e.render()})),e.setSize.apply(e,Object(Ao.a)(t.size))}var Dy={histogram:[],numberOfBins:256,histogramArray:null,dataRange:[0,1],gaussians:[],opacities:[],size:[600,300],piecewiseSize:256,colorCanvasMTime:0,gaussianMinimumHeight:.05,style:{backgroundColor:"rgba(255, 255, 255, 1)",histogramColor:"rgba(200, 200, 200, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(0, 0, 150)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",handleColor:"rgb(0, 150, 0)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:20,padding:10,zoomControlHeight:10,zoomControlColor:"#999"},activeGaussian:-1,selectedGaussian:-1,enableRangeZoom:!0,rangeZoom:[0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),ln.c.obj(e,t),ln.c.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),ln.c.setGetArray(e,t,["rangeZoom"],2),ln.c.get(e,t,["size","canvas","gaussians"]),ln.c.event(e,t,"opacityChange"),ln.c.event(e,t,"animation"),ln.c.event(e,t,"zoomChange"),Ly(e,t)}var Uy=ky({newInstance:ln.c.newInstance(Ey,"vtkPiecewiseGaussianWidget"),extend:Ey},My),zy='',_y='',jy='';var Qy={container:"VolumeController-module_container__2HNSO",line:"VolumeController-module_line__3rtqL",button:"VolumeController-module_button__2T-xL",sliderEntry:"VolumeController-module_sliderEntry__27XSC",sliderIcon:"VolumeController-module_sliderIcon__U8YAZ VolumeController-module_button__2T-xL",slider:"VolumeController-module_slider__3PS68",piecewiseEditor:"VolumeController-module_piecewiseEditor__2_jav",select:"VolumeController-module_select__7mbfS",presets:"VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadow:"VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonDarkBG:"VolumeController-module_buttonDarkBG__3W1zO VolumeController-module_button__2T-xL",presetsDarkBG:"VolumeController-module_presetsDarkBG__2ZI2W VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowDarkBG:"VolumeController-module_shadowDarkBG__WHYZ- VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS",buttonBrightBG:"VolumeController-module_buttonBrightBG__2dstz VolumeController-module_button__2T-xL",presetsBrightBG:"VolumeController-module_presetsBrightBG__3_VRC VolumeController-module_presets__1h4j5 VolumeController-module_select__7mbfS",shadowBrightBG:"VolumeController-module_shadowBrightBG__YCHpe VolumeController-module_shadow__29K9t VolumeController-module_select__7mbfS"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".VolumeController-module_container__2HNSO {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n justify-content: space-between;\n position: absolute;\n top: 5px;\n left: 5px;\n background: rgba(128, 128, 128, 0.5);\n border-radius: 5px;\n padding: 2px;\n border: 0.5px solid black;\n box-sizing: border-box;\n}\n\n.VolumeController-module_line__3rtqL {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.VolumeController-module_button__2T-xL {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module_button__2T-xL svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module_sliderEntry__27XSC {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module_sliderIcon__U8YAZ {\n height: 1rem;\n}\n\n.VolumeController-module_slider__3PS68 {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module_piecewiseEditor__2_jav {\n flex: 1;\n}\n\n.VolumeController-module_select__7mbfS {\n flex: 1;\n border: none;\n background: transparent;\n color: white;\n border: none;\n -moz-appearance: none;\n width: 5px;\n}\n\n.VolumeController-module_select__7mbfS select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module_presets__1h4j5 {\n}\n\n.VolumeController-module_shadow__29K9t {\n}\n\n.VolumeController-module_buttonDarkBG__3W1zO {\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W {\n color: white;\n}\n\n.VolumeController-module_presetsDarkBG__2ZI2W option {\n color: black;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- {\n color: white;\n}\n\n.VolumeController-module_shadowDarkBG__WHYZ- option {\n color: black;\n}\n\n.VolumeController-module_buttonBrightBG__2dstz {\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC {\n color: black;\n}\n\n.VolumeController-module_presetsBrightBG__3_VRC option {\n color: white;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe {\n color: black;\n}\n\n.VolumeController-module_shadowBrightBG__YCHpe option {\n color: white;\n}\n");var qy=Iy.rgbPresetNames.map((function(e){return'")}));function $y(e,t){function n(){var e=!!Number(t.el.querySelector(".js-shadow").value);t.actor.getProperty().setShade(e),t.renderWindow.render()}function r(){var e=t.actor.getMapper().getInputData();if(e){var n=e.getPointData().getScalars()||e.getPointData().getArrays()[0],r=t.rescaleColorMap?t.colorDataRange:n.getRange(),a=Iy.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(a),o.setMappingRange.apply(o,Object(Ao.a)(r)),o.updateRange(),t.renderWindow.render()}}function a(){var e=Number(t.el.querySelector(".js-spacing").value),n=t.actor.getMapper().getInputData(),r=.7*Math.sqrt(n.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.actor.getMapper().setSampleDistance(r*Math.pow(2,3*e-1.5)),t.renderWindow.render()}function o(){var e=Number(t.el.querySelector(".js-edge").value);if(0===e)t.actor.getProperty().setUseGradientOpacity(0,!1);else{var n=t.actor.getMapper().getInputData(),r=(n.getPointData().getScalars()||n.getPointData().getArrays()[0]).getRange();t.actor.getProperty().setUseGradientOpacity(0,!0);var a=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*a*a),t.actor.getProperty().setGradientOpacityMaximumValue(0,1*(r[1]-r[0])*e*e)}t.renderWindow.render()}t.classHierarchy.push("vtkVolumeController"),t.el=document.createElement("div"),t.el.setAttribute("class",Qy.container),t.widget=Uy.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(i,l,s){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",g=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(l),e.setRenderWindow(i);var u=t.actor.getMapper().getInputData(),d=u.getPointData().getScalars()||u.getPointData().getArrays()[0],m=t.actor.getProperty().getRGBTransferFunction(0),f=t.actor.getProperty().getScalarOpacity(0),p=s?"DarkBG":"BrightBG",C={};["button","presets","shadow"].forEach((function(e){C[e]=Qy["".concat(e).concat(p)]})),t.el.innerHTML='\n
\n
').concat(zy,'
\n \n \n
\n
\n
\n
').concat(jy,'
\n \n
\n
\n
').concat(_y,'
\n \n
\n
\n
\n ');var I=t.el.querySelector(".js-button"),h=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),y=t.el.querySelector(".js-spacing"),v=t.el.querySelector(".js-edge"),Z=t.el.querySelector(".js-pwf");t.widget.updateStyle({backgroundColor:"rgba(255, 255, 255, 0.6)",histogramColor:"rgba(100, 100, 100, 0.5)",strokeColor:"rgb(0, 0, 0)",activeColor:"rgb(255, 255, 255)",handleColor:"rgb(50, 150, 50)",buttonDisableFillColor:"rgba(255, 255, 255, 0.5)",buttonDisableStrokeColor:"rgba(0, 0, 0, 0.5)",buttonStrokeColor:"rgba(0, 0, 0, 1)",buttonFillColor:"rgba(255, 255, 255, 1)",strokeWidth:2,activeStrokeWidth:3,buttonStrokeWidth:1.5,handleWidth:3,iconSize:0,padding:10}),t.widget.addGaussian(.5,1,.5,.5,.4),t.widget.setDataArray(d.getData()),t.widget.setColorTransferFunction(m),t.widget.applyOpacity(f),t.widget.setContainer(Z),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),I.addEventListener("click",e.toggleVisibility),h.addEventListener("change",n),b.addEventListener("change",r),y.addEventListener("input",a),v.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(f),t.colorDataRange=t.widget.getOpacityRange(),t.rescaleColorMap&&r(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),t.widget.onAnimation((function(e){e?t.renderWindow.getInteractor().requestAnimation(t.widget):(t.renderWindow.getInteractor().cancelAnimation(t.widget),t.renderWindow.render())})),m.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),h.value=Number(c)?"1":"0",b.value=g,n(),r(),a(),o()},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.el),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.el),e.modified())};var i=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!i(e)&&(r(),!0)},e.toggleVisibility=function(){e.setExpanded(!e.getExpanded())},e.setExpanded=function(e){var n=t.el.querySelectorAll(".js-toggle"),r=n.length;if(t.expanded=e,t.expanded)for(;r--;)n[r].style.display="flex";else for(;r--;)n[r].style.display="none"},e.getExpanded=function(){return t.expanded},e.setSize=t.widget.setSize,e.render=t.widget.render,e.onAnimation=t.widget.onAnimation,e.onModified(e.render),e.setSize.apply(e,Object(Ao.a)(t.size))}var ev={size:[600,300],expanded:!0,rescaleColorMap:!1};function tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ev,n),ln.c.obj(e,t),ln.c.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),ln.c.get(e,t,["widget"]),$y(e,t)}var nv={newInstance:ln.c.newInstance(tv,"vtkVolumeController"),extend:tv};var rv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;ps(this,n),(r=t.call(this,e)).subscriptions=[],r.containerRef=Bs.a.createRef();var a=e.size,o=e.rescaleColorMap;return r.controller=nv.newInstance({size:a,rescaleColorMap:o}),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(zh.Consumer,null,(function(t){return Bs.a.createElement(_h.Consumer,null,(function(n){return e.view=t,e.representation=n,Bs.a.createElement("div",{ref:e.containerRef})}))}))}},{key:"componentDidMount",value:function(){this.init()}},{key:"componentDidUpdate",value:function(e,t,n){var r;(r=this.controller).setSize.apply(r,fs(this.props.size)),this.controller.render()}},{key:"componentWillUnmount",value:function(){for(;this.subscriptions.length;)this.subscriptions.pop().unsubscribe();this.controller.setContainer(null),this.controller.delete(),this.controller=null}},{key:"init",value:function(){var e=this,t=this.containerRef.current,n=this.view,r=n.renderWindow,a=n.props,o=this.representation.volume,i=a.background[0]+a.background[1]+a.background[2]<1.5;if(o&&o.getMapper()&&o.getMapper().getInputData()){var l=o.getMapper().getInputData();this.controller.setContainer(t),this.controller.setupContent(r,o,i),this.controller.render(),this.view.resetCamera(),this.view.renderView(),this.subscriptions.push(l.onModified((function(){return e.onDataChange()}),-1))}else setTimeout((function(){return e.init()}),100)}},{key:"onDataChange",value:function(){var e=this.controller.getWidget();if(this.representation&&this.representation.volume){var t=this.representation.volume.getMapper().getInputData(),n=t.getPointData().getScalars()||t.getPointData().getArrays()[0];e.setDataArray(n.getData())}}}]),n}();rv.defaultProps={size:[400,150],rescaleColorMap:!0},rv.propTypes={id:Rs.a.string,size:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool};var av=rv;function ov(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getPointData()},e.children)}))}ov.defaultProps={},ov.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var iv=ov,lv={int32:Int32Array,int16:Int16Array,int8:Int8Array,uint32:Uint32Array,uint16:Uint16Array,uint8:Uint8Array,float32:Float32Array,float64:Float64Array};function sv(e,t){if(!e)return null;if(Array.isArray(e))return t.from(e);if(e.dtype){var n=e.bvals,r=e.dtype,a=Ki.toArrayBuffer(n);return new lv[r](a)}return e}var cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).polydata=Go.a.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this;return Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(jh.Provider,{value:e},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}))}},{key:"componentDidMount",value:function(){this.update(this.props)}},{key:"componentDidUpdate",value:function(e,t,n){this.update(this.props,e)}},{key:"componentWillUnmount",value:function(){this.polydata.delete(),this.polydata=null}},{key:"update",value:function(e,t){var n=e.connectivity,r=e.points,a=e.verts,o=e.lines,i=e.polys,l=e.strips,s=!1,c=Uint32Array;if(r&&(!t||r!==t.points)){var g=sv(r,Float64Array);this.polydata.getPoints().setData(g,3),s=!0,c=g.length>196608?Uint32Array:Uint16Array}if(!a||t&&a===t.verts||(this.polydata.getVerts().setData(sv(a,c)),s=!0),!o||t&&o===t.lines||(this.polydata.getLines().setData(sv(o,c)),s=!0),!i||t&&i===t.polys||(this.polydata.getPolys().setData(sv(i,c)),s=!0),!l||t&&l===t.strips||(this.polydata.getStrips().setData(sv(l,c)),s=!0),n&&(n||!t||n!==t.connectivity)){var u=r.length/3;switch(n){case"points":var d=new Uint32Array(u+1);d[0]=u;for(var m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),ln.c.event(e,t,"DataAvailable"),mv(e,t)}),"vtkTrivialProducer"),pv={},Cv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(){return ps(this,n),t.apply(this,arguments)}return Is(n,[{key:"getTrivialProducer",value:function(){var e=pv[this.props.name];return e||(e=fv(),pv[this.props.name]=e),e}},{key:"render",value:function(){var e=this;return this.update(),Bs.a.createElement(_h.Consumer,null,(function(t){return Bs.a.createElement(qh.Consumer,null,(function(n){return e.representation=t,e.downstream||(e.downstream=n),Bs.a.createElement(_h.Provider,{value:e},Bs.a.createElement(qh.Provider,{value:e.getTrivialProducer()},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children)))}))}))}},{key:"update",value:function(){var e=this;this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.subscription=this.getTrivialProducer().onDataAvailable((function(){e.dataAvailable()}))}},{key:"dataAvailable",value:function(){this.downstream&&this.downstream.setInputConnection(this.getTrivialProducer().getOutputPort(),this.props.port),this.validData||(this.validData=!0,this.getTrivialProducer().invokeDataAvailable()),this.representation&&this.representation.dataAvailable()}},{key:"dataChanged",value:function(){this.representation&&this.representation.dataChanged()}}]),n}();Cv.defaultProps={port:0,name:"shared"},Cv.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var Iv=Cv;function hv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bv(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*a,10):t.tickTextStyle.fontSize=Math.max(16*a,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var i=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var l=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];i+.4*l>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=i+.4*l,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=i+1.4*l,t.boxPosition=[.99-t.boxSize[0],-.92]),t.boxSize[1]=Math.max(1.2,Math.min(1.84/r,1.84))}else{t.axisTitlePixelOffset=2*t.tickTextStyle.fontSize,t.tickLabelPixelOffset=.5*t.tickTextStyle.fontSize;var s=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],c=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],g=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*g*(t.ticks.length+3))),t.boxSize[1]=s+c,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)},e.update=function(){if(t.scalarsToColors&&t.visibility){if(t.barMapper.setLookupTable(t.scalarsToColors),t.forceUpdate||Math.max(t.scalarsToColors.getMTime(),e.getMTime())>t.lastRebuildTime.getMTime()){var n=t.scalarsToColors.getMappingRange();t.lastTickBounds=Object(Ao.a)(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=TI().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var a=r.tickFormat(5);if(t.tickStrings=t.ticks.map(a),t.automated)e.computeAndApplyAutomatedSettings();else{var o=e.updateTextureAtlas();e.recomputeBarSegments(o)}t.forceViewUpdate=!0,t.lastRebuildTime.modified(),t.forceUpdate=!1}(t.forceViewUpdate||t.camera.getMTime()>t.lastRedrawTime.getMTime())&&(e.updatePolyDataForLabels(),e.updatePolyDataForBarSegments(),t.lastRedrawTime.modified(),t.forceViewUpdate=!1)}},e.completedImage=function(r){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,n=t.nextAtlas,t.nextAtlas=null,r&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,a=0,o=1;Rv(t.tmContext,t.axisTextStyle);var i=t.tmContext.measureText(t.axisLabel),l={height:i.actualBoundingBoxAscent+2,startingHeight:o,width:i.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,l),o+=l.height,a=l.width,n.titleWidth=l.width,n.titleHeight=l.height,n.tickWidth=0,n.tickHeight=0,Rv(t.tmContext,t.tickTextStyle);for(var s=[].concat(Object(Ao.a)(t.tickStrings),["NaN","Below","Above"]),c=0;ct.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var a=2*(e.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];if(t.topTitle){var o=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0]-a,t.barSize[1]=t.boxSize[1]-o}else{var i=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-i-a,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+a,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var l=(2*e.tickWidth-8)/t.lastSize[0],s=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1];t.barSize[0]=t.boxSize[0],t.barPosition[0]=t.boxPosition[0],t.barSize[1]=t.boxSize[1]-s-n,t.barPosition[1]=t.boxPosition[1],r[0]=l}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var a=[0,0],o=t.vertical?1:0,i=t.vertical?.01:.02;function l(e,n){t.barSegments.push({corners:[[].concat(a),[a[0]+r[0],a[1]],[a[0]+r[0],a[1]+r[1]],[a[0],a[1]+r[1]]],scalars:n,title:e}),a[o]+=r[o]+i}"function"==typeof t.scalarsToColors.getNanColor&&l("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&l("Below",[-.1,-.1,-.1,-.1]);var s="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();a[o]+=i;var c=r[o];r[o]=s?1-2*i-r[o]-a[o]:1-i-a[o],l("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),s&&(r[o]=c,a[o]+=i,l("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,t,r,a,o,i,l){var s=n.get(e);if(s){var c=l.ptIdx,g=l.cellIdx;vv[0]=t[0],vv[1]=t[1],vv[2]=t[2],o[0]<-.5?Object(Fo.b)(Av,r,o[0]*i-s.width):o[0]>.5?Object(Fo.b)(Av,r,o[0]*i):Object(Fo.b)(Av,r,o[0]*i-s.width/2),Object(Fo.g)(vv,vv,Av),Object(Fo.b)(Av,a,o[1]*i-s.height/2),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[0],l.tcoords[2*c+1]=s.tcoords[1],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[2],l.tcoords[2*c+1]=s.tcoords[3],c++,Object(Fo.b)(Av,a,s.height),Object(Fo.g)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[4],l.tcoords[2*c+1]=s.tcoords[5],c++,Object(Fo.b)(Av,r,s.width),Object(Fo.a)(vv,vv,Av),l.points[3*c]=vv[0],l.points[3*c+1]=vv[1],l.points[3*c+2]=vv[2],l.tcoords[2*c]=s.tcoords[6],l.tcoords[2*c+1]=s.tcoords[7],c++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-3,l.polys[4*g+3]=c-2,g++,l.polys[4*g]=3,l.polys[4*g+1]=c-4,l.polys[4*g+2]=c-2,l.polys[4*g+3]=c-1,l.ptIdx+=4,l.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Object(Yo.i)(n,n),Object(Yo.g)(Vv,n);var r=t.lastSize;Av[0]=0,Av[1]=0,Av[2]=-.99,Object(Fo.q)(vv,Av,Vv),Av[0]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Sv,Zv,vv),Av[0]-=.1,Av[1]+=.1,Object(Fo.q)(Zv,Av,Vv),Object(Fo.a)(Bv,Zv,vv);for(var a=0;a<3;a++)Sv[a]/=.05*r[0],Bv[a]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,i=4*o,l=2*o,s=new Float64Array(3*i),c=new Uint16Array(4*l),g=new Float32Array(2*i),u={ptIdx:0,cellIdx:0,polys:c,points:s,tcoords:g},d=t.vertical?0:1,m=t.vertical?1:0,f=[0,1];t.vertical?(t.topTitle?(Av[0]=t.boxPosition[0]+.5*t.boxSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,[0,1],t.axisTitlePixelOffset,u)):(Av[0]=t.barPosition[0]+t.barSize[0],Av[1]=t.barPosition[1]+.5*t.barSize[1],Object(Fo.q)(vv,Av,Vv),Object(Fo.b)(Sv,Sv,-1),e.createPolyDataForOneLabel(t.axisLabel,vv,Bv,Sv,[0,-1],t.axisTitlePixelOffset,u),Object(Fo.b)(Sv,Sv,-1)),f=[-1,0]):(Av[0]=t.barPosition[0]+.5*t.barSize[0],Av[1]=t.barPosition[1]+t.barSize[1],Object(Fo.q)(vv,Av,Vv),e.createPolyDataForOneLabel(t.axisLabel,vv,Sv,Bv,f,t.axisTitlePixelOffset,u)),Gv[2]=-.99,Gv[d]=t.barPosition[d]+(.5*f[d]+.5)*t.barSize[d],Gv[m]=t.barPosition[m]+.5*t.barSize[m];for(var p=null,C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kv(n)),aC.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=Pu.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=Go.a.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=aC.newInstance(),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},ln.c.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},ln.c.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=Go.a.newInstance(),t.tmPolyData=Go.a.newInstance(),t.tmMapper=Pu.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=dC.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=aC.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmActor.setProperty(e.getProperty()),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.mapper=sC.newInstance(),t.pixelMapperPolyData=Go.a.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,a,o,i){t.camera=r,t.lastSize[0]===i[0]&&t.lastSize[1]===i[1]||(t.lastSize[0]=i[0],t.lastSize[1]=i[1],t.lastAspectRatio=i[0]/i[1],t.forceUpdate=!0),e.update()})),ln.c.setGet(e,t,["automated","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),ln.c.get(e,t,["axisTextStyle","tickTextStyle"]),ln.c.getArray(e,t,["boxPosition","boxSize"]),ln.c.setArray(e,t,["boxPosition","boxSize"],2),wv(e,t)}var xv={newInstance:ln.c.newInstance(Wv,"vtkScalarBarActor"),extend:Wv};var Tv=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).validData=!1,r.currentVisibility=!0,r.actor=aC.newInstance({visibility:!1,representationId:e.id}),r.lookupTable=Ib.newInstance(),r.mapper=Pu.newInstance({lookupTable:r.lookupTable,useLookupTableScalarRange:!0}),r.actor.setMapper(r.mapper),r.cubeAxes=qI.newInstance({visibility:!1,dataBounds:[-1,1,-1,1,-1,1]}),r.cubeAxes.getActors().forEach((function(e){return(0,e.setVisibility)(!1)})),r.scalarBar=xv.newInstance(),r.scalarBar.setScalarsToColors(r.lookupTable),r.scalarBar.setVisibility(!1),r.subscriptions=[],r.subscriptions.push(r.mapper.onModified((function e(){if(r.mapper.getInputData()){1===r.subscriptions.length&&r.subscriptions.push(r.mapper.getInputData().onModified(e));var t=r.mapper.getInputData().getBounds();t[0]t.bounds[1]&&(t.bounds[1]=g[0]),g[1]>t.bounds[3]&&(t.bounds[3]=g[1]),g[2]>t.bounds[5]&&(t.bounds[5]=g[2]);var R=new Float32Array(I,36*b,9);Dl(R,y),zl(R,R),Ul(R,R)}var w=e.getAbstractScalars(n,t.scalarMode,t.arrayAccessMode,t.arrayId,t.colorByArrayName).scalars;t.useLookupTableScalarRange||e.getLookupTable().setRange(t.scalarRange[0],t.scalarRange[1]),t.colorArray=null;var k=e.getLookupTable();k&&w&&(k.build(),t.colorArray=k.mapScalars(w,t.colorMode,0)),t.buildTime.modified()}},e.getPrimitiveCount=function(){var t=e.getInputData(1),n=e.getInputData().getPoints().getNumberOfValues()/3;return{points:n*t.getPoints().getNumberOfValues()/3,verts:n*(t.getVerts().getNumberOfValues()-t.getVerts().getNumberOfCells()),lines:n*(t.getLines().getNumberOfValues()-2*t.getLines().getNumberOfCells()),triangles:n*(t.getPolys().getNumberOfValues()-3*t.getLines().getNumberOfCells())}}}var Pv={orient:!0,orientationMode:Nv.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:Hv.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function Kv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pv,n),Pu.extend(e,t,n),ln.c.algo(e,t,2,0),t.buildTime={},ln.c.obj(t.buildTime,{mtime:0}),t.boundsTime={},ln.c.obj(t.boundsTime,{mtime:0}),ln.c.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),ln.c.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),Fv(e,t)}var Mv=function(e){for(var t=1;t4&&void 0!==arguments[4]?arguments[4]:{};return{getArrays:function(){return{input:e.augmentInputArrays(t,n.map((function(e){return{location:t,name:e}}))),output:[{location:t,name:r,attribute:"outputAttributeType"in o?o.outputAttributeType:ti.a.SCALARS,numberOfComponents:"numberOfOutputComponents"in o?o.numberOfOutputComponents:1}]}},evaluate:function(e,t){var n=new Array(e.length),r=e.map((function(e,t){var r=e.getNumberOfComponents(),a=e.getData();return 1===r?function(e){return a[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],i=o.getData(),l=o.getNumberOfComponents(),s=new Array(l);if(1===l)i.forEach((function(e,t){i[t]=a.apply(void 0,Object(Ao.a)(r.map((function(e){return e(t)}))).concat([t,s]))}));else for(var c=o.getNumberOfTuples(),g=function(e){s=a.apply(void 0,Object(Ao.a)(r.map((function(t){return t(e)}))).concat([e,s])),o.setTuple(e,s)},u=0;u4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,a,o))},e.prepareArrays=function(e,t,n){var r=[],a=[];return e.input.forEach((function(e){if(e.location===Dh.b.COORDINATE)r.push(t.getPoints());else{var n=[[Dh.b.UNIFORM,function(e){return e.getFieldData()}],[Dh.b.POINT,function(e){return e.getPointData()}],[Dh.b.CELL,function(e){return e.getCellData()}],[Dh.b.VERTEX,function(e){return e.getVertexData()}],[Dh.b.EDGE,function(e){return e.getEdgeData()}],[Dh.b.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),a="location"in e&&e.location in n?n[e.location](t):null;a?e.name?r.push(a.getArrayByName(e.name)):"index"in e?r.push(a.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Dh.b.UNIFORM?r.push(a.getActiveAttribute(e.attribute)):(rZ('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rZ('Specifier "'.concat(JSON.stringify(e),'" did not provide a usable location.')),r.push(null))}})),e.output.forEach((function(e){var r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),ln.c.obj(e,t),ln.c.algo(e,t,1,1),aZ(e,t)}var lZ={newInstance:ln.c.newInstance(iZ,"vtkCalculator"),extend:iZ};var sZ=Nl.a.FieldDataTypes,cZ=function(e){ys(n,Ss.Component);var t=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gs(e);if(t){var a=Gs(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return As(this,n)}}(n);function n(e){var r;return ps(this,n),(r=t.call(this,e)).calculator=lZ.newInstance(),r}return Is(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.name,r=t.arrays,a=t.location,o=t.formula;return this.calculator.setFormulaSimple(sZ[a],r,n,o),Bs.a.createElement(qh.Consumer,null,(function(t){return e.downstream||(t.setInputConnection(e.calculator.getOutputPort(),e.props.port),e.downstream=t),Bs.a.createElement(qh.Provider,{value:e.calculator},Bs.a.createElement("div",{key:e.props.id,id:e.props.id},e.props.children))}))}},{key:"componentWillUnmount",value:function(){this.calculator.delete(),this.calculator=null}}]),n}();cZ.defaultProps={port:0,name:"scalars",location:"POINT",arrays:[],formula:function(e){return e[0]}},cZ.propTypes={id:Rs.a.string,port:Rs.a.number,name:Rs.a.string,location:Rs.a.string,arrays:Rs.a.arrayOf(Rs.a.string),formula:Rs.a.func,children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var gZ=cZ;function uZ(e){return Bs.a.createElement(jh.Consumer,null,(function(t){return Bs.a.createElement(Qh.Provider,{value:t.getDataSet().getCellData()},e.children)}))}uZ.defaultProps={},uZ.propTypes={children:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.node),Rs.a.node])};var dZ={VolumeRepresentation:Db,SliceRepresentation:fy,VolumeController:av,PointData:iv,PolyData:gv,Reader:dv,ShareDataSet:Iv,View:nb,GeometryRepresentation:Jv,GlyphRepresentation:Dv,ImageData:Uv,DataArray:_v,FieldData:Qv,Algorithm:tZ,Calculator:gZ,CellData:uZ};function mZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r="Float32Array"),console.log("nbComponents",t),Bs.a.createElement(Jv,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,showCubeAxes:e.showCubeAxes,cubeAxesStyle:e.cubeAxesStyle,showScalarBar:e.showScalarBar,scalarBarTitle:e.scalarBarTitle,scalarBarStyle:e.scalarBarStyle},Bs.a.createElement(gv,{points:e.xyz,connectivity:"points"},t&&Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}mZ.defaultProps={xyz:[0,0,0],colorMapPreset:"erdc_rainbow_bright",colorDataRange:[0,1],showCubeAxes:!1,showScalarBar:!1,scalarBarTitle:""},mZ.propTypes={id:Rs.a.string,xyz:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),colorMapPreset:Rs.a.string,colorDataRange:Rs.a.arrayOf(Rs.a.number),property:Rs.a.object,showCubeAxes:Rs.a.bool,cubeAxesStyle:Rs.a.object,showScalarBar:Rs.a.bool,scalarBarTitle:Rs.a.string,scalarBarStyle:Rs.a.object};var fZ=mZ;function pZ(e){var t=0,n=null,r=null;return e.rgb&&(n=e.rgb,t=3,r="Uint8Array"),e.rgba&&(n=e.rgb,t=4,r="Uint8Array"),e.scalars&&(n=e.scalars,t=1,r=e.scalarsType),Bs.a.createElement(Db,{id:e.id,colorMapPreset:e.colorMapPreset,colorDataRange:e.colorDataRange,property:e.property,mapper:e.mapper,volume:e.volume},e.volumeController&&Bs.a.createElement(av,{rescaleColorMap:e.rescaleColorMap,size:e.controllerSize}),Bs.a.createElement(Uv,{dimensions:e.dimensions,origin:e.origin,spacing:e.spacing},Bs.a.createElement(iv,null,Bs.a.createElement(_v,{registration:"setScalars",numberOfComponents:t,values:n,type:r}))))}pZ.defaultProps={scalarsType:"Float32Array",colorMapPreset:"erdc_rainbow_bright",colorDataRange:"auto",volumeController:!0,rescaleColorMap:!0,controllerSize:[400,150]},pZ.propTypes={id:Rs.a.string,dimensions:Rs.a.arrayOf(Rs.a.number),spacing:Rs.a.arrayOf(Rs.a.number),origin:Rs.a.arrayOf(Rs.a.number),rgb:Rs.a.arrayOf(Rs.a.number),rgba:Rs.a.arrayOf(Rs.a.number),scalars:Rs.a.arrayOf(Rs.a.number),scalarsType:Rs.a.string,mapper:Rs.a.object,volume:Rs.a.object,property:Rs.a.object,colorMapPreset:Rs.a.string,volumeController:Rs.a.bool,controllerSize:Rs.a.arrayOf(Rs.a.number),rescaleColorMap:Rs.a.bool,colorDataRange:Rs.a.oneOfType([Rs.a.arrayOf(Rs.a.number),Rs.a.string])};var CZ={PointCloudRepresentation:fZ,VolumeDataRepresentation:pZ},IZ=dZ.VolumeRepresentation,hZ=dZ.SliceRepresentation,bZ=dZ.VolumeController,yZ=dZ.PointData,vZ=dZ.PolyData,ZZ=dZ.Reader,AZ=dZ.ShareDataSet,GZ=dZ.View,SZ=dZ.GeometryRepresentation,BZ=dZ.GlyphRepresentation,VZ=dZ.ImageData,RZ=dZ.DataArray,wZ=dZ.FieldData,kZ=dZ.Algorithm,WZ=dZ.Calculator,xZ=dZ.CellData,TZ=CZ.PointCloudRepresentation,JZ=CZ.VolumeDataRepresentation,XZ={ViewContext:zh,RepresentationContext:_h,DataSetContext:jh,FieldsContext:Qh,DownstreamContext:qh},OZ={Core:dZ,Representations:CZ,Contexts:XZ};t.default=r}]]); //# sourceMappingURL=async-ReactVTK.js.map //# sourceMappingURL=async-ReactVTK.js.map \ No newline at end of file diff --git a/inst/deps/dash_vtk.min.js b/inst/deps/dash_vtk.min.js index 4fb614a..d7cb529 100644 --- a/inst/deps/dash_vtk.min.js +++ b/inst/deps/dash_vtk.min.js @@ -1,3 +1,3 @@ -window.dash_vtk=function(e){function a(a){for(var r,n,o=a[0],l=a[1],i=0,c=[];i= 2.1.2 < 3" @@ -7044,12 +7186,14 @@ }, "iferr": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg==", "dev": true }, "ignore-walk": { "version": "3.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", "dev": true, "requires": { "minimatch": "^3.0.4" @@ -7057,22 +7201,26 @@ }, "import-lazy": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", "dev": true }, "imurmurhash": { "version": "0.1.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, "infer-owner": { "version": "1.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", "dev": true }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "requires": { "once": "^1.3.0", @@ -7081,17 +7229,20 @@ }, "inherits": { "version": "2.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, "init-package-json": { "version": "1.10.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw==", "dev": true, "requires": { "glob": "^7.1.1", @@ -7106,22 +7257,26 @@ }, "ip": { "version": "1.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "dev": true }, "ip-regex": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", "dev": true }, "is-callable": { "version": "1.1.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", "dev": true }, "is-ci": { "version": "1.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", "dev": true, "requires": { "ci-info": "^1.5.0" @@ -7129,14 +7284,16 @@ "dependencies": { "ci-info": { "version": "1.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", "dev": true } } }, "is-cidr": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-8Xnnbjsb0x462VoYiGlhEi+drY8SFwrHiSYuzc/CEwco55vkehTaxAyIjEdpi3EMvLPPJAJi9FlzP+h+03gp0Q==", "dev": true, "requires": { "cidr-regex": "^2.0.10" @@ -7144,12 +7301,14 @@ }, "is-date-object": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -7157,7 +7316,8 @@ }, "is-installed-globally": { "version": "0.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", "dev": true, "requires": { "global-dirs": "^0.1.0", @@ -7166,17 +7326,20 @@ }, "is-npm": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", "dev": true }, "is-obj": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, "is-path-inside": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { "path-is-inside": "^1.0.1" @@ -7184,12 +7347,14 @@ }, "is-redirect": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", "dev": true }, "is-regex": { "version": "1.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { "has": "^1.0.1" @@ -7197,17 +7362,20 @@ }, "is-retry-allowed": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg==", "dev": true }, "is-stream": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "is-symbol": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", "dev": true, "requires": { "has-symbols": "^1.0.0" @@ -7215,53 +7383,63 @@ }, "is-typedarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isexe": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, "isstream": { "version": "0.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", "dev": true }, "jsbn": { "version": "0.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true, "optional": true }, "json-parse-better-errors": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, "json-schema": { "version": "0.2.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true }, "json-stringify-safe": { "version": "5.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, "jsonparse": { "version": "1.3.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", "dev": true }, "jsprim": { "version": "1.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", "dev": true, "requires": { "assert-plus": "1.0.0", @@ -7272,7 +7450,8 @@ }, "latest-version": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", "dev": true, "requires": { "package-json": "^4.0.0" @@ -7280,12 +7459,14 @@ }, "lazy-property": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc=", "dev": true }, "libcipm": { "version": "4.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-IN3hh2yDJQtZZ5paSV4fbvJg4aHxCCg5tcZID/dSVlTuUiWktsgaldVljJv6Z5OUlYspx6xQkbR0efNodnIrOA==", "dev": true, "requires": { "bin-links": "^1.1.2", @@ -7307,7 +7488,8 @@ }, "libnpm": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-d7jU5ZcMiTfBqTUJVZ3xid44fE5ERBm9vBnmhp2ECD2Ls+FNXWxHSkO7gtvrnbLO78gwPdNPz1HpsF3W4rjkBQ==", "dev": true, "requires": { "bin-links": "^1.1.2", @@ -7334,7 +7516,8 @@ }, "libnpmaccess": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ==", "dev": true, "requires": { "aproba": "^2.0.0", @@ -7345,7 +7528,8 @@ }, "libnpmconfig": { "version": "1.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-9esX8rTQAHqarx6qeZqmGQKBNZR5OIbl/Ayr0qQDy3oXja2iFVQQI81R6GZ2a02bSNZ9p3YOGX1O6HHCb1X7kA==", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -7355,7 +7539,8 @@ "dependencies": { "find-up": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -7363,7 +7548,8 @@ }, "locate-path": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -7372,7 +7558,8 @@ }, "p-limit": { "version": "2.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -7380,7 +7567,8 @@ }, "p-locate": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -7388,14 +7576,16 @@ }, "p-try": { "version": "2.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true } } }, "libnpmhook": { "version": "5.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA==", "dev": true, "requires": { "aproba": "^2.0.0", @@ -7406,7 +7596,8 @@ }, "libnpmorg": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww==", "dev": true, "requires": { "aproba": "^2.0.0", @@ -7417,7 +7608,8 @@ }, "libnpmpublish": { "version": "1.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-2yIwaXrhTTcF7bkJKIKmaCV9wZOALf/gsTDxVSu/Gu/6wiG3fA8ce8YKstiWKTxSFNC0R7isPUb6tXTVFZHt2g==", "dev": true, "requires": { "aproba": "^2.0.0", @@ -7433,7 +7625,8 @@ }, "libnpmsearch": { "version": "2.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg==", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -7443,7 +7636,8 @@ }, "libnpmteam": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA==", "dev": true, "requires": { "aproba": "^2.0.0", @@ -7454,7 +7648,8 @@ }, "libnpx": { "version": "10.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-BPc0D1cOjBeS8VIBKUu5F80s6njm0wbVt7CsGMrIcJ+SI7pi7V0uVPGpEMH9H5L8csOcclTxAXFE2VAsJXUhfA==", "dev": true, "requires": { "dotenv": "^5.0.1", @@ -7469,7 +7664,8 @@ }, "lock-verify": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-vcLpxnGvrqisKvLQ2C2v0/u7LVly17ak2YSgoK4PrdsYBXQIax19vhKiLfvKNFx7FRrpTnitrpzF/uuCMuorIg==", "dev": true, "requires": { "npm-package-arg": "^6.1.0", @@ -7478,7 +7674,8 @@ }, "lockfile": { "version": "1.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA==", "dev": true, "requires": { "signal-exit": "^3.0.2" @@ -7486,12 +7683,14 @@ }, "lodash._baseindexof": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw=", "dev": true }, "lodash._baseuniq": { "version": "4.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg=", "dev": true, "requires": { "lodash._createset": "~4.0.0", @@ -7500,17 +7699,20 @@ }, "lodash._bindcallback": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4=", "dev": true }, "lodash._cacheindexof": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI=", "dev": true }, "lodash._createcache": { "version": "3.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-VtagZAF2JeeevKa4AY4XRAvc8JM=", "dev": true, "requires": { "lodash._getnative": "^3.0.0" @@ -7518,52 +7720,62 @@ }, "lodash._createset": { "version": "4.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY=", "dev": true }, "lodash._getnative": { "version": "3.9.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", "dev": true }, "lodash._root": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", "dev": true }, "lodash.clonedeep": { "version": "4.5.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, "lodash.restparam": { "version": "3.6.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", "dev": true }, "lodash.union": { "version": "4.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", "dev": true }, "lodash.uniq": { "version": "4.5.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", "dev": true }, "lodash.without": { "version": "4.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PNRXSgC2e643OpS3SHcmQFB7eqw=", "dev": true }, "lowercase-keys": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", "dev": true }, "lru-cache": { "version": "5.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, "requires": { "yallist": "^3.0.2" @@ -7571,7 +7783,8 @@ }, "make-dir": { "version": "1.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "dev": true, "requires": { "pify": "^3.0.0" @@ -7579,7 +7792,8 @@ }, "make-fetch-happen": { "version": "5.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-07JHC0r1ykIoruKO8ifMXu+xEU8qOXDFETylktdug6vJDACnP+HKevOu3PXyNPzFyTSlz8vrBYlBO1JZRe8Cag==", "dev": true, "requires": { "agentkeepalive": "^3.4.1", @@ -7597,17 +7811,20 @@ }, "meant": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-KN+1uowN/NK+sT/Lzx7WSGIj2u+3xe5n2LbwObfjOhPZiA+cCfCm6idVl0RkEfjThkw5XJ96CyRcanq6GmKtUg==", "dev": true }, "mime-db": { "version": "1.35.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==", "dev": true }, "mime-types": { "version": "2.1.19", - "bundled": true, + "resolved": false, + "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "dev": true, "requires": { "mime-db": "~1.35.0" @@ -7615,7 +7832,8 @@ }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -7623,12 +7841,14 @@ }, "minimist": { "version": "1.2.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, "minizlib": { "version": "1.3.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", "dev": true, "requires": { "minipass": "^2.9.0" @@ -7636,7 +7856,8 @@ "dependencies": { "minipass": { "version": "2.9.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -7647,7 +7868,8 @@ }, "mississippi": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", "dev": true, "requires": { "concat-stream": "^1.5.0", @@ -7664,7 +7886,8 @@ }, "mkdirp": { "version": "0.5.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, "requires": { "minimist": "^1.2.5" @@ -7672,14 +7895,16 @@ "dependencies": { "minimist": { "version": "1.2.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true } } }, "move-concurrently": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", "dev": true, "requires": { "aproba": "^1.1.1", @@ -7692,24 +7917,28 @@ "dependencies": { "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true } } }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, "mute-stream": { "version": "0.0.7", - "bundled": true, + "resolved": false, + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, "node-fetch-npm": { "version": "2.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", "dev": true, "requires": { "encoding": "^0.1.11", @@ -7719,7 +7948,8 @@ }, "node-gyp": { "version": "5.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-OUTryc5bt/P8zVgNUmC6xdXiDJxLMAW8cF5tLQOT9E5sOQj+UeQxnnPy74K3CLCa/SOjjBlbuzDLR8ANwA+wmw==", "dev": true, "requires": { "env-paths": "^2.2.0", @@ -7737,7 +7967,8 @@ }, "nopt": { "version": "4.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", "dev": true, "requires": { "abbrev": "1", @@ -7746,7 +7977,8 @@ }, "normalize-package-data": { "version": "2.5.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", @@ -7757,7 +7989,8 @@ "dependencies": { "resolve": { "version": "1.10.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -7767,7 +8000,8 @@ }, "npm-audit-report": { "version": "1.3.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-8nH/JjsFfAWMvn474HB9mpmMjrnKb1Hx/oTAdjv4PT9iZBvBxiZ+wtDUapHCJwLqYGQVPaAfs+vL5+5k9QndXw==", "dev": true, "requires": { "cli-table3": "^0.5.0", @@ -7776,7 +8010,8 @@ }, "npm-bundled": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", "dev": true, "requires": { "npm-normalize-package-bin": "^1.0.1" @@ -7784,12 +8019,14 @@ }, "npm-cache-filename": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE=", "dev": true }, "npm-install-checks": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-E4kzkyZDIWoin6uT5howP8VDvkM+E8IQDcHAycaAxMbwkqhIg5eEYALnXOl3Hq9MrkdQB/2/g1xwBINXdKSRkg==", "dev": true, "requires": { "semver": "^2.3.0 || 3.x || 4 || 5" @@ -7797,7 +8034,8 @@ }, "npm-lifecycle": { "version": "3.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-lDLVkjfZmvmfvpvBzA4vzee9cn+Me4orq0QF8glbswJVEbIcSNWib7qGOffolysc3teCqbbPZZkzbr3GQZTL1g==", "dev": true, "requires": { "byline": "^5.0.0", @@ -7812,17 +8050,20 @@ }, "npm-logical-tree": { "version": "1.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg==", "dev": true }, "npm-normalize-package-bin": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", "dev": true }, "npm-package-arg": { "version": "6.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", "dev": true, "requires": { "hosted-git-info": "^2.7.1", @@ -7833,7 +8074,8 @@ }, "npm-packlist": { "version": "1.4.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", "dev": true, "requires": { "ignore-walk": "^3.0.1", @@ -7843,7 +8085,8 @@ }, "npm-pick-manifest": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-wNprTNg+X5nf+tDi+hbjdHhM4bX+mKqv6XmPh7B5eG+QY9VARfQPfCEH013H5GqfNj6ee8Ij2fg8yk0mzps1Vw==", "dev": true, "requires": { "figgy-pudding": "^3.5.1", @@ -7853,7 +8096,8 @@ }, "npm-profile": { "version": "4.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-Ta8xq8TLMpqssF0H60BXS1A90iMoM6GeKwsmravJ6wYjWwSzcYBTdyWa3DZCYqPutacBMEm7cxiOkiIeCUAHDQ==", "dev": true, "requires": { "aproba": "^1.1.2 || 2", @@ -7863,7 +8107,8 @@ }, "npm-registry-fetch": { "version": "4.0.7", - "bundled": true, + "resolved": false, + "integrity": "sha512-cny9v0+Mq6Tjz+e0erFAB+RYJ/AVGzkjnISiobqP8OWj9c9FLoZZu8/SPSKJWE17F1tk4018wfjV+ZbIbqC7fQ==", "dev": true, "requires": { "JSONStream": "^1.3.4", @@ -7877,14 +8122,16 @@ "dependencies": { "safe-buffer": { "version": "5.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true } } }, "npm-run-path": { "version": "2.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { "path-key": "^2.0.0" @@ -7892,12 +8139,14 @@ }, "npm-user-validate": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw==", "dev": true }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -7908,27 +8157,32 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "oauth-sign": { "version": "0.9.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, "object-keys": { "version": "1.0.12", - "bundled": true, + "resolved": false, + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", "dev": true }, "object.getownpropertydescriptors": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", "dev": true, "requires": { "define-properties": "^1.1.2", @@ -7937,7 +8191,8 @@ }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -7945,22 +8200,26 @@ }, "opener": { "version": "1.5.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", "dev": true }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "requires": { "os-homedir": "^1.0.0", @@ -7969,12 +8228,14 @@ }, "p-finally": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, "package-json": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", "dev": true, "requires": { "got": "^6.7.1", @@ -7985,7 +8246,8 @@ }, "pacote": { "version": "9.5.12", - "bundled": true, + "resolved": false, + "integrity": "sha512-BUIj/4kKbwWg4RtnBncXPJd15piFSVNpTzY0rysSr3VnMowTYgkGKcaHrbReepAkjTr8lH2CVWRi58Spg2CicQ==", "dev": true, "requires": { "bluebird": "^3.5.3", @@ -8022,7 +8284,8 @@ "dependencies": { "minipass": { "version": "2.9.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -8033,7 +8296,8 @@ }, "parallel-transform": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=", "dev": true, "requires": { "cyclist": "~0.2.2", @@ -8043,7 +8307,8 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -8057,7 +8322,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -8067,57 +8333,68 @@ }, "path-exists": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-is-inside": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, "path-key": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "path-parse": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, "performance-now": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "dev": true }, "pify": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "prepend-http": { "version": "1.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", "dev": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, "promise-inflight": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", "dev": true }, "promise-retry": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", "dev": true, "requires": { "err-code": "^1.0.0", @@ -8126,14 +8403,16 @@ "dependencies": { "retry": { "version": "0.10.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", "dev": true } } }, "promzard": { "version": "0.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-JqXW7ox97kyxIggwWs+5O6OCqe4=", "dev": true, "requires": { "read": "1" @@ -8141,12 +8420,14 @@ }, "proto-list": { "version": "1.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=", "dev": true }, "protoduck": { "version": "5.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==", "dev": true, "requires": { "genfun": "^5.0.0" @@ -8154,22 +8435,26 @@ }, "prr": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "dev": true }, "pseudomap": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, "psl": { "version": "1.1.29", - "bundled": true, + "resolved": false, + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", "dev": true }, "pump": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -8178,7 +8463,8 @@ }, "pumpify": { "version": "1.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, "requires": { "duplexify": "^3.6.0", @@ -8188,7 +8474,8 @@ "dependencies": { "pump": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -8199,22 +8486,26 @@ }, "punycode": { "version": "1.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", "dev": true }, "qrcode-terminal": { "version": "0.12.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==", "dev": true }, "qs": { "version": "6.5.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, "query-string": { "version": "6.8.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw==", "dev": true, "requires": { "decode-uri-component": "^0.2.0", @@ -8224,12 +8515,14 @@ }, "qw": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-77/cdA+a0FQwRCassYNBLMi5ltQ=", "dev": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "requires": { "deep-extend": "^0.6.0", @@ -8240,7 +8533,8 @@ }, "read": { "version": "1.0.7", - "bundled": true, + "resolved": false, + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", "dev": true, "requires": { "mute-stream": "~0.0.4" @@ -8248,7 +8542,8 @@ }, "read-cmd-shim": { "version": "1.0.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA==", "dev": true, "requires": { "graceful-fs": "^4.1.2" @@ -8256,7 +8551,8 @@ }, "read-installed": { "version": "4.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc=", "dev": true, "requires": { "debuglog": "^1.0.1", @@ -8270,7 +8566,8 @@ }, "read-package-json": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-dAiqGtVc/q5doFz6096CcnXhpYk0ZN8dEKVkGLU0CsASt8SrgF6SF7OTKAYubfvFhWaqofl+Y8HK19GR8jwW+A==", "dev": true, "requires": { "glob": "^7.1.1", @@ -8282,7 +8579,8 @@ }, "read-package-tree": { "version": "5.3.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-mLUDsD5JVtlZxjSlPPx1RETkNjjvQYuweKwNVt1Sn8kP5Jh44pvYuUHCp6xSVDZWbNxVxG5lyZJ921aJH61sTw==", "dev": true, "requires": { "read-package-json": "^2.0.0", @@ -8292,7 +8590,8 @@ }, "readable-stream": { "version": "3.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -8302,7 +8601,8 @@ }, "readdir-scoped-modules": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", "dev": true, "requires": { "debuglog": "^1.0.1", @@ -8313,7 +8613,8 @@ }, "registry-auth-token": { "version": "3.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A==", "dev": true, "requires": { "rc": "^1.1.6", @@ -8322,7 +8623,8 @@ }, "registry-url": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", "dev": true, "requires": { "rc": "^1.0.1" @@ -8330,7 +8632,8 @@ }, "request": { "version": "2.88.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "dev": true, "requires": { "aws-sign2": "~0.7.0", @@ -8357,27 +8660,32 @@ }, "require-directory": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, "require-main-filename": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "resolve-from": { "version": "4.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "retry": { "version": "0.12.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", "dev": true }, "rimraf": { "version": "2.7.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", "dev": true, "requires": { "glob": "^7.1.3" @@ -8385,7 +8693,8 @@ }, "run-queue": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", "dev": true, "requires": { "aproba": "^1.1.1" @@ -8393,29 +8702,34 @@ "dependencies": { "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true } } }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, "semver": { "version": "5.7.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "semver-diff": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", "dev": true, "requires": { "semver": "^5.0.3" @@ -8423,12 +8737,14 @@ }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "sha": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==", "dev": true, "requires": { "graceful-fs": "^4.1.2" @@ -8436,7 +8752,8 @@ }, "shebang-command": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "requires": { "shebang-regex": "^1.0.0" @@ -8444,27 +8761,32 @@ }, "shebang-regex": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, "slide": { "version": "1.1.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", "dev": true }, "smart-buffer": { "version": "4.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw==", "dev": true }, "socks": { "version": "2.3.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA==", "dev": true, "requires": { "ip": "1.1.5", @@ -8473,7 +8795,8 @@ }, "socks-proxy-agent": { "version": "4.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==", "dev": true, "requires": { "agent-base": "~4.2.1", @@ -8482,7 +8805,8 @@ "dependencies": { "agent-base": { "version": "4.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", "dev": true, "requires": { "es6-promisify": "^5.0.0" @@ -8492,12 +8816,14 @@ }, "sorted-object": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw=", "dev": true }, "sorted-union-stream": { "version": "2.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-x3lMfgd4gAUv9xqNSi27Sppjisc=", "dev": true, "requires": { "from2": "^1.3.0", @@ -8506,7 +8832,8 @@ "dependencies": { "from2": { "version": "1.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0=", "dev": true, "requires": { "inherits": "~2.0.1", @@ -8515,12 +8842,14 @@ }, "isarray": { "version": "0.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", "dev": true }, "readable-stream": { "version": "1.1.14", - "bundled": true, + "resolved": false, + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -8531,14 +8860,16 @@ }, "string_decoder": { "version": "0.10.31", - "bundled": true, + "resolved": false, + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "dev": true } } }, "spdx-correct": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", @@ -8547,12 +8878,14 @@ }, "spdx-exceptions": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, "spdx-expression-parse": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", @@ -8561,17 +8894,20 @@ }, "spdx-license-ids": { "version": "3.0.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, "split-on-first": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", "dev": true }, "sshpk": { "version": "1.14.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "dev": true, "requires": { "asn1": "~0.2.3", @@ -8587,7 +8923,8 @@ }, "ssri": { "version": "6.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", "dev": true, "requires": { "figgy-pudding": "^3.5.1" @@ -8595,7 +8932,8 @@ }, "stream-each": { "version": "1.2.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-mc1dbFhGBxvTM3bIWmAAINbqiuAk9TATcfIQC8P+/+HJefgaiTlMn2dHvkX8qlI12KeYKSQ1Ua9RrIqrn1VPoA==", "dev": true, "requires": { "end-of-stream": "^1.1.0", @@ -8604,7 +8942,8 @@ }, "stream-iterate": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE=", "dev": true, "requires": { "readable-stream": "^2.1.5", @@ -8613,7 +8952,8 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -8627,7 +8967,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -8637,17 +8978,20 @@ }, "stream-shift": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", "dev": true }, "strict-uri-encode": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", "dev": true }, "string-width": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0", @@ -8656,17 +9000,20 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "strip-ansi": { "version": "4.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { "ansi-regex": "^3.0.0" @@ -8676,7 +9023,8 @@ }, "string_decoder": { "version": "1.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "requires": { "safe-buffer": "~5.2.0" @@ -8684,19 +9032,22 @@ "dependencies": { "safe-buffer": { "version": "5.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", "dev": true } } }, "stringify-package": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg==", "dev": true }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -8704,17 +9055,20 @@ }, "strip-eof": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, "supports-color": { "version": "5.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", "dev": true, "requires": { "has-flag": "^3.0.0" @@ -8722,7 +9076,8 @@ }, "tar": { "version": "4.4.13", - "bundled": true, + "resolved": false, + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "dev": true, "requires": { "chownr": "^1.1.1", @@ -8736,7 +9091,8 @@ "dependencies": { "minipass": { "version": "2.9.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, "requires": { "safe-buffer": "^5.1.2", @@ -8747,7 +9103,8 @@ }, "term-size": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", "dev": true, "requires": { "execa": "^0.7.0" @@ -8755,17 +9112,20 @@ }, "text-table": { "version": "0.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, "through": { "version": "2.3.8", - "bundled": true, + "resolved": false, + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, "through2": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", "dev": true, "requires": { "readable-stream": "^2.1.5", @@ -8774,7 +9134,8 @@ "dependencies": { "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -8788,7 +9149,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "requires": { "safe-buffer": "~5.1.0" @@ -8798,17 +9160,20 @@ }, "timed-out": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", "dev": true }, "tiny-relative-date": { "version": "1.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==", "dev": true }, "tough-cookie": { "version": "2.4.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "dev": true, "requires": { "psl": "^1.1.24", @@ -8817,7 +9182,8 @@ }, "tunnel-agent": { "version": "0.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -8825,28 +9191,33 @@ }, "tweetnacl": { "version": "0.14.5", - "bundled": true, + "resolved": false, + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true, "optional": true }, "typedarray": { "version": "0.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, "uid-number": { "version": "0.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", "dev": true }, "umask": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0=", "dev": true }, "unique-filename": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { "unique-slug": "^2.0.0" @@ -8854,7 +9225,8 @@ }, "unique-slug": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", "dev": true, "requires": { "imurmurhash": "^0.1.4" @@ -8862,7 +9234,8 @@ }, "unique-string": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", "dev": true, "requires": { "crypto-random-string": "^1.0.0" @@ -8870,17 +9243,20 @@ }, "unpipe": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", "dev": true }, "unzip-response": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", "dev": true }, "update-notifier": { "version": "2.5.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", "dev": true, "requires": { "boxen": "^1.2.1", @@ -8897,7 +9273,8 @@ }, "uri-js": { "version": "4.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", "dev": true, "requires": { "punycode": "^2.1.0" @@ -8905,14 +9282,16 @@ "dependencies": { "punycode": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true } } }, "url-parse-lax": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", "dev": true, "requires": { "prepend-http": "^1.0.1" @@ -8920,17 +9299,20 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, "util-extend": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8=", "dev": true }, "util-promisify": { "version": "2.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PCI2R2xNMsX/PEcAKt18E7moKlM=", "dev": true, "requires": { "object.getownpropertydescriptors": "^2.0.3" @@ -8938,12 +9320,14 @@ }, "uuid": { "version": "3.3.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", "dev": true }, "validate-npm-package-license": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "requires": { "spdx-correct": "^3.0.0", @@ -8952,7 +9336,8 @@ }, "validate-npm-package-name": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", "dev": true, "requires": { "builtins": "^1.0.3" @@ -8960,7 +9345,8 @@ }, "verror": { "version": "1.10.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -8970,7 +9356,8 @@ }, "wcwidth": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", "dev": true, "requires": { "defaults": "^1.0.3" @@ -8978,7 +9365,8 @@ }, "which": { "version": "1.3.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -8986,12 +9374,14 @@ }, "which-module": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "requires": { "string-width": "^1.0.2" @@ -8999,7 +9389,8 @@ "dependencies": { "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -9011,7 +9402,8 @@ }, "widest-line": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA==", "dev": true, "requires": { "string-width": "^2.1.1" @@ -9019,7 +9411,8 @@ }, "worker-farm": { "version": "1.7.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", "dev": true, "requires": { "errno": "~0.1.7" @@ -9027,7 +9420,8 @@ }, "wrap-ansi": { "version": "5.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { "ansi-styles": "^3.2.0", @@ -9037,17 +9431,20 @@ "dependencies": { "ansi-regex": { "version": "4.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "string-width": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -9057,7 +9454,8 @@ }, "strip-ansi": { "version": "5.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -9067,12 +9465,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "write-file-atomic": { "version": "2.4.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", "dev": true, "requires": { "graceful-fs": "^4.1.11", @@ -9082,27 +9482,32 @@ }, "xdg-basedir": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", "dev": true }, "xtend": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true }, "y18n": { "version": "4.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true }, "yargs": { "version": "14.2.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", "dev": true, "requires": { "cliui": "^5.0.0", @@ -9120,12 +9525,14 @@ "dependencies": { "ansi-regex": { "version": "4.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "find-up": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { "locate-path": "^3.0.0" @@ -9133,12 +9540,14 @@ }, "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, "locate-path": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { "p-locate": "^3.0.0", @@ -9147,7 +9556,8 @@ }, "p-limit": { "version": "2.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -9155,7 +9565,8 @@ }, "p-locate": { "version": "3.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { "p-limit": "^2.0.0" @@ -9163,12 +9574,14 @@ }, "p-try": { "version": "2.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "string-width": { "version": "3.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { "emoji-regex": "^7.0.1", @@ -9178,7 +9591,8 @@ }, "strip-ansi": { "version": "5.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { "ansi-regex": "^4.1.0" @@ -9188,7 +9602,8 @@ }, "yargs-parser": { "version": "15.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -9197,7 +9612,8 @@ "dependencies": { "camelcase": { "version": "5.3.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true } } @@ -10015,9 +10431,9 @@ "dev": true }, "react-vtk-js": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/react-vtk-js/-/react-vtk-js-1.5.0.tgz", - "integrity": "sha512-Ub5RlEjgOcQ/ss+aMfS0moBGFH9y/WI9NPK6QisJLvX29hUucFf/N/5boOajDlBzDTUCv/TZn6vCMtXnObzvHQ==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/react-vtk-js/-/react-vtk-js-1.5.1.tgz", + "integrity": "sha512-guO2iExLY/r3yiGJlyn2sUxGg1NeIAaJJMUwiJvaMHtj/KlH/3NZ1II5K956rnd4SACHGwaQDt1c7KIMf64pmg==", "requires": { "@babel/runtime": "^7.12.5", "@kitware/vtk.js": "17.8.0" @@ -10872,12 +11288,13 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "ssri": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", - "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", + "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", "dev": true, "requires": { - "figgy-pudding": "^3.5.1" + "figgy-pudding": "^3.5.1", + "minipass": "^3.1.1" } }, "static-extend": { @@ -11294,65 +11711,11 @@ "webpack-sources": "^1.4.3" }, "dependencies": { - "cacache": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", - "integrity": "sha512-5ZvAxd05HDDU+y9BVvcqYu2LLXmPnQ0hW62h32g4xBTgL/MppR4/04NHfj/ycM2y6lmTnbw6HVi+1eN0Psba6w==", - "dev": true, - "requires": { - "chownr": "^1.1.2", - "figgy-pudding": "^3.5.1", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.2", - "infer-owner": "^1.0.4", - "lru-cache": "^5.1.1", - "minipass": "^3.0.0", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "p-map": "^3.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^2.7.1", - "ssri": "^7.0.0", - "unique-filename": "^1.1.1" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true - }, - "ssri": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.0.tgz", - "integrity": "sha512-77/WrDZUWocK0mvA5NTRQyveUf+wsrIc6vyrxpS8tVvYBcX215QbafrJR3KtkpskIzoFLqqNuuYQvxaMjXJ/0g==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1", - "minipass": "^3.1.1" - } } } }, @@ -11858,11 +12221,7 @@ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } + "optional": true }, "glob-parent": { "version": "3.1.0", @@ -11981,6 +12340,29 @@ "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + } + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -12081,30 +12463,19 @@ "ajv-keywords": "^3.1.0" } }, - "serialize-javascript": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", - "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", "dev": true, "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" + "figgy-pudding": "^3.5.1" } }, "terser-webpack-plugin": { @@ -12123,6 +12494,12 @@ "webpack-sources": "^1.4.0", "worker-farm": "^1.7.0" } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true } } }, @@ -12632,9 +13009,9 @@ "dev": true }, "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index b45bf77..d6abc68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dash_vtk", - "version": "0.0.8", + "version": "0.0.9", "description": "React based declarative usage of vtk.js for Dash", "repository": { "type": "git", @@ -26,7 +26,7 @@ "dependencies": { "@plotly/dash-component-plugins": "^1.2.0", "ramda": "^0.26.1", - "react-vtk-js": "^1.5.0" + "react-vtk-js": "^1.5.1" }, "devDependencies": { "@babel/core": "^7.5.4", diff --git a/src/DashVtk.jl b/src/DashVtk.jl index f9cb42c..9e2cf4e 100644 --- a/src/DashVtk.jl +++ b/src/DashVtk.jl @@ -3,7 +3,7 @@ module DashVtk using Dash const resources_path = realpath(joinpath( @__DIR__, "..", "deps")) -const version = "0.0.8" +const version = "0.0.9" include("vtk_algorithm.jl") include("vtk_calculator.jl") @@ -35,28 +35,28 @@ function __init__() [ DashBase.Resource( relative_package_path = "dash_vtk.min.js", - external_url = "https://unpkg.com/dash_vtk@0.0.8/dash_vtk/dash_vtk.min.js", + external_url = "https://unpkg.com/dash_vtk@0.0.9/dash_vtk/dash_vtk.min.js", dynamic = nothing, async = nothing, type = :js ), DashBase.Resource( relative_package_path = "dash_vtk.min.js.map", - external_url = "https://unpkg.com/dash_vtk@0.0.8/dash_vtk/dash_vtk.min.js.map", + external_url = "https://unpkg.com/dash_vtk@0.0.9/dash_vtk/dash_vtk.min.js.map", dynamic = true, async = nothing, type = :js ), DashBase.Resource( relative_package_path = "async-ReactVTK.js", - external_url = "https://unpkg.com/dash_vtk@0.0.8/dash_vtk/async-ReactVTK.js", + external_url = "https://unpkg.com/dash_vtk@0.0.9/dash_vtk/async-ReactVTK.js", dynamic = nothing, async = :true, type = :js ), DashBase.Resource( relative_package_path = "async-ReactVTK.js.map", - external_url = "https://unpkg.com/dash_vtk@0.0.8/dash_vtk/async-ReactVTK.js.map", + external_url = "https://unpkg.com/dash_vtk@0.0.9/dash_vtk/async-ReactVTK.js.map", dynamic = true, async = nothing, type = :js