diff --git a/cadquery/cq_directive.py b/cadquery/cq_directive.py index b59a3bab2..eb2e5d8b3 100644 --- a/cadquery/cq_directive.py +++ b/cadquery/cq_directive.py @@ -156,6 +156,8 @@ // setup actor,mapper and add const mapper = vtk.Rendering.Core.vtkMapper.newInstance(); mapper.setInputConnection(reader.getOutputPort()); + mapper.setResolveCoincidentTopologyToPolygonOffset(); + mapper.setResolveCoincidentTopologyPolygonOffsetParameters(0.5,100); const actor = vtk.Rendering.Core.vtkActor.newInstance(); actor.setMapper(mapper); diff --git a/cadquery/occ_impl/jupyter_tools.py b/cadquery/occ_impl/jupyter_tools.py index 96fdd6857..a4d4827bb 100644 --- a/cadquery/occ_impl/jupyter_tools.py +++ b/cadquery/occ_impl/jupyter_tools.py @@ -35,6 +35,8 @@ // setup actor,mapper and add const mapper = vtk.Rendering.Core.vtkMapper.newInstance(); mapper.setInputConnection(reader.getOutputPort()); + mapper.setResolveCoincidentTopologyToPolygonOffset(); + mapper.setResolveCoincidentTopologyPolygonOffsetParameters(0.5,100); const actor = vtk.Rendering.Core.vtkActor.newInstance(); actor.setMapper(mapper); diff --git a/doc/_static/vtk.js b/doc/_static/vtk.js index 186ed595d..a781f31e5 100644 --- a/doc/_static/vtk.js +++ b/doc/_static/vtk.js @@ -1,3 +1,3 @@ /*! For license information please see vtk.js.LICENSE.txt */ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={1553:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return D()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",m={};function g(){}function v(){}function y(){}var b={};b[o]=function(){return this};var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&r.call(x,o)&&(b=x);var S=y.prototype=g.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function T(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:T(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},7757:function(e,t,n){e.exports=n(1553)},9737:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,{LUFactor3x3:function(){return gt},LUSolve3x3:function(){return vt},Pi:function(){return Ae},add:function(){return Ke},angleBetweenVectors:function(){return lt},areBoundsInitialized:function(){return tn},areEquals:function(){return Ot},areMatricesEqual:function(){return Et},arrayMax:function(){return Me},arrayMin:function(){return ke},arrayRange:function(){return Ne},beginCombination:function(){return je},binomial:function(){return Ve},boundsIsWithinOtherBounds:function(){return cn},ceil:function(){return Te},ceilLog2:function(){return Re},clampAndNormalizeValue:function(){return an},clampValue:function(){return rn},clampVector:function(){return on},computeBoundsFromPoints:function(){return nn},createUninitializedBounds:function(){return bn},cross:function(){return et},default:function(){return Pn},degreesFromRadians:function(){return _e},determinant2x2:function(){return mt},determinant3x3:function(){return Pt},diagonalize3x3:function(){return Rt},distance2BetweenPoints:function(){return st},dot:function(){return Qe},dot2D:function(){return ot},estimateMatrixCondition:function(){return Ut},extentIsWithinOtherExtent:function(){return un},factorial:function(){return Fe},float2CssRGBA:function(){return An},floatRGB2HexCode:function(){return Sn},floatToHex2:function(){return xn},floor:function(){return Ee},gaussian:function(){return He},gaussianAmplitude:function(){return ct},gaussianWeight:function(){return dt},getAdjustedScalarRange:function(){return ln},getMajorAxisIndex:function(){return wn},getScalarTypeFittingRange:function(){return sn},getSeed:function(){return ze},hex2float:function(){return Ht},hsv2rgb:function(){return qt},identity3x3:function(){return At},inf:function(){return fn},invert3x3:function(){return Ct},invertMatrix:function(){return jt},isFinite:function(){return gn},isInf:function(){return mn},isNaN:function(){return vn},isNan:function(){return yn},isPowerOfTwo:function(){return Le},jacobi:function(){return Gt},jacobiN:function(){return It},lab2rgb:function(){return $t},lab2xyz:function(){return Xt},linearSolve3x3:function(){return yt},luFactorLinearSystem:function(){return Bt},luSolveLinearSystem:function(){return Lt},matrix3x3ToQuaternion:function(){return kt},max:function(){return Ie},min:function(){return De},multiply3x3_mat3:function(){return wt},multiply3x3_vect3:function(){return bt},multiplyAccumulate:function(){return Ze},multiplyAccumulate2D:function(){return Je},multiplyMatrix:function(){return xt},multiplyQuaternion:function(){return Mt},multiplyScalar:function(){return Xe},multiplyScalar2D:function(){return Ye},nearestPowerOfTwo:function(){return Be},negInf:function(){return hn},nextCombination:function(){return Ue},norm:function(){return tt},norm2D:function(){return ft},normalize:function(){return nt},normalize2D:function(){return ht},orthogonalize3x3:function(){return Nt},outer:function(){return $e},outer2D:function(){return pt},perpendiculars:function(){return rt},pointIsWithinBounds:function(){return dn},projectVector:function(){return it},projectVector2D:function(){return at},quaternionToMatrix3x3:function(){return _t},radiansFromDegrees:function(){return Pe},random:function(){return We},randomSeed:function(){return Ge},rgb2hsv:function(){return Kt},rgb2lab:function(){return Qt},rgb2xyz:function(){return Jt},round:function(){return Oe},roundNumber:function(){return Tt},roundVector:function(){return Dt},signedAngleBetweenVectors:function(){return ut},singularValueDecomposition3x3:function(){return Ft},solve3PointCircle:function(){return pn},solveHomogeneousLeastSquares:function(){return zt},solveLeastSquares:function(){return Wt},solveLinearSystem:function(){return Vt},subtract:function(){return qe},transpose3x3:function(){return St},uninitializeBounds:function(){return en},xyz2lab:function(){return Yt},xyz2rgb:function(){return Zt}});var i={};n.r(i),n.d(i,{add:function(){return Ri},angle:function(){return co},bezier:function(){return no},ceil:function(){return Vi},clone:function(){return Di},copy:function(){return Mi},create:function(){return Ti},cross:function(){return $i},dist:function(){return wo},distance:function(){return Ki},div:function(){return bo},divide:function(){return Li},dot:function(){return Qi},equals:function(){return mo},exactEquals:function(){return ho},floor:function(){return ji},forEach:function(){return Ao},fromValues:function(){return ki},hermite:function(){return to},inverse:function(){return Zi},len:function(){return So},length:function(){return Ii},lerp:function(){return eo},max:function(){return Gi},min:function(){return Ui},mul:function(){return yo},multiply:function(){return Bi},negate:function(){return Yi},normalize:function(){return Ji},random:function(){return ro},rotateX:function(){return so},rotateY:function(){return lo},rotateZ:function(){return uo},round:function(){return zi},scale:function(){return Wi},scaleAndAdd:function(){return Hi},set:function(){return Ni},sqrDist:function(){return xo},sqrLen:function(){return Co},squaredDistance:function(){return qi},squaredLength:function(){return Xi},str:function(){return fo},sub:function(){return vo},subtract:function(){return Fi},transformMat3:function(){return oo},transformMat4:function(){return io},transformQuat:function(){return ao},zero:function(){return po}});var o={};n.r(o),n.d(o,{add:function(){return ca},adjoint:function(){return Mo},clone:function(){return _o},copy:function(){return Oo},create:function(){return Po},determinant:function(){return No},equals:function(){return ma},exactEquals:function(){return ha},frob:function(){return ua},fromQuat:function(){return ta},fromQuat2:function(){return Yo},fromRotation:function(){return Wo},fromRotationTranslation:function(){return Xo},fromRotationTranslationScale:function(){return $o},fromRotationTranslationScaleOrigin:function(){return ea},fromScaling:function(){return zo},fromTranslation:function(){return Go},fromValues:function(){return Eo},fromXRotation:function(){return Ho},fromYRotation:function(){return Ko},fromZRotation:function(){return qo},frustum:function(){return na},getRotation:function(){return Qo},getScaling:function(){return Jo},getTranslation:function(){return Zo},identity:function(){return Do},invert:function(){return ko},lookAt:function(){return aa},mul:function(){return ga},multiply:function(){return Ro},multiplyScalar:function(){return pa},multiplyScalarAndAdd:function(){return fa},ortho:function(){return oa},perspective:function(){return ra},perspectiveFromFieldOfView:function(){return ia},rotate:function(){return Lo},rotateX:function(){return Vo},rotateY:function(){return jo},rotateZ:function(){return Uo},scale:function(){return Bo},set:function(){return To},str:function(){return la},sub:function(){return va},subtract:function(){return da},targetTo:function(){return sa},translate:function(){return Fo},transpose:function(){return Io}});var a={};n.r(a),n.d(a,{add:function(){return Ga},adjoint:function(){return Oa},clone:function(){return wa},copy:function(){return xa},create:function(){return ya},determinant:function(){return Ea},equals:function(){return qa},exactEquals:function(){return Ka},frob:function(){return Ua},fromMat2d:function(){return Fa},fromMat4:function(){return ba},fromQuat:function(){return Ba},fromRotation:function(){return Na},fromScaling:function(){return Ra},fromTranslation:function(){return Ma},fromValues:function(){return Sa},identity:function(){return Aa},invert:function(){return _a},mul:function(){return Xa},multiply:function(){return Ta},multiplyScalar:function(){return Wa},multiplyScalarAndAdd:function(){return Ha},normalFromMat4:function(){return La},projection:function(){return Va},rotate:function(){return Ia},scale:function(){return ka},set:function(){return Ca},str:function(){return ja},sub:function(){return Ya},subtract:function(){return za},translate:function(){return Da},transpose:function(){return Pa}});var s=[];s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63;for(var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u>16&255,r[p++]=d>>8&255,r[p++]=255&d}switch(a){case 3:for(;!c(e[u]);)u++;for(d=s[e.charCodeAt(u++)]<<10;!c(e[u]);)u++;for(d|=s[e.charCodeAt(u++)]<<4;!c(e[u]);)u++;d|=s[e.charCodeAt(u++)]>>2,r[p++]=d>>8&255,r[p++]=255&d;break;case 2:for(;!c(e[u]);)u++;for(d=s[e.charCodeAt(u++)]<<2;!c(e[u]);)u++;d|=s[e.charCodeAt(u++)]>>4,r[p++]=255&d;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return p}var p={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?t-1:0),r=1;r1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};j(t);var n=[];function r(e){n[e]=null}function i(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++O),t.classHierarchy=["vtkObject"],e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?M("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],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(a){var s=i?null:e["set".concat(V(a))];s&&Array.isArray(n[a])&&s.length>1?o=s.apply(void 0,y(n[a]))||o:s?o=s(n[a])||o:(-1!==["mtime"].indexOf(a)||r||N("Warning: Set value to model directly ".concat(a,", ").concat(n[a])),t[a]=n[a],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 i=n.get(),o=Object.keys(t).sort(),a=Object.keys(i).sort();a.forEach((function(e){var n=o.indexOf(e);-1===n?r&&k("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=i[e]})),o.length&&r&&k("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function H(e,t,n){n.forEach((function(n){"object"===v(n)?e["get".concat(V(n.name))]=function(){return t[n.name]}:e["get".concat(V(n))]=function(){return t[n]}}))}F.Float32Array=Float32Array,F.Float64Array=Float64Array,F.Uint8Array=Uint8Array,F.Int8Array=Int8Array,F.Uint16Array=Uint16Array,F.Int16Array=Int16Array,F.Uint32Array=Uint32Array,F.Int32Array=Int32Array,F.Uint8ClampedArray=Uint8ClampedArray;var K={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 M("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 M("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw M("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function q(e){if("object"===v(e)){var t=K[e.type];if(t)return function(n,r){return t(n,r,e)};throw M("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(M("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function X(e,t,n){n.forEach((function(n){"object"===v(n)?e["set".concat(V(n.name))]=q(n)(e,t):e["set".concat(V(n))]=q(n)(e,t)}))}function Y(e,t,n){H(e,t,n),X(e,t,n)}function Z(e,t,n){n.forEach((function(n){e["get".concat(V(n))]=function(){return[].concat(t[n])},e["get".concat(V(n),"ByReference")]=function(){return t[n]}}))}function J(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){e["set".concat(V(n))]=function(){if(t.deleted)return M("instance deleted - cannot call any method"),!1;for(var o=arguments.length,a=new Array(o),s=0;s4&&void 0!==arguments[4]?arguments[4]:void 0;Z(e,t,n),J(e,t,n,r,i)}function $(e,t,n,r){function i(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?M("instance deleted - cannot call any method"):r>=t.numberOfInputs?M("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)M("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var i="algorithm ".concat(e.getClassName()," only has ");return i+="".concat(t.numberOfInputs),void M(i+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function a(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(M("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(A):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(A):t.inputConnection=[],t.output?t.output=t.output.map(A):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(A):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),i=r,o=1/0;i--;){if(!t.output[i])return!0;var a=t.output[i].getMTime();if(ao)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=i,e.setInputConnection=o,e.addInputData=function(e){t.deleted?M("instance deleted - cannot call any method"):(t.numberOfInputs++,i(e,t.numberOfInputs-1))},e.addInputConnection=function(e){t.deleted?M("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=a,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return a(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]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return M("instance deleted - cannot call any method"),null;var a=o++;return r.push([a,e,i]),r.sort((function(e,t){return t[2]-e[2]})),s(a)},e.delete=function(){i(),r.forEach((function(e){return a(g(e,1)[0])}))}}function ne(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&&A.register(t,n),n}function re(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(ie(e)){if(r.indexOf(e)>=0)return n;r.push(e);var i=t(e);void 0!==i&&n.push(i);var o=e.get();Object.keys(o).forEach((function(e){var i=o[e];Array.isArray(i)?i.forEach((function(e){oe(e,t,n,r)})):oe(i,t,n,r)}))}return n}function ae(e,t){var n=arguments.length>2&&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 se=1,le="__root__";function ue(e,t){ae(e,t);var n=e.delete;t.proxyId="".concat(se++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),H(e,t,["proxyId","proxyGroup","proxyName"]),Y(e,t,["proxyManager"]);var r={},i={};function o(e,t){i[t]||(i[t]=[]);for(var n=i[t],a=0;a0&&void 0!==arguments[0]?arguments[0]:le;return i[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le,r=[],i=t.proxyId,o=a(n)||[],l=0;l1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,i=[],o=0,a=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(a)return null;var l=[],u=null;for(o=i.length;o--;){var c=i[o];c.instance===n?u=c:l.push(c)}if(!u)return null;var d=u.instance["get".concat(V(u.propertyName))]();if(!U(d,r)||s){for(r=d,a=!0;l.length;){var p=l.pop();p.instance.set(f({},p.propertyName,r))}a=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function l(e,t){var n=[];for(o=i.length;o--;){var r=i[o];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(o))}for(;n.length;)i.splice(n.pop(),1)}function u(n,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.onModified(s),u=i[0];return i.push({instance:n,propertyName:r,subscription:a}),o&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(f({},r,t.propertyLinkMap[e].value)):u&&s(u.instance,!0)),{unsubscribe:function(){return l(n,r)}}}function c(){for(;i.length;)i.pop().subscription.unsubscribe()}var d={bind:u,unbind:l,unsubscribe:c,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),i=r.length;i--;)t.propertyLinkMap[r[i]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},z((function(){if(t.links)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],i=Number(e),o="B";i>n;)i/=n,o=r.pop();return"".concat(i.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:H,getArray:Z,getCurrentGlobalMTime:function(){return O},getStateArrayMapFunc:G,isVtkObject:ie,keystore:ae,newInstance:ne,newTypedArray:B,newTypedArrayFrom:L,normalizeWheel:function(e){var t=0,n=0,r=0,i=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,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1===e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}},obj:W,proxy:ue,proxyPropertyMapping:ce,proxyPropertyState:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function i(e){for(var n=Object.keys(e),r=n.length;r--;){var i=n[r];t[i].set(e[i])}}t.this=e;for(var o=Object.keys(r),a=o.length,s=function(){var s=o[a];t[s]=r[s];var l=n[s];e["set".concat(V(s))]=function(n){n!==t[s]&&(t[s]=n,i(l[n]),e.modified())}};a--;)s();o.length&&H(e,t,o)},safeArrays:j,set:X,setArray:J,setGet:Y,setGetArray:Q,setImmediate:z,setLoggerFunction:function(e,t){I[e]&&(I[e]=t||D)},throttle:function(e,t){var n=!1,r=null;function i(){n=!1,null!==r&&(o.apply(void 0,y(r)),r=null)}function o(){for(var o=arguments.length,a=new Array(o),s=0;s0&&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,i=t,o=e.length;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=-1/0,i=t,o=e.length;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,i=-1/0,o=t,a=e.length;o=0;--i)if(n[i]0&&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()}var He=xe("gaussian");function Ke(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function qe(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function Xe(e,t){return e[0]*=t,e[1]*=t,e[2]*=t,e}function Ye(e,t){return e[0]*=t,e[1]*=t,e}function Ze(e,t,n,r){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r}function Je(e,t,n,r){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function Qe(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function $e(e,t,n){for(var r=0;r<3;r++)for(var i=0;i<3;i++)n[r][i]=e[r]*t[i]}function et(e,t,n){var r=e[1]*t[2]-e[2]*t[1],i=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=i,n[2]=o,n}function tt(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;rl&&s>u?(i=0,o=1,a=2):l>u?(i=1,o=2,a=0):(i=2,o=0,a=1);var d=e[i]/c,p=e[o]/c,f=e[a]/c,h=Math.sqrt(d*d+f*f);if(0!==r){var m=Math.sin(r),g=Math.cos(r);t&&(t[i]=(f*g-d*p*m)/h,t[o]=m*h,t[a]=(-d*g-p*f*m)/h),n&&(n[i]=(-f*m-d*p*g)/h,n[o]=g*h,n[a]=(d*m-p*f*g)/h)}else t&&(t[i]=f/h,t[o]=0,t[a]=-d/h),n&&(n[i]=-d*p/h,n[o]=h,n[a]=-p*f/h)}function it(e,t,n){var r=Qe(t,t);if(0===r)return n[0]=0,n[1]=0,n[2]=0,!1;for(var i=Qe(e,t)/r,o=0;o<3;o++)n[o]=t[o];return Xe(n,i),!0}function ot(e,t){return e[0]*t[0]+e[1]*t[1]}function at(e,t,n){var r=ot(t,t);if(0===r)return n[0]=0,n[1]=0,!1;for(var i=ot(e,t)/r,o=0;o<2;o++)n[o]=t[o];return Ye(n,i),!0}function st(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])+(e[2]-t[2])*(e[2]-t[2])}function lt(e,t){var n=[0,0,0];return et(e,t,n),Math.atan2(tt(n),Qe(e,t))}function ut(e,t,n){var r=[0,0,0];et(e,t,r);var i=Math.atan2(tt(r),Qe(e,t));return Qe(r,n)>=0?i:-i}function ct(e,t,n){var r=Math.abs(e-n);return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-Math.pow(r,2)/(2*t))}function dt(e,t,n){var r=Math.abs(e-n);return Math.exp(-Math.pow(r,2)/(2*t))}function pt(e,t,n){for(var r=0;r<2;r++)for(var i=0;i<2;i++)n[r][i]=e[r]*t[i]}function ft(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function ht(e){var t=ft(e);return 0!==t&&(e[0]/=t,e[1]/=t),t}function mt(){for(var e=arguments.length,t=new Array(e),n=0;ni&&(i=r),(r=Math.abs(e[a][2]))>i&&(i=r),o[a]=1/i;i=o[0]*Math.abs(e[0][0]),n=0,(r=o[1]*Math.abs(e[1][0]))>=i&&(i=r,n=1),(r=o[2]*Math.abs(e[2][0]))>=i&&(n=2),0!==n&&(Se(e[n],e[0]),o[n]=o[0]),t[0]=n,e[1][0]/=e[0][0],e[2][0]/=e[0][0],e[1][1]-=e[1][0]*e[0][1],e[2][1]-=e[2][0]*e[0][1],i=o[1]*Math.abs(e[1][1]),n=1,(r=o[2]*Math.abs(e[2][1]))>=i&&(n=2,Se(e[2],e[1]),o[2]=o[1]),t[1]=n,e[2][1]/=e[1][1],e[1][2]-=e[1][0]*e[0][2],e[2][2]-=e[2][0]*e[0][2]+e[2][1]*e[1][2],t[2]=2}function vt(e,t,n){var r=n[t[0]];n[t[0]]=n[0],n[0]=r,r=n[t[1]],n[t[1]]=n[1],n[1]=r-e[1][0]*n[0],r=n[t[2]],n[t[2]]=n[2],n[2]=r-e[2][0]*n[0]-e[2][1]*n[1],n[2]/=e[2][2],n[1]=(n[1]-e[1][2]*n[2])/e[1][1],n[0]=(n[0]-e[0][1]*n[1]-e[0][2]*n[2])/e[0][0]}function yt(e,t,n){var r=e[0][0],i=e[0][1],o=e[0][2],a=e[1][0],s=e[1][1],l=e[1][2],u=e[2][0],c=e[2][1],d=e[2][2],p=+mt(s,c,l,d),f=-mt(a,u,l,d),h=+mt(a,u,s,c),m=-mt(i,c,o,d),g=+mt(r,u,o,d),v=-mt(r,u,i,c),y=+mt(i,s,o,l),b=-mt(r,a,o,l),w=+mt(r,a,i,s),x=r*p+i*f+o*h,S=p*t[0]+m*t[1]+y*t[2],C=f*t[0]+g*t[1]+b*t[2],A=h*t[0]+v*t[1]+w*t[2];n[0]=S/x,n[1]=C/x,n[2]=A/x}function bt(e,t,n){var r=e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],i=e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],o=e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2];n[0]=r,n[1]=i,n[2]=o}function wt(e,t,n){for(var r=[[0,0,0],[0,0,0],[0,0,0]],i=0;i<3;i++)r[0][i]=e[0][0]*t[0][i]+e[0][1]*t[1][i]+e[0][2]*t[2][i],r[1][i]=e[1][0]*t[0][i]+e[1][1]*t[1][i]+e[1][2]*t[2][i],r[2][i]=e[2][0]*t[0][i]+e[2][1]*t[1][i]+e[2][2]*t[2][i];for(var o=0;o<3;o++)n[o][0]=r[o][0],n[o][1]=r[o][1],n[o][2]=r[o][2]}function xt(e,t,n,r,i,o,a){r!==i&&ve("Number of columns of A must match number of rows of B.");for(var s=0;s2&&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)}var Et=Ot;function Tt(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 Dt(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]=Tt(e[0],n),t[1]=Tt(e[1],n),t[2]=Tt(e[2],n),t}function It(e,t,n,r){var i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,w=Ce(t),x=Ce(t),S=function(e,t,n,r,i){v=e[t][n],g=e[r][i],e[t][n]=v-m*(g+v*f),e[r][i]=g+m*(v-g*f)};for(l=0;l3&&Math.abs(n[l])+v===Math.abs(n[l])&&Math.abs(n[s])+v===Math.abs(n[s]))e[l][s]=0;else if(Math.abs(e[l][s])>c){for(g=n[s]-n[l],Math.abs(g)+v===Math.abs(g)?p=e[l][s]/g:(d=.5*g/e[l][s],p=1/(Math.abs(d)+Math.sqrt(1+d*d)),d<0&&(p=-p)),y=1/Math.sqrt(1+p*p),f=(m=p*y)/(1+y),g=p*e[l][s],x[l]-=g,x[s]+=g,n[l]-=g,n[s]+=g,e[l][s]=0,o=0;o<=l-1;o++)S(e,o,l,o,s);for(o=l+1;o<=s-1;o++)S(e,l,o,o,s);for(o=s+1;o=20)return ye("vtkMath::Jacobi: Error extracting eigenfunctions"),0;for(o=0;o=b&&(b=n[a=i]);if(a!==o)for(n[a]=n[o],n[o]=b,i=0;i>1)+(1&t);for(o=0;o=0&&u++;if(u(r=l>s?l:s)?u:r,i[a]=1,0!==r&&(i[a]/=r)}var c=Math.abs(t[0][0])*i[0],d=Math.abs(t[1][0])*i[1],p=Math.abs(t[2][0])*i[2];o[0]=0,d>=(r=c)&&(r=d,o[0]=1),p>=r&&(o[0]=2),0!==o[0]&&(Se(t[o[0]],t[0]),i[o[0]]=i[0]);var f=Math.abs(t[1][1])*i[1],h=Math.abs(t[2][1])*i[2];o[1]=1,h>=(r=f)&&(o[1]=2,Se(t[2],t[1])),o[2]=2;var m=0;if(Pt(t)<0){m=1;for(var g=0;g<3;g++)t[0][g]=-t[0][g],t[1][g]=-t[1][g],t[2][g]=-t[2][g]}var v=Ce(4);if(kt(t,v),_t(v,t),m)for(var y=0;y<3;y++)t[0][y]=-t[0][y],t[1][y]=-t[1][y],t[2][y]=-t[2][y];1!==o[1]&&Se(t[o[1]],t[1]),0!==o[0]&&Se(t[o[0]],t[0])}function Rt(e,t,n){var r,i,o,a,s,l,u=[Ce(3),Ce(3),Ce(3)],c=Ce(3),d=Ce(3);for(r=0;r<3;r++)u[r][0]=e[r][0],u[r][1]=e[r][1],u[r][2]=e[r][2],c[r]=u[r],d[r]=n[r];if(It(c,3,t,d),t[0]!==t[1]||t[0]!==t[2]){for(St(n,n),r=0;r<3;r++)if(t[(r+1)%3]===t[(r+2)%3]){for(l=Math.abs(n[r][0]),a=0,i=1;i<3;i++)l<(s=Math.abs(n[r][i]))&&(l=s,a=i);return a!==r&&(s=t[a],t[a]=t[r],t[r]=s,Se(n[r],n[a])),n[a][a]<0&&(n[a][0]=-n[a][0],n[a][1]=-n[a][1],n[a][2]=-n[a][2]),o=(a+2)%3,n[i=(a+1)%3][0]=0,n[i][1]=0,n[i][2]=0,n[i][i]=1,et(n[a],n[i],n[o]),nt(n[o]),et(n[o],n[a],n[i]),void St(n,n)}for(l=Math.abs(n[0][0]),a=0,r=1;r<3;r++)l<(s=Math.abs(n[r][0]))&&(l=s,a=r);for(0!==a&&(s=t[a],t[a]=t[0],t[0]=s,Se(n[a],n[0])),Math.abs(n[1][1])a&&(a=u);if(0===a)return ye("Unable to factor linear system"),0;d[r]=1/a}for(i=0;i=a&&(a=l,c=r)}if(i!==c){for(o=0;o=0)for(o=a;o<=i-1;o++)l-=e[i][o]*n[o];else 0!==l&&(a=i);n[i]=l}for(i=r-1;i>=0;i--){for(l=n[i],o=i+1;o3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=r||Ce(n),a=i||Ce(n);if(0===Bt(e,o,n))return 0;for(var s=0;sIe&&(r=Math.abs(e[i][o]));for(var a=0;a6&&void 0!==arguments[6])||arguments[6];if(ewe&&(p=0,d[u]=0);if(p&&1===i)return ye("Detected homogeneous system (Y=0), calling SolveHomogeneousLeastSquares()"),zt(e,t,n,o);if(p)h=1;else for(u=0;u1&&void 0!==arguments[1]?arguments[1]:[0,.5,1];switch(e.length){case 3:return t[0]=17*parseInt(e[0],16)/255,t[1]=17*parseInt(e[1],16)/255,t[2]=17*parseInt(e[2],16)/255,t;case 4:return t[0]=17*parseInt(e[1],16)/255,t[1]=17*parseInt(e[2],16)/255,t[2]=17*parseInt(e[3],16)/255,t;case 6:return t[0]=parseInt(e.substr(0,2),16)/255,t[1]=parseInt(e.substr(2,2),16)/255,t[2]=parseInt(e.substr(4,2),16)/255,t;case 7:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t;case 9:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t[3]=parseInt(e.substr(7,2),16)/255,t;default:return t}}function Kt(e,t){var n,r,i=g(e,3),o=i[0],a=i[1],s=i[2],l=1/6,u=o,c=o;a>u?u=a:au?u=s:s0?(u-c)/u:0)>0?(n=o===u?l*(a-s)/(u-c):a===u?1/3+l*(s-o)/(u-c):2/3+l*(o-a)/(u-c))<0&&(n+=1):n=0,t[0]=n,t[1]=r,t[2]=d}function qt(e,t){var n,r,i,o=g(e,3),a=o[0],s=o[1],l=o[2],u=1/3,c=1/6,d=2/3,p=5/6;a>c&&a<=u?(r=1,n=(u-a)/c,i=0):a>u&&a<=.5?(r=1,i=(a-u)/c,n=0):a>.5&&a<=d?(i=1,r=(d-a)/c,n=0):a>d&&a<=p?(i=1,n=(a-d)/c,r=0):a>p&&a<=1?(n=1,i=(1-a)/c,r=0):(n=1,r=a/c,i=0),n=s*n+(1-s),r=s*r+(1-s),i=s*i+(1-s),n*=l,r*=l,i*=l,t[0]=n,t[1]=r,t[2]=i}function Xt(e,t){var n=g(e,3),r=(n[0]+16)/116,i=n[1]/500+r,o=r-n[2]/200;r=Math.pow(r,3)>.008856?Math.pow(r,3):(r-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787,t[0]=.9505*i,t[1]=1*r,t[2]=1.089*o}function Yt(e,t){var n=g(e,3),r=n[0]/.9505,i=n[1]/1,o=n[2]/1.089;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,t[0]=116*i-16,t[1]=500*(r-i),t[2]=200*(i-o)}function Zt(e,t){var n=g(e,3),r=n[0],i=n[1],o=n[2],a=3.2406*r+-1.5372*i+-.4986*o,s=-.9689*r+1.8758*i+.0415*o,l=.0557*r+-.204*i+1.057*o;a>.0031308?a=1.055*Math.pow(a,1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92;var u=a;u1&&(a/=u,s/=u,l/=u),a<0&&(a=0),s<0&&(s=0),l<0&&(l=0),t[0]=a,t[1]=s,t[2]=l}function Jt(e,t){var n=g(e,3),r=n[0],i=n[1],o=n[2];r>.04045?r=Math.pow((r+.055)/1.055,2.4):r/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,t[0]=.4124*r+.3576*i+.1805*o,t[1]=.2126*r+.7152*i+.0722*o,t[2]=.0193*r+.1192*i+.9505*o}function Qt(e,t){var n=[0,0,0];Jt(e,n),Yt(n,t)}function $t(e,t){var n=[0,0,0];Xt(e,n),Zt(n,t)}function en(e){e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1}function tn(e){return!(e[1]-e[0]<0)}function nn(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 rn(e,t,n){return en?n:e}function on(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return r[0]=rn(e[0],t[0],n[0]),r[1]=rn(e[1],t[1],n[1]),r[2]=rn(e[2],t[2],n[2]),r}function an(e,t){var n=0;return t[0]!==t[1]&&(n=((n=et[1]?t[1]:e)-t[0])/(t[1]-t[0])),n}var sn=xe("GetScalarTypeFittingRange"),ln=xe("GetAdjustedScalarRange");function un(e,t){if(!e||!t)return 0;for(var n=0;n<6;n+=2)if(e[n]t[n+1]||e[n+1]t[n+1])return 0;return 1}function cn(e,t,n){if(!e||!t)return 0;for(var r=0;r<6;r+=2)if(e[r]+n[r/2]t[r+1]||e[r+1]+n[r/2]t[r+1])return 0;return 1}function dn(e,t,n){if(!e||!t||!n)return 0;for(var r=0;r<3;r++)if(e[r]+n[r]t[2*r+1])return 0;return 1}function pn(e,t,n,r){for(var i=Ce(3),o=Ce(3),a=Ce(3),s=Ce(3),l=Ce(3),u=Ce(3),c=0;c<3;++c)i[c]=e[c]-t[c],o[c]=t[c]-n[c],a[c]=n[c]-e[c],s[c]=-i[c],l[c]=-o[c],u[c]=-a[c];var d=tt(s),p=tt(l),f=tt(a),h=Ce(3);et(i,o,h);for(var m=tt(h),g=d*p*f/(2*m),v=2*m*m,y=p*p*Qe(i,u)/v,b=f*f*Qe(s,o)/v,w=d*d*Qe(a,l)/v,x=0;x<3;++x)r[x]=y*e[x]+b*t[x]+w*n[x];return g}var fn=1/0,hn=-1/0,mn=function(e){return!Number.isFinite(e)},gn=Number.isFinite,vn=Number.isNaN,yn=vn;function bn(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}function wn(e){for(var t=-1,n=-1,r=0;rt&&(n=r,t=i)}return n}function xn(e){var t=Math.floor(255*e);return t>15?t.toString(16):"0".concat(t.toString(16))}function Sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";return"".concat(t).concat(e.map(xn).join(""))}function Cn(e){return Math.round(255*e)}function An(e){return 3===e.length?"rgb(".concat(e.map(Cn).join(", "),")"):"rgba(".concat(Cn(e[0]||0),", ").concat(Cn(e[1]||0),", ").concat(Cn(e[2]||0),", ").concat(e[3]||0,")")}var Pn={Pi:Ae,radiansFromDegrees:Pe,degreesFromRadians:_e,round:Oe,floor:Ee,ceil:Te,ceilLog2:Re,min:De,max:Ie,arrayMin:ke,arrayMax:Me,arrayRange:Ne,isPowerOfTwo:Le,nearestPowerOfTwo:Be,factorial:Fe,binomial:Ve,beginCombination:je,nextCombination:Ue,randomSeed:Ge,getSeed:ze,random:We,gaussian:He,add:Ke,subtract:qe,multiplyScalar:Xe,multiplyScalar2D:Ye,multiplyAccumulate:Ze,multiplyAccumulate2D:Je,dot:Qe,outer:$e,cross:et,norm:tt,normalize:nt,perpendiculars:rt,projectVector:it,projectVector2D:at,distance2BetweenPoints:st,angleBetweenVectors:lt,gaussianAmplitude:ct,gaussianWeight:dt,dot2D:ot,outer2D:pt,norm2D:ft,normalize2D:ht,determinant2x2:mt,LUFactor3x3:gt,LUSolve3x3:vt,linearSolve3x3:yt,multiply3x3_vect3:bt,multiply3x3_mat3:wt,multiplyMatrix:xt,transpose3x3:St,invert3x3:Ct,identity3x3:At,determinant3x3:Pt,quaternionToMatrix3x3:_t,areEquals:Ot,areMatricesEqual:Et,roundNumber:Tt,roundVector:Dt,matrix3x3ToQuaternion:kt,multiplyQuaternion:Mt,orthogonalize3x3:Nt,diagonalize3x3:Rt,singularValueDecomposition3x3:Ft,solveLinearSystem:Vt,invertMatrix:jt,luFactorLinearSystem:Bt,luSolveLinearSystem:Lt,estimateMatrixCondition:Ut,jacobi:Gt,jacobiN:It,solveHomogeneousLeastSquares:zt,solveLeastSquares:Wt,hex2float:Ht,rgb2hsv:Kt,hsv2rgb:qt,lab2xyz:Xt,xyz2lab:Yt,xyz2rgb:Zt,rgb2xyz:Jt,rgb2lab:Qt,lab2rgb:$t,uninitializeBounds:en,areBoundsInitialized:tn,computeBoundsFromPoints:nn,clampValue:rn,clampVector:on,clampAndNormalizeValue:an,getScalarTypeFittingRange:sn,getAdjustedScalarRange:ln,extentIsWithinOtherExtent:un,boundsIsWithinOtherBounds:cn,pointIsWithinBounds:dn,solve3PointCircle:pn,inf:fn,negInf:hn,isInf:mn,isNan:vn,isNaN:vn,isFinite:gn,createUninitializedBounds:bn,getMajorAxisIndex:wn,floatToHex2:xn,floatRGB2HexCode:Sn,float2CssRGBA:An};function _n(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 On(e){for(var t=1;ti&&(e=i),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=Tn(),i=e.length,o=0;if(t<0&&n>1){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function kn(e){return Object.prototype.toString.call(e).slice(8,-1)}var Mn={computeRange:Dn,createRangeHelper:Tn,getDataType:kn,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=i)}return n}};function Nn(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,i){i!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=i,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=In(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=Dn(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=In(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,i=0;i1&&void 0!==arguments[1]?arguments[1]:En,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var i=e*r;if(1===r)n[0]=t.values[i];else if(2===r)n[0]=t.values[i],n[1]=t.values[i+1];else if(3===r)n[0]=t.values[i],n[1]=t.values[i+1],n[2]=t.values[i+2];else if(4===r)n[0]=t.values[i],n[1]=t.values[i+1],n[2]=t.values[i+2],n[3]=t.values[i+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 Bn({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=kn(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=On(On({},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 Rn={name:"",numberOfComponents:1,size:0,dataType:he.DefaultDataType,rangeTuple:[0,0]};function Fn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Rn,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=L(t.dataType,t.values)):t.values=B(t.dataType,t.size),t.values&&(t.size=t.values.length,t.dataType=kn(t.values)),W(e,t),X(e,t,["name","numberOfComponents"]),Nn(e,t)}var Bn=ne(Fn,"vtkDataArray"),Ln=On(On({newInstance:Bn,extend:Fn},Mn),he);function Vn(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 jn(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Ln.extend(e,t,Wn(n)),zn(e,t)}var Kn=jn({newInstance:de.newInstance(Hn,"vtkCellArray"),extend:Hn},Gn);function qn(){var e=new ArrayBuffer(4),t=new Uint8Array(e),n=new Uint32Array(e);return t[0]=161,t[1]=178,t[2]=195,t[3]=212,3569595041===n[0]?"LittleEndian":2712847316===n[0]?"BigEndian":null}var Xn={ENDIANNESS:qn(),getEndianness:qn,swapBytes:function(e,t){if(!(t<2))for(var n=new Int8Array(e),r=n.length,i=[],o=0;o=0&&i.t<=1),i}function sr(e,t,n,r){var i={intersection:!1,l0:[],l1:[],error:null},o=[];et(t,r,o);var a,s=o.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]<$n){var l=[];return qe(e,n,l),0===Qe(t,l)?i.error=er:i.error=tr,i}a=s[0]>s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var u=[],c=-Qe(t,e),d=-Qe(r,n);switch(a){case"x":u[0]=0,u[1]=(d*t[2]-c*r[2])/o[0],u[2]=(c*r[1]-d*t[1])/o[0];break;case"y":u[0]=(c*r[2]-d*t[2])/o[1],u[1]=0,u[2]=(d*t[0]-c*r[0])/o[1];break;case"z":u[0]=(d*t[1]-c*r[1])/o[2],u[1]=(c*r[0]-d*t[0])/o[2],u[2]=0}return i.l0=u,Ke(u,o,i.l1),i.intersection=!0,i}var lr={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:nr,projectPoint:rr,projectVector:ir,generalizedProjectPoint:or,intersectWithLine:ar,intersectWithPlane:sr,DISJOINT:tr,COINCIDE:er};function ur(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return nr(e,t.origin,t.normal)},e.projectPoint=function(e,n){rr(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return ir(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){or(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 ar(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return sr(e,n,t.origin,t.normal)}}var cr={normal:[0,0,1],origin:[0,0,0]};function dr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cr,n),de.obj(e,t),de.setGetArray(e,t,["normal","origin"],3),ur(e,t)}var pr=function(e){for(var t=1;t(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=i<(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[3]=o>(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[4]=a<(arguments.length<=3?void 0:arguments[3])?a: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 wr(e,t,n,r,i,o,a){var s=g(e,6),l=s[0],u=s[1],c=s[2],d=s[3],p=s[4],f=s[5];void 0===a?(e[0]=Math.min(t[0],l),e[1]=Math.max(t[1],u),e[2]=Math.min(t[2],c),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],p),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,l),e[1]=Math.max(n,u),e[2]=Math.min(r,c),e[3]=Math.max(i,d),e[4]=Math.min(o,p),e[5]=Math.max(a,f))}function xr(e,t,n,r){var i=g(e,6),o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[5];return e[0]=t,e[1]=t>a?t:a,e[2]=n,e[3]=n>l?n:l,e[4]=r,e[5]=r>c?r:c,o!==t||s!==n||u!==r}function Sr(e,t,n,r){var i=g(e,6),o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[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 Pr(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function _r(e,t){return e[2*t+1]-e[2*t]}function Or(e){return[_r(e,0),_r(e,1),_r(e,2)]}function Er(e){return e.slice(0,2)}function Tr(e){return e.slice(2,4)}function Dr(e){return e.slice(4,6)}function Ir(e){var t=Or(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function kr(e){if(gr(e)){var t=Or(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Mr(e){return[e[0],e[2],e[4]]}function Nr(e){return[e[1],e[3],e[5]]}function Rr(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Fr(e,t){for(var n=0,r=0;r<2;r++)for(var i=2;i<4;i++)for(var o=4;o<6;o++)t[n]=[e[r],e[i],e[o]],n++}function Br(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 Lr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Pr(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Vr(e,t,n,r){for(var i=[].concat(hr),o=e.getData(),a=0;ae[2*c+1]?(a[c]=0,u[c]=e[2*c+1],o=!1):a[c]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],i[0]=0,1;for(var d=0;d<3;d++)2!==a[d]&&0!==n[d]?l[d]=(u[d]-t[d])/n[d]:l[d]=-1;for(var p=0;p<3;p++)l[s]1||l[s]<0)return 0;i[0]=l[s];for(var f=0;f<3;f++)if(s!==f){if(r[f]=t[f]+l[s]*n[f],r[f]e[2*f+1])return 0}else r[f]=u[f];return 1}function Ur(e,t,n){for(var r=[],i=0,o=1,a=1,s=4;s<=5;++s){r[2]=e[s];for(var l=2;l<=3;++l){r[1]=e[l];for(var u=0;u<=1;++u)if(r[0]=e[u],i=pr.evaluate(n,t,r),a&&(o=i>=0?1:-1,a=0),0===i||o>0&&i<0||o<0&&i>0)return 1}}return 0}function Gr(e,t){if(!gr(e)||!gr(t))return!1;for(var n,r=[0,0,0,0,0,0],i=0;i<3;i++)if(n=!1,t[2*i]>=e[2*i]&&t[2*i]<=e[2*i+1]?(n=!0,r[2*i]=t[2*i]):e[2*i]>=t[2*i]&&e[2*i]<=t[2*i+1]&&(n=!0,r[2*i]=e[2*i]),t[2*i+1]>=e[2*i]&&t[2*i+1]<=e[2*i+1]?(n=!0,r[2*i+1]=t[2*i+1]):e[2*i+1]>=t[2*i]&&e[2*i+1]<=t[2*i+1]&&(n=!0,r[2*i+1]=e[2*i+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 zr(e,t){if(!gr(e)||!gr(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 Wr(e,t,n,r){return!(te[1]||ne[3]||re[5])}function Hr(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]],i=[0,0,0,0,0,0,0,0],o=0,a=0;a<2;a++)for(var s=2;s<4;s++)for(var l=4;l<6;l++){var u=[e[a],e[s],e[l]];i[o++]=pr.evaluate(n,t,u)}for(var c=2;c--&&!(Rr(i[r[c][0]],i[r[c][4]])&&Rr(i[r[c][1]],i[r[c][5]])&&Rr(i[r[c][2]],i[r[c][6]])&&Rr(i[r[c][3]],i[r[c][7]])););if(c<0)return!1;for(var d=Math.sign(n[c]),p=Math.abs((e[2*c+1]-e[2*c])*n[c]),f=d>0?1:0,h=0;h<4;h++)if(0!==p){var m=Math.abs(i[r[c][h]])/p;d>0&&mf&&(f=m)}var g=(1-f)*e[2*c]+f*e[2*c+1];return d>0?e[2*c]=g:e[2*c+1]=g,!0}var Kr=function(){function e(t){Yn(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),vr(this.bounds,hr))}return Jn(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return mr(this.bounds,e)}},{key:"isValid",value:function(){return gr(this.bounds)}},{key:"setBounds",value:function(e){return vr(this.bounds,e)}},{key:"reset",value:function(){return yr(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n=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,i=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 a=e.getArrayByName(n.getName());if(a){if(n.getNumberOfComponents()===a.getNumberOfComponents())if(r>-1&&r-1?i:r;a.setTuple(s,n.getTuple(r))}else for(var l=0;ln.getNumberOfTuples())e.addArray(n);else{var u=n.getNumberOfComponents(),c=n.getNumberOfValues(),d=i>-1?i:r;ce?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 Zr={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function Jr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zr,n),de.obj(e,t),Yr(e,t)}var Qr={newInstance:de.newInstance(Jr,"vtkFieldData"),extend:Jr},$r={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},ei={DEFAULT:0,SINGLE:1,DOUBLE:2},ti={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:ei,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};function ni(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 ri=ti.AttributeTypes,ii=ti.AttributeCopyOperations,oi=de.vtkWarningMacro;function ai(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return ri[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,i){var o=r(i);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return oi("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return oi("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var a=t["active".concat(o)];if(a>=0&&a=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,si,n),Qr.extend(e,t,n),de.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),ai(e,t)}var ui=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),hi.forEach((function(n){t[n]=ui.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var gi={};function vi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gi,n),de.obj(e,t),de.setGet(e,t,hi),mi(e,t)}var yi=function(e){for(var t=1;te[1]||e[2]>e[3]||e[4]>e[5]?Si.EMPTY:3===t?Si.XYZ_GRID:2===t?e[0]===e[1]?Si.YZ_PLANE:e[2]===e[3]?Si.XZ_PLANE:Si.XY_PLANE:1===t?e[0]0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function Qi(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function $i(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function eo(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}function to(e,t,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+n[0]*l+r[0]*u+i[0]*c,e[1]=t[1]*s+n[1]*l+r[1]*u+i[1]*c,e[2]=t[2]*s+n[2]*l+r[2]*u+i[2]*c,e}function no(e,t,n,r,i,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,d=3*l*a,p=l*o;return e[0]=t[0]*u+n[0]*c+r[0]*d+i[0]*p,e[1]=t[1]*u+n[1]*c+r[1]*d+i[1]*p,e[2]=t[2]*u+n[2]*c+r[2]*d+i[2]*p,e}function ro(e,t){t=t||1;var n=2*_i()*Math.PI,r=2*_i()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}function io(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function oo(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function ao(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],u=t[2],c=i*u-o*l,d=o*s-r*u,p=r*l-i*s,f=i*p-o*d,h=o*c-r*p,m=r*d-i*c,g=2*a;return c*=g,d*=g,p*=g,f*=2,h*=2,m*=2,e[0]=s+c+f,e[1]=l+d+h,e[2]=u+p+m,e}function so(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function lo(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function uo(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function co(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),u=l&&Qi(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}function po(e){return e[0]=0,e[1]=0,e[2]=0,e}function fo(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function ho(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function mo(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(n-o)<=Ai*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=Ai*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=Ai*Math.max(1,Math.abs(i),Math.abs(s))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var go,vo=Fi,yo=Bi,bo=Li,wo=Ki,xo=qi,So=Ii,Co=Xi,Ao=(go=Ti(),function(e,t,n,r,i,o){var a,s;for(t||(t=3),n||(n=0),s=r?Math.min(r*t+n,e.length):e.length,a=n;a0?(n[0]=2*(s*a+c*r+l*o-u*i)/d,n[1]=2*(l*a+c*i+u*r-s*o)/d,n[2]=2*(u*a+c*o+s*i-l*r)/d):(n[0]=2*(s*a+c*r+l*o-u*i),n[1]=2*(l*a+c*i+u*r-s*o),n[2]=2*(u*a+c*o+s*i-l*r)),Xo(e,t,n),e}function Zo(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Jo(e,t){var n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function Qo(e,t){var n=new Pi(3);Jo(n,t);var r=1/n[0],i=1/n[1],o=1/n[2],a=t[0]*r,s=t[1]*i,l=t[2]*o,u=t[4]*r,c=t[5]*i,d=t[6]*o,p=t[8]*r,f=t[9]*i,h=t[10]*o,m=a+c+h,g=0;return m>0?(g=2*Math.sqrt(m+1),e[3]=.25*g,e[0]=(d-f)/g,e[1]=(p-l)/g,e[2]=(s-u)/g):a>c&&a>h?(g=2*Math.sqrt(1+a-c-h),e[3]=(d-f)/g,e[0]=.25*g,e[1]=(s+u)/g,e[2]=(p+l)/g):c>h?(g=2*Math.sqrt(1+c-a-h),e[3]=(p-l)/g,e[0]=(s+u)/g,e[1]=.25*g,e[2]=(d+f)/g):(g=2*Math.sqrt(1+h-a-c),e[3]=(s-u)/g,e[0]=(p+l)/g,e[1]=(d+f)/g,e[2]=.25*g),e}function $o(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3],l=i+i,u=o+o,c=a+a,d=i*l,p=i*u,f=i*c,h=o*u,m=o*c,g=a*c,v=s*l,y=s*u,b=s*c,w=r[0],x=r[1],S=r[2];return e[0]=(1-(h+g))*w,e[1]=(p+b)*w,e[2]=(f-y)*w,e[3]=0,e[4]=(p-b)*x,e[5]=(1-(d+g))*x,e[6]=(m+v)*x,e[7]=0,e[8]=(f+y)*S,e[9]=(m-v)*S,e[10]=(1-(d+h))*S,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function ea(e,t,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,d=s+s,p=o*u,f=o*c,h=o*d,m=a*c,g=a*d,v=s*d,y=l*u,b=l*c,w=l*d,x=r[0],S=r[1],C=r[2],A=i[0],P=i[1],_=i[2],O=(1-(m+v))*x,E=(f+w)*x,T=(h-b)*x,D=(f-w)*S,I=(1-(p+v))*S,k=(g+y)*S,M=(h+b)*C,N=(g-y)*C,R=(1-(p+m))*C;return e[0]=O,e[1]=E,e[2]=T,e[3]=0,e[4]=D,e[5]=I,e[6]=k,e[7]=0,e[8]=M,e[9]=N,e[10]=R,e[11]=0,e[12]=n[0]+A-(O*A+D*P+M*_),e[13]=n[1]+P-(E*A+I*P+N*_),e[14]=n[2]+_-(T*A+k*P+R*_),e[15]=1,e}function ta(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,p=i*a,f=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[1]=c+v,e[2]=p-g,e[3]=0,e[4]=c-v,e[5]=1-u-h,e[6]=f+m,e[7]=0,e[8]=p+g,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function na(e,t,n,r,i,o,a){var s=1/(n-t),l=1/(i-r),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function ra(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,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!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}function ia(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*u*.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}function oa(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*u,e[15]=1,e}function aa(e,t,n,r){var i,o,a,s,l,u,c,d,p,f,h=t[0],m=t[1],g=t[2],v=r[0],y=r[1],b=r[2],w=n[0],x=n[1],S=n[2];return Math.abs(h-w)0&&(c*=f=1/Math.sqrt(f),d*=f,p*=f);var h=l*p-u*d,m=u*c-s*p,g=s*d-l*c;return(f=h*h+m*m+g*g)>0&&(h*=f=1/Math.sqrt(f),m*=f,g*=f),e[0]=h,e[1]=m,e[2]=g,e[3]=0,e[4]=d*g-p*m,e[5]=p*h-c*g,e[6]=c*m-d*h,e[7]=0,e[8]=c,e[9]=d,e[10]=p,e[11]=0,e[12]=i,e[13]=o,e[14]=a,e[15]=1,e}function la(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]+")"}function ua(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])}function ca(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}function da(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}function pa(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}function fa(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}function ha(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]}function ma(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],h=e[12],m=e[13],g=e[14],v=e[15],y=t[0],b=t[1],w=t[2],x=t[3],S=t[4],C=t[5],A=t[6],P=t[7],_=t[8],O=t[9],E=t[10],T=t[11],D=t[12],I=t[13],k=t[14],M=t[15];return Math.abs(n-y)<=Ai*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-b)<=Ai*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-w)<=Ai*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-x)<=Ai*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-S)<=Ai*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(s-C)<=Ai*Math.max(1,Math.abs(s),Math.abs(C))&&Math.abs(l-A)<=Ai*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(u-P)<=Ai*Math.max(1,Math.abs(u),Math.abs(P))&&Math.abs(c-_)<=Ai*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(d-O)<=Ai*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(p-E)<=Ai*Math.max(1,Math.abs(p),Math.abs(E))&&Math.abs(f-T)<=Ai*Math.max(1,Math.abs(f),Math.abs(T))&&Math.abs(h-D)<=Ai*Math.max(1,Math.abs(h),Math.abs(D))&&Math.abs(m-I)<=Ai*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-k)<=Ai*Math.max(1,Math.abs(g),Math.abs(k))&&Math.abs(v-M)<=Ai*Math.max(1,Math.abs(v),Math.abs(M))}var ga=Ro,va=da;function ya(){var e=new Pi(9);return Pi!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ba(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function wa(e){var t=new Pi(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function xa(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}function Sa(e,t,n,r,i,o,a,s,l){var u=new Pi(9);return u[0]=e,u[1]=t,u[2]=n,u[3]=r,u[4]=i,u[5]=o,u[6]=a,u[7]=s,u[8]=l,u}function Ca(e,t,n,r,i,o,a,s,l,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function Aa(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Pa(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function _a(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*a-s*u,p=-c*o+s*l,f=u*o-a*l,h=n*d+r*p+i*f;return h?(h=1/h,e[0]=d*h,e[1]=(-c*r+i*u)*h,e[2]=(s*r-i*a)*h,e[3]=p*h,e[4]=(c*n-i*l)*h,e[5]=(-s*n+i*o)*h,e[6]=f*h,e[7]=(-u*n+r*l)*h,e[8]=(a*n-r*o)*h,e):null}function Oa(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=i*u-r*c,e[2]=r*s-i*a,e[3]=s*l-o*c,e[4]=n*c-i*l,e[5]=i*o-n*s,e[6]=o*u-a*l,e[7]=r*l-n*u,e[8]=n*a-r*o,e}function Ea(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+n*(-u*i+a*s)+r*(l*i-o*s)}function Ta(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=n[0],f=n[1],h=n[2],m=n[3],g=n[4],v=n[5],y=n[6],b=n[7],w=n[8];return e[0]=p*r+f*a+h*u,e[1]=p*i+f*s+h*c,e[2]=p*o+f*l+h*d,e[3]=m*r+g*a+v*u,e[4]=m*i+g*s+v*c,e[5]=m*o+g*l+v*d,e[6]=y*r+b*a+w*u,e[7]=y*i+b*s+w*c,e[8]=y*o+b*l+w*d,e}function Da(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=n[0],f=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=p*r+f*a+u,e[7]=p*i+f*s+c,e[8]=p*o+f*l+d,e}function Ia(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=Math.sin(n),f=Math.cos(n);return e[0]=f*r+p*a,e[1]=f*i+p*s,e[2]=f*o+p*l,e[3]=f*a-p*r,e[4]=f*s-p*i,e[5]=f*l-p*o,e[6]=u,e[7]=c,e[8]=d,e}function ka(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Ma(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Na(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ra(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Fa(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Ba(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,p=i*a,f=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[3]=c-v,e[6]=p+g,e[1]=c+v,e[4]=1-u-h,e[7]=f-m,e[2]=p-g,e[5]=f+m,e[8]=1-u-d,e}function La(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],p=t[10],f=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,w=n*u-o*a,x=r*l-i*s,S=r*u-o*s,C=i*u-o*l,A=c*m-d*h,P=c*g-p*h,_=c*v-f*h,O=d*g-p*m,E=d*v-f*m,T=p*v-f*g,D=y*T-b*E+w*O+x*_-S*P+C*A;return D?(D=1/D,e[0]=(s*T-l*E+u*O)*D,e[1]=(l*_-a*T-u*P)*D,e[2]=(a*E-s*_+u*A)*D,e[3]=(i*E-r*T-o*O)*D,e[4]=(n*T-i*_+o*P)*D,e[5]=(r*_-n*E-o*A)*D,e[6]=(m*C-g*S+v*x)*D,e[7]=(g*w-h*C-v*b)*D,e[8]=(h*S-m*w+v*y)*D,e):null}function Va(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function ja(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function Ua(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function Ga(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}function za(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}function Wa(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}function Ha(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}function Ka(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]}function qa(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=t[0],p=t[1],f=t[2],h=t[3],m=t[4],g=t[5],v=t[6],y=t[7],b=t[8];return Math.abs(n-d)<=Ai*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-p)<=Ai*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(i-f)<=Ai*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-h)<=Ai*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-m)<=Ai*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(s-g)<=Ai*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-v)<=Ai*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(u-y)<=Ai*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-b)<=Ai*Math.max(1,Math.abs(c),Math.abs(b))}var Xa=Ta,Ya=za,Za=de.vtkErrorMacro;function Ja(e,t){t.classHierarchy.push("vtkImageData"),e.setExtent=function(){if(t.deleted)return Za("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),i=0;i1&&(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 Za("Requesting a point from an empty image."),null;var i=new Float64Array(3);switch(t.dataDescription){case bi.EMPTY:return null;case bi.SINGLE_POINT:break;case bi.X_LINE:i[0]=n;break;case bi.Y_LINE:i[1]=n;break;case bi.Z_LINE:i[2]=n;break;case bi.XY_PLANE:i[0]=n%r[0],i[1]=n/r[0];break;case bi.YZ_PLANE:i[1]=n%r[1],i[2]=n/r[1];break;case bi.XZ_PLANE:i[0]=n%r[0],i[2]=n/r[0];break;case bi.XYZ_GRID:i[0]=n%r[0],i[1]=n/r[0]%r[1],i[2]=n/(r[0]*r[1]);break;default:Za("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(i,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]]),i=new Float64Array(3);e.indexToWorld(r,i);for(var o=[i[0],i[0],i[1],i[1],i[2],i[2]],a=3;a<24;a+=3)Ni(r,n[a],n[a+1],n[a+2]),e.indexToWorld(r,i),i[0]o[1]&&(o[1]=i[0]),i[1]>o[3]&&(o[3]=i[1]),i[2]>o[5]&&(o[5]=i[2]);return o},e.computeTransforms=function(){Go(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],Bo(t.indexToWorld,t.indexToWorld,t.spacing),ko(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return Za("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:[];return io(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 io(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],i=[0,0,0];Xr.computeCornerPoints(e,r,i);var o=[0,0,0],a=[0,0,0];return io(o,r,t.indexToWorld),io(a,i,t.indexToWorld),nn(o,a,n),n},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],i=[0,0,0];Xr.computeCornerPoints(e,r,i);var o=[0,0,0],a=[0,0,0];return io(o,r,t.worldToIndex),io(a,i,t.worldToIndex),nn(o,a,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 i=[0,0,0],o=[0,0,0];Xr.computeCornerPoints(r,i,o),Dt(i,i),Dt(o,o);var a=e.getDimensions();on(i,[0,0,0],[a[0]-1,a[1]-1,a[2]-1],i),on(o,[0,0,0],[a[0]-1,a[1]-1,a[2]-1],o);for(var s=a[0],l=a[0]*a[1],u=e.getPointData().getScalars().getData(),c=-1/0,d=1/0,p=0,f=0,h=0,m=i[2];m<=o[2];m++)for(var g=i[1];g<=o[1];g++)for(var v=i[0]+g*s+m*l,y=i[0];y<=o[0];y++){if(!n||n([y,g,m],r)){var b=u[v];b>c&&(c=b),b0?f/h:0,x=p-w*w,S=Math.sqrt(x);return{minimum:d,maximum:c,average:w,variance:x,sigma:S}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,i=0;i<3;++i)n[i]=r,r*=e[2*i+1]-e[2*i]+1;return n},e.computeOffsetIndex=function(t){var n=g(t,3),r=n[0],i=n[1],o=n[2],a=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),l=e.computeIncrements(a,s);return Math.floor((Math.round(r)-a[0])*l[0]+(Math.round(i)-a[2])*l[1]+(Math.round(o)-a[4])*l[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),i=0;i<3;++i)if(r[i]n[2*i+1])return Za("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 Za("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var i=e.getOffsetIndexFromWorld(t);return Number.isNaN(i)?i:e.getPointData().getScalars().getComponent(i,n)}}var Qa={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:bi.EMPTY};function $a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qa,n),yi.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=Aa(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),de.get(e,t,["direction","indexToWorld","worldToIndex"]),de.setGetArray(e,t,["origin","spacing"],3),de.getArray(e,t,["extent"],6),Ja(e,t)}var es={newInstance:de.newInstance($a,"vtkImageData"),extend:$a};function ts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0],n=g(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=e.getContext("2d"),l=s.getImageData(r,i,o||e.width,a||e.height),u=es.newInstance({type:"vtkImageData"});u.setOrigin(0,0,0),u.setSpacing(1,1,1),u.setExtent(0,(o||e.width)-1,0,(a||e.height)-1,0,0);var c=Ln.newInstance({numberOfComponents:4,values:new Uint8Array(l.data.buffer)});return c.setName("scalars"),u.getPointData().setScalars(c),u}var ns={canvasToImageData:ts,imageToImageData:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{flipX:!1,flipY:!1,rotate:0},n=document.createElement("canvas");n.width=e.width,n.height=e.height;var r=n.getContext("2d"),i=t.flipX,o=t.flipY,a=t.rotate;return r.translate(n.width/2,n.height/2),r.scale(i?-1:1,o?-1:1),r.rotate(a*Math.PI/180),r.drawImage(e,-e.width/2,-e.width/2),ts(n)}},rs={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},is={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:rs},os={DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5},as={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:os};function ss(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 ls=is.ScalarMappingTarget,us=is.VectorMode,cs=Ln.VtkDataTypes,ds=as.ColorMode,ps=de.vtkErrorMacro;function fs(e){return e}function hs(e){return Math.floor(255*e+.5)}function ms(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(us.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(us.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(us.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)ps("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var i=r.length,o=0;o=0?t.annotationArray[i].annotation!==r&&(t.annotationArray[i].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),i=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),i},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),i=r>=0;return i&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),i},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var i=e.getAnnotatedValueIndex(n);e.getIndexedColor(i,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,ls.RGBA,-1,-1):(l<0&&(l=0),l>=i&&(l=i-1),e.mapScalarsThroughTable(t,o,ls.RGBA,l))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),i=e.getNumberOfComponents(),o=t.getData(),a=e.getData(),s=0;s=u&&(l=u-1)):(-1===s&&(s=e.getVectorSize()),s<=0?(l=0,s=u):(l<0&&(l=0),l>=u&&(l=u-1),l+s>u&&(s=u-l)),a!==us.MAGNITUDE||1!==u&&1!==s||(a=us.COMPONENT));var c=0;switch(l>0&&(c=l),a){case us.COMPONENT:e.mapScalarsThroughTable(t,n,r,c);break;default:case us.MAGNITUDE:var d=Ln.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,d,s),e.mapScalarsThroughTable(d,n,r,0);break;case us.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var i=r(n),o=t.getData(),a=e.getData(),s=o.length,l=0,u=0;u=1&&n.getDataType()===cs.UNSIGNED_CHAR)return n;var a=Ln.newInstance({numberOfComponents:4,empty:!0,size:4*i,dataType:cs.UNSIGNED_CHAR});if(i<=0)return a;o=(o=o>0?o:0)<1?o:1;var s=fs;switch(n.getDataType()!==cs.FLOAT&&n.getDataType()!==cs.DOUBLE||(s=hs),r){case 1:e.luminanceToRGBA(a,n,o,s);break;case 2:e.luminanceAlphaToRGBA(a,n,s);break;case 3:e.rGBToRGBA(a,n,o,s);break;case 4:e.rGBAToRGBA(a,n,o,s);break;default:return ps("Cannot convert colors"),null}return a},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 gs={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:us.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function vs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gs,n),de.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],de.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),de.setArray(e,t,["mappingRange"],2),de.getArray(e,t,["mappingRange"]),ms(e,t)}var ys=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,i,o){var a=e.linearLookup;t.indexedLookup&&(a=e.indexedLookupFunction);var s=e.getMappingRange(),l={maxIndex:e.getNumberOfColors()-1,range:s,shift:0,scale:0};e.lookupShiftAndScale(s,l);var u=e.getAlpha(),c=n.getNumberOfTuples(),d=n.getNumberOfComponents(),p=r.getData(),f=n.getData();if(u>=1){if(i===rs.RGBA)for(var h=0;ht.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var xs={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 Ss(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xs,n),ys.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},de.obj(t.buildTime),t.opaqueFlagBuildTime={},de.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},de.obj(t.insertTime,{mtime:0}),de.get(e,t,["buildTime"]),de.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),de.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),de.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),de.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),ws(e,t)}var Cs={newInstance:de.newInstance(Ss,"vtkLookupTable"),extend:Ss},As=function(e){return e},Ps=Do(new Float64Array(16)),_s=1e-6,Os=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];Yn(this,e),this.matrix=Do(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?Ei:As}return Jn(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(16);Ni(n,e[0],e[1],e[2]),Ni(r,t[0],t[1],t[2]),Ji(n,n),Ji(r,r);var o=Qi(n,r);return o>=1||($i(this.tmp,n,r),Ii(this.tmp)<_s&&($i(this.tmp,[1,0,0],e),Ii(this.tmp)<_s&&$i(this.tmp,[0,1,0],e)),Wo(i,Math.acos(o),this.tmp),Ro(this.matrix,this.matrix,i)),this}},{key:"rotate",value:function(e,t){return Ni.apply(i,[this.tmp].concat(y(t))),Ji(this.tmp,this.tmp),Lo(this.matrix,this.matrix,this.angleConv(e),this.tmp),this}},{key:"rotateX",value:function(e){return Vo(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateY",value:function(e){return jo(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"rotateZ",value:function(e){return Uo(this.matrix,this.matrix,this.angleConv(e)),this}},{key:"translate",value:function(e,t,n){return Ni(this.tmp,e,t,n),Fo(this.matrix,this.matrix,this.tmp),this}},{key:"scale",value:function(e,t,n){return Ni(this.tmp,e,t,n),Bo(this.matrix,this.matrix,this.tmp),this}},{key:"multiply",value:function(e){return Ro(this.matrix,this.matrix,e),this}},{key:"identity",value:function(){return Do(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(Et(Ps,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,i=t;i1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=de.newTypedArray(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,ks,n),Ln.extend(e,t,n),Is(e,t)}var Ns={newInstance:de.newInstance(Ms,"vtkPoints"),extend:Ms};function Rs(e,t){t.classHierarchy.push("vtkProgressHandler"),e.startWork=function(){t.workCount+=1,1===t.workCount&&e.invokeChange(!0)},e.stopWork=function(){t.workCount-=1,0===t.workCount&&e.invokeChange(!1)},e.isWorking=function(){return!!t.workCount},e.wrapPromise=function(t){return e.startWork(),new Promise((function(n,r){t.then((function(){e.stopWork(),n.apply(void 0,arguments)}),(function(t){e.stopWork(),r(t)}))}))},e.wrapPromiseFunction=function(t){return function(){return e.wrapPromise(t.apply(void 0,arguments))}}}var Fs={workCount:0};function Bs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fs,n),de.obj(e,t),de.event(e,t,"change"),de.get(e,t,["workCount"]),Rs(e,t)}var Ls={newInstance:de.newInstance(Bs,"vtkProgressHandler"),extend:Bs},Vs=[];function js(e,t){t.classHierarchy.push("vtkStringArray"),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(n,r,i){i!==t.values[n*t.numberOfComponents+r]&&(t.values[n*t.numberOfComponents+r]=i,e.modified())},e.getData=function(){return t.values},e.getTuple=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vs,r=t.numberOfComponents||1;n.length&&(n.length=r);for(var i=e*r,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 zs({name:t.name,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkStringArray".concat(e.getMTime())),t.name},e.setData=function(n,r){t.values=n,t.size=n.length,r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.modified()}}var Us={name:"",numberOfComponents:1,size:0,dataType:"string"};function Gs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Us,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkStringArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=y(t.values)):t.values=[],t.values&&(t.size=t.values.length),de.obj(e,t),de.set(e,t,["name"]),js(e,t)}var zs=de.newInstance(Gs,"vtkStringArray"),Ws={newInstance:zs,extend:Gs};function Hs(e){return e}function Ks(e){return null===e||"null"===e?null:"true"===e||"false"!==e&&(void 0!==e&&"undefined"!==e?"["===e[0]&&"]"===e[e.length-1]?e.substring(1,e.length-1).split(",").map((function(e){return Ks(e.trim())})):""===e||Number.isNaN(Number(e))?e:Number(e):void 0)}var qs={toNativeType:Ks,extractURLParameters:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search,n={},r=e?Ks:Hs,i=(t||"").replace(/#.*/,"").replace("?","").split("&");return i.forEach((function(e){var t=g(e.split("=").map((function(e){return decodeURIComponent(e)})),2),i=t[0],o=t[1];i&&(n[i]=!o||r(o))})),n}},Xs=[];function Ys(e,t){t.classHierarchy.push("vtkVariantArray"),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(n,r,i){i!==t.values[n*t.numberOfComponents+r]&&(t.values[n*t.numberOfComponents+r]=i,e.modified())},e.getData=function(){return t.values},e.getTuple=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xs,r=t.numberOfComponents||1;n.length&&(n.length=r);for(var i=e*r,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 Qs({name:t.name,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkVariantArray".concat(e.getMTime())),t.name},e.setData=function(n,r){t.values=n,t.size=n.length,r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.modified()}}var Zs={name:"",numberOfComponents:1,size:0,dataType:"JSON"};function Js(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,Zs,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkVariantArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=y(t.values)):t.values=[],t.values&&(t.size=t.values.length),de.obj(e,t),de.set(e,t,["name"]),Ys(e,t)}var Qs=de.newInstance(Js,"vtkVariantArray"),$s={vtkBase64:p,vtkCellArray:Kn,vtkDataArray:Ln,vtkEndian:Xn,vtkImageHelper:ns,vtkLookupTable:Cs,vtkMath:r,vtkMatrixBuilder:Es,vtkPoints:Ns,vtkProgressHandler:Ls,vtkScalarsToColors:ys,vtkStringArray:Ws,vtkURLExtract:qs,vtkVariantArray:{newInstance:Qs,extend:Js}};function el(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 tl(e,t){t.classHierarchy.push("vtkBox"),e.setBounds=function(){for(var e=[],n=arguments.length,r=new Array(n),i=0;i1?(p=0,o=s[f]-d[f]):(o=a<=.5?c[f]-s[f]:s[f]-d[f])>l&&(l=o):(o=Math.abs(s[f]-c[f]))>0&&(p=0),o>0&&(u+=o*o);return u=Math.sqrt(u),p?l:u},e.addBounds=function(){var n=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))n=arguments.length<=0?void 0:arguments[0];else for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nl,n),de.obj(e,t),tl(e,t)}var il=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=de.newTypedArray(e.getDataType(),3*t.pointsIds.length));var i=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=i[n],r[++o]=i[++n],r[++o]=i[++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 en(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,i=0;i<3;i++)n+=(r=t.bounds[2*i+1]-t.bounds[2*i])*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,i,o,a){},e.evaluatePosition=function(e,t,n,r,i,o){}}var al={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function sl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,al,n),de.obj(e,t),t.points||(t.points=Ns.newInstance()),de.get(e,t,["points","pointsIds"]),ol(e,t)}var ll={newInstance:de.newInstance(sl,"vtkCell"),extend:sl};function ul(e,t){t.classHierarchy.push("vtkCone"),e.evaluateFunction=function(e){var n=Math.tan(Pe(t.angle));return e[1]*e[1]+e[2]*e[2]-e[0]*e[0]*n*n},e.evaluateGradient=function(e){var n=Math.tan(Pe(t.angle));return[-2*e[0]*n*n,2*e[1],2*e[2]]}}var cl={angle:15};function dl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cl,n),de.obj(e,t),de.setGet(e,t,["angle"]),ul(e,t)}var pl={newInstance:de.newInstance(dl,"vtkCone"),extend:dl};function fl(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 hl={evaluate:function(e,t,n,r){var i=new Float32Array(3);i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2];var o=Qe(n,i);return Qe(i,i)-o*o-e*e}};function ml(e,t){t.classHierarchy.push("vtkCylinder"),e.evaluateFunction=function(e){var n=[e[0]-t.center[0],e[1]-t.center[1],e[2]-t.center[2]],r=Qe(t.axis,n);return Qe(n,n)-r*r-t.radius*t.radius},e.evaluateGradient=function(e){var n=t.axis[0]*(e[0]-t.center[0])+t.axis[1]*(e[1]-t.center[1])+t.axis[2]*(e[2]-t.center[2]),r=[t.center[0]+n*t.axis[0],t.center[1]+n*t.axis[1],t.center[2]+n*t.axis[2]];return[2*(e[0]-r[0]),2*(e[1]-r[1]),2*(e[2]-r[2])]}}var gl={radius:.5,center:[0,0,0],axis:[0,1,0]};function vl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gl,n),de.obj(e,t),de.setGet(e,t,["radius"]),de.setGetArray(e,t,["center","axis"],3),ml(e,t)}var yl=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n={origin:[0,0,0],spacing:[1,1,1]},r=[1,1,1],i=[1,0,0,0,1,0,0,0,1],o=0;o1&&void 0!==arguments[1]&&arguments[1],n={imageType:{dimension:3,pixelType:1,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},r=e.getDirection(),i=n.size.length;n.imageType.dimension=i,n.direction.rows=i,n.direction.columns=i;for(var o=0;on&&(n=a)}}else{n=t.functions[0].evaluateFunction(e);for(var s=1;sn&&(n=l)}}return n},e.evaluateGradient=function(e){var n=t.axis[0]*(e[0]-t.center[0])+t.axis[1]*(e[1]-t.center[1])+t.axis[2]*(e[2]-t.center[2]),r=new Float32Array(3);return r[0]=t.center[0]+n*t.axis[0],r[1]=t.center[1]+n*t.axis[1],r[2]=t.center[2]+n*t.axis[2],[2*(e[0]-r[0]),2*(e[1]-r[1]),2*(e[2]-r[2])]}}var Ol={operation:0,functions:[]};function El(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ol,n),de.obj(e,t),de.setGet(e,t,["operation"]),_l(e,t)}var Tl=Al({newInstance:de.newInstance(El,"vtkImplicitBoolean"),extend:El},Sl),Dl={NO_INTERSECTION:0,YES_INTERSECTION:1,ON_LINE:2},Il={IntersectionState:Dl};function kl(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 Ml(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},a=[];a[0]=n[0]-t[0],a[1]=n[1]-t[1],a[2]=n[2]-t[2];var s=a[0]*(e[0]-t[0])+a[1]*(e[1]-t[1])+a[2]*(e[2]-t[2]),l=Qe(a,a),u=1e-5*s;return 0!==l&&(o.t=s/l),u<0&&(u=-u),-u1?r=n:(r=a,a[0]=t[0]+o.t*a[0],a[1]=t[1]+o.t*a[1],a[2]=t[2]+o.t*a[2]),i&&(i[0]=r[0],i[1]=r[1],i[2]=r[2]),o.distance=st(r,e),o}function Fl(e,t,n,r,i,o){var a=[],s=[],l=[];i[0]=0,o[0]=0,a[0]=t[0]-e[0],a[1]=t[1]-e[1],a[2]=t[2]-e[2],s[0]=r[0]-n[0],s[1]=r[1]-n[1],s[2]=r[2]-n[2],l[0]=n[0]-e[0],l[1]=n[1]-e[1],l[2]=n[2]-e[2];var u=[];u[0]=[Qe(a,a),-Qe(a,s)],u[1]=[u[0][1],Qe(s,s)];var c=[];if(c[0]=Qe(a,l),c[1]=-Qe(s,l),0===Vt(u,c,2)){for(var d,p=Number.MAX_VALUE,f=[e,t,n,r],h=[n,n,e,e],m=[r,r,t,t],g=[o[0],o[0],i[0],i[0]],v=[i[0],i[0],o[0],o[0]],y=0;y<4;y++)(d=Rl(f[y],h[y],m[y])).distance=0&&i[0]<=1&&o[0]>=0&&o[0]<=1?Nl.YES_INTERSECTION:Nl.NO_INTERSECTION}var Bl={distanceToLine:Rl,intersection:Fl};function Ll(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,i,o){var a={intersect:0,t:Number.MAX_VALUE,subId:0,betweenPoints:null};o[1]=0,o[2]=0;var s=[],l=[],u=[];t.points.getPoint(0,l),t.points.getPoint(1,u);var c,d=[],p=[],f=Fl(e,n,l,u,d,p);if(a.t=d[0],a.betweenPoints=(c=a.t)>=0&&c<=1,o[0]=p[0],f===Nl.YES_INTERSECTION){for(var h=0;h<3;h++)i[h]=l[h]+o[0]*(u[h]-l[h]),s[h]=e[h]+a.t*(n[h]-e[h]);if(st(i,s)<=r*r)return a.intersect=1,a}else{var m;if(a.t<0)return(m=Rl(e,l,u,i)).distance<=r*r?(a.t=0,a.intersect=1,a.betweenPoints=!0,a):a;if(a.t>1)return(m=Rl(n,l,u,i)).distance<=r*r?(a.t=1,a.intersect=1,a.betweenPoints=!0,a):a;if(o[0]<0)return o[0]=0,m=Rl(l,e,n,i),a.t=m.t,m.distance<=r*r?(a.intersect=1,a):a;if(o[0]>1)return o[0]=1,m=Rl(u,e,n,i),a.t=m.t,m.distance<=r*r?(a.intersect=1,a):a}return a},e.evaluatePosition=function(e,t,n,r,i,o){}}var Vl={};function jl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vl,n),ll.extend(e,t,n),Ll(e,t)}var Ul=Ml(Ml({newInstance:de.newInstance(jl,"vtkLine"),extend:jl},Bl),Il),Gl=["chemical json","name","inchi","formula","atoms","bonds","properties"];function zl(e,t){t.classHierarchy.push("vtkMolecule")}var Wl={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function Hl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wl,n),de.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),de.setGet(e,t,Gl),zl(0,t)}var Kl={newInstance:de.newInstance(Hl,"vtkMolecule"),extend:Hl},ql=de.vtkErrorMacro;function Xl(e,t){t.classHierarchy.push("vtkPiecewiseFunction"),e.getSize=function(){return t.nodes.length},e.getType=function(){var e,n=0,r=0;t.nodes.length>0&&(n=t.nodes[0].y);for(var i=1;in)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?(ql("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 i=t.nodes.length;if(n<0||n>=i)return ql("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,i,o){if(i<0||i>1)return ql("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return ql("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var a,s={x:n,y:r,midpoint:i,sharpness:o};for(t.nodes.push(s),e.sortAndUpdateRange(),a=0;a=t.nodes.length)return-1;var i=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),i},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,i,o){e.sortAndUpdateRange();for(var a=0;a=n&&t.nodes[a].x<=i?t.nodes.splice(a,1):a++;e.addPoint(n,r,.5,0),e.addPoint(i,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 i=0;i=n[0]&&t.nodes[i].x<=n[1]?t.nodes.splice(i,1):++i;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,s=0,l=t.nodes.length,u=0;0!==l&&(u=t.nodes[l-1].y);var c=0,d=0,p=0,f=0,h=0,m=0,g=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);st.nodes[s].x;)++s.99999&&(m=.99999));if(s>=l)i[v]=t.clamping?u:0;else if(0===s)i[v]=t.clamping?t.nodes[0].y:0;else{var y=(c-d)/(p-d);if(y=y.99){if(y<.5){i[v]=f;continue}i[v]=h;continue}if(g<.01){i[v]=(1-y)*f+y*h;continue}y<.5?y=.5*Math.pow(2*y,1+10*g):y>.5&&(y=1-.5*Math.pow(2*(1-y),1+10*g));var b=y*y,w=b*y,x=2*w-3*b+1,S=-2*w+3*b,C=w-2*b+y,A=w-b,P=h-f,_=(1-g)*P;i[v]=x*f+S*h+C*_+A*_;var O=fh?f:h;i[v]=i[v]E?E:i[v]}}}}var Yl={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function Zl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yl,n),de.obj(e,t),t.nodes=[],de.setGet(e,t,["allowDuplicateScalars","clamping"]),de.setArray(e,t,["range"],2),de.getArray(e,t,["range"]),Xl(e,t)}var Jl={newInstance:de.newInstance(Zl,"vtkPiecewiseFunction"),extend:Zl};function Ql(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=A(t.points):t.points=Ns.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=Ns.newInstance(),t.points.shallowCopy(e.getPoints())}}var $l={};function eu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$l,n),yi.extend(e,t,n),de.setGet(e,t,["points"]),Ql(e,t)}var tu={newInstance:de.newInstance(eu,"vtkPointSet"),extend:eu};function nu(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),i=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var a=0;a1&&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=y(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,ru,n),de.obj(e,t),nu(e,t)}var ou={newInstance:de.newInstance(iu,"vtkCellLinks"),extend:iu},au=0,su=1,lu=2,uu=3,cu=4,du=5,pu=6,fu=7,hu=9,mu=21,gu=41,vu=42,yu=["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 bu(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 wu={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]=au},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,Su,n),de.obj(e,t),de.get(e,t,["size","maxId","extend"]),de.getArray(e,t,["typeArray","locationArray"]),xu(e,t)}var Au=function(e){for(var t=1;t=0)return h.dist2<=l?(s.intersect=1,s):(s.intersect=h.evaluation,s)}var m=st(u,c),g=st(c,d),v=st(d,u);t.line||(t.line=Ul.newInstance()),m>g&&m>v?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,c)):g>v&&g>m?(t.line.getPoints().setPoint(0,c),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,u));var y=t.line.intersectWithLine(n,r,i,o,a);if(s.betweenPoints=y.betweenPoints,s.t=y.t,y.intersect){for(var b=[],w=[],x=[],S=0;S<3;S++)b[S]=u[S]-d[S],w[S]=c[S]-d[S],x[S]=o[S]-d[S];return a[0]=Qe(x,b)/v,a[1]=Qe(x,w)/g,s.intersect=1,s}return a[0]=0,a[1]=0,s.intersect=0,s},e.evaluatePosition=function(e,n,r,i){var o,a,s,l,u,c,d,p={subId:0,dist2:0,evaluation:-1},f=[],h=[],m=[],g=[],v=[],y=[],b=[],w=0,x=[],S=[],C=[],A=[],P=[];p.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,h),t.points.getPoint(0,m),_u(f,h,m,g),pr.generalizedProjectPoint(e,f,g,P);var _=0;for(o=0;o<3;o++)(s=g[o]<0?-g[o]:g[o])>_&&(_=s,w=o);for(a=0,o=0;o<3;o++)o!==w&&(x[a++]=o);for(o=0;o<2;o++)v[o]=P[x[o]]-m[x[o]],y[o]=f[x[o]]-m[x[o]],b[o]=h[x[o]]-m[x[o]];if(0===(l=mt(y,b)))return r[0]=0,r[1]=0,p.evaluation=-1,p;if(r[0]=mt(v,b)/l,r[1]=mt(y,v)/l,i[0]=1-(r[0]+r[1]),i[1]=r[0],i[2]=r[1],i[0]>=0&&i[0]<=1&&i[1]>=0&&i[1]<=1&&i[2]>=0&&i[2]<=1)n&&(p.dist2=st(P,e),n[0]=P[0],n[1]=P[1],n[2]=P[2]),p.evaluation=1;else{var O;if(n)if(i[1]<0&&i[2]<0)for(u=st(e,m),c=Ul.distanceToLine(e,f,m,O,C),d=Ul.distanceToLine(e,m,h,O,A),u1?r[i]-1:0)>n&&(n=t);return n}}var Du={};function Iu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Du,n),ll.extend(e,t,n),Tu(e,t)}var ku,Mu=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Nu.forEach((function(n){t[n]=Kn.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),i=e.getNumberOfPolys(),o=e.getNumberOfStrips(),a=n+r+i+o,s=new Uint8Array(a),l=s,u=new Uint32Array(a),c=u;if(n){var d=0;t.verts.getCellSizes().forEach((function(e,t){c[t]=d,l[t]=e>1?lu:su,d+=e+1})),c=c.subarray(n),l=l.subarray(n)}if(r){var p=0;t.lines.getCellSizes().forEach((function(e,t){c[t]=p,l[t]=e>2?cu:uu,1===e&&Ru("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),p+=e+1})),c=c.subarray(r),l=l.subarray(r)}if(i){var f=0;t.polys.getCellSizes().forEach((function(e,t){switch(c[t]=f,e){case 3:l[t]=du;break;case 4:l[t]=hu;break;default:l[t]=fu}e<3&&Ru("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),f+=e+1})),c+=c.subarray(i),l+=l.subarray(i)}if(o){var h=0;l.fill(pu,0,o),t.strips.getCellSizes().forEach((function(e,t){c[t]=h,h+=e+1}))}t.cells=Au.newInstance(),t.cells.setCellTypes(a,s,u)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=ou.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 su:case lu:r=t.verts;break;case uu:case cu:r=t.lines;break;case du:case hu:case fu:r=t.polys;break;case pu:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var i=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(i)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var i=t.links.getLink(n),o=t.links.getLink(r);return i.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),i=n||Fu[r.cellType].newInstance();return i.initialize(e.getPoints(),r.cellPointIds),i}}var Lu={};function Vu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lu,n),tu.extend(e,t,n),de.get(e,t,["cells","links"]),de.setGet(e,t,["verts","lines","polys","strips"]),Bu(e,t)}var ju={newInstance:de.newInstance(Vu,"vtkPolyData"),extend:Vu};function Uu(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 Gu(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var zu={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function Wu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zu,n),de.obj(e,t),t.properties={},de.setGet(e,t,["contentType","fieldType","properties","selectionList"]),Gu(e,t)}var Hu=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yu,n),de.obj(e,t),de.setGet(e,t,["radius"]),de.setGetArray(e,t,["center"],3),Xu(e,t)}var Ju=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rc,n),de.obj(e,t),t.matrix=Do(new Float64Array(16)),de.setGet(e,t,["sourceLandmark","targetLandmark","mode"]),de.get(e,t,["matrix"]),nc(e,t)}var oc={vtkLandmarkTransform:function(e){for(var t=1;t').concat(e.label,"")})).join(""),r.style.zIndex=1e3,r.style.position="absolute",r.style.left="50%",r.style.top="50%",r.style.transform="translate(-50%, -50%)",r.addEventListener("change",(function(t){n.removeChild(r),e(sc[Number(t.target.value)])})),n.appendChild(r)}))}},vtkTimerLog:{getUniversalTime:function(){return+new Date}}}},bc=de.vtkErrorMacro;function wc(e,t){t.classHierarchy.push("vtkImageDataToCornerstoneImage"),e.requestData=function(e,n){var r=e[0];if(r){var i=r.getSpacing(),o=r.getDimensions(),a=r.getPointData().getScalars(),s=a.getRange(0),l=a.getData(),u=null;if(1===o[2])u=a.data?a.data:l;else{var c=t.sliceIndex*o[0]*o[1]*l.BYTES_PER_ELEMENT;u=de.newTypedArray(a.getDataType(),l.buffer,c,o[0]*o[1])}var d={imageId:t.imageId,color:a.getNumberOfComponents()>1,columnPixelSpacing:i[0],columns:o[0],width:o[0],rowPixelSpacing:i[1],rows:o[1],height:o[1],intercept:0,invert:!1,minPixelValue:s[0],maxPixelValue:s[1],sizeInBytes:u.length*u.BYTES_PER_ELEMENT,slope:1,windowCenter:Math.round((s[0]+s[1])/2),windowWidth:s[1]-s[0],decodeTimeInMS:0,getPixelData:function(){return u}};n[0]=d}else bc("Invalid or missing input")}}var xc={imageId:"default-image-id",sliceIndex:0};function Sc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["imageId","sliceIndex"]),de.algo(e,t,1,1),wc(e,t)}var Cc={vtkImageDataToCornerstoneImage:{newInstance:de.newInstance(Sc,"vtkImageDataToCornerstoneImage"),extend:Sc}};function Ac(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 Pc=M;function _c(e,t){t.classHierarchy.push("vtkCutter");var n=function(e){for(var t=1;t=t.length&&r.stripIdx>=n.length,e}};return r}(e);!h.done;){var m=h.next();if(!(m.length<=2)){for(var g=[],v=void 0,y=0;y0,w=!0,x=1;x0!==b){w=!1;break}if(!w){for(var S=[],C=0;C0;if(g[A]>0!==P){var _=C,O=A,E=g[O]-g[_];E<=0&&(_=A,O=C,E*=-1);var T=0;0!==E&&(T=(t.cutValue-g[_])/E);var D=m[_],I=m[O];p[0]=i[3*D],p[1]=i[3*D+1],p[2]=i[3*D+2],f[0]=i[3*I],f[1]=i[3*I+1],f[2]=i[3*I+2];var k=[p[0]+T*(f[0]-p[0]),p[1]+T*(f[1]-p[1]),p[2]+T*(f[2]-p[2])];S.push({pointEdge1:D,pointEdge2:I,intersectedPoint:k,newPointID:-1})}}for(var M=0;M2&&(l.push(U),S.forEach((function(e){l.push(e.newPointID)})))}}}n.getPoints().setData(L(r.getDataType(),a),3),0!==s.length&&n.getLines().setData(Uint16Array.from(s)),0!==l.length&&n.getPolys().setData(Uint16Array.from(l))})(r,i),n[0]=i}else Pc("Missing cut function");else Pc("Invalid or missing input")}}var Oc={cutFunction:null,cutScalars:null,cutValue:0};function Ec(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Oc,n),W(e,t),$(e,t,1,1),Y(e,t,["cutFunction","cutValue"]),_c(e,t)}var Tc={newInstance:ne(Ec,"vtkCutter"),extend:Ec},Dc={vtkCutter:Tc},Ic=de.vtkErrorMacro;function kc(e,t,n,r){var i,o;e.set((i=n,o=0,t.map((function(e,t){return t===o?(o+=e+1,e):e+i}))),r)}function Mc(e,t){t.classHierarchy.push("vtkAppendPolyData"),e.requestData=function(n,r){var i=e.getNumberOfInputPorts();if(i)if(1!==i){for(var o=ju.newInstance(),a=0,s=0,l=1,u=1,c=0,d=0,p=0,f=0,h=!0,m=!0,g=!0,v=0;v(l=y.getPoints().getDataType())?s:l);var w=y.getPointData();w?(h=h&&null!==w.getNormals(),m=m&&null!==w.getTCoords(),g=g&&null!==w.getScalars()):(h=!1,m=!1,g=!1)}t.outputPointsPrecision===ei.SINGLE?s=fe.FLOAT:t.outputPointsPrecision===ei.DOUBLE&&(s=fe.DOUBLE);var x=Ns.newInstance({dataType:s});x.setNumberOfPoints(a);var S=x.getData(),C=new Uint32Array(c),A=new Uint32Array(d),P=new Uint32Array(p),_=new Uint32Array(f),O=null,E=null,T=null,D=n[i-1];if(h){var I=D.getPointData().getNormals();O=Ln.newInstance({numberOfComponents:3,numberOfTuples:a,size:3*a,dataType:I.getDataType(),name:I.getName()})}if(m){var k=D.getPointData().getTCoords();E=Ln.newInstance({numberOfComponents:2,numberOfTuples:a,size:2*a,dataType:k.getDataType(),name:k.getName()})}if(g){var M=D.getPointData().getScalars();T=Ln.newInstance({numberOfComponents:M.getNumberOfComponents(),numberOfTuples:a,size:a*M.getNumberOfComponents(),dataType:M.getDataType(),name:M.getName()})}a=0,c=0,d=0,p=0,f=0;for(var N=0;N2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nc,n),de.setGet(e,t,["outputPointsPrecision"]),de.obj(e,t),de.algo(e,t,1,1),Mc(e,t)}var Fc={newInstance:de.newInstance(Rc,"vtkAppendPolyData"),extend:Rc};function Bc(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 Lc=de.vtkWarningMacro;function Vc(e,t){t.classHierarchy.push("vtkCalculator"),e.setFormula=function(n){return n!==t.formula&&(t.formula=n,e.modified(),!0)},e.getFormula=function(){return t.formula},e.augmentInputArrays=function(e,t){var n=t.slice(0);return e!==ci.POINT&&e!==ci.VERTEX||n.push({location:ci.COORDINATE}),n},e.createSimpleFormulaObject=function(t,n,r,i){var o=arguments.length>4&&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:$r.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(),i=e.getData();return 1===r?function(e){return i[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],a=o.getData(),s=o.getNumberOfComponents(),l=new Array(s);if(1===s)a.forEach((function(e,t){a[t]=i.apply(void 0,y(r.map((function(e){return e(t)}))).concat([t,l]))}));else for(var u=o.getNumberOfTuples(),c=function(e){l=i.apply(void 0,y(r.map((function(t){return t(e)}))).concat([e,l])),o.setTuple(e,l)},d=0;d4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,i,o))},e.prepareArrays=function(e,t,n){var r=[],i=[];return e.input.forEach((function(e){if(e.location===ci.COORDINATE)r.push(t.getPoints());else{var n=[[ci.UNIFORM,function(e){return e.getFieldData()}],[ci.POINT,function(e){return e.getPointData()}],[ci.CELL,function(e){return e.getCellData()}],[ci.VERTEX,function(e){return e.getVertexData()}],[ci.EDGE,function(e){return e.getEdgeData()}],[ci.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),i="location"in e&&e.location in n?n[e.location](t):null;i?e.name?r.push(i.getArrayByName(e.name)):"index"in e?r.push(i.getArrayByIndex(e.index)):"attribute"in e&&e.location!==ci.UNIFORM?r.push(i.getActiveAttribute(e.attribute)):(Lc('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(Lc('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,jc,n),de.obj(e,t),de.algo(e,t,1,1),Vc(e,t)}var Gc={newInstance:de.newInstance(Uc,"vtkCalculator"),extend:Uc},zc=de.vtkErrorMacro,Wc=function(){function e(){Yn(this,e),this.segmentMapping={},this.segments=[null],this.faces=[]}return Jn(e,[{key:"addSegment",value:function(e){var t=e[0],n=e[e.length-1];if(!(t===n||e.length<2)){var r=this.segmentMapping[t],i=this.segmentMapping[n];if(void 0!==r&&void 0!==i)if(Math.abs(r)===Math.abs(i)){var o=r0)for(var s=1;s0){for(var f=this.segments[r],h=1;h0){for(var v=this.segments[i],y=1;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kc,n),de.obj(e,t),de.algo(e,t,1,1),Hc(e,t)}var Xc={newInstance:de.newInstance(qc,"vtkClosedPolyLineToSurfaceFilter"),extend:qc},Yc=de.vtkErrorMacro;function Zc(e,t){t.classHierarchy.push("vtkImageCropFilter"),e.reset=function(){var t=e.getInputData();t&&e.setCroppingPlanes.apply(e,y(t.getExtent()))},e.requestData=function(e,n){var r=e[0];if(r){var i=r.getPointData().getScalars();if(i){var o=r.getExtent(),a=6===t.croppingPlanes.length?o.map((function(e,n){return n%2==0?Math.max(e,Math.round(t.croppingPlanes[n])):Math.min(e,Math.round(t.croppingPlanes[n]))})):o.slice();if(a[0]===o[0]&&a[1]===o[1]&&a[2]===o[2]&&a[3]===o[3]&&a[4]===o[4]&&a[5]===o[5]){var s=es.newInstance();return s.shallowCopy(r),void(n[0]=s)}for(var l=0;l<3;++l)if(a[2*l]>a[2*l+1]){var u=[a[2*l+1],a[2*l]];a[2*l]=u[0],a[2*l+1]=u[1]}for(var c=0;c<6;c+=2)a[c]=Math.max(a[c],o[c]),a[c+1]=Math.min(a[c+1],o[c+1]);for(var d=i.getNumberOfComponents(),p=(a[1]-a[0]+1)*(a[3]-a[2]+1)*(a[5]-a[4]+1)*d,f=i.getData(),h=r.getDimensions(),m=d*h[0],g=d*h[0]*h[1],v=(a[0]-o[0])*d,y=(a[1]-a[0]+1)*d,b=new f.constructor(p),w=0,x=a[4];x<=a[5];++x)for(var S=a[2];S<=a[3];++S){var C=v+(S-o[2])*m+(x-o[4])*g,A=C+y,P=f.subarray(C,A);b.set(P,w),w+=P.length}var _=es.newInstance({extent:a,origin:r.getOrigin(),direction:r.getDirection(),spacing:r.getSpacing()}),O=Ln.newInstance({name:i.getName(),numberOfComponents:d,values:b});_.getPointData().setScalars(O),n[0]=_}else Yc("No scalars from input")}else Yc("Invalid or missing input")},e.isResetAvailable=function(){if(0===t.croppingPlanes.length)return!1;var n=e.getInputData();return!!n&&void 0!==n.getExtent().find((function(e,n){return Math.abs(t.croppingPlanes[n]-e)>Number.EPSILON}))}}var Jc={croppingPlanes:[]};function Qc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jc,n),de.obj(e,t),de.algo(e,t,1,1),de.setGetArray(e,t,["croppingPlanes"],6),Zc(e,t)}var $c={newInstance:de.newInstance(Qc,"vtkImageCropFilter"),extend:Qc},ed=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],td=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]],nd=function(e){return ed[e]},rd=function(e){return td[e]},id=de.vtkErrorMacro,od=de.vtkDebugMacro;function ad(e,t){t.classHierarchy.push("vtkImageMarchingCubes");var n=[],r=[],i=[],o=[],a=new Map;e.getVoxelScalars=function(e,t,i,o,a,s,l,u){n[0]=i*o+t*a[0]+e,n[1]=n[0]+1,n[2]=n[0]+a[0],n[3]=n[2]+1,n[4]=n[0]+o,n[5]=n[4]+1,n[6]=n[4]+a[0],n[7]=n[6]+1;for(var c=0;c<8;++c)r[c]=u[n[c]]},e.getVoxelPoints=function(e,t,n,r,i,a){o[0]=i[0]+e*a[0],o[1]=i[1]+t*a[1],o[2]=i[2]+n*a[2],o[3]=o[0]+a[0],o[4]=o[1],o[5]=o[2],o[6]=o[0],o[7]=o[1]+a[1],o[8]=o[2],o[9]=o[3],o[10]=o[7],o[11]=o[2],o[12]=o[0],o[13]=o[1],o[14]=o[2]+a[2],o[15]=o[3],o[16]=o[1],o[17]=o[14],o[18]=o[0],o[19]=o[7],o[20]=o[14],o[21]=o[3],o[22]=o[7],o[23]=o[14]},e.getPointGradient=function(e,t,n,r,i,o,a,s){var l,u;0===e?(l=a[e+1+t*r[0]+n*i],u=a[e+t*r[0]+n*i],s[0]=(u-l)/o[0]):e===r[0]-1?(l=a[e+t*r[0]+n*i],u=a[e-1+t*r[0]+n*i],s[0]=(u-l)/o[0]):(l=a[e+1+t*r[0]+n*i],u=a[e-1+t*r[0]+n*i],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*r[0]+n*i],u=a[e+t*r[0]+n*i],s[1]=(u-l)/o[1]):t===r[1]-1?(l=a[e+t*r[0]+n*i],u=a[e+(t-1)*r[0]+n*i],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*r[0]+n*i],u=a[e+(t-1)*r[0]+n*i],s[1]=.5*(u-l)/o[1]),0===n?(l=a[e+t*r[0]+(n+1)*i],u=a[e+t*r[0]+n*i],s[2]=(u-l)/o[2]):n===r[2]-1?(l=a[e+t*r[0]+n*i],u=a[e+t*r[0]+(n-1)*i],s[2]=(u-l)/o[2]):(l=a[e+t*r[0]+(n+1)*i],u=a[e+t*r[0]+(n-1)*i],s[2]=.5*(u-l)/o[2])},e.getVoxelGradients=function(t,n,r,o,a,s,l){var u=[];e.getPointGradient(t,n,r,o,a,s,l,u),i[0]=u[0],i[1]=u[1],i[2]=u[2],e.getPointGradient(t+1,n,r,o,a,s,l,u),i[3]=u[0],i[4]=u[1],i[5]=u[2],e.getPointGradient(t,n+1,r,o,a,s,l,u),i[6]=u[0],i[7]=u[1],i[8]=u[2],e.getPointGradient(t+1,n+1,r,o,a,s,l,u),i[9]=u[0],i[10]=u[1],i[11]=u[2],e.getPointGradient(t,n,r+1,o,a,s,l,u),i[12]=u[0],i[13]=u[1],i[14]=u[2],e.getPointGradient(t+1,n,r+1,o,a,s,l,u),i[15]=u[0],i[16]=u[1],i[17]=u[2],e.getPointGradient(t,n+1,r+1,o,a,s,l,u),i[18]=u[0],i[19]=u[1],i[20]=u[2],e.getPointGradient(t+1,n+1,r+1,o,a,s,l,u),i[21]=u[0],i[22]=u[1],i[23]=u[2]},e.produceTriangles=function(s,l,u,c,d,p,f,h,m,g,v,y){var b,w,x=[1,2,4,8,16,32,64,128],S=[0,1,3,2,4,5,7,6],C=[],A=[],P=[];e.getVoxelScalars(l,u,c,d,p,f,h,m);for(var _=0,O=0;O<8;O++)r[S[O]]>=s&&(_|=x[O]);var E=nd(_);if(!(E[0]<0)){e.getVoxelPoints(l,u,c,p,f,h),t.computeNormals&&e.getVoxelGradients(l,u,c,p,d,h,m);for(var T=0;E[T]>=0;T+=3){v.push(3);for(var D=0;D<3;D++){var I=rd(E[T+D]);if(b=void 0,t.mergePoints&&(P[0]=n[I[0]],P[1]=n[I[1]],P[0]>P[1]&&(w=P[0],P[0]=P[1],P[1]=w),b=a.get(P)),void 0===b){var k=(s-r[I[0]])/(r[I[1]]-r[I[0]]),M=o.slice(3*I[0],3*(I[0]+1)),N=o.slice(3*I[1],3*(I[1]+1));if(C[0]=M[0]+k*(N[0]-M[0]),C[1]=M[1]+k*(N[1]-M[1]),C[2]=M[2]+k*(N[2]-M[2]),b=g.length/3,g.push(C[0],C[1],C[2]),t.computeNormals){var R=i.slice(3*I[0],3*(I[0]+1)),F=i.slice(3*I[1],3*(I[1]+1));A[0]=R[0]+k*(F[0]-R[0]),A[1]=R[1]+k*(F[1]-R[1]),A[2]=R[2]+k*(F[2]-R[2]),nt(A),y.push(A[0],A[1],A[2])}t.mergePoints&&(P[0]=n[I[0]],P[1]=n[I[1]],P[0]>P[1]&&(w=P[0],P[0]=P[1],P[1]=w),a[P]=b)}v.push(b)}}}},e.requestData=function(n,r){var i=n[0];if(i){console.time("mcubes");for(var o=i.getOrigin(),a=i.getSpacing(),s=i.getDimensions(),l=i.getPointData().getScalars().getData(),u=[],c=[],d=[],p=s[0]*s[1],f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sd,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["contourValue","computeNormals","mergePoints"]),de.algo(e,t,1,1),ad(e,t)}var ud={newInstance:de.newInstance(ld,"vtkImageMarchingCubes"),extend:ld},cd=[[-1,-1,-1,-1,-1],[0,3,-1,-1,-1],[1,0,-1,-1,-1],[1,3,-1,-1,-1],[2,1,-1,-1,-1],[0,3,2,1,-1],[2,0,-1,-1,-1],[2,3,-1,-1,-1],[3,2,-1,-1,-1],[0,2,-1,-1,-1],[1,0,3,2,-1],[1,2,-1,-1,-1],[3,1,-1,-1,-1],[0,1,-1,-1,-1],[3,0,-1,-1,-1],[-1,-1,-1,-1,-1]],dd=[[0,1],[1,3],[2,3],[0,2]],pd=function(e){return cd[e]},fd=function(e){return dd[e]},hd=de.vtkErrorMacro,md=de.vtkDebugMacro;function gd(e,t){t.classHierarchy.push("vtkImageMarchingSquares"),e.getContourValues=function(){return t.contourValues},e.setContourValues=function(n){t.contourValues=n,e.modified()};var n=[],r=[],i=[],o=new Map;e.getPixelScalars=function(e,t,i,o,a,s,l,u){n[0]=i*o+t*a[0]+e,n[1]=n[0]+1,n[2]=n[0]+a[0],n[3]=n[2]+1;for(var c=0;c<4;++c)r[c]=u[n[c]]},e.getPixelPoints=function(e,t,n,r,o,a){i[0]=o[0]+e*a[0],i[1]=o[1]+t*a[1],i[2]=i[0]+a[0],i[3]=i[1],i[4]=i[0],i[5]=i[1]+a[1],i[6]=i[2],i[7]=i[5]},e.produceLines=function(a,s,l,u,c,d,p,f,h,m,g){var v,y,b=[1,2,8,4],w=[],x=[];e.getPixelScalars(s,l,u,c,d,p,f,h);for(var S=0,C=0;C<4;C++)r[C]>=a&&(S|=b[C]);var A=pd(S);if(!(A[0]<0)){e.getPixelPoints(s,l,u,d,p,f);for(var P=p[2]+u*f[2],_=0;A[_]>=0;_+=3){g.push(2);for(var O=0;O<2;O++){var E=fd(A[_+O]);if(v=void 0,t.mergePoints&&(x[0]=n[E[0]],x[1]=n[E[1]],x[0]>x[1]&&(y=x[0],x[0]=x[1],x[1]=y),v=o.get(x)),void 0===v){var T=(a-r[E[0]])/(r[E[1]]-r[E[0]]),D=i.slice(2*E[0],2*(E[0]+1)),I=i.slice(2*E[1],2*(E[1]+1));w[0]=D[0]+T*(I[0]-D[0]),w[1]=D[1]+T*(I[1]-D[1]),v=m.length/3,m.push(w[0],w[1],P),t.mergePoints&&(x[0]=n[E[0]],x[1]=n[E[1]],x[0]>x[1]&&(y=x[0],x[0]=x[1],x[1]=y),o[x]=v)}g.push(v)}}}},e.requestData=function(n,r){var i=n[0];if(i){console.time("msquares");var a=i.getOrigin(),s=i.getSpacing(),l=i.getDimensions(),u=i.getPointData().getScalars().getData(),c=[],d=[],p=l[0]*l[1],f=Math.round(t.slice);f>=l[2]&&(f=0);for(var h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vd,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["slice","mergePoints"]),de.algo(e,t,1,1),gd(e,t)}var bd={newInstance:de.newInstance(yd,"vtkImageMarchingSquares"),extend:yd},wd=de.vtkErrorMacro;function xd(e,t){t.classHierarchy.push("vtkImageOutlineFilter"),e.requestData=function(e,n){var r=e[0];if(r&&"vtkImageData"===r.getClassName()){var i=es.newInstance(r.get("spacing","origin","direction")),o=function(e,t){return e[0]+e[1]*t[0]+e[2]*t[0]*t[1]},a=r.getDimensions();i.setDimensions(a),i.computeTransforms();var s=new Uint8Array(r.getNumberOfPoints()),l=r.getPointData().getScalars().getData(),u=0,c=1;1===t.slicingMode?(u=0,c=2):0===t.slicingMode&&(u=1,c=2),l.forEach((function(e,n){if(e!==t.background){for(var r=function(e,t){var n=[0,0,0];return n[0]=e%t[0],n[1]=Math.floor(e/t[0])%t[1],n[2]=Math.floor(e/(t[0]*t[1])),n}(n,a),i=!1,d=-1;d<=1&&!i;d++)for(var p=-1;p<=1&&!i;p++){var f=d,h=p,m=0;1===t.slicingMode?(f=d,h=0,m=p):0===t.slicingMode&&(f=0,h=p,m=d);var g=r[u]+f,v=r[c]+h;g>=0&&g=0&&v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Sd,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["slicingMode","background"]),xd(e,t)}var Ad={newInstance:de.newInstance(Cd,"vtkImageOutlineFilter"),extend:Cd},Pd=de.vtkErrorMacro;function _d(e,t){t.classHierarchy.push("vtkImageSliceFilter"),e.requestData=function(e,n){var r=e[0];if(r){var i=r.getPointData().getScalars();if(i){var o=r.get("extent","spacing","origin");o.extent[4]=t.sliceIndex,o.extent[5]=o.extent[4];var a=i.getNumberOfComponents(),s=(o.extent[1]-o.extent[0]+1)*(o.extent[3]-o.extent[2]+1)*a,l=s*t.sliceIndex,u=i.getData().slice(l,l+s),c=Ln.newInstance({name:i.getName(),numberOfComponents:a,values:u}),d=es.newInstance(o);d.getPointData().setScalars(c),n[0]=d}else Pd("No scalars from input")}else Pd("Invalid or missing input")}}var Od={sliceIndex:0};function Ed(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Od,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["sliceIndex","orientation"]),_d(e,t)}var Td={newInstance:de.newInstance(Ed,"vtkImageSliceFilter"),extend:Ed},Dd=de.vtkErrorMacro;function Id(e,t){t.classHierarchy.push("vtkImageStreamline");var n=new Int32Array(3),r=new Float32Array(3),i=new Float32Array(8),o=new Uint32Array(8),a=new Uint32Array(3),s=new Float32Array(3),l=new Float32Array(3);e.interpolationFunctions=function(e,t){var n=e[0],r=e[1],i=e[2],o=1-n,a=1-r,s=1-i;t[0]=o*a*s,t[1]=n*a*s,t[2]=o*r*s,t[3]=n*r*s,t[4]=o*a*i,t[5]=n*a*i,t[6]=o*r*i,t[7]=n*r*i},e.computeStructuredCoordinates=function(e,t,n,r,i,o,a){for(var s=!0,l=0;l<3;l++){var u=(e[l]-o[l])/i[l];t[l]=Math.floor(u),n[l]=u-t[l];var c=!1,d=r[2*l],p=r[2*l+1];if(d===p){var f=e[l]-a[2*l];f*f<=i[l]*i[l]*1e-12&&(n[l]=0,t[l]=d,c=!0)}else t[l]=0&&e[l]>=a[2*l]||i[l]<0&&e[l]<=a[2*l+1])&&(n[l]=0,t[l]=d,c=!0):t[l]>=p?(i[l]>=0&&e[l]<=a[2*l+1]||i[l]<0&&e[l]>=a[2*l])&&(n[l]=1,t[l]=p-1,c=!0):c=!0;s=s&&c}return s},e.getVoxelIndices=function(e,t,n){n[0]=e[2]*t[0]*t[1]+e[1]*t[0]+e[0],n[1]=n[0]+1,n[2]=n[0]+t[0],n[3]=n[2]+1,n[4]=n[0]+t[0]*t[1],n[5]=n[4]+1,n[6]=n[4]+t[0],n[7]=n[6]+1},e.vectorAt=function(t,s,l,u){if(!e.computeStructuredCoordinates(t,n,r,l.getExtent(),l.getSpacing(),l.getOrigin(),l.getBounds()))return!1;e.interpolationFunctions(r,i);var c=l.getExtent();a[0]=c[1]-c[0]+1,a[1]=c[3]-c[2]+1,a[2]=c[5]-c[4]+1,e.getVoxelIndices(n,a,o),u[0]=0,u[1]=0,u[2]=0;for(var d=0;d<8;d++)for(var p=s.getTuple(o[d]),f=0;f<3;f++)u[f]+=i[d]*p[f];return!0},e.computeNextStep=function(t,n,r,i){if(!e.vectorAt(i,t,n,s))return!1;for(var o=0;o<3;o++)l[o]=i[o]+r/2*s[o];if(!e.vectorAt(l,t,n,s))return!1;for(var a=0;a<3;a++)i[a]+=r*s[a];return!!e.vectorAt(i,t,n,s)},e.streamIntegrate=function(n,r,i,o){var a=[],s=t.maximumNumberOfSteps,l=t.integrationStep,u=new Float32Array(3);u[0]=i[0],u[1]=i[1],u[2]=i[2];var c=[],d=0;for(d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kd,n),de.obj(e,t),de.algo(e,t,2,1),de.setGet(e,t,["integrationStep","maximumNumberOfSteps"]),Id(e,t)}var Nd={newInstance:de.newInstance(Md,"vtkImageStreamline"),extend:Md},Rd=JSON.parse('{"H":[{"id":"Xx","atomicNumber":0,"mass":0,"exactMass":0,"radiusCovalent":0,"radiusVDW":0,"symbol":"Xx","name":"Dummy","elementColor":[0.07,0.5,0.7]},{"id":"H","atomicNumber":1,"mass":1.00794,"exactMass":1.007825032,"ionization":13.5984,"electronAffinity":0.75420375,"electronegativityPauling":2.2,"nameOrigin":"Greek \'hydro\' and \'gennao\' for \'forms water\'","radiusCovalent":0.37,"radiusVDW":1.2,"boilingpoint":20.28,"meltingpoint":14.01,"periodTableBlock":"s","discoveryDate":"1766","period":"1","group":"1","electronicConfiguration":"1s1","family":"Non-Metal","symbol":"H","name":"Hydrogen","elementColor":[1,1,1],"discoveryCountry":["uk"],"discoverers":["C.","Cavendish"]},{"id":"He","atomicNumber":2,"mass":4.002602,"exactMass":4.002603254,"ionization":24.5874,"electronAffinity":0,"nameOrigin":"The Greek word for the sun was \'helios\'","radiusCovalent":0.32,"radiusVDW":1.4,"boilingpoint":4.216,"meltingpoint":0.95,"periodTableBlock":"p","discoveryDate":"1895","period":"1","group":"8","electronicConfiguration":"1s2","family":"Noblegas","symbol":"He","name":"Helium","elementColor":[0.85,1,1],"discoveryCountry":["se","uk"],"discoverers":["P. J. Janssen","J. N. Lockyer"]},{"id":"Li","atomicNumber":3,"mass":6.941,"exactMass":7.01600455,"ionization":5.3917,"electronAffinity":0.618049,"electronegativityPauling":0.98,"nameOrigin":"Greek \'lithos\' means \'stone\'","radiusCovalent":1.34,"radiusVDW":2.2,"boilingpoint":1615,"meltingpoint":453.7,"periodTableBlock":"s","discoveryDate":"1817","period":"2","group":"1","electronicConfiguration":"He 2s1","family":"Alkali_Earth","symbol":"Li","name":"Lithium","elementColor":[0.8,0.5,1],"discoveryCountry":["se"],"discoverers":["A.","Arfvedson"]},{"id":"Be","atomicNumber":4,"mass":9.012182,"exactMass":9.0121822,"ionization":9.3227,"electronAffinity":0,"electronegativityPauling":1.57,"nameOrigin":"Greek \'beryllos\' for \'light-green stone\'","radiusCovalent":0.9,"radiusVDW":1.9,"boilingpoint":3243,"meltingpoint":1560,"periodTableBlock":"s","discoveryDate":"1797","period":"2","group":"2","electronicConfiguration":"He 2s2","family":"Alkaline_Earth","symbol":"Be","name":"Beryllium","elementColor":[0.76,1,0],"discoveryCountry":["fr"],"discoverers":["Nicholas","Louis","Vauquelin"]},{"id":"B","atomicNumber":5,"mass":10.811,"exactMass":11.0093054,"ionization":8.298,"electronAffinity":0.279723,"electronegativityPauling":2.04,"nameOrigin":"Boron means \'Bor(ax) + (carb)on\'. It is found in borax and behaves a lot like carbon","radiusCovalent":0.82,"radiusVDW":1.8,"boilingpoint":4275,"meltingpoint":2365,"periodTableBlock":"p","discoveryDate":"1808","period":"2","group":"3","electronicConfiguration":"He 2s2 2p1","family":"Metalloids","symbol":"B","name":"Boron","elementColor":[1,0.71,0.71],"discoveryCountry":["uk","fr"],"discoverers":["Louis Joseph Gay-Lussac","Louis Jacques Thenard"]},{"id":"C","atomicNumber":6,"mass":12.0107,"exactMass":12,"ionization":11.2603,"electronAffinity":1.262118,"electronegativityPauling":2.55,"nameOrigin":"Latin \'carboneum\' for carbon","radiusCovalent":0.77,"radiusVDW":1.7,"boilingpoint":5100,"meltingpoint":3825,"periodTableBlock":"p","discoveryDate":"0","period":"2","group":"4","electronicConfiguration":"He 2s2 2p2","family":"Non-Metal","symbol":"C","name":"Carbon","elementColor":[0.5,0.5,0.5],"discoveryCountry":["ancient"]},{"id":"N","atomicNumber":7,"mass":14.0067,"exactMass":14.003074,"ionization":14.5341,"electronAffinity":-0.07,"electronegativityPauling":3.04,"nameOrigin":"Latin \'nitrogenium\' (\'forms saltpeter\')","radiusCovalent":0.75,"radiusVDW":1.6,"boilingpoint":77.344,"meltingpoint":63.15,"periodTableBlock":"p","discoveryDate":"1772","period":"2","group":"5","electronicConfiguration":"He 2s2 2p3","family":"Non-Metal","symbol":"N","name":"Nitrogen","elementColor":[0.05,0.05,1],"discoveryCountry":["uk"],"discoverers":["D.","Rutherford"]},{"id":"O","atomicNumber":8,"mass":15.9994,"exactMass":15.99491462,"ionization":13.6181,"electronAffinity":1.461112,"electronegativityPauling":3.44,"nameOrigin":"Latin \'oxygenium\' (forms acids)","radiusCovalent":0.73,"radiusVDW":1.55,"boilingpoint":90.188,"meltingpoint":54.8,"periodTableBlock":"p","discoveryDate":"1774","period":"2","group":"6","electronicConfiguration":"He 2s2 2p4","family":"Non-Metal","symbol":"O","name":"Oxygen","elementColor":[1,0.05,0.05],"discoveryCountry":["se","uk"],"discoverers":["J.","Priestley"]},{"id":"F","atomicNumber":9,"mass":18.9984032,"exactMass":18.99840322,"ionization":17.4228,"electronAffinity":3.4011887,"electronegativityPauling":3.98,"nameOrigin":"Latin \'fluere\' (\'floats\')","radiusCovalent":0.71,"radiusVDW":1.5,"boilingpoint":85,"meltingpoint":53.55,"periodTableBlock":"p","discoveryDate":"1886","period":"2","group":"7","electronicConfiguration":"He 2s2 2p5","family":"Halogen","symbol":"F","name":"Fluorine","elementColor":[0.7,1,1],"discoveryCountry":["fr"],"discoverers":["H.","F.","Moissan"]},{"id":"Ne","atomicNumber":10,"mass":20.1797,"exactMass":19.99244018,"ionization":21.5645,"electronAffinity":0,"nameOrigin":"Greek \'neo\'. meaning \'new\'","radiusCovalent":0.69,"radiusVDW":1.54,"boilingpoint":27.1,"meltingpoint":24.55,"periodTableBlock":"p","discoveryDate":"1898","period":"2","group":"8","electronicConfiguration":"He 2s2 2p6","family":"Noblegas","symbol":"Ne","name":"Neon","elementColor":[0.7,0.89,0.96],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","M.W. Travers"]},{"id":"Na","atomicNumber":11,"mass":22.98976928,"exactMass":22.98976928,"ionization":5.1391,"electronAffinity":0.547926,"electronegativityPauling":0.93,"nameOrigin":"Arabic \'natrun\' for \'soda\'","radiusCovalent":1.54,"radiusVDW":2.4,"boilingpoint":1156,"meltingpoint":371,"periodTableBlock":"s","discoveryDate":"1807","period":"3","group":"1","electronicConfiguration":"Ne 3s1","family":"Alkali_Earth","symbol":"Na","name":"Sodium","elementColor":[0.67,0.36,0.95],"discoveryCountry":["uk"],"discoverers":["Sir","Humphrey","Davy"]},{"id":"Mg","atomicNumber":12,"mass":24.305,"exactMass":23.9850417,"ionization":7.6462,"electronAffinity":0,"electronegativityPauling":1.31,"nameOrigin":"Named after the city of Magnesia","radiusCovalent":1.3,"radiusVDW":2.2,"boilingpoint":1380,"meltingpoint":922,"periodTableBlock":"s","discoveryDate":"1808","period":"3","group":"2","electronicConfiguration":"Ne 3s2","family":"Alkaline_Earth","symbol":"Mg","name":"Magnesium","elementColor":[0.54,1,0],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Al","atomicNumber":13,"mass":26.9815386,"exactMass":26.98153863,"ionization":5.9858,"electronAffinity":0.43283,"electronegativityPauling":1.61,"nameOrigin":"Latin \'alumen\'","radiusCovalent":1.18,"radiusVDW":2.1,"boilingpoint":2740,"meltingpoint":933.5,"periodTableBlock":"p","discoveryDate":"1825","period":"3","group":"3","electronicConfiguration":"Ne 3s2 3p1","family":"Other_Metal","symbol":"Al","name":"Aluminium","elementColor":[0.75,0.65,0.65],"discoveryCountry":["dk"],"discoverers":["H.","Ch.","Oersted"]},{"id":"Si","atomicNumber":14,"mass":28.0855,"exactMass":27.97692653,"ionization":8.1517,"electronAffinity":1.389521,"electronegativityPauling":1.9,"nameOrigin":"Latin \'silex\'","radiusCovalent":1.11,"radiusVDW":2.1,"boilingpoint":2630,"meltingpoint":1683,"periodTableBlock":"p","discoveryDate":"1823","period":"3","group":"4","electronicConfiguration":"Ne 3s2 3p2","family":"Metalloids","symbol":"Si","name":"Silicon","elementColor":[0.5,0.6,0.6],"discoveryCountry":["se"],"discoverers":["J.","J.","Berzelius"]},{"id":"P","atomicNumber":15,"mass":30.973762,"exactMass":30.97376163,"ionization":10.4867,"electronAffinity":0.7465,"electronegativityPauling":2.19,"nameOrigin":"Greek \'phosphoros\' for \'carries light\'","radiusCovalent":1.06,"radiusVDW":1.95,"boilingpoint":553,"meltingpoint":317.3,"periodTableBlock":"p","discoveryDate":"1669","period":"3","group":"5","electronicConfiguration":"Ne 3s2 3p3","family":"Non-Metal","symbol":"P","name":"Phosphorus","elementColor":[1,0.5,0],"discoveryCountry":["de"],"discoverers":["H.","Brandt"]},{"id":"S","atomicNumber":16,"mass":32.065,"exactMass":31.972071,"ionization":10.36,"electronAffinity":2.0771029,"electronegativityPauling":2.58,"nameOrigin":"In sanskrit \'sweb\' means \'to sleep\'","radiusCovalent":1.02,"radiusVDW":1.8,"boilingpoint":717.82,"meltingpoint":392.2,"periodTableBlock":"p","discoveryDate":"0","period":"3","group":"6","electronicConfiguration":"Ne 3s2 3p4","family":"Non-Metal","symbol":"S","name":"Sulfur","elementColor":[1,1,0.19],"discoveryCountry":["ancient"]},{"id":"Cl","atomicNumber":17,"mass":35.453,"exactMass":34.96885268,"ionization":12.9676,"electronAffinity":3.612724,"electronegativityPauling":3.16,"nameOrigin":"Greek \'chloros\' for \'yellow-green\'","radiusCovalent":0.99,"radiusVDW":1.8,"boilingpoint":239.18,"meltingpoint":172.17,"periodTableBlock":"p","discoveryDate":"1774","period":"3","group":"7","electronicConfiguration":"Ne 3s2 3p5","family":"Halogen","symbol":"Cl","name":"Chlorine","elementColor":[0.12,0.94,0.12],"discoveryCountry":["se"],"discoverers":["C.","W.","Scheele"]},{"id":"Ar","atomicNumber":18,"mass":39.948,"exactMass":39.96238312,"ionization":15.7596,"electronAffinity":0,"nameOrigin":"Greek \'aergon\' for \'inactive\'","radiusCovalent":0.97,"radiusVDW":1.88,"boilingpoint":87.45,"meltingpoint":83.95,"periodTableBlock":"p","discoveryDate":"1894","period":"3","group":"8","electronicConfiguration":"Ne 3s2 3p6","family":"Noblegas","symbol":"Ar","name":"Argon","elementColor":[0.5,0.82,0.89],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","J. Rayleigh"]},{"id":"K","atomicNumber":19,"mass":39.0983,"exactMass":38.96370668,"ionization":4.3407,"electronAffinity":0.501459,"electronegativityPauling":0.82,"nameOrigin":"Arabic \'al qaliy\' for potash","radiusCovalent":1.96,"radiusVDW":2.8,"boilingpoint":1033,"meltingpoint":336.8,"periodTableBlock":"s","discoveryDate":"1807","period":"4","group":"1","electronicConfiguration":"Ar 4s1","family":"Alkali_Earth","symbol":"K","name":"Potassium","elementColor":[0.56,0.25,0.83],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Ca","atomicNumber":20,"mass":40.078,"exactMass":39.96259098,"ionization":6.1132,"electronAffinity":0.02455,"electronegativityPauling":1,"nameOrigin":"Latin \'calx\' for \'lime\'","radiusCovalent":1.74,"radiusVDW":2.4,"boilingpoint":1757,"meltingpoint":1112,"periodTableBlock":"s","discoveryDate":"1808","period":"4","group":"2","electronicConfiguration":"Ar 4s2","family":"Alkaline_Earth","symbol":"Ca","name":"Calcium","elementColor":[0.24,1,0],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Sc","atomicNumber":21,"mass":44.955912,"exactMass":44.9559119,"ionization":6.5615,"electronAffinity":0.188,"electronegativityPauling":1.36,"nameOrigin":"Named because it was found in Scandinavia","radiusCovalent":1.44,"radiusVDW":2.3,"boilingpoint":3109,"meltingpoint":1814,"periodTableBlock":"d","discoveryDate":"1879","period":"4","group":"3","electronicConfiguration":"Ar 3d1 4s2","family":"Transition","symbol":"Sc","name":"Scandium","elementColor":[0.9,0.9,0.9],"discoveryCountry":["se"],"discoverers":["L.","Nilson"]},{"id":"Ti","atomicNumber":22,"mass":47.867,"exactMass":47.9479463,"ionization":6.8281,"electronAffinity":0.084,"electronegativityPauling":1.54,"nameOrigin":"The Titans were giants in Greek mythology","radiusCovalent":1.36,"radiusVDW":2.15,"boilingpoint":3560,"meltingpoint":1935,"periodTableBlock":"d","discoveryDate":"1791","period":"4","group":"4","electronicConfiguration":"Ar 3d2 4s2","family":"Transition","symbol":"Ti","name":"Titanium","elementColor":[0.75,0.76,0.78],"discoveryCountry":["uk"],"discoverers":["W.","Gregor"]},{"id":"V","atomicNumber":23,"mass":50.9415,"exactMass":50.9439595,"ionization":6.7462,"electronAffinity":0.525,"electronegativityPauling":1.63,"nameOrigin":"\'Vanadis\' is another name for the Nordic goddess Freyja","radiusCovalent":1.25,"radiusVDW":2.05,"boilingpoint":3650,"meltingpoint":2163,"periodTableBlock":"d","discoveryDate":"1830","period":"4","group":"5","electronicConfiguration":"Ar 3d3 4s2","family":"Transition","symbol":"V","name":"Vanadium","elementColor":[0.65,0.65,0.67],"discoveryCountry":["se"],"discoverers":["N.","Sefström"]},{"id":"Cr","atomicNumber":24,"mass":51.9961,"exactMass":51.9405075,"ionization":6.7665,"electronAffinity":0.67584,"electronegativityPauling":1.66,"nameOrigin":"Greek \'chroma\' means \'color\'","radiusCovalent":1.27,"radiusVDW":2.05,"boilingpoint":2945,"meltingpoint":2130,"periodTableBlock":"d","discoveryDate":"1797","period":"4","group":"6","electronicConfiguration":"Ar 3d5 4s1","family":"Transition","symbol":"Cr","name":"Chromium","elementColor":[0.54,0.6,0.78],"discoveryCountry":["fr"],"discoverers":["Nicholas","Louis","Vauquelin"]},{"id":"Mn","atomicNumber":25,"mass":54.938045,"exactMass":54.9380451,"ionization":7.434,"electronAffinity":0,"electronegativityPauling":1.55,"nameOrigin":"It was discovered near a town named Magnesia in black earth. Thus, it was named \'magnesia nigra\', or for short, Manganese.","radiusCovalent":1.39,"radiusVDW":2.05,"boilingpoint":2235,"meltingpoint":1518,"periodTableBlock":"d","discoveryDate":"1774","period":"4","group":"7","electronicConfiguration":"Ar 3d5 4s2","family":"Transition","symbol":"Mn","name":"Manganese","elementColor":[0.61,0.48,0.78],"discoveryCountry":["se"],"discoverers":["C.","W.","Scheele"]},{"id":"Fe","atomicNumber":26,"mass":55.845,"exactMass":55.9349375,"ionization":7.9024,"electronAffinity":0.151,"electronegativityPauling":1.83,"nameOrigin":"Latin \'ferrum\'","radiusCovalent":1.25,"radiusVDW":2.05,"boilingpoint":3023,"meltingpoint":1808,"periodTableBlock":"d","discoveryDate":"0","period":"4","group":"8","electronicConfiguration":"Ar 3d6 4s2","family":"Transition","symbol":"Fe","name":"Iron","elementColor":[0.5,0.48,0.78],"discoveryCountry":["ancient"]},{"id":"Co","atomicNumber":27,"mass":58.933195,"exactMass":58.933195,"ionization":7.881,"electronAffinity":0.6633,"electronegativityPauling":1.88,"nameOrigin":"Named after the German word \'Kobold\' for \'goblin\'","radiusCovalent":1.26,"radiusVDW":2,"boilingpoint":3143,"meltingpoint":1768,"periodTableBlock":"d","discoveryDate":"1737","period":"4","group":"8","electronicConfiguration":"Ar 3d7 4s2","family":"Transition","symbol":"Co","name":"Cobalt","elementColor":[0.44,0.48,0.78],"discoveryCountry":["se"],"discoverers":["G.","Brandt"]},{"id":"Ni","atomicNumber":28,"mass":58.6934,"exactMass":57.9353429,"ionization":7.6398,"electronAffinity":1.15716,"electronegativityPauling":1.91,"nameOrigin":"\'Nickel\' was the name of a mountain goblin","radiusCovalent":1.21,"radiusVDW":2,"boilingpoint":3005,"meltingpoint":1726,"periodTableBlock":"d","discoveryDate":"1751","period":"4","group":"8","electronicConfiguration":"Ar 3d8 4s2","family":"Transition","symbol":"Ni","name":"Nickel","elementColor":[0.36,0.48,0.76],"discoveryCountry":["se"],"discoverers":["A.","F.","Cronstedt"]},{"id":"Cu","atomicNumber":29,"mass":63.546,"exactMass":62.9295975,"ionization":7.7264,"electronAffinity":1.23578,"electronegativityPauling":1.9,"nameOrigin":"Greek \'cuprum\' for Cypres","radiusCovalent":1.38,"radiusVDW":2,"boilingpoint":2840,"meltingpoint":1356.6,"periodTableBlock":"d","discoveryDate":"0","period":"4","group":"1","electronicConfiguration":"Ar 3d10 4s1","family":"Transition","symbol":"Cu","name":"Copper","elementColor":[1,0.48,0.38],"discoveryCountry":["ancient"]},{"id":"Zn","atomicNumber":30,"mass":65.38,"exactMass":63.9291422,"ionization":9.3942,"electronAffinity":0,"electronegativityPauling":1.65,"nameOrigin":"German \'zinking\' for \'rough\', because zinc ore is very rough","radiusCovalent":1.31,"radiusVDW":2.1,"boilingpoint":1180,"meltingpoint":692.73,"periodTableBlock":"d","discoveryDate":"1746","period":"4","group":"2","electronicConfiguration":"Ar 3d10 4s2","family":"Transition","symbol":"Zn","name":"Zinc","elementColor":[0.49,0.5,0.69],"discoveryCountry":["de"],"discoverers":["Andreas","Marggraf"]},{"id":"Ga","atomicNumber":31,"mass":69.723,"exactMass":68.9255736,"ionization":5.9993,"electronAffinity":0.41,"electronegativityPauling":1.81,"nameOrigin":"\'Gallia\' is an old name for France","radiusCovalent":1.26,"radiusVDW":2.1,"boilingpoint":2478,"meltingpoint":302.92,"periodTableBlock":"p","discoveryDate":"1875","period":"4","group":"3","electronicConfiguration":"Ar 3d10 4s2 4p1","family":"Other_Metal","symbol":"Ga","name":"Gallium","elementColor":[0.76,0.56,0.56],"discoveryCountry":["fr"],"discoverers":["P.","E.","Lecoq","de","Boisbaudran"]},{"id":"Ge","atomicNumber":32,"mass":72.64,"exactMass":73.9211778,"ionization":7.8994,"electronAffinity":1.232712,"electronegativityPauling":2.01,"nameOrigin":"Latin \'germania\' is an old name for Germany","radiusCovalent":1.22,"radiusVDW":2.1,"boilingpoint":3107,"meltingpoint":1211.5,"periodTableBlock":"p","discoveryDate":"1886","period":"4","group":"4","electronicConfiguration":"Ar 3d10 4s2 4p2","family":"Metalloids","symbol":"Ge","name":"Germanium","elementColor":[0.4,0.56,0.56],"discoveryCountry":["de"],"discoverers":["C.","A.","Winkler"]},{"id":"As","atomicNumber":33,"mass":74.9216,"exactMass":74.9215965,"ionization":9.7886,"electronAffinity":0.814,"electronegativityPauling":2.18,"nameOrigin":"Greek \'arsenikos\' for \'male\' or \'bold\'","radiusCovalent":1.19,"radiusVDW":2.05,"boilingpoint":876,"meltingpoint":1090,"periodTableBlock":"p","discoveryDate":"0","period":"4","group":"5","electronicConfiguration":"Ar 3d10 4s2 4p3","family":"Metalloids","symbol":"As","name":"Arsenic","elementColor":[0.74,0.5,0.89],"discoveryCountry":["ancient"]},{"id":"Se","atomicNumber":34,"mass":78.96,"exactMass":79.9165213,"ionization":9.7524,"electronAffinity":2.02067,"electronegativityPauling":2.55,"nameOrigin":"Greek \'selena\' for \'moon\'","radiusCovalent":1.16,"radiusVDW":1.9,"boilingpoint":958,"meltingpoint":494,"periodTableBlock":"p","discoveryDate":"1817","period":"4","group":"6","electronicConfiguration":"Ar 3d10 4s2 4p4","family":"Non-Metal","symbol":"Se","name":"Selenium","elementColor":[1,0.63,0],"discoveryCountry":["se"],"discoverers":["J.","J.","Berzelius"]},{"id":"Br","atomicNumber":35,"mass":79.904,"exactMass":78.9183371,"ionization":11.8138,"electronAffinity":3.363588,"electronegativityPauling":2.96,"nameOrigin":"Greek \'bromos\' for \'smells badly\'","radiusCovalent":1.14,"radiusVDW":1.9,"boilingpoint":331.85,"meltingpoint":265.95,"periodTableBlock":"p","discoveryDate":"1826","period":"4","group":"7","electronicConfiguration":"Ar 3d10 4s2 4p5","family":"Halogen","symbol":"Br","name":"Bromine","elementColor":[0.65,0.16,0.16],"discoveryCountry":["fr"],"discoverers":["A.","J.","Balard"]},{"id":"Kr","atomicNumber":36,"mass":83.798,"exactMass":83.911507,"ionization":13.9996,"electronAffinity":0,"electronegativityPauling":3,"nameOrigin":"Greek \'kryptos\' for \'hidden\'","radiusCovalent":1.1,"radiusVDW":2.02,"boilingpoint":120.85,"meltingpoint":116,"periodTableBlock":"p","discoveryDate":"1898","period":"4","group":"8","electronicConfiguration":"Ar 3d10 4s2 4p6","family":"Noblegas","symbol":"Kr","name":"Krypton","elementColor":[0.36,0.72,0.82],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","M. W. Travers"]},{"id":"Rb","atomicNumber":37,"mass":85.4678,"exactMass":84.91178974,"ionization":4.1771,"electronAffinity":0.485916,"electronegativityPauling":0.82,"nameOrigin":"Latin \'rubidus\' for \'dark red\'","radiusCovalent":2.11,"radiusVDW":2.9,"boilingpoint":961,"meltingpoint":312.63,"periodTableBlock":"s","discoveryDate":"1861","period":"5","group":"1","electronicConfiguration":"Kr 5s1","family":"Alkali_Earth","symbol":"Rb","name":"Rubidium","elementColor":[0.44,0.18,0.69],"discoveryCountry":["de"],"discoverers":["Robert W. Bunsen","Gustav R. Kirchhoff"]},{"id":"Sr","atomicNumber":38,"mass":87.62,"exactMass":87.9056121,"ionization":5.6949,"electronAffinity":0.05206,"electronegativityPauling":0.95,"nameOrigin":"Named after the mineral Strontianit","radiusCovalent":1.92,"radiusVDW":2.55,"boilingpoint":1655,"meltingpoint":1042,"periodTableBlock":"s","discoveryDate":"1790","period":"5","group":"2","electronicConfiguration":"Kr 5s2","family":"Alkaline_Earth","symbol":"Sr","name":"Strontium","elementColor":[0,1,0],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Y","atomicNumber":39,"mass":88.90585,"exactMass":88.9058483,"ionization":6.2173,"electronAffinity":0.307,"electronegativityPauling":1.22,"nameOrigin":"Named after the small town of Ytterby near Stockholm in Sweden. Terbium. Ytterbium and Gadolinium are also named after this town.","radiusCovalent":1.62,"radiusVDW":2.4,"boilingpoint":3611,"meltingpoint":1795,"periodTableBlock":"d","discoveryDate":"1794","period":"5","group":"3","electronicConfiguration":"Kr 4d1 5s2","family":"Transition","symbol":"Y","name":"Yttrium","elementColor":[0.58,1,1],"discoveryCountry":["fi"],"discoverers":["Johann","Gadolin"]},{"id":"Zr","atomicNumber":40,"mass":91.224,"exactMass":89.9047044,"ionization":6.6339,"electronAffinity":0.426,"electronegativityPauling":1.33,"nameOrigin":"Named after the mineral zircon","radiusCovalent":1.48,"radiusVDW":2.3,"boilingpoint":4682,"meltingpoint":2128,"periodTableBlock":"d","discoveryDate":"1789","period":"5","group":"4","electronicConfiguration":"Kr 4d2 5s2","family":"Transition","symbol":"Zr","name":"Zirconium","elementColor":[0.58,0.88,0.88],"discoveryCountry":["de"],"discoverers":["Martin","Heinrich","Klaproth"]},{"id":"Nb","atomicNumber":41,"mass":92.90638,"exactMass":92.9063781,"ionization":6.7589,"electronAffinity":0.893,"electronegativityPauling":1.6,"nameOrigin":"Named after Niobe, the daughter of the Greek god Tantalus.","radiusCovalent":1.37,"radiusVDW":2.15,"boilingpoint":5015,"meltingpoint":2742,"periodTableBlock":"d","discoveryDate":"1801","period":"5","group":"5","electronicConfiguration":"Kr 4d4","family":"Transition","symbol":"Nb","name":"Niobium","elementColor":[0.45,0.76,0.79],"discoveryCountry":["uk"],"discoverers":["Ch.","Hatchett"]},{"id":"Mo","atomicNumber":42,"mass":95.96,"exactMass":97.9054082,"ionization":7.0924,"electronAffinity":0.7472,"electronegativityPauling":2.16,"nameOrigin":"This name has Greek roots. It means \'like Platinum\' - it was difficult to distinguish Molybdenum from Platinum.","radiusCovalent":1.45,"radiusVDW":2.1,"boilingpoint":4912,"meltingpoint":2896,"periodTableBlock":"d","discoveryDate":"1778","period":"5","group":"6","electronicConfiguration":"Kr 4d5 5s1","family":"Transition","symbol":"Mo","name":"Molybdenum","elementColor":[0.33,0.71,0.71],"discoveryCountry":["se"],"discoverers":["C.","W.","Scheele"]},{"id":"Tc","atomicNumber":43,"mass":98,"exactMass":97.907216,"ionization":7.28,"electronAffinity":0.55,"electronegativityPauling":1.9,"nameOrigin":"Greek \'technetos\' for artificial","radiusCovalent":1.56,"radiusVDW":2.05,"boilingpoint":4538,"meltingpoint":2477,"periodTableBlock":"d","discoveryDate":"1937","period":"5","group":"7","electronicConfiguration":"Kr 4d6 5s1","family":"Transition","symbol":"Tc","name":"Technetium","elementColor":[0.23,0.62,0.62],"discoveryCountry":["it"],"discoverers":["C. Perrier","E. G. Segre"]},{"id":"Ru","atomicNumber":44,"mass":101.07,"exactMass":101.9043493,"ionization":7.3605,"electronAffinity":1.04638,"electronegativityPauling":2.2,"nameOrigin":"Ruthenia is the old name of Russia","radiusCovalent":1.26,"radiusVDW":2.05,"boilingpoint":4425,"meltingpoint":2610,"periodTableBlock":"d","discoveryDate":"1844","period":"5","group":"8","electronicConfiguration":"Kr 4d7 5s1","family":"Transition","symbol":"Ru","name":"Ruthenium","elementColor":[0.14,0.56,0.56],"discoveryCountry":["ru"],"discoverers":["K.","Klaus"]},{"id":"Rh","atomicNumber":45,"mass":102.9055,"exactMass":102.905504,"ionization":7.4589,"electronAffinity":1.14289,"electronegativityPauling":2.28,"nameOrigin":"Greek \'rhodeos\' means \'red like a rose\'","radiusCovalent":1.35,"radiusVDW":2,"boilingpoint":3970,"meltingpoint":2236,"periodTableBlock":"d","discoveryDate":"1803","period":"5","group":"8","electronicConfiguration":"Kr 4d8 5s1","family":"Transition","symbol":"Rh","name":"Rhodium","elementColor":[0.04,0.49,0.55],"discoveryCountry":["uk"],"discoverers":["W.","Wollaston"]},{"id":"Pd","atomicNumber":46,"mass":106.42,"exactMass":105.903486,"ionization":8.3369,"electronAffinity":0.56214,"electronegativityPauling":2.2,"nameOrigin":"Named after the asteroid Pallas","radiusCovalent":1.31,"radiusVDW":2.05,"boilingpoint":3240,"meltingpoint":1825,"periodTableBlock":"d","discoveryDate":"1803","period":"5","group":"8","electronicConfiguration":"Kr 4d10","family":"Transition","symbol":"Pd","name":"Palladium","elementColor":[0,0.41,0.52],"discoveryCountry":["uk"]},{"id":"Ag","atomicNumber":47,"mass":107.8682,"exactMass":106.905097,"ionization":7.5762,"electronAffinity":1.30447,"electronegativityPauling":1.93,"nameOrigin":"Latin \'argentum\' for silver","radiusCovalent":1.53,"radiusVDW":2.1,"boilingpoint":2436,"meltingpoint":1235.1,"periodTableBlock":"d","discoveryDate":"0","period":"5","group":"1","electronicConfiguration":"Kr 4d10 5s1","family":"Transition","symbol":"Ag","name":"Silver","elementColor":[0.88,0.88,1],"discoveryCountry":["ancient"]},{"id":"Cd","atomicNumber":48,"mass":112.411,"exactMass":113.9033585,"ionization":8.9938,"electronAffinity":0,"electronegativityPauling":1.69,"nameOrigin":"Greek \'kadmia\' (\'Galmei\' = Zinc carbonate)","radiusCovalent":1.48,"radiusVDW":2.2,"boilingpoint":1040,"meltingpoint":594.26,"periodTableBlock":"d","discoveryDate":"1817","period":"5","group":"2","electronicConfiguration":"Kr 4d10 5s2","family":"Transition","symbol":"Cd","name":"Cadmium","elementColor":[1,0.85,0.56],"discoveryCountry":["de"],"discoverers":["F.","Stromeyer"]},{"id":"In","atomicNumber":49,"mass":114.818,"exactMass":114.903878,"ionization":5.7864,"electronAffinity":0.404,"electronegativityPauling":1.78,"nameOrigin":"Named after \'Indigo\' because of its blue spectrum","radiusCovalent":1.44,"radiusVDW":2.2,"boilingpoint":2350,"meltingpoint":429.78,"periodTableBlock":"p","discoveryDate":"1863","period":"5","group":"3","electronicConfiguration":"Kr 4d10 5s2 5p1","family":"Other_Metal","symbol":"In","name":"Indium","elementColor":[0.65,0.46,0.45],"discoveryCountry":["de"],"discoverers":["F. Reich","H.T. Richter"]},{"id":"Sn","atomicNumber":50,"mass":118.71,"exactMass":119.9021947,"ionization":7.3439,"electronAffinity":1.112066,"electronegativityPauling":1.96,"nameOrigin":"Latin \'stannum\' for tin","radiusCovalent":1.41,"radiusVDW":2.25,"boilingpoint":2876,"meltingpoint":505.12,"periodTableBlock":"p","discoveryDate":"0","period":"5","group":"4","electronicConfiguration":"Kr 4d10 5s2 5p2","family":"Other_Metal","symbol":"Sn","name":"Tin","elementColor":[0.4,0.5,0.5],"discoveryCountry":["ancient"]},{"id":"Sb","atomicNumber":51,"mass":121.76,"exactMass":120.9038157,"ionization":8.6084,"electronAffinity":1.047401,"electronegativityPauling":2.05,"nameOrigin":"Arabic \'anthos ammonos\' for \'blossom of the god Ammon\'","radiusCovalent":1.38,"radiusVDW":2.2,"boilingpoint":1860,"meltingpoint":903.91,"periodTableBlock":"p","discoveryDate":"0","period":"5","group":"5","electronicConfiguration":"Kr 4d10 5s2 5p3","family":"Metalloids","symbol":"Sb","name":"Antimony","elementColor":[0.62,0.39,0.71],"discoveryCountry":["ancient"]},{"id":"Te","atomicNumber":52,"mass":127.6,"exactMass":129.9062244,"ionization":9.0096,"electronAffinity":1.970875,"electronegativityPauling":2.1,"nameOrigin":"Latin \'tellus\' or \'telluris\' for \'Planet Earth\'","radiusCovalent":1.35,"radiusVDW":2.1,"boilingpoint":1261,"meltingpoint":722.72,"periodTableBlock":"p","discoveryDate":"1782","period":"5","group":"6","electronicConfiguration":"Kr 4d10 5s2 5p4","family":"Metalloids","symbol":"Te","name":"Tellurium","elementColor":[0.83,0.48,0],"discoveryCountry":["de"],"discoverers":["Franz","Joseph","Muller","von","Reichstein"]},{"id":"I","atomicNumber":53,"mass":126.90447,"exactMass":126.904473,"ionization":10.4513,"electronAffinity":3.059038,"electronegativityPauling":2.66,"nameOrigin":"Greek \'ioeides\' for \'violet\'.","radiusCovalent":1.33,"radiusVDW":2.1,"boilingpoint":457.5,"meltingpoint":386.7,"periodTableBlock":"p","discoveryDate":"1811","period":"5","group":"7","electronicConfiguration":"Kr 4d10 5s2 5p5","family":"Halogen","symbol":"I","name":"Iodine","elementColor":[0.58,0,0.58],"discoveryCountry":["fr"],"discoverers":["Bernard","Courtois"]},{"id":"Xe","atomicNumber":54,"mass":131.293,"exactMass":131.9041535,"ionization":12.1298,"electronAffinity":0,"electronegativityPauling":2.6,"nameOrigin":"Greek \'xenos\' for \'foreigner\'","radiusCovalent":1.3,"radiusVDW":2.16,"boilingpoint":165.1,"meltingpoint":161.39,"periodTableBlock":"p","discoveryDate":"1898","period":"5","group":"8","electronicConfiguration":"Kr 4d10 5s2 5p6","family":"Noblegas","symbol":"Xe","name":"Xenon","elementColor":[0.26,0.62,0.69],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","M. W. Travers"]},{"id":"Cs","atomicNumber":55,"mass":132.9054519,"exactMass":132.9054519,"ionization":3.8939,"electronAffinity":0.471626,"electronegativityPauling":0.79,"nameOrigin":"Latin \'caesius\' for \'heaven blue\'.","radiusCovalent":2.25,"radiusVDW":3,"boilingpoint":944,"meltingpoint":301.54,"periodTableBlock":"s","discoveryDate":"1860","period":"6","group":"1","electronicConfiguration":"Xe 6s1","family":"Alkali_Earth","symbol":"Cs","name":"Caesium","elementColor":[0.34,0.09,0.56],"discoveryCountry":["de"],"discoverers":["Robert Wilhelm Bunsen","Gustav Robert Kirchhoff"]},{"id":"Ba","atomicNumber":56,"mass":137.327,"exactMass":137.9052472,"ionization":5.2117,"electronAffinity":0.14462,"electronegativityPauling":0.89,"nameOrigin":"Greek \'barys\' for \'heavy\'","radiusCovalent":1.98,"radiusVDW":2.7,"boilingpoint":2078,"meltingpoint":1002,"periodTableBlock":"s","discoveryDate":"1808","period":"6","group":"2","electronicConfiguration":"Xe 6s2","family":"Alkaline_Earth","symbol":"Ba","name":"Barium","elementColor":[0,0.79,0],"discoveryCountry":["uk"],"discoverers":["Humphry","Bartholomew","Davy"]},{"id":"La","atomicNumber":57,"mass":138.90547,"exactMass":138.9063533,"ionization":5.5769,"electronAffinity":0.47,"electronegativityPauling":1.1,"nameOrigin":"Greek \'lanthanein\' for \'hidden\'. The Lanthanoids are also called the \'rare earth\' elements.","radiusCovalent":1.69,"radiusVDW":2.5,"boilingpoint":3737,"meltingpoint":1191,"periodTableBlock":"f","discoveryDate":"1839","period":"6","group":"3","electronicConfiguration":"Xe 5d1 6s2","family":"Rare_Earth","symbol":"La","name":"Lanthanum","elementColor":[0.44,0.83,1],"discoveryCountry":["se"],"discoverers":["K.","G.","Mosander"]},{"id":"Ce","atomicNumber":58,"mass":140.116,"exactMass":139.9054387,"ionization":5.5387,"electronAffinity":0.5,"electronegativityPauling":1.12,"nameOrigin":"Named after the planetoid Ceres","radiusVDW":2.48,"boilingpoint":3715,"meltingpoint":1071,"periodTableBlock":"f","discoveryDate":"1803","period":"6","group":"4","electronicConfiguration":"Xe 4f1 5d1 6s2","family":"Rare_Earth","symbol":"Ce","name":"Cerium","elementColor":[1,1,0.78],"discoverers":["Jöns Jacob Berzelius","W. Hisinger","M. Klaproth"]},{"id":"Pr","atomicNumber":59,"mass":140.90765,"exactMass":140.9076528,"ionization":5.473,"electronAffinity":0.5,"electronegativityPauling":1.13,"nameOrigin":"Greek \'prasinos didymos\' for \'green twin\'","radiusVDW":2.47,"boilingpoint":3785,"meltingpoint":1204,"periodTableBlock":"f","discoveryDate":"1885","period":"6","group":"5","electronicConfiguration":"Xe 4f3 6s2","family":"Rare_Earth","symbol":"Pr","name":"Praseodymium","elementColor":[0.85,1,0.78],"discoverers":["Carl","F.","Auer","von","Welsbach"]},{"id":"Nd","atomicNumber":60,"mass":144.242,"exactMass":141.9077233,"ionization":5.525,"electronAffinity":0.5,"electronegativityPauling":1.14,"nameOrigin":"Greek \'neos didymos\' for \'new twin\'","radiusVDW":2.45,"boilingpoint":3347,"meltingpoint":1294,"periodTableBlock":"f","discoveryDate":"1885","period":"6","group":"6","electronicConfiguration":"Xe 4f4 6s2","family":"Rare_Earth","symbol":"Nd","name":"Neodymium","elementColor":[0.78,1,0.78],"discoverers":["Carl","F.","Auer","von","Welsbach"]},{"id":"Pm","atomicNumber":61,"mass":145,"exactMass":144.912749,"ionization":5.582,"electronAffinity":0.5,"nameOrigin":"Named after the Greek Prometheus. Prometheus stole the fire from the gods and gave it to mankind.","radiusVDW":2.43,"boilingpoint":3273,"meltingpoint":1315,"periodTableBlock":"f","discoveryDate":"1945","period":"6","group":"7","electronicConfiguration":"Xe 4f5 6s2","family":"Rare_Earth","symbol":"Pm","name":"Promethium","elementColor":[0.64,1,0.78],"discoverers":["J. A. Marinsky","C. D. Coryell","L. E. Glendenin"]},{"id":"Sm","atomicNumber":62,"mass":150.36,"exactMass":151.9197324,"ionization":5.6437,"electronAffinity":0.5,"electronegativityPauling":1.17,"nameOrigin":"Named after the mineral Samarskit","radiusVDW":2.42,"boilingpoint":2067,"meltingpoint":1347,"periodTableBlock":"f","discoveryDate":"1879","period":"6","group":"8","electronicConfiguration":"Xe 4f6 6s2","family":"Rare_Earth","symbol":"Sm","name":"Samarium","elementColor":[0.56,1,0.78],"discoverers":["P.","Lecoq","de","Boisbaudran"]},{"id":"Eu","atomicNumber":63,"mass":151.964,"exactMass":152.9212303,"ionization":5.6704,"electronAffinity":0.5,"nameOrigin":"Named after Europe","radiusVDW":2.4,"boilingpoint":1800,"meltingpoint":1095,"periodTableBlock":"f","discoveryDate":"1901","period":"6","group":"8","electronicConfiguration":"Xe 4f7 6s2","family":"Rare_Earth","symbol":"Eu","name":"Europium","elementColor":[0.38,1,0.78],"discoverers":["E.","A.","Demarcay"]},{"id":"Gd","atomicNumber":64,"mass":157.25,"exactMass":157.9241039,"ionization":6.1498,"electronAffinity":0.5,"electronegativityPauling":1.2,"nameOrigin":"Named after the Finnish chemist Johan Gadolin","radiusVDW":2.38,"boilingpoint":3545,"meltingpoint":1585,"periodTableBlock":"f","discoveryDate":"1880","period":"6","group":"8","electronicConfiguration":"Xe 4f7 5d1 6s2","family":"Rare_Earth","symbol":"Gd","name":"Gadolinium","elementColor":[0.27,1,0.78],"discoverers":["Jean","de","Marignac"]},{"id":"Tb","atomicNumber":65,"mass":158.92535,"exactMass":158.9253468,"ionization":5.8638,"electronAffinity":0.5,"nameOrigin":"Named after the Swedish town of Ytterby","radiusVDW":2.37,"boilingpoint":3500,"meltingpoint":1629,"periodTableBlock":"f","discoveryDate":"1843","period":"6","group":"1","electronicConfiguration":"Xe 4f9 6s2","family":"Rare_Earth","symbol":"Tb","name":"Terbium","elementColor":[0.19,1,0.78],"discoverers":["K.","G.","Mosander"]},{"id":"Dy","atomicNumber":66,"mass":162.5,"exactMass":163.9291748,"ionization":5.9389,"electronAffinity":0.5,"electronegativityPauling":1.22,"nameOrigin":"Greek \'dysprositor\' for \'difficult to reach\'","radiusVDW":2.35,"boilingpoint":2840,"meltingpoint":1685,"periodTableBlock":"f","discoveryDate":"1886","period":"6","group":"2","electronicConfiguration":"Xe 4f10 6s2","family":"Rare_Earth","symbol":"Dy","name":"Dysprosium","elementColor":[0.12,1,0.78],"discoverers":["F.","E.","Lecoq","de","Boisbaudran"]},{"id":"Ho","atomicNumber":67,"mass":164.93032,"exactMass":164.9303221,"ionization":6.0215,"electronAffinity":0.5,"electronegativityPauling":1.23,"nameOrigin":"Latin \'holmia\' for the old name of Stockholm","radiusVDW":2.33,"boilingpoint":2968,"meltingpoint":1747,"periodTableBlock":"f","discoveryDate":"1878","period":"6","group":"3","electronicConfiguration":"Xe 4f11 6s2","family":"Rare_Earth","symbol":"Ho","name":"Holmium","elementColor":[0,1,0.61],"discoverers":["J. L. Soret","P.T. Cleve"]},{"id":"Er","atomicNumber":68,"mass":167.259,"exactMass":165.9302931,"ionization":6.1077,"electronAffinity":0.5,"electronegativityPauling":1.24,"nameOrigin":"Named ofter the Swedish town of Ytterby. Terbium and Ytterbium are also named after this town.","radiusVDW":2.32,"boilingpoint":3140,"meltingpoint":1802,"periodTableBlock":"f","discoveryDate":"1843","period":"6","group":"4","electronicConfiguration":"Xe 4f12 6s2","family":"Rare_Earth","symbol":"Er","name":"Erbium","elementColor":[0,0.9,0.46],"discoverers":["K.","G.","Mosander"]},{"id":"Tm","atomicNumber":69,"mass":168.93421,"exactMass":168.9342133,"ionization":6.1843,"electronAffinity":0.5,"electronegativityPauling":1.25,"nameOrigin":"Named after the old name of Scandinavia, \'Thule\'.","radiusVDW":2.3,"boilingpoint":2223,"meltingpoint":1818,"periodTableBlock":"f","discoveryDate":"1879","period":"6","group":"5","electronicConfiguration":"Xe 4f13 6s2","family":"Rare_Earth","symbol":"Tm","name":"Thulium","elementColor":[0,0.83,0.32],"discoverers":["P.","T.","Cleve"]},{"id":"Yb","atomicNumber":70,"mass":173.054,"exactMass":173.9388621,"ionization":6.2542,"electronAffinity":0.5,"nameOrigin":"Like Terbium and Gadolinium, this is named after the Swedish town of Ytterby.","radiusVDW":2.28,"boilingpoint":1469,"meltingpoint":1092,"periodTableBlock":"f","discoveryDate":"1878","period":"6","group":"6","electronicConfiguration":"Xe 4f14 6s2","family":"Rare_Earth","symbol":"Yb","name":"Ytterbium","elementColor":[0,0.75,0.22],"discoverers":["J.","Ch.","Marignac"]},{"id":"Lu","atomicNumber":71,"mass":174.9668,"exactMass":174.9407718,"ionization":5.4259,"electronAffinity":0.5,"electronegativityPauling":1.27,"nameOrigin":"Named after the Roman name \'Lutetia\' for Paris","radiusCovalent":1.6,"radiusVDW":2.27,"boilingpoint":3668,"meltingpoint":1936,"periodTableBlock":"f","discoveryDate":"1907","period":"6","group":"7","electronicConfiguration":"Xe 4f14 5d1 6s2","family":"Rare_Earth","symbol":"Lu","name":"Lutetium","elementColor":[0,0.67,0.14],"discoverers":["Carl F. Auer von Welsbach","G. Urbain"]},{"id":"Hf","atomicNumber":72,"mass":178.49,"exactMass":179.94655,"ionization":6.8251,"electronAffinity":0,"electronegativityPauling":1.3,"nameOrigin":"\'Hafnia\' is the old name of Kopenhagen (Denmark)","radiusCovalent":1.5,"radiusVDW":2.25,"boilingpoint":4875,"meltingpoint":2504,"periodTableBlock":"d","discoveryDate":"1923","period":"6","group":"4","electronicConfiguration":"Xe 4f14 5d2 6s2","family":"Transition","symbol":"Hf","name":"Hafnium","elementColor":[0.3,0.76,1],"discoveryCountry":["dk"],"discoverers":["D. Coster","G. Hevesy"]},{"id":"Ta","atomicNumber":73,"mass":180.94788,"exactMass":180.9479958,"ionization":7.5496,"electronAffinity":0.322,"electronegativityPauling":1.5,"nameOrigin":"Named after the Greek myth of Tantalos","radiusCovalent":1.38,"radiusVDW":2.2,"boilingpoint":5730,"meltingpoint":3293,"periodTableBlock":"d","discoveryDate":"1802","period":"6","group":"5","electronicConfiguration":"Xe 4f14 5d3 6s2","family":"Transition","symbol":"Ta","name":"Tantalum","elementColor":[0.3,0.65,1],"discoveryCountry":["se"],"discoverers":["A.","Ekeberg"]},{"id":"W","atomicNumber":74,"mass":183.84,"exactMass":183.9509312,"ionization":7.864,"electronAffinity":0.815,"electronegativityPauling":2.36,"nameOrigin":"\'tung sten\' means \'heavy stone\' in Swedish. The old name (and thus the symbol \'W\') was Wolfram, named after a mineral.","radiusCovalent":1.46,"radiusVDW":2.1,"boilingpoint":5825,"meltingpoint":3695,"periodTableBlock":"d","discoveryDate":"1783","period":"6","group":"6","electronicConfiguration":"Xe 4f14 5d4 6s2","family":"Transition","symbol":"W","name":"Tungsten","elementColor":[0.13,0.58,0.84],"discoveryCountry":["es"],"discoverers":["C.","W.","Scheele"]},{"id":"Re","atomicNumber":75,"mass":186.207,"exactMass":186.9557531,"ionization":7.8335,"electronAffinity":0.15,"electronegativityPauling":1.9,"nameOrigin":"Named after the German river Rhine (latin \'Rhenium\').","radiusCovalent":1.59,"radiusVDW":2.05,"boilingpoint":5870,"meltingpoint":3455,"periodTableBlock":"d","discoveryDate":"1925","period":"6","group":"7","electronicConfiguration":"Xe 4f14 5d5 6s2","family":"Transition","symbol":"Re","name":"Rhenium","elementColor":[0.15,0.49,0.67],"discoveryCountry":["de"],"discoverers":["Walter Noddack","Ida Tacke-Noddack","Otto Berg"]},{"id":"Os","atomicNumber":76,"mass":190.23,"exactMass":191.9614807,"ionization":8.4382,"electronAffinity":1.0778,"electronegativityPauling":2.2,"nameOrigin":"Greek for \'smell\'. Its oxides smell strongly like radishes.","radiusCovalent":1.28,"radiusVDW":2,"boilingpoint":5300,"meltingpoint":3300,"periodTableBlock":"d","discoveryDate":"1804","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d6 6s2","family":"Transition","symbol":"Os","name":"Osmium","elementColor":[0.15,0.4,0.59],"discoveryCountry":["uk"],"discoverers":["S.","Tennant"]},{"id":"Ir","atomicNumber":77,"mass":192.217,"exactMass":192.9629264,"ionization":8.967,"electronAffinity":1.56436,"electronegativityPauling":2.2,"nameOrigin":"Greek \'iris\' for \'rainbow\'","radiusCovalent":1.37,"radiusVDW":2,"boilingpoint":4700,"meltingpoint":2720,"periodTableBlock":"d","discoveryDate":"1804","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d7 6s2","family":"Transition","symbol":"Ir","name":"Iridium","elementColor":[0.09,0.33,0.53],"discoveryCountry":["uk"],"discoverers":["S.","Tennant"]},{"id":"Pt","atomicNumber":78,"mass":195.084,"exactMass":194.9647911,"ionization":8.9588,"electronAffinity":2.1251,"electronegativityPauling":2.28,"nameOrigin":"Spanish \'platina\' means \'small silver\'","radiusCovalent":1.28,"radiusVDW":2.05,"boilingpoint":4100,"meltingpoint":2042.1,"periodTableBlock":"d","discoveryDate":"1735","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d9 6s1","family":"Transition","symbol":"Pt","name":"Platinum","elementColor":[0.96,0.93,0.82],"discoveryCountry":["uk"],"discoverers":["A.","de","Ulloa"]},{"id":"Au","atomicNumber":79,"mass":196.966569,"exactMass":196.9665687,"ionization":9.2255,"electronAffinity":2.30861,"electronegativityPauling":2.54,"nameOrigin":"Latin \'aurum\'. Named after Aurora, the goddess of sunrise","radiusCovalent":1.44,"radiusVDW":2.1,"boilingpoint":3130,"meltingpoint":1337.58,"periodTableBlock":"d","discoveryDate":"0","period":"6","group":"1","electronicConfiguration":"Xe 4f14 5d10 6s1","family":"Transition","symbol":"Au","name":"Gold","elementColor":[0.8,0.82,0.12],"discoveryCountry":["ancient"]},{"id":"Hg","atomicNumber":80,"mass":200.59,"exactMass":201.970643,"ionization":10.4375,"electronAffinity":0,"electronegativityPauling":2,"nameOrigin":"Graeco-Latin \'hydrargyrum\' for \'liquid silver\'","radiusCovalent":1.49,"radiusVDW":2.05,"boilingpoint":629.88,"meltingpoint":234.31,"periodTableBlock":"d","discoveryDate":"0","period":"6","group":"2","electronicConfiguration":"Xe 4f14 5d10 6s2","family":"Transition","symbol":"Hg","name":"Mercury","elementColor":[0.71,0.71,0.76],"discoveryCountry":["ancient"]},{"id":"Tl","atomicNumber":81,"mass":204.3833,"exactMass":204.9744275,"ionization":6.1082,"electronAffinity":0.377,"electronegativityPauling":1.62,"nameOrigin":"Greek \'tallos\' for \'young twig\'","radiusCovalent":1.48,"radiusVDW":2.2,"boilingpoint":1746,"meltingpoint":577,"periodTableBlock":"p","discoveryDate":"1861","period":"6","group":"3","electronicConfiguration":"Xe 4f14 5d10 6s2 6p1","family":"Other_Metal","symbol":"Tl","name":"Thallium","elementColor":[0.65,0.33,0.3],"discoveryCountry":["uk"],"discoverers":["W.","Crookes"]},{"id":"Pb","atomicNumber":82,"mass":207.2,"exactMass":207.9766521,"ionization":7.4167,"electronAffinity":0.364,"electronegativityPauling":2.33,"nameOrigin":"Latin \'plumbum\' for Lead","radiusCovalent":1.47,"radiusVDW":2.3,"boilingpoint":2023,"meltingpoint":600.65,"periodTableBlock":"p","discoveryDate":"0","period":"6","group":"4","electronicConfiguration":"Xe 4f14 5d10 6s2 6p2","family":"Other_Metal","symbol":"Pb","name":"Lead","elementColor":[0.34,0.35,0.38],"discoveryCountry":["ancient"]},{"id":"Bi","atomicNumber":83,"mass":208.9804,"exactMass":208.9803987,"ionization":7.2855,"electronAffinity":0.942363,"electronegativityPauling":2.02,"nameOrigin":"The old name of Bismuth is \'Wismut\', which stood for \'white mass\'.","radiusCovalent":1.46,"radiusVDW":2.3,"boilingpoint":1837,"meltingpoint":544.59,"periodTableBlock":"p","discoveryDate":"0","period":"6","group":"5","electronicConfiguration":"Xe 4f14 5d10 6s2 6p3","family":"Other_Metal","symbol":"Bi","name":"Bismuth","elementColor":[0.62,0.31,0.71],"discoveryCountry":["ancient"]},{"id":"Po","atomicNumber":84,"mass":209,"exactMass":208.9824304,"ionization":8.414,"electronAffinity":1.9,"electronegativityPauling":2,"nameOrigin":"Named after Poland to honor Marie Curie","radiusVDW":2,"meltingpoint":527,"periodTableBlock":"p","discoveryDate":"1898","period":"6","group":"6","electronicConfiguration":"Xe 4f14 5d10 6s2 6p4","family":"Metalloids","symbol":"Po","name":"Polonium","elementColor":[0.67,0.36,0],"discoveryCountry":["fr"],"discoverers":["M. Sklodowska-Curie","P. Curie"]},{"id":"At","atomicNumber":85,"mass":210,"exactMass":209.987148,"ionization":0,"electronAffinity":2.8,"electronegativityPauling":2.2,"nameOrigin":"Greek \'astator\' for \'changing\'","radiusVDW":2,"boilingpoint":610,"meltingpoint":575,"periodTableBlock":"p","discoveryDate":"1940","period":"6","group":"7","electronicConfiguration":"Xe 4f14 5d10 6s2 6p5","family":"Halogen","symbol":"At","name":"Astatine","elementColor":[0.46,0.31,0.27],"discoveryCountry":["us"],"discoverers":["D. R. Corson","K. R. McKenzie","E. Segre"]},{"id":"Rn","atomicNumber":86,"mass":222,"exactMass":222.0175777,"ionization":10.7485,"electronAffinity":0,"nameOrigin":"Named after Radium. It ends with \'on\' to make it clear that it is a noble gas.","radiusCovalent":1.45,"radiusVDW":2,"boilingpoint":211.4,"meltingpoint":202,"periodTableBlock":"p","discoveryDate":"1898","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d10 6s2 6p6","family":"Noblegas","symbol":"Rn","name":"Radon","elementColor":[0.26,0.51,0.59],"discoveryCountry":["de"],"discoverers":["E.","Dorn"]},{"id":"Fr","atomicNumber":87,"mass":223,"exactMass":223.0197359,"ionization":4.0727,"electronegativityPauling":0.7,"nameOrigin":"Named after France to honor Marguerite Perey","radiusVDW":2,"boilingpoint":950,"meltingpoint":300,"periodTableBlock":"s","discoveryDate":"1939","period":"7","group":"1","electronicConfiguration":"Rn 7s1","family":"Alkali_Earth","symbol":"Fr","name":"Francium","elementColor":[0.26,0,0.4],"discoveryCountry":["fr"],"discoverers":["M.","Perey"]},{"id":"Ra","atomicNumber":88,"mass":226,"exactMass":226.0254098,"ionization":5.2784,"electronegativityPauling":0.9,"nameOrigin":"Latin \'radius\' for \'beam\', as it is radioactive","radiusVDW":2,"boilingpoint":1413,"meltingpoint":973,"periodTableBlock":"s","discoveryDate":"1898","period":"7","group":"2","electronicConfiguration":"Rn 7s2","family":"Alkaline_Earth","symbol":"Ra","name":"Radium","elementColor":[0,0.49,0],"discoveryCountry":["fr"],"discoverers":["M. Sklodowska-Curie","P. Curie"]},{"id":"Ac","atomicNumber":89,"mass":227,"exactMass":227.0277521,"ionization":5.17,"electronegativityPauling":1.1,"nameOrigin":"Greek \'aktis\' for \'beam\' - actinium is radioactive","radiusVDW":2,"boilingpoint":3470,"meltingpoint":1324,"periodTableBlock":"f","discoveryDate":"1899","period":"7","group":"3","electronicConfiguration":"Rn 6d1 7s2","family":"Other_Metal","symbol":"Ac","name":"Actinium","elementColor":[0.44,0.67,0.98],"discoveryCountry":["fr"],"discoverers":["A.","L.","Debierne"]},{"id":"Th","atomicNumber":90,"mass":232.03806,"exactMass":232.0380553,"ionization":6.3067,"electronegativityPauling":1.3,"nameOrigin":"Named after the German god of thunder: Thor","radiusVDW":2.4,"boilingpoint":5060,"meltingpoint":2028,"periodTableBlock":"f","discoveryDate":"1828","period":"7","group":"4","electronicConfiguration":"Rn 6d2 7s2","family":"Other_Metal","symbol":"Th","name":"Thorium","elementColor":[0,0.73,1],"discoverers":["J.","J.","Berzelius"]},{"id":"Pa","atomicNumber":91,"mass":231.03588,"exactMass":231.035884,"ionization":5.89,"electronegativityPauling":1.5,"nameOrigin":"Greek \'protos\' for \'ancester\'. Protactinium is before Actinium in the periodic table.","radiusVDW":2,"boilingpoint":4300,"meltingpoint":1845,"periodTableBlock":"f","discoveryDate":"1917","period":"7","group":"5","electronicConfiguration":"Rn 5f2 6d1 7s2","family":"Other_Metal","symbol":"Pa","name":"Protactinium","elementColor":[0,0.63,1],"discoverers":["O. Hahn","L. Meitern","W. Wollaston"]},{"id":"U","atomicNumber":92,"mass":238.02891,"exactMass":238.0507882,"ionization":6.1941,"electronegativityPauling":1.38,"nameOrigin":"Greek \'ouranos\' for \'heaven\'. Named after the planet Uranus.","radiusVDW":2.3,"boilingpoint":4407,"meltingpoint":1408,"periodTableBlock":"f","discoveryDate":"1789","period":"7","group":"6","electronicConfiguration":"Rn 5f3 6d1 7s2","family":"Other_Metal","symbol":"U","name":"Uranium","elementColor":[0,0.56,1],"discoverers":["M.","M.","Klaproth"]},{"id":"Np","atomicNumber":93,"mass":237,"exactMass":237.0481734,"ionization":6.2657,"electronegativityPauling":1.36,"nameOrigin":"Named after the planet Neptune.","radiusVDW":2,"boilingpoint":4175,"meltingpoint":912,"periodTableBlock":"f","discoveryDate":"1940","period":"7","group":"7","electronicConfiguration":"Rn 5f4 6d1 7s2","family":"Other_Metal","symbol":"Np","name":"Neptunium","elementColor":[0,0.5,1],"discoverers":["E. M. McMillan","P. Aberson"]},{"id":"Pu","atomicNumber":94,"mass":244,"exactMass":244.064204,"ionization":6.026,"electronegativityPauling":1.28,"nameOrigin":"Named after the planet Pluto.","radiusVDW":2,"boilingpoint":3505,"meltingpoint":913,"periodTableBlock":"f","discoveryDate":"1940","period":"7","group":"8","electronicConfiguration":"Rn 5f6 7s2","family":"Other_Metal","symbol":"Pu","name":"Plutonium","elementColor":[0,0.42,1],"discoverers":["Glenn T. Seaborg","E. M. McMillan","J. W. Kennedy","A.C. Wahl"]},{"id":"Am","atomicNumber":95,"mass":243,"exactMass":243.0613811,"ionization":5.9738,"electronegativityPauling":1.3,"nameOrigin":"Named after America.","radiusVDW":2,"boilingpoint":2880,"meltingpoint":1449,"periodTableBlock":"f","discoveryDate":"1945","period":"7","group":"8","electronicConfiguration":"Rn 5f7 7s2","family":"Other_Metal","symbol":"Am","name":"Americium","elementColor":[0.33,0.36,0.95],"discoverers":["Glenn T. Seaborg","L. O. Morgan","R. A. James","A. Ghiors"]},{"id":"Cm","atomicNumber":96,"mass":247,"exactMass":247.070354,"ionization":5.9914,"electronegativityPauling":1.3,"nameOrigin":"Named after Marie Curie.","radiusVDW":2,"boilingpoint":3383,"meltingpoint":1620,"periodTableBlock":"f","discoveryDate":"1944","period":"7","group":"8","electronicConfiguration":"Rn 5f7 6d1 7s2","family":"Other_Metal","symbol":"Cm","name":"Curium","elementColor":[0.47,0.36,0.89],"discoverers":["Glenn T. Seaborg","R. A. James","A. Ghiors"]},{"id":"Bk","atomicNumber":97,"mass":247,"exactMass":247.070307,"ionization":6.1979,"electronegativityPauling":1.3,"nameOrigin":"Named after the town Berkeley where it was discovered.","radiusVDW":2,"boilingpoint":983,"meltingpoint":1258,"periodTableBlock":"f","discoveryDate":"1949","period":"7","group":"1","electronicConfiguration":"Rn 5f9 7s2","family":"Other_Metal","symbol":"Bk","name":"Berkelium","elementColor":[0.54,0.31,0.89],"discoverers":["Glenn T. Seaborg","A. Ghiors","S. G. Thompson"]},{"id":"Cf","atomicNumber":98,"mass":251,"exactMass":251.079587,"ionization":6.2817,"electronegativityPauling":1.3,"nameOrigin":"Named after the US-State of California.","radiusVDW":2,"boilingpoint":1173,"meltingpoint":1172,"periodTableBlock":"f","discoveryDate":"1950","period":"7","group":"2","electronicConfiguration":"Rn 5f10 7s2","family":"Other_Metal","symbol":"Cf","name":"Californium","elementColor":[0.63,0.21,0.83],"discoverers":["Glenn T. Seaborg","A. Ghiors","S. G. Thompson"]},{"id":"Es","atomicNumber":99,"mass":252,"exactMass":252.08298,"ionization":6.42,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist Albert Einstein.","radiusVDW":2,"meltingpoint":1130,"periodTableBlock":"f","discoveryDate":"1952","period":"7","group":"3","electronicConfiguration":"Rn 5f11 7s2","family":"Other_Metal","symbol":"Es","name":"Einsteinium","elementColor":[0.7,0.12,0.83],"discoverers":["Glenn T. Seaborg","et al."]},{"id":"Fm","atomicNumber":100,"mass":257,"exactMass":257.095105,"ionization":6.5,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist Enrico Fermi.","radiusVDW":2,"meltingpoint":1800,"periodTableBlock":"f","discoveryDate":"1953","period":"7","group":"4","electronicConfiguration":"Rn 5f12 7s2","family":"Other_Metal","symbol":"Fm","name":"Fermium","elementColor":[0.7,0.12,0.73],"discoverers":["Glenn T. Seaborg","et al."]},{"id":"Md","atomicNumber":101,"mass":258,"exactMass":258.098431,"ionization":6.58,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist D.I. Mendeleev.","radiusVDW":2,"meltingpoint":1100,"periodTableBlock":"f","discoveryDate":"1955","period":"7","group":"5","electronicConfiguration":"Rn 5f13 7s2","family":"Other_Metal","symbol":"Md","name":"Mendelevium","elementColor":[0.7,0.05,0.65],"discoverers":["Glenn T. Seaborg","Albert Ghiorso","Bernard Harvey","Gregory Choppin","Stanley G. Thompson"]},{"id":"No","atomicNumber":102,"mass":259,"exactMass":259.10103,"ionization":6.65,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist Alfred Nobel.","radiusVDW":2,"meltingpoint":1100,"periodTableBlock":"f","discoveryDate":"1958","period":"7","group":"6","electronicConfiguration":"Rn 5f14 7s2","family":"Other_Metal","symbol":"No","name":"Nobelium","elementColor":[0.74,0.05,0.53]},{"id":"Lr","atomicNumber":103,"mass":262,"exactMass":262.10963,"ionization":4.9,"nameOrigin":"Named after the scientist Ernest Orlando Lawrence.","radiusVDW":2,"meltingpoint":1900,"periodTableBlock":"f","discoveryDate":"1961","period":"7","group":"7","electronicConfiguration":"Rn 5f14 7s2 7p1","family":"Other_Metal","symbol":"Lr","name":"Lawrencium","elementColor":[0.78,0,0.4],"discoverers":["Albert Ghiorso","Torbjorn Sikkeland","Almon Larsh","Robert M. Latimer"]},{"id":"Rf","atomicNumber":104,"mass":267,"exactMass":261.10877,"ionization":6,"nameOrigin":"Named after the scientist Ernest Rutherford","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1964","period":"7","group":"4","electronicConfiguration":"Rn 5f14 6d2 7s2","family":"Transition","symbol":"Rf","name":"Rutherfordium","elementColor":[0.8,0,0.35],"discoveryCountry":["ru","us"]},{"id":"Db","atomicNumber":105,"mass":268,"exactMass":262.11408,"nameOrigin":"Named after the science-town Dubna in Russia","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1967","period":"7","group":"5","electronicConfiguration":"Rn 5f14 6d3 7s2","family":"Transition","symbol":"Db","name":"Dubnium","elementColor":[0.82,0,0.31],"discoveryCountry":["ru","us"]},{"id":"Sg","atomicNumber":106,"mass":271,"exactMass":263.11832,"nameOrigin":"Named after the scientist G. Theodore Seaborg.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1974","period":"7","group":"6","family":"Transition","symbol":"Sg","name":"Seaborgium","elementColor":[0.85,0,0.27],"discoveryCountry":["ru","us"],"discoverers":["Albert Ghiorso","et al."]},{"id":"Bh","atomicNumber":107,"mass":272,"exactMass":264.1246,"nameOrigin":"Named after the scientist Niels Bohr.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1981","period":"7","group":"7","family":"Transition","symbol":"Bh","name":"Bohrium","elementColor":[0.88,0,0.22],"discoveryCountry":["ru"],"discoverers":["Peter Armbruster","Gottfried Münzenber","et al."]},{"id":"Hs","atomicNumber":108,"mass":270,"exactMass":265.13009,"nameOrigin":"Latin \'hassia\' for the German county Hessen. In Hessen a lot elements have been discovered.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1984","period":"7","group":"8","family":"Transition","symbol":"Hs","name":"Hassium","elementColor":[0.9,0,0.18],"discoveryCountry":["de"],"discoverers":["Peter Armbruster","Gottfried Münzenber","et al."]},{"id":"Mt","atomicNumber":109,"mass":276,"exactMass":268.13873,"nameOrigin":"Named after the scientist Lise Meitner.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1982","period":"7","group":"8","family":"Transition","symbol":"Mt","name":"Meitnerium","elementColor":[0.91,0,0.15],"discoveryCountry":["de"],"discoverers":["Peter Armbruster","Gottfried Münzenber","et al."]},{"id":"Ds","atomicNumber":110,"mass":281,"exactMass":271.14606,"nameOrigin":"Named after the German city Darmstadt where many elements have been discovered.","periodTableBlock":"d","discoveryDate":"1994","period":"7","group":"8","family":"Transition","symbol":"Ds","name":"Darmstadtium","elementColor":[0.92,0,0.14],"discoveryCountry":["de"],"discoverers":["S. Hofmann","V. Ninov","F. P. Hessberger","P. Armbruster","H. Folger","G. Münzenberg","H. J. Schött","et al."]},{"id":"Rg","atomicNumber":111,"mass":280,"exactMass":272.15362,"nameOrigin":"Named after Wilhelm Conrad Röntgen.","periodTableBlock":"d","discoveryDate":"1994","period":"7","group":"1","family":"Transition","symbol":"Rg","name":"Roentgenium","elementColor":[0.93,0,0.13],"discoveryCountry":["de"],"discoverers":["S. Hofmann","V. Ninov","F. P. Hessberger","P. Armbruster","H. Folger","G. Münzenberg","et al."]},{"id":"Cn","atomicNumber":112,"mass":285,"exactMass":285.17411,"nameOrigin":"Historically known as eka-mercury. Ununbium is a temporary IUPAC systematic element name.","periodTableBlock":"d","discoveryDate":"1996","period":"7","family":"Transition","symbol":"Cn","name":"Copernicium","elementColor":[0.94,0,0.12],"discoveryCountry":["de"],"discoverers":["First","created","at","the","Gesellschaft","für","Schwerionenforschung"]},{"id":"Uut","atomicNumber":113,"mass":284,"exactMass":284.17808,"nameOrigin":"Historically known as eka-thallium. Ununtrium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2003","period":"7","family":"Other_Metal","symbol":"Uut","name":"Ununtrium","elementColor":[0.95,0,0.11],"discoveryCountry":["ru","us"],"discoverers":["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]},{"id":"Uuq","atomicNumber":114,"mass":289,"exactMass":289.18728,"nameOrigin":"Historically known as eka-lead. Ununquadium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"1998","period":"7","family":"Other_Metal","symbol":"Uuq","name":"Ununquadium","elementColor":[0.96,0,0.1],"discoveryCountry":["ru","us"],"discoverers":["Joint","Institute","for","Nuclear","Research"]},{"id":"Uup","atomicNumber":115,"mass":288,"exactMass":288.19249,"nameOrigin":"Historically known as eka-bismuth. Ununpentium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2004","period":"7","family":"Other_Metal","symbol":"Uup","name":"Ununpentium","elementColor":[0.97,0,0.09],"discoveryCountry":["ru","us"],"discoverers":["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]},{"id":"Uuh","atomicNumber":116,"mass":293,"exactMass":292.19979,"nameOrigin":"Historically known as eka-polonium. Ununhexium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2000","period":"7","family":"Other_Metal","symbol":"Uuh","name":"Ununhexium","elementColor":[0.98,0,0.08],"discoveryCountry":["ru"],"discoverers":["Joint","Institute","for","Nuclear","Research"]},{"id":"Uus","atomicNumber":117,"nameOrigin":"Temporary symbol and name. Can also be referred to as eka-astatine.","periodTableBlock":"p","discoveryDate":"0","period":"7","family":"Halogen","symbol":"Uus","name":"Ununseptium","elementColor":[0.99,0,0.07]},{"id":"Uuo","atomicNumber":118,"mass":294,"nameOrigin":"Historically known as eka-radon, eka-emanation before 1960. Ununoctium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2002","period":"7","family":"Noblegas","symbol":"Uuo","name":"Ununoctium","elementColor":[1,0,0.06],"discoveryCountry":["ru","us"],"discoverers":["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]}]}'),Fd=de.vtkErrorMacro,Bd=de.vtkDebugMacro,Ld={};function Vd(e,t){var n=[],r=[],i=[],o=[];function a(e,a,s){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.bondRadius;r.push(s),r.push(u),i.push(a[0]),i.push(a[1]),i.push(a[2]),n.push(e[0]),n.push(e[1]),n.push(e[2]);for(var c=0;c0&&b.push(x[P]*t.atomicRadiusScaleFactor),C.length>0&&(A=3*P,w.push(255*C[A]),w.push(255*C[A+1]),w.push(255*C[A+2])));if(!g){g=[],v=[];for(var _=0;_E||Math.abs(I[1])>E||Math.abs(I[2])>E)){var k=E*E,M=I[0]*I[0]+I[1]*I[1]+I[2]*I[2];M.1&&(g.push(_),g.push(O),v.push(1))}}f=g.length/2}for(var N=0;N2*G*.6&&(t.bondRadius*=2*G*.6/z,U=(2+t.deltaBondFactor)*t.bondRadius);for(var W=v[N]%2,H=W;H0){var J=Math.sqrt(j)/2;a(Z=[h[B]-J*q[0]/2+K*X[0],h[B+1]-J*q[1]/2+K*X[1],h[B+2]-J*q[2]/2+K*X[2]],q,J,C.slice(B,B+3)),a(Z=[h[L]+J*q[0]/2+K*X[0],h[L+1]+J*q[1]/2+K*X[1],h[L+2]+J*q[2]/2+K*X[2]],q,J,C.slice(L,L+3))}else{var Q=Math.sqrt(j);Z=[h[B]-V[0]/2+K*X[0],h[B+1]-V[1]/2+K*X[1],h[B+2]-V[2]/2+K*X[2]],C.length>0?a(Z,q,Q,C.slice(L,L+3)):a(Z,q,Q)}}}}if(c.getPoints().setData(y,3),x){var $=Ln.newInstance({numberOfComponents:1,values:b,name:e.getSphereScaleArrayName()});c.getPointData().addArray($)}if(C.length>0){var ee=Ln.newInstance({numberOfComponents:3,values:Uint8Array.from(w),name:"colors"});c.getPointData().setScalars(ee)}d.getPoints().setData(n,3);var te=Ln.newInstance({numberOfComponents:2,values:r,name:"stickScales"});d.getPointData().addArray(te);var ne=Ln.newInstance({numberOfComponents:3,values:i,name:"orientation"});if(d.getPointData().addArray(ne),C.length>0){var re=Ln.newInstance({numberOfComponents:3,values:Uint8Array.from(o),name:"colors"});d.getPointData().setScalars(re)}return l[0]=c,l[1]=d,1}}Rd.H.forEach((function(e){Ld[e.atomicNumber]=e}));var jd={sphereScaleArrayName:"radius",tolerance:.45,atomicRadiusScaleFactor:.3,bondRadius:.075,deltaBondFactor:.6,radiusType:"radiusVDW",hideElements:""};function Ud(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jd,n),de.obj(e,t),de.setGet(e,t,["atomicRadiusScaleFactor","bondRadius","deltaBondFactor","hideElements","radiusType","sphereScaleArrayName","tolerance"]),de.algo(e,t,1,2),Vd(e,t)}var Gd={newInstance:de.newInstance(Ud,"vtkMoleculeToRepresentation"),extend:Ud},zd=de.vtkErrorMacro,Wd=[0,2,4,1,2,4,0,3,4,1,3,4,0,2,5,1,2,5,0,3,5,1,3,5],Hd=[2,0,1,2,2,3,2,4,5,2,6,7,2,0,2,2,1,3,2,4,6,2,5,7,2,0,4,2,1,5,2,2,6,2,3,7];function Kd(e,t){t.classHierarchy.push("vtkOutlineFilter"),e.requestData=function(e,t){var n=e[0];if(n){var r=n.getBounds(),i=ju.newInstance();i.getPoints().setData(Float32Array.from(Wd.map((function(e){return r[e]}))),3),i.getLines().setData(Uint16Array.from(Hd)),t[0]=i}else zd("Invalid or missing input")}}var qd={};function Xd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qd,n),de.obj(e,t),de.algo(e,t,1,1),Kd(e,t)}var Yd={newInstance:de.newInstance(Xd,"vtkOutlineFilter"),extend:Xd,BOUNDS_MAP:Wd,LINE_ARRAY:Hd},Zd=n(9467),Jd=n.n(Zd);function Qd(e,t){t.classHierarchy.push("vtkPriorityQueue"),e.push=function(e,n){var r=t.elements.findIndex((function(t){return t.priority>e}));t.elements.splice(r,0,{priority:e,element:n})},e.pop=function(){return t.elements.length>0?t.elements.shift().element:null},e.deleteById=function(e){t.elements=t.elements.filter((function(t){return t.element.id!==e}))},e.length=function(){return t.elements.length}}var $d={elements:[]};function ep(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$d,n),de.obj(e,t),Qd(e,t)}var tp={newInstance:de.newInstance(ep,"vtkPriorityQueue"),extend:ep},np=1e-6;function rp(e,t){function n(e){var n=[0,0,0],r=[0,0,0],i=[0,0,0],o=[0,0,0];qe(e.point,e.previous.point,n),qe(e.next.point,e.point,r),qe(e.previous.point,e.next.point,i),et(n,r,o);var a=Qe(o,t.normal);if(a<=0)return-1;var s=tt(n)+tt(r)+tt(i);return s*s/a}function r(e){if(t.pointCount<=3)return!0;var n=e.previous,r=e.next,i=[0,0,0];qe(r.point,n.point,i);var o=[0,0,0];if(et(i,t.normal,o),nt(o),0===tt(o))return!1;for(var a=pr.evaluate(o,n.point,r.next.point),s=a>np?1:a<-1e-6?-1:0,l=s<0?1:0,u=r.next.next;u.id!==n.id;u=u.next){var c=u.previous,d=(a=pr.evaluate(o,n.point,u.point))>np?1:a<-1e-6?-1:0;if(d!==s){if(l||(l=d<=0?1:0),Ul.intersection(n.point,r.point,u.point,c.point,[0],[0])===Dl.YES_INTERSECTION)return!1;s=d}}return 1===l}function i(e,r){t.pointCount-=1;var i=e.previous,o=e.next;t.tris=t.tris.concat(e.point),t.tris=t.tris.concat(o.point),t.tris=t.tris.concat(i.point),i.next=o,o.previous=i,r.deleteById(i.id),r.deleteById(o.id);var a=n(i);a>0&&r.push(a,i);var s=n(o);s>0&&r.push(s,o),e.id===t.firstPoint.id&&(t.firstPoint=o)}t.classHierarchy.push("vtkPolygon"),e.triangulate=function(){return t.firstPoint?function(){!function(){var e=[0,0,0],n=[0,0,0];t.normal=[0,0,0];for(var r=y(t.firstPoint.point),i=t.firstPoint,o=0;o0&&e.push(s,o),o=o.next}for(;t.pointCount>2&&e.length()>0;)if(t.pointCount===e.length())i(e.pop(),e);else{var l=e.pop();r(l)&&i(l,e)}return t.pointCount<=2}():null},e.setPoints=function(e){t.pointCount=e.length,t.firstPoint={id:0,point:e[0],next:null,previous:null};for(var n=t.firstPoint,r=1;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ip,n),de.obj(e,t),rp(e,t)}var ap={newInstance:de.newInstance(op,"vtkPolygon"),extend:op},sp=n(477),lp=n.n(sp);function up(){return lp()('/*! For license information please see PaintFilter.worker.worker.js.LICENSE.txt */\n!function(){"use strict";var t={666:function(t,n,e){var r=function(){function t(t,n){for(var e=0;e1?n-1:0),r=1;r1?r-1:0),a=1;a3&&void 0!==arguments[3]?arguments[3]:[];y([0,t,n,e],r)},M=function(t,n,e){if(!n)throw new Error("eventName is required");if("string"!=typeof n)throw new Error("eventName should be string");y([1,t,n,e])};return self.addEventListener("message",(function(t){var n=t.data;Array.isArray(n)?m.apply(void 0,a(n)):n&&n.eventName&&d.emitLocally.apply(d,[n.eventName].concat(a(n.args)))})),d},t.exports.TransferableResponse=c},197:function(t){var n=function(){function t(t,n){for(var e=0;e1?n-1:0),r=1;rMath.round(t)));null!=f.slicingMode&&f.slicingMode!==o&&(e[f.slicingMode%3]=0);const i=f.dimensions[0],a=f.dimensions[0]*f.dimensions[1],s=Math.round(Math.max(r[2]-e[2],0)),u=Math.round(Math.min(r[2]+e[2],f.dimensions[2]-1));for(let t=s;t<=u;t++){const n=(r[2]-t)/e[2],o=e[1]*Math.sqrt(1-n*n),s=Math.round(Math.max(r[1]-o,0)),u=Math.round(Math.min(r[1]+o,f.dimensions[1]-1));for(let o=s;o<=u;o++){const s=(r[1]-o)/e[1],u=e[0]*Math.sqrt(1-s*s-n*n),l=Math.round(Math.max(r[0]-u,0)),c=Math.round(Math.min(r[0]+u,f.dimensions[0]-1));if(l<=c){const n=o*i+t*a;f.buffer.fill(1,n+l,n+c+1)}}}}r()().operation("start",(({bufferType:t,dimensions:n,slicingMode:e})=>{if(!f.buffer){const r=n[0]*n[1]*n[2];f.buffer=new self[t](r),f.dimensions=n,f.prevPoint=null,f.slicingMode=e}})).operation("paint",(function({point:t,radius:n}){f.prevPoint||(f.prevPoint=t);const e=[t[0]-f.prevPoint[0],t[1]-f.prevPoint[1],t[2]-f.prevPoint[2]],r=[1,1,1];for(let t=0;t<3;t++)e[t]<0&&(e[t]=-e[t],r[t]=-1);const o=Math.max(...e),i=[o,o,o],a=[...f.prevPoint];for(let t=0;t<=o;t++){l({center:a,scale3:n});for(let t=0;t<3;t++)i[t]-=e[t],i[t]<=0&&(i[t]+=o,a[t]+=r[t])}f.prevPoint=t})).operation("paintRectangle",(function({point1:t,point2:n}){const[e,r,o]=t,[i,a,s]=n,u=Math.max(Math.min(e,i),0),l=Math.min(Math.max(e,i),f.dimensions[0]-1);if(u<=l){const t=Math.max(Math.min(r,a),0),n=Math.min(Math.max(r,a),f.dimensions[1]-1),e=Math.max(Math.min(o,s),0),i=Math.min(Math.max(o,s),f.dimensions[2]-1),c=f.dimensions[0],p=f.dimensions[0]*f.dimensions[1];for(let r=e;r<=i;r++)for(let e=t;e<=n;e++){const t=e*c+r*p;f.buffer.fill(1,t+u,t+l+1)}}})).operation("paintEllipse",l).operation("paintTriangles",(function({triangleList:t}){const n=Math.floor(t.length/9);for(let e=0;e=0&&e[0]=0&&e[1]=0&&e[2]{const t=new(r().TransferableResponse)(f.buffer.buffer,[f.buffer.buffer]);return f.buffer=null,t}))}()}();\n',"Worker",void 0,void 0)}var cp=de.vtkErrorMacro;function dp(e,t){t.classHierarchy.push("vtkPaintFilter");var n=null,r=null,i={};function o(){i.index=-1,i.snapshots=[],i.labels=[]}function a(e,t){var n=i.index+1,r=i.snapshots.length-i.index;i.snapshots.splice(n,r),i.labels.splice(n,r),i.snapshots.push(e),i.labels.push(t),i.index++}e.startStroke=function(){t.labelMap&&(r||(n=new up,r=new(Jd())(n)),r.exec("start",{bufferType:"Uint8Array",dimensions:t.labelMap.getDimensions(),slicingMode:t.slicingMode}))},e.endStroke=function(){var t;return r&&(t=r.exec("end")).then((function(t){e.applyBinaryMask(t),n.terminate(),n=null,r=null})),t},e.applyBinaryMask=function(n){for(var r=t.labelMap.getPointData().getScalars(),i=r.getData(),o=new Uint8Array(n),s=0,l=0;l-1},e.paintPolygon=function(e){if(r&&e.length>0){for(var n=ap.newInstance(),i=[],o=0;o-1){for(var n=t.labelMap.getPointData().getScalars(),r=n.getData(),o=i.snapshots[i.index],a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pp,n),de.obj(e,t),de.algo(e,t,0,1),de.setGet(e,t,["backgroundImage","labelMap","maskWorldToIndex","voxelFunc","label","radius","slicingMode"]),dp(e,t)}var hp={newInstance:de.newInstance(fp,"vtkPaintFilter"),extend:fp},mp=de.vtkErrorMacro;function gp(e,t){t.classHierarchy.push("vtkScalarToRGBA"),e.requestData=function(e,n){var r=e[0];if(r){var i=r.getPointData().getScalars();if(i)if(t.lookupTable)if(t.piecewiseFunction){for(var o=[0,0,0,0],a=i.getData(),s=new Uint8Array(4*a.length),l=0,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vp,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["lookupTable","piecewiseFunction"]),gp(e,t)}var bp={newInstance:de.newInstance(yp,"vtkScalarToRGBA"),extend:yp},wp=0,xp=1,Sp=2,Cp=3,Ap=0,Pp=1,_p=2,Op=3,Ep=de.vtkDebugMacro,Tp=de.vtkErrorMacro,Dp=de.vtkWarningMacro;function Ip(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],i=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],a=t,s=a[0],l=0;l1){var u=0,c=[0,0,0],d=[0,0,0],p=a.slice(l+1,l+1+s);if((u=r(e,p,0))!==s)!function(){var t=p[u],a=e.slice(3*t,3*(t+1)),l=p[u+1],f=e.slice(3*l,3*(l+1));if(nt(c=f.map((function(e,t){return e-a[t]}))),i)o=i;else{for(;++u.001){o=m,c=d;break}}if(u>=s)for(var g=0;g<3;++g)if(0!==c[g]){o[(g+2)%3]=0,o[(g+1)%3]=1,o[g]=-c[(g+1)%3]/c[g];break}}nt(o);for(var v=0;++u0?Math.sqrt(S):0;for(var C=[0,0,0],A=0;A<3;++A)C[A]=d[A]+c[A];nt(C),et(C,w,b),et(c,w,C),Qe(o,C)*Qe(b,C)<0&&(S*=-1);for(var P=v;Pt.radiusFactor&&(_=t.radiusFactor);else if(u&&t.varyRadius===Cp&&(_=u.getComponent(r[E],0))<0)return Dp("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var R=0;R1&&D){var Q=g.slice(Z,Z+v+1);i(d.getData(),Q,E)}o(X,v,J,d.getData(),x.getData(),c.getPointData(),W,C,L,j,U,G,T,q)?(O=a(X,v,Y,O,c.getCellData(),z,_),H&&s(X,v,J,d.getData(),L,H.getData())):Dp("Could not generate points"),X=n(X,v),Y++}u.setPoints(x),u.setStrips(_),u.setPointData(W),W.setNormals(A),l[0]=u}}}}else Tp("Invalid or missing input")}}var kp={outputPointsPrecision:ei.DEFAULT,radius:.5,varyRadius:wp,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:Ap,textureLength:1};function Mp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kp,n),de.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),de.obj(e,t),de.algo(e,t,1,1),Ip(e,t)}var Np={newInstance:de.newInstance(Mp,"vtkTubeFilter"),extend:Mp},Rp=de.vtkDebugMacro,Fp=de.vtkErrorMacro;function Bp(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var i=n[0];if(!i)return Fp("Invalid or missing input"),1;var o=i.getPoints(),a=i.getPointData().getNormals(),s=e.getInputArrayToProcess(0);if(!o||!s)return Rp("No data to warp",!!o,!!s),r[0]=n[0],1;var l=o.getNumberOfPoints(),u=null,c=[0,0,1];a&&!t.useNormal?(u=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},Rp("Using data normals")):e.getXyPlane()?(u=function(e,t){return c},Rp("Using x-y plane normal")):(u=function(e,n){return t.normal},Rp("Using Normal instance variable"));for(var d=new Float32Array(3*l),p=o.getData(),f=0,h=[0,0,1],m=1,g=s.getData(),v=s.getNumberOfComponents(),y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lp,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),de.setGetArray(e,t,["normal"],3),Bp(e,t)}var jp={newInstance:de.newInstance(Vp,"vtkWarpScalar"),extend:Vp};function Up(e,t){t.classHierarchy.push("vtkWindowedSincPolyDataFilter"),e.vtkWindowedSincPolyDataFilterExecute=function(e,n,r){if(!e||t.numberOfIterations<=0)return e;for(var i=e.getData(),o=n.getVerts().getData(),a=n.getLines().getData(),s=n.getPolys().getData(),l=n.getStrips().getData(),u=Math.cos(Pn.radiansFromDegrees(t.featureAngle)),c=Math.cos(Pn.radiansFromDegrees(t.edgeAngle)),d=e.getNumberOfPoints(),p=new Array(d),f=0;f3,S=0;S0||A>0){var P=ju.newInstance();P.setPoints(n.getPoints()),P.setPolys(n.getPolys());var _=P,O=[],E=0,T=[],D=[];_.buildLinks();for(var I=_.getPolys().getData(),k=0,M=0;M=2){if(!t.nonManifoldSmoothing){for(var j=0;j=L&&(V=2)}}else{if(!(1===L&&(E=O[0])>k))continue;if(t.featureEdgeSmoothing){Mu.computeNormal(y(e.getPoint(N[0])),y(e.getPoint(N[1])),y(e.getPoint(N[2])),T);var U=_.getCellPoints(E).cellPointIds;Mu.computeNormal(y(e.getPoint(U[0])),y(e.getPoint(U[1])),y(e.getPoint(U[2])),D),Pn.dot(T,D)<=u&&(V=2)}}V&&0===p[F].type?(p[F].edges=[B],p[F].type=V):(V&&3===p[F].type||V&&2===p[F].type||!V&&0===p[F].type)&&(p[F].edges.push(B),p[F].type&&3===V&&(p[F].type=3)),V&&0===p[B].type?(p[B].edges=[F],p[B].type=V):(V&&3===p[B].type||V&&2===p[B].type||!V&&0===p[B].type)&&(p[B].edges.push(F),p[B].type&&3===V&&(p[B].type=3))}}}for(var G=0;G=0&&Pn.normalize(q)>=0&&Pn.dot(K,q)1&&(ue[t.numberOfIterations-2]=2*(t.numberOfIterations-1)*le[t.numberOfIterations-1]);for(var be=t.numberOfIterations-3;be>=0;--be)ue[be]=ue[be+2]+2*(be+1)*le[be+1];fe=0,he=0,fe+=le[0],he+=ue[0];for(var we=1;we<=t.numberOfIterations;++we)1===we?(fe+=le[we]*(1-.5*oe),he+=ue[we]*(1-.5*oe)):(fe+=le[we]*Math.cos(we*Math.acos(1-.5*oe)),he+=ue[we]*Math.cos(we*Math.acos(1-.5*oe)));t.numberOfIterations>1?Math.abs(fe-1)>=.001?ge-=(fe-1)/he:me=!0:(me=!0,ge=0)}Math.abs(fe-1)>=.001&&console.log("An optimal offset for the smoothing filter could not be found. Unpredictable smoothing/shrinkage may result.");for(var xe=[0,0,0],Se=[0,0,0],Ce=[0,0,0],Ae=[0,0,0],Pe=[0,0,0],_e=[0,0,0],Oe=0;Oe0){var Ee,Te;Q[Y].getPoint(Oe,xe),Ce[0]=0,Ce[1]=0,Ce[2]=0;for(var De=0;De0){var Ue,Ge;Q[Y].getPoint(je,Fe),Q[Z].getPoint(je,Be),Ce[0]=0,Ce[1]=0,Ce[2]=0;for(var ze=0;ze2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gp,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["numberOfIterations","passBand","featureAngle","edgeAngle","featureEdgeSmoothing","boundarySmoothing","nonManifoldSmoothing","generateErrorScalars","generateErrorVectors","normalizeCoordinates"]),Up(e,t)}var Wp=de.newInstance(zp,"vtkWindowedSincPolyDataFilter"),Hp={vtkAppendPolyData:Fc,vtkCalculator:Gc,vtkClosedPolyLineToSurfaceFilter:Xc,vtkImageCropFilter:$c,vtkImageMarchingCubes:ud,vtkImageMarchingSquares:bd,vtkImageOutlineFilter:Ad,vtkImageSliceFilter:Td,vtkImageStreamline:Nd,vtkMoleculeToRepresentation:Gd,vtkOutlineFilter:Yd,vtkPaintFilter:hp,vtkScalarToRGBA:bp,vtkTubeFilter:Np,vtkWarpScalar:jp,vtkWindowedSincPolyDataFilter:{newInstance:Wp,extend:zp}};function Kp(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var i=n[0],o=2*Math.PI/t.resolution,a=-t.height/2,s=t.resolution+1,l=4*t.resolution+1+t.resolution,u=0,c=de.newTypedArray(t.pointType,3*s),d=0,p=new Uint32Array(l);c[0]=t.height/2,c[1]=0,c[2]=0,t.capping&&(p[d++]=t.resolution);for(var f=0;ft.resolution?1:h+2;(r=Es.buildFromRadian()).translate.apply(r,y(t.center)).rotateFromDirections([1,0,0],t.direction).apply(c),(i=ju.newInstance()).getPoints().setData(c,3),i.getPolys().setData(p,1),n[0]=i}}}var qp={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};function Xp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qp,n),de.obj(e,t),de.setGet(e,t,["height","radius","resolution","capping"]),de.setGetArray(e,t,["center","direction"],3),de.algo(e,t,0,1),Kp(e,t)}var Yp={newInstance:de.newInstance(Xp,"vtkConeSource"),extend:Xp};function Zp(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,i;if(!t.deleted){var o=n[0],a=2*Math.PI/t.resolution,s=2*t.resolution,l=5*t.resolution;t.capping&&(s=4*t.resolution,l=7*t.resolution+2);for(var u=de.newTypedArray(t.pointType,3*s),c=0,d=new Uint32Array(l),p=new Float32Array(3*s),f=Ln.newInstance({numberOfComponents:3,values:p,name:"Normals"}),h=new Float32Array(2*s),m=Ln.newInstance({numberOfComponents:2,values:h,name:"TCoords"}),g=[0,0,0],v=[0,0,0],b=[0,0,0],w=[0,0,0],x=[0,0],S=[0,0],C=0;C2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jp,n),de.obj(e,t),de.setGet(e,t,["height","radius","resolution","capping"]),de.setGetArray(e,t,["center","direction"],3),de.algo(e,t,0,1),Zp(e,t)}var $p={newInstance:de.newInstance(Qp,"vtkCylinderSource"),extend:Qp};function ef(e,t){t.classHierarchy.push("vtkArrowSource"),e.requestData=function(e,n){if(!t.deleted){var r=$p.newInstance({capping:!0});r.setResolution(t.shaftResolution),r.setRadius(t.shaftRadius),r.setHeight(1-t.tipLength),r.setCenter(0,.5*(1-t.tipLength),0);var i=r.getOutputData(),o=i.getPoints().getData(),a=i.getPointData().getNormals().getData();Es.buildFromDegree().rotateZ(-90).apply(o).apply(a);var s=Yp.newInstance();s.setResolution(t.tipResolution),s.setHeight(t.tipLength),s.setRadius(t.tipRadius);var l=s.getOutputData(),u=l.getPoints().getData();Es.buildFromRadian().translate(1-.5*t.tipLength,0,0).apply(u);var c=Fc.newInstance();c.setInputData(i),c.addInputData(l);var d=c.getOutputData(),p=d.getPoints().getData();Es.buildFromRadian().translate(.5*t.tipLength-.5,0,0).apply(p),t.invert?(Es.buildFromRadian().rotateFromDirections([1,0,0],t.direction).scale(-1,-1,-1).apply(p),n[0]=d):(Es.buildFromRadian().rotateFromDirections([1,0,0],t.direction).scale(1,1,1).apply(p),n[0]=c.getOutputData())}}}var tf={tipResolution:6,tipRadius:.1,tipLength:.35,shaftResolution:6,shaftRadius:.03,invert:!1,direction:[1,0,0],pointType:"Float32Array"};function nf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tf,n),de.obj(e,t),de.setGet(e,t,["tipResolution","tipRadius","tipLength","shaftResolution","shaftRadius","invert"]),de.setGetArray(e,t,["direction"],3),de.algo(e,t,0,1),ef(e,t)}var rf={newInstance:de.newInstance(nf,"vtkArrowSource"),extend:nf};function of(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 af(e,t){t.classHierarchy.push("vtkCircleSource"),e.requestData=function(e,n){var r,i;if(!t.deleted){var o=n[0],a=de.newTypedArray(t.pointType,3*t.resolution),s=new Uint32Array(t.resolution+2);s[0]=t.resolution+1;for(var l=2*Math.PI/t.resolution,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sf(n)),de.obj(e,t),de.setGet(e,t,["radius","resolution","lines","face"]),de.setGetArray(e,t,["center","direction"],3),de.algo(e,t,0,1),af(e,t)}var uf={newInstance:de.newInstance(lf,"vtkCircleSource"),extend:lf};function cf(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 i=!1;!t.mask&&r&&(i=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(i=!0),t.mask[n]=r),i&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var i;if(!t.deleted&&t.radius.length){n();var o=r[0],a=t.radius.length,s=t.height/2,l=0,u=0,c=t.startThetat.startTheta?t.endTheta:t.startTheta;d*=Math.PI/180;var p=t.resolution,f=!1;d>=c+2*Math.PI?d=c+2*Math.PI:(++p,f=!0);var h=(d-c)/t.resolution,m=p*a*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(l+=2*(p+1)+5*p+(f?10:0),u+=2+p+(f?2:0));for(var g=1;g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,df,n),de.obj(e,t),de.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),de.setGetArray(e,t,["center","direction"],3),de.getArray(e,t,["cellFields"]),de.algo(e,t,0,1),cf(e,t)}var ff={newInstance:de.newInstance(pf,"vtkConcentricCylinderSource"),extend:pf};function hf(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,mf,n),de.obj(e,t),de.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),de.setGetArray(e,t,["center","rotations"],3),de.algo(e,t,0,1),hf(e,t)}var vf={newInstance:de.newInstance(gf,"vtkCubeSource"),extend:gf};function yf(e,t){t.classHierarchy.push("vtkCursor3D"),e.setModelBounds=function(n){if(Array.isArray(n)&&!(n.length<6)&&(t.modelBounds[0]!==n[0]||t.modelBounds[1]!==n[1]||t.modelBounds[2]!==n[2]||t.modelBounds[3]!==n[3]||t.modelBounds[4]!==n[4]||t.modelBounds[5]!==n[5])){e.modified(),t.modelBounds=n.map((function(e){return Number(e)}));for(var r=0;r<3;++r)t.modelBounds[2*r]=Math.min(t.modelBounds[2*r],t.modelBounds[2*r+1])}},e.setFocalPoint=function(n){if(Array.isArray(n)&&!(n.length<3)&&(n[0]!==t.focalPoint[0]||n[1]!==t.focalPoint[1]||n[2]!==t.focalPoint[2])){e.modified();for(var r=[],i=0;i<3;i++)r[i]=n[i]-t.focalPoint[i],t.focalPoint[i]=Number(n[i]),t.translationMode?(t.modelBounds[2*i]+=r[i],t.modelBounds[2*i+1]+=r[i]):t.wrap?t.focalPoint[i]=t.modelBounds[2*i]+1*(t.focalPoint[i]-t.modelBounds[2*i])%(1*(t.modelBounds[2*i+1]-t.modelBounds[2*i])):(n[i]t.modelBounds[2*i+1]&&(t.focalPoint[i]=t.modelBounds[2*i+1]))}},e.setAll=function(t){e.setOutline(t),e.setAxes(t),e.setXShadows(t),e.setYShadows(t),e.setZShadows(t)},e.allOn=function(){e.setAll(!0)},e.allOff=function(){e.setAll(!1)},e.requestData=function(e,n){if(!t.deleted){var r=0,i=0;if(t.wrap)for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bf,n),de.obj(e,t),de.get(e,t,["focus"]),de.getArray(e,t,["modelBounds"],6),de.getArray(e,t,["focalPoint"],3),de.setGet(e,t,["outline"]),de.setGet(e,t,["axes"]),de.setGet(e,t,["xShadows"]),de.setGet(e,t,["yShadows"]),de.setGet(e,t,["zShadows"]),de.setGet(e,t,["wrap"]),de.setGet(e,t,["translationMode"]),de.algo(e,t,0,1),yf(e,t)}var xf={newInstance:de.newInstance(wf,"vtkCursor3D"),extend:wf};function Sf(e,t){var n=this;t.classHierarchy.push("vtkImageGridSource"),e.requestData=function(e,r){if(!t.deleted){var i={},o={type:"vtkImageData",mtime:t.mtime,metadata:{source:"vtkImageGridSource",state:i}};["gridSpacing","gridOrigin","dataSpacing","dataOrigin"].forEach((function(e){i[e]=[].concat(t[e])}));var a=es.newInstance(o);a.setOrigin(t.dataOrigin[0],t.dataOrigin[1],t.dataOrigin[2]),a.setSpacing(t.dataSpacing[0],t.dataSpacing[1],t.dataSpacing[2]),a.setExtent.apply(n,t.dataExtent),a.setDirection(t.dataDirection);var s=[0,0,0];s=s.map((function(e,n){return t.dataExtent[2*n+1]-t.dataExtent[2*n]+1}));for(var l=new Uint8Array(s[0]*s[1]*s[2]),u=0,c=0,d=0,p=0,f=t.dataExtent[4];f<=t.dataExtent[5];f++){d=t.gridSpacing[2]?f%t.gridSpacing[2]===t.gridOrigin[2]:0;for(var h=t.dataExtent[2];h<=t.dataExtent[3];h++){c=t.gridSpacing[1]?h%t.gridSpacing[1]===t.gridOrigin[1]:0;for(var m=t.dataExtent[0];m<=t.dataExtent[1];m++)u=t.gridSpacing[0]?m%t.gridSpacing[0]===t.gridOrigin[0]:0,l[p]=d||c||u?t.lineValue:t.fillValue,p++}}var g=Ln.newInstance({numberOfComponents:1,values:l});g.setName("scalars"),a.getPointData().setScalars(g),r[0]=a}}}var Cf={lineValue:0,fillValue:255,gridSpacing:[10,10,0],gridOrigin:[0,0,0],dataSpacing:[1,1,1],dataOrigin:[0,0,0],dataExtent:[0,255,0,255,0,0],dataDirection:[1,0,0,0,1,0,0,0,1]};function Af(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cf,n),de.obj(e,t),de.setGet(e,t,["lineValue","fillValue"]),de.setGetArray(e,t,["gridOrigin","gridSpacing","dataOrigin","dataSpacing"],3),de.setGetArray(e,t,["dataExtent"],6),de.setGetArray(e,t,["dataDirection"],9),de.algo(e,t,0,1),Sf(e,t)}var Pf={newInstance:de.newInstance(Af,"vtkImageGridSource"),extend:Af},_f=de.vtkWarningMacro;function Of(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],i=r?r.getPoints().getDataType():"Float32Array",o=ju.newInstance(),a=new Float32Array(3);if(qe(t.point2,t.point1,a),tt(a)<=0)_f("Zero-length line definition");else{var s=t.resolution,l=s+1,u=de.newTypedArray(i,3*l);o.getPoints().setData(u,3);var c=new Uint32Array(l+1);o.getLines().setData(c,1);for(var d=0,p=0,f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ef,n),de.obj(e,t),de.setGet(e,t,["resolution"]),de.setGetArray(e,t,["point1","point2"],3),de.algo(e,t,0,1),Of(e,t)}var Df={newInstance:de.newInstance(Tf,"vtkLineSource"),extend:Tf},If=de.vtkWarningMacro;function kf(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var i=r[0],o=i?i.getPoints().getDataType():"Float32Array",a=ju.newInstance(),s=new Float32Array(3),l=new Float32Array(3);if(qe(t.point1,t.origin,s),qe(t.point2,t.origin,l),e.updatePlane(s,l)){var u=t.xResolution,c=t.yResolution,d=(u+1)*(c+1),p=u*c,f=de.newTypedArray(o,3*d);a.getPoints().setData(f,3);var h=new Uint32Array(5*p);a.getPolys().setData(h,1);var m=new Float32Array(3*d),g=Ln.newInstance({numberOfComponents:3,values:m,name:"Normals"});a.getPointData().setNormals(g);var v=new Float32Array(2*d),y=Ln.newInstance({numberOfComponents:2,values:v,name:"TextureCoordinates"});a.getPointData().setTCoords(y);for(var b=new Float32Array(2),w=0,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mf,n),t.normal=[0,0,1],t.center=[0,0,0],de.obj(e,t),de.setGet(e,t,["xResolution","yResolution"]),de.setGetArray(e,t,["origin"],3),de.getArray(e,t,["point1","point2","normal","center"],3),de.algo(e,t,0,1),kf(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}var Rf={newInstance:de.newInstance(Nf,"vtkPlaneSource"),extend:Nf};function Ff(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],i=r?r.getPoints().getDataType():"Float32Array",o=ju.newInstance(),a=t.numberOfPoints,s=de.newTypedArray(i,3*a);o.getPoints().setData(s,3);var l,u,c,d,p,f=new Uint32Array(a+1);o.getVerts().setData(f,1);for(var h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bf,n),de.obj(e,t),de.setGet(e,t,["numberOfPoints","radius"]),de.setGetArray(e,t,["center"],3),de.algo(e,t,0,1),Ff(e,t)}var Vf={newInstance:de.newInstance(Lf,"vtkPointSource"),extend:Lf};function jf(e,t){var n=this;t.classHierarchy.push("vtkRTAnalyticSource"),e.requestData=function(e,r){if(!t.deleted){var i={},o={type:"vtkImageData",mtime:t.mtime,metadata:{source:"vtkRTAnalyticSource",state:i}};["standardDeviation","center","frequency","magnitude","maximum"].forEach((function(e){i[e]=[].concat(t[e])}));var a=es.newInstance(o);a.setSpacing(1,1,1),a.setExtent.apply(n,t.wholeExtent),a.setOrigin(0,0,0),a.setDirection(t.dataDirection);var s=[0,0,0];s=s.map((function(e,n){return t.wholeExtent[2*n+1]-t.wholeExtent[2*n]+1}));for(var l=new Uint8Array(s[0]*s[1]*s[2]),u=1/(2*t.standardDeviation*t.standardDeviation),c=0,d=0,p=0,f=[1/(t.wholeExtent[1]-t.wholeExtent[0]),1/(t.wholeExtent[3]-t.wholeExtent[2]),1/(t.wholeExtent[5]-t.wholeExtent[4])],h=0,m=t.wholeExtent[4];m<=t.wholeExtent[5];m++){p=(t.center[2]-m)*f[2];var g=t.magnitude[2]*Math.cos(t.frequency[2]*p);p*=p;for(var v=t.wholeExtent[2];v<=t.wholeExtent[3];v++){d=(t.center[1]-v)*f[1];var y=t.magnitude[1]*Math.sin(t.frequency[1]*d);d*=d;for(var b=t.wholeExtent[0];b<=t.wholeExtent[1];b++){var w=p+d+(c=(t.center[0]-b)*f[0])*c,x=t.magnitude[0]*Math.sin(t.frequency[0]*c);l[h]=t.maximum*Math.exp(-w*u)+x+y+g+t.offset,h++}}}var S=Ln.newInstance({numberOfComponents:1,values:l});S.setName("scalars"),a.getPointData().setScalars(S),r[0]=a}}}var Uf={offset:40,maximum:120,center:[0,0,0],frequency:[60,30,40],magnitude:[10,18,5],standardDeviation:.5,wholeExtent:[-10,10,-10,10,-10,10],dataDirection:[1,0,0,0,1,0,0,0,1]};function Gf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uf,n),de.obj(e,t),de.setGet(e,t,["offset","maximum","standardDeviation"]),de.setGetArray(e,t,["center","frequency","magnitude"],3),de.setGetArray(e,t,["wholeExtent"],6),de.setGetArray(e,t,["dataDirection"],9),de.algo(e,t,0,1),jf(e,t)}var zf={newInstance:de.newInstance(Gf,"vtkRTAnalyticSource"),extend:Gf};function Wf(e,t){t.classHierarchy.push("vtkSLICSource"),e.addCluster=function(n,r,i,o,a,s,l){var u=t.clusters.length;return t.clusters.push(new Float32Array([n,r,i,o,a,s,l])),e.modified(),u},e.removeCluster=function(n){t.clusters.splice(n,1),e.modified()},e.removeAllClusters=function(){t.clusters=[],e.modified()},e.updateCluster=function(n,r,i,o,a,s,l,u){t.clusters[n]||(t.clusters[n]=new Float32Array(7)),t.clusters[n][0]=r,t.clusters[n][1]=i,t.clusters[n][2]=o,t.clusters[n][3]=a,t.clusters[n][4]=s,t.clusters[n][5]=l,t.clusters[n][6]=u,e.modified()},e.getNumberOfClusters=function(){return t.clusters.length},e.requestData=function(e,n){if(!t.deleted){var r=t.dimensions[0]*t.dimensions[1]*t.dimensions[2],i=es.newInstance();i.setSpacing.apply(i,y(t.spacing)),i.setExtent(0,t.dimensions[0]-1,0,t.dimensions[1]-1,0,t.dimensions[2]-1),i.setOrigin.apply(i,y(t.origin));for(var o=function(e,t,n){for(var r=new Float32Array(t[0]*t[1]*t[2]*3),i=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hf,n),de.obj(e,t),de.setGet(e,t,["clusterArrayName","scalarArrayName"]),de.setGetArray(e,t,["origin","spacing","dimensions"],3),de.algo(e,t,0,1),Wf(e,t)}var qf={newInstance:de.newInstance(Kf,"vtkSLICSource"),extend:Kf};function Xf(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],i=r?r.getPoints().getDataType():"Float32Array";r=ju.newInstance();var o=0,a=t.thetaResolution,s=t.startThetat.startTheta?t.endTheta:t.startTheta;l*=Math.PI/180;var u=t.startPhit.startPhi?t.endPhi:t.startPhi;c*=Math.PI/180,Math.abs(s-l)<2*Math.PI&&++a;var d=(l-s)/t.thetaResolution,p=t.startPhi<=0?1:0,f=t.phiResolution+(t.endPhi>=180?-1:0),h=t.phiResolution*a+2,m=2*t.phiResolution*t.thetaResolution,g=0,v=de.newTypedArray(i,3*h),y=new Float32Array(3*h),b=0,w=new Uint32Array(5*m);t.startPhi<=0&&(v[3*g+0]=t.center[0],v[3*g+1]=t.center[1],v[3*g+2]=t.center[2]+t.radius,y[3*g+0]=0,y[3*g+1]=0,y[3*g+2]=1,g++,o++),t.endPhi>=180&&(v[3*g+0]=t.center[0],v[3*g+1]=t.center[1],v[3*g+2]=t.center[2]-t.radius,y[3*g+0]=0,y[3*g+1]=0,y[3*g+2]=-1,g++,o++);for(var x=t.phiResolution-o,S=(c-u)/(t.phiResolution-1),C=0;C=180)for(var I=x-1+o,k=0;k2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yf,n),de.obj(e,t),de.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),de.setGetArray(e,t,["center"],3),de.algo(e,t,0,1),Xf(e,t)}var Jf={newInstance:de.newInstance(Zf,"vtkSphereSource"),extend:Zf},Qf={vtkArrowSource:rf,vtkCircleSource:uf,vtkConcentricCylinderSource:ff,vtkConeSource:Yp,vtkCubeSource:vf,vtkCursor3D:xf,vtkCylinderSource:$p,vtkImageGridSource:Pf,vtkLineSource:Df,vtkPlaneSource:Rf,vtkPointSource:Vf,vtkRTAnalyticSource:zf,vtkSLICSource:qf,vtkSphereSource:Jf},$f=de.vtkErrorMacro;function eh(e,t){t.classHierarchy.push("vtkTextureMapToSphere"),e.requestData=function(e,n){if(!t.deleted){var r=e[0],i=r.getPoints().getNumberOfPoints();if(i<=1)$f("Can't generate texture coordinates without points");else{var o=Math.PI/2,a=[],s=r.getPoints();if(t.automaticSphereGeneration){t.center=[0,0,0];for(var l=0;lu?(d=0,p[1]=c>0?0:1):(d=Math.acos(c/u),p[1]=d/Math.PI)):p[1]=0,0!=(f=u*Math.sin(d))?(c=a[0]-t.center[0],h=Math.abs(c)>f?c>0?0:Math.PI:Math.acos(c/f),c=a[1]-t.center[1],m=Math.abs(c)>f?c>0?o:-o:Math.asin(c/f)):(h=0,m=0),t.preventSeam?p[0]=h/Math.PI:(p[0]=h/(2*Math.PI),m<0&&(p[0]=1-p[0])),g.push.apply(g,p);var y=Ln.newInstance({name:"Texture Coordinates",numberOfComponents:2,size:i,values:g}),b=ju.newInstance();b.getPoints().setData(new Float32Array(r.getPoints().getData()),3),b.getPolys().setData(new Uint32Array(r.getPolys().getData())),b.getPointData().setTCoords(y),n[0]=b}}}}var th={center:[0,0,0],automaticSphereGeneration:1,preventSeam:1};function nh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,th,n),de.obj(e,t),de.setGetArray(e,t,["center"]),de.setGet(e,t,["automaticSphereGeneration","preventSeam"]),de.algo(e,t,1,1),eh(e,t)}var rh={newInstance:de.newInstance(nh,"vtkTextureMapToSphere"),extend:nh},ih=de.vtkErrorMacro;function oh(e,t){t.classHierarchy.push("vtkTextureMapToPlane"),e.requestData=function(e,n){if(!t.deleted){var r=e[0],i=r.getPoints().getNumberOfPoints();if(i<3&&t.automaticPlaneGeneration)ih("Can't generate texture coordinates without points");else{var o=ju.newInstance();o.getPoints().setData(new Float32Array(r.getPoints().getData()),3),o.getPolys().setData(new Uint32Array(r.getPolys().getData()));var a=[],s=0,l=0,u=0,c=0,d=[0,0,0],p=0,f=[0,0,0],h=[0,0,0],m=0,g=0,v=0,y=0,b=[0,0,0];if(t.automaticPlaneGeneration&&0===t.origin[0]&&0===t.origin[1]&&0===t.origin[2]&&0===t.point1[0]&&0===t.point1[1]&&0===t.point2[0]&&0===t.point2[1]){for(t.automaticPlaneGeneration&&function(e){for(var n=e.getPoints().getNumberOfPoints(),r=0,i=[0,0,0,0,0,0,0,0,0],o=[0,0,0],a=[0,0,0],s=e.getBounds(),l=[s[0],s[2],s[4]],u=[s[1],s[3],s[5]],c=Math.sqrt(st(l,u)),d=c,p=0;p<3;p++)t.normal[p]=0,s[2*p+1]-s[2*p]2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ah,n),de.obj(e,t),de.setGetArray(e,t,["origin","point1","point2","normal","sRange","tRange"],3),de.setGet(e,t,["automaticPlaneGeneration"]),de.algo(e,t,1,1),oh(e,t)}var lh={Cornerstone:Cc,Core:Dc,General:Hp,Sources:Qf,Texture:{vtkTextureMapToPlane:{newInstance:de.newInstance(sh,"vtkTextureMapToPlane"),extend:sh},vtkTextureMapToSphere:rh}},uh={CLAMP:0,REPEAT:1,MIRROR:2},ch={NEAREST:0,LINEAR:1,CUBIC:2},dh={ImageBorderMode:uh,InterpolationMode:ch};function ph(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 fh(e){for(var t=1;t=0?r:0}function bh(e,t,n){var r=n-t+1,i=e-t;return(i%=r)>=0?i:i+r}function wh(e,t,n){var r=n-t,i=2*r+(0===r?1:0),o=e-t;return o=o>=0?o:-o,(o%=i)<=r?o:i-o}function xh(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 Sh(e){for(var t=1;t0?d:0)0?o:0;d=d0?r:e-n},e.getNumberOfComponents=function(){return t.interpolationInfo.numberOfComponents},e.interpolateIJK=function(n,r){e.interpolatePoint(t.interpolationInfo,n,r)},e.checkBoundsIJK=function(e){return!(e[0]t.structuredBounds[1]||e[1]t.structuredBounds[3]||e[2]t.structuredBounds[5])},e.computeSupportSize=null,e.isSeparable=null,e.precomputeWeightsForExtent=function(e,t,n){},e.FreePrecomputedWeights=function(e){},e.interpolatePoint=function(e,t,n){},e.interpolateRow=function(e,t,n,r,i,o){}}var Ph={outValue:0,tolerance:Number.EPSILON,componentOffset:0,componentCount:-1,borderMode:Ch.CLAMP,slidingWindow:!1,scalars:null,interpolationInfo:Sh({},hh),interpolationFunc:null,rowInterpolationFunc:null,structuredBounds:[0,-1,0,-1,0,-1],spacing:null,origin:null,extent:null};function _h(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ph,n),de.obj(e,t),de.setGet(e,t,["outValue","tolerance","componentOffset","componentCount","borderMode","slidingWindow"]),de.get(e,t,["origin","spacing"]),Ah(e,t)}var Oh=Sh({newInstance:de.newInstance(_h,"vtkAbstractImageInterpolator"),extend:_h},dh);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 Th(e){for(var t=1;t1)if(a===ch.LINEAR)v[h*x+1-y]=O[1]*T,b[h*x-y]=1-P,b[h*x+1-y]=P;else if(a===ch.CUBIC){var D=e.vtkTricubicInterpWeights(P);if(4===h)for(var I=0;I<4;I++)v[h*x+I-y]=O[I]*T,b[h*x+I-y]=D[I];else{for(var k=[0,0,0,0],M=0;M<4;M++)k[O[M]-c]+=D[M];for(var N=0;N=p&&S<=f?0===w&&(w=1,i[2*l]=x):1===w&&(w=2,i[2*l+1]=x-1)}(0===w||i[2*l]>i[2*l+1])&&(s=!1)}if(!s)for(var R=0;R<3;R++)i[2*R]=r[2*R],i[2*R+1]=r[2*R]-1}}var Ih={interpolationMode:ch.NEAREST};function kh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ih,n),Oh.extend(e,t,n),de.setGet(e,t,["interpolationMode"]),Dh(e,t)}var Mh={newInstance:de.newInstance(kh,"vtkImageInterpolator"),extend:kh};function Nh(e,t){t.classHierarchy.push("vtkImagePointDataIterator"),e.initialize=function(e,n,r,i){var o=e.getExtent(),a=n;null==a&&(a=o);for(var s,l,u,c=!1,d=0;d<6;d+=2)t.extent[d]=Math.max(a[d],o[d]),t.extent[d+1]=Math.min(a[d+1],o[d+1]),t.extent[d]>t.extent[d+1]&&(c=!0);if(t.rowIncrement=o[1]-o[0]+1,t.sliceIncrement=t.rowIncrement*(o[3]-o[2]+1),c){s=0,l=0,u=0,t.id=0,t.rowEndIncrement=0,t.sliceEndIncrement=0;for(var p=0;p<6;p+=2)t.extent[p]=o[p],t.extent[p+1]=o[p]-1}else s=t.extent[1]-t.extent[0]+1,l=t.extent[3]-t.extent[2]+1,u=t.extent[5]-t.extent[4]+1,t.id=t.extent[0]-o[0]+(t.extent[2]-o[2])*t.rowIncrement+(t.extent[4]-o[4])*t.sliceIncrement,t.rowEndIncrement=t.rowIncrement-s,t.sliceEndIncrement=t.rowEndIncrement+t.sliceIncrement-t.rowIncrement*l;if(t.spanEnd=t.id+s,t.rowEnd=t.id+s,t.sliceEnd=t.id+(t.rowIncrement*l-t.rowEndIncrement),t.end=t.id+(t.sliceIncrement*u-t.sliceEndIncrement),t.index[0]=t.extent[0],t.index[1]=t.extent[2],t.index[2]=t.extent[4],t.startY=t.index[1],r){t.hasStencil=!0,t.inStencil=!1,t.spanIndex=0;var f=r.getExtent();if(t.spanSliceIncrement=0,t.spanSliceEndIncrement=0,f[3]>=f[2]&&f[5]>=f[4]){t.spanSliceIncrement=f[3]-f[2]+1;var h=t.extent[2]-f[2];h>=0&&(t.spanSliceEndIncrement+=h);var m=f[3]-t.extent[3];m>=0&&(t.spanSliceEndIncrement+=m)}var g=0,v=t.extent[2]-f[2];v<0?(t.extent[2]=f[2],g-=1):g+=v,f[3]<=t.extent[3]&&(t.extent[3]=f[3]);var y=t.extent[4]-f[4];y<0?(t.extent[4]=f[4],v>=0&&(g-=1+t.spanSliceEndIncrement)):g+=y*t.spanSliceIncrement,f[5]<=t.extent[5]&&(t.extent[5]=f[5]),t.extent[2]<=t.extent[3]&&t.extent[4]<=t.extent[5]?(t.spanCountPointer=r.extentListLengths.subarray(g),t.spanListPointer=r.extentLists.subarray(g),v>=0&&y>=0&&(t.inStencil=!0,t.setSpanState(t.extent[0]))):(t.spanCountPointer=null,t.spanListPointer=null,t.inStencil=!1)}else t.hasStencil=!1,t.inStencil=!0,t.spanSliceEndIncrement=0,t.spanSliceIncrement=0,t.spanIndex=0,t.spanCountPointer=null,t.spanListPointer=null;if(i){t.algorithm=i;var b=l*u;t.target=b/50+1,t.count=50*t.target-b/t.target*t.target+1}else t.algorithm=null,t.target=0,t.count=0},e.setSpanState=function(e){var n,r=!1,i=t.spanListPointer,o=t.spanCountPointer[0];for(n=0;ne);++n)r=!r;t.spanIndex=n,t.inStencil=r;var a=t.extent[1]+1;n=t.extent[2]&&t.index[1]<=t.extent[3]&&t.index[2]>=t.extent[4]&&t.index[2]<=t.extent[5]?(t.spanCountPointer=t.spanCountPointer.subarray(n),t.spanListPointer=t.spanListPointer.subarray(n),e.setSpanState(t.extent[0])):t.inStencil=!1),t.algorithm&&e.reportProgress()}else{t.id=t.spanEnd;var r=t.spanCountPointer[0],i=t.extent[1]+1;if(t.index[0]=i,t.spanIndex1&&void 0!==arguments[1]?arguments[1]:0;return e.getArray(t.getPointData().getScalars(),n)}}var Rh={spanState:0,extent:[0,-1,0,-1,0,-1],end:0,spanEnd:0,rowEnd:0,sliceEnd:0,rowIncrement:0,rowEndIncrement:0,sliceIncrement:0,sliceEndIncrement:0,id:0,index:[0,0,0],startY:0,hasStencil:!1,inStencil:!0,spanIndex:0,spanSliceIncrement:0,spanSliceEndIncrement:0,spanCountPointer:null,spanListPointer:null,algorithm:null,target:0,count:0};function Fh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rh,n),de.obj(e,t),de.get(e,t,["id","index"]),Nh(e,t)}var Bh,Lh={newInstance:de.newInstance(Fh,"vtkImagePointDataIterator"),extend:Fh};function Vh(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}Bh=new Pi(4),Pi!=Float32Array&&(Bh[0]=0,Bh[1]=0,Bh[2]=0,Bh[3]=0);var jh={SlabMode:{MIN:0,MAX:1,MEAN:2,SUM:3}};function Uh(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 Gh=jh.SlabMode,zh=de.capitalize,Wh=de.vtkErrorMacro;function Hh(e,t){t.classHierarchy.push("vtkImageReslice");var n=null,r=null;function i(e,t,n,r){for(var i=n-1,o=0;o=t.outputDimensionality?(m[2*w]=0,m[2*w+1]=0):null==t.outputExtent?(t.autoCropOutput&&(S=b[2*w+1]-b[2*w]),m[2*w]=Math.round(C),m[2*w+1]=Math.round(m[2*w]+Math.abs(S/h[w]))):(m[2*w]=t.outputExtent[2*w],m[2*w+1]=t.outputExtent[2*w+1]),w>=t.outputDimensionality?f[w]=0:null==t.outputOrigin?t.autoCropOutput?f[w]=b[2*w]-m[2*w]*h[w]:f[w]=A-.5*(m[2*w]+m[2*w+1])*h[w]:f[w]=t.outputOrigin[w],g[w]=m[2*w+1]-m[2*w]+1}var E=d.getDataType();t.outputScalarType&&(E=t.outputScalarType);var T=a.getPointData().getScalars().getNumberOfComponents(),D=de.newTypedArray(E,g[0]*g[1]*g[2]*T),I=Ln.newInstance({name:"Scalars",values:D,numberOfComponents:T}),k=es.newInstance();k.setDimensions(g),k.setOrigin(f),k.setSpacing(h),k.getPointData().setScalars(I),e.getIndexMatrix(a,k);var M=t.interpolationMode;t.usePermuteExecute=!1,t.optimization&&null==r&&1===t.slabSliceSpacingFraction&&t.interpolator.isSeparable()&&e.isPermutationMatrix(n)&&(t.usePermuteExecute=!0,e.canUseNearestNeighbor(n,m)&&(M=ch.NEAREST)),t.interpolator.setInterpolationMode(M);var N=uh.CLAMP;N=t.wrap?uh.REPEAT:N,N=t.mirror?uh.MIRROR:N,t.interpolator.setBorderMode(N);var R=762939453125e-17,F=.5*t.border;F=(F=N===uh.CLAMP?F:4294967294)>R?F:R,t.interpolator.setTolerance(F),t.interpolator.initialize(a),e.vtkImageResliceExecute(a,k),t.interpolator.releaseData(),o[0]=k}else Wh("Invalid or missing input")},e.vtkImageResliceExecute=function(i,o){var a=i.getPointData().getScalars(),s=o.getPointData().getScalars(),l=s.getData(),u=o.getExtent(),c=n,d=Math.max(t.slabNumberOfSlices,1),p=t.slabSliceSpacingFraction,f=e.isPerspectiveMatrix(c),h=a.getData(),m=a.getDataType(),g=a.getNumberOfComponents(),v=t.interpolator.getComponentOffset(),y=t.interpolator.getBorderMode(),b=i.getDimensions(),w=[0,b[0]-1,0,b[1]-1,0,b[2]-1],x=[0,0,0];x[0]=a.getNumberOfComponents(),x[1]=x[0]*b[0],x[2]=x[1]*b[1];var S=b[0]*b[1]*b[2];v>0&&v+gch.LINEAR||d>1&&t.slabMode===Gh.SUM,V=e.getConversionFunc(m,_,t.scalarShift,t.scalarScale,L),j=e.getSetPixelsFunc(_,1,O,l),U=e.getCompositeFunc(t.slabMode,t.slabTrapezoidIntegration),G=u[2]-1,z=u[4]-1,W=[0,0,0,0],H=[0,0,0,0],K=Lh.newInstance();K.initialize(o,u,t.stencil,null);for(var q=K.getScalars(o,0),X=0,Y=de.newTypedArray(_,Xr.getDiagonalLength(u)*O*2),Z=new Float64Array(g*d),J=new Float64Array(g);!K.isAtEnd();K.nextSpan()){var Q=K.spanEndId()-K.getId();if(X=1*K.getId()*O,K.isInStencil()){var $=K.getIndex();$[2]>z&&(z=$[2],W[0]=I[0]+z*D[0],W[1]=I[1]+z*D[1],W[2]=I[2]+z*D[2],W[3]=I[3]+z*D[3],G=u[2]-1),$[1]>G&&(G=$[1],H[0]=W[0]+G*T[0],H[1]=W[1]+G*T[1],H[2]=W[2]+G*T[2],H[3]=W[3]+G*T[3]);var ee=$[0],te=ee+Q-1;if(P){for(var ne=h,re=l,ie=1*x[0],oe=1*x[1],ae=1*x[2],se=w[1]-w[0]+1,le=w[3]-w[2]+1,ue=w[5]-w[4]+1,ce=ee-1,pe=!1,fe=1*g,he=ee;he<=te;he++){var me=[H[0]+he*E[0],H[1]+he*E[1],H[2]+he*E[2]],ge=vh(me[0])-w[0],ve=vh(me[1])-w[2],ye=vh(me[2])-w[4];if(ge>=0&&ge=0&&ve=0&&ye1){var Be=Fe-.5*(d-1);Be*=p,Me[0]=ke[0]+Be*D[0],Me[1]=ke[1]+Be*D[1],Me[2]=ke[2]+Be*D[2],Me[3]=ke[3]+Be*D[3],Ne=Me}if(f){var Le=1/Ne[3];Ne[0]*=Le,Ne[1]*=Le,Ne[2]*=Le}if(null!==r&&e.applyTransform(r,Ne,M,R),t.interpolator.checkBoundsIJK(Ne)){Oe=1,t.interpolator.interpolateIJK(Ne,J);for(var Ve=0;Veg&&U(Z,g,Re/g);for(var je=0;jeee?_e:Oe}var Ue=Te-1-(Oe!==_e)-Ee+1,Ge=0;_e?(A&&e.rescaleScalars(F,g,te-ee+1,t.scalarShift,t.scalarScale),Ge=V(Y,F.subarray(Ee*g),O,Ue)):Ge=j(Y,B,O,Ue);for(var ze=0;zes[2*d+1]&&(s[2*d+1]=l[d]),l[d]u){var f=u;u=l,l=f}a=lp}if(a&&n!==fe.FLOAT&&n!==fe.DOUBLE){var h=e.getDataTypeMinMax(n);return function(t,n,r,i){return e.clamp(t,n,r,i,h.min,h.max)}}return e.convert},e.set=function(e,t,n,r){for(var i=n*r,o=0;o=3)return 0;var i=e[4*r+n],o=e[12+n];t[2*r]===t[2*r+1]&&(o+=i*t[2*n],i=0);var a=gh(i).error,s=gh(o).error;if(0!==a||0!==s)return 0}return 1}}function Kh(e,t,n){n.forEach((function(n){var r="set".concat(zh(n)),i=e[r];e[r]=function(){return 1===arguments.length&&null==(arguments.length<=0?void 0:arguments[0])||null==t[n]?(arguments.length<=0?void 0:arguments[0])!==t[n]?(t[n]=arguments.length<=0?void 0:arguments[0],e.modified(),!0):null:i.apply(void 0,arguments)}}))}var qh={transformInputSampling:!0,autoCropOutput:!1,outputDimensionality:3,outputSpacing:null,outputOrigin:null,outputExtent:null,outputScalarType:null,wrap:!1,mirror:!1,border:!0,interpolationMode:ch.NEAREST,slabMode:Gh.MIN,slabTrapezoidIntegration:!1,slabNumberOfSlices:1,slabSliceSpacingFraction:1,optimization:!1,scalarShift:0,scalarScale:1,backgroundColor:[0,0,0,0],resliceAxes:null,resliceTransform:null,interpolator:Mh.newInstance(),usePermuteExecute:!1};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qh,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["outputDimensionality","outputScalarType","scalarShift","scalarScale","transformInputSampling","autoCropOutput","wrap","mirror","border","backgroundColor","slabMode","slabTrapezoidIntegration","slabNumberOfSlices","slabSliceSpacingFraction"]),de.setGetArray(e,t,["outputOrigin","outputSpacing"],3),de.setGetArray(e,t,["outputExtent"],6),Kh(e,t,["outputOrigin","outputSpacing","outputExtent"]),de.get(e,t,["resliceAxes"]),de.algo(e,t,1,1),Hh(e,t)}var Yh=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,em,n),de.obj(e,t),de.algo(e,t,1,1),de.setGetArray(e,t,["sampleDimensions"],3),de.setGetArray(e,t,["modelBounds"],6),$h(e,t)}var nm={Core:Zh,Hybrid:{vtkSampleFunction:{newInstance:de.newInstance(tm,"vtkSampleFunction"),extend:tm}}};function rm(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 im={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]},om={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,im,n),de.setGet(e,t,["rotationFactor"]),de.setGetArray(e,t,["displayCenter"],2),de.setGetArray(e,t,["center"],3),rm(e,t)}};function am(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 sm={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0},lm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sm,n),de.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),de.setGet(e,t,["interactorStyle"]),am(e,t)}};function um(e,t){t.classHierarchy.push("vtkCompositeKeyboardManipulator"),e.onKeyPress=function(e,t,n){},e.onKeyDown=function(e,t,n){},e.onKeyUp=function(e,t,n){}}var cm={},dm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cm,n),um(e,t)}};function pm(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 fm={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1},hm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fm,n),de.setGet(e,t,["button","shift","control","alt"]),de.set(e,t,["dragEnabled","scrollEnabled"]),pm(e,t)}},mm={Unknown:0,LeftController:1,RightController:2},gm={Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4},vm={Device:mm,Input:gm};function ym(e,t){t.classHierarchy.push("vtkCompositeVRManipulator"),e.onButton3D=function(e,t,n,r,i,o){},e.onMove3D=function(e,t,n,r,i,o){}}var bm={},wm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bm,n),de.setGet(e,t,["device","input"]),ym(e,t)},Device:mm,Input:gm};function xm(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 Sm(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,a=n?"addEventListener":"removeEventListener",s=n?"removeEventListener":"addEventListener";!i&&!n&&r>0&&--r,r&&!i||(r=0,t.container&&t.container[s]("mousemove",e.handleMouseMove),o[a]("mouseup",e.handleMouseUp),o[a]("mousemove",e.handleMouseMove),o[a]("touchend",e.handleTouchEnd,!1),o[a]("touchcancel",e.handleTouchEnd,!1),o[a]("touchmove",e.handleTouchMove,!1)),!i&&n&&++r}function c(){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){_m("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 Pm("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||i(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Im),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.addEventListener("keypress",e.handleKeyPress),document.addEventListener("keydown",e.handleKeyDown),document.addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){u(!1,!0),t.container.removeEventListener("contextmenu",Im),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.removeEventListener("keypress",e.handleKeyPress),document.removeEventListener("keydown",e.handleKeyDown),document.removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=l(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=l(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=l(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){u(!0),Im(t);var n=Sm(Sm({},s(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:_m("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)?Pm("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())):_m("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var i=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(!i){var o=r&&r.getClassName?r.getClassName():r;Pm("".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(),i=0;i1){var r=a(n.touches);if(2===n.touches.length){var i={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(i)}e.recognizeGesture("TouchStart",r)}else{var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}},e.handleTouchMove=function(n){if(Im(n),t.recognizeGestures&&n.touches.length>1){var r=a(n.touches);e.recognizeGesture("TouchMove",r)}else{var i={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(i)}},e.handleTouchEnd=function(n){if(Im(n),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),u(!1)}else{var i=a(n.changedTouches);e.recognizeGesture("TouchEnd",i),u(!1)}else if(1===n.touches.length){var s=a(n.changedTouches);e.recognizeGesture("TouchEnd",s);var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}else{var c=a(n.touches);e.recognizeGesture("TouchMove",c)}else{var d={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(d),u(!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 i=null,o=null,a=null,s=r.length;s--;){var l=r[s];if(t.view.isInViewport(e,n,l)&&l.getInteractive()){a=l;break}null===i&&l.getInteractive()&&(i=l),null===o&&t.view.isInViewport(e,n,l)&&(o=l)}return null===a&&(a=i),null===a&&(a=o),null==a&&(a=r[0]),a},e.render=function(){null!==t.animationRequest||t.inRender||c()},Dm.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 i=Sm({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](i)}else Em("\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 i=0,o=[],a=[];Object.keys(r).forEach((function(e){o[i]=r[e],a[i]=t.startingEventPositions[e],i++}));var s=Math.sqrt((a[0].x-a[1].x)*(a[0].x-a[1].x)+(a[0].y-a[1].y)*(a[0].y-a[1].y)),l=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)),u=_e(Math.atan2(a[1].y-a[0].y,a[1].x-a[0].x)),c=_e(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),d=c-u;c=c+180>=360?c-180:c+180,u=u+180>=360?u-180:u+180,Math.abs(c-u)f&&h>m&&h>g){t.currentGesture="Pinch";var v={scale:1,touches:r};e.startPinchEvent(v)}else if(m>f&&m>g){t.currentGesture="Rotate";var y={rotation:0,touches:r};e.startRotateEvent(y)}else if(g>f){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var w={rotation:d,touches:r};e.rotateEvent(w)}if("Pinch"===t.currentGesture){var x={scale:l/s,touches:r};e.pinchEvent(x)}if("Pan"===t.currentGesture){var S={translation:p,touches:r};e.panEvent(S)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()},e.setCurrentRenderer=function(e){t._forcedRenderer=!!e,t.currentRenderer=e};var d=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),d()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Mm={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 Nm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mm,n),de.obj(e,t),de.event(e,t,"RenderEvent"),Dm.forEach((function(n){return de.event(e,t,n)})),de.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),de.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),km(e,t)}var Rm=Sm({newInstance:de.newInstance(Nm,"vtkRenderWindowInteractor"),extend:Nm,handledEvents:Dm},vm);function Fm(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 Bm(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Um,n),de.obj(e,t),de.event(e,t,"InteractionEvent"),de.event(e,t,"StartInteractionEvent"),de.event(e,t,"EndInteractionEvent"),de.get(e,t,["interactor","enabled"]),de.setGet(e,t,["priority","processEvents"]),jm(e,t)}var zm=Bm({newInstance:de.newInstance(Gm,"vtkInteractorObserver"),extend:Gm},{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)}}),Wm={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},Hm={States:Wm};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 qm=Hm.States,Xm={Rotate:qm.IS_ROTATE,Pan:qm.IS_PAN,Spin:qm.IS_SPIN,Dolly:qm.IS_DOLLY,CameraPose:qm.IS_CAMERA_POSE,WindowLevel:qm.IS_WINDOW_LEVEL,Slice:qm.IS_SLICE};function Ym(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(Xm).forEach((function(n){de.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===qm.IS_NONE&&(t.state=Xm[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},de.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===Xm[n]&&(t.state=qm.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 Zm={state:qm.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function Jm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zm,n),zm.extend(e,t,n),Ym(e,t)}var Qm=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lg,n),Qm.extend(e,t,n),de.setGet(e,t,["rotationFactor"]),de.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),de.setGetArray(e,t,["centerOfRotation"],3),sg(e,t)}var cg=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pg,n),de.obj(e,t),lm.extend(e,t,n),om.extend(e,t,n),dg(e,t)}var hg={newInstance:de.newInstance(fg,"vtkGestureCameraManipulator"),extend:fg},mg=de.vtkErrorMacro,gg="vtkKeyboardCameraManipulator";function vg(e,t){t.classHierarchy.push("vtkKeyboardCameraManipulator");var n={keysDown:[],direction:[0,0,0],skipUpdateDirection:!1,animationSub:null,cameraModifiedSub:null};e.inMotion=function(){return null!==n.animationSub},e.resetMovementSpeed=function(){var e=t.renderer.computeVisiblePropBounds();t.movementSpeed=Xr.getMaxLength(e)/500},e.startMovement=function(){if(e.inMotion())mg("Camera is already in motion!");else{null===t.movementSpeed&&e.resetMovementSpeed();var r=t.interactor,i=t.renderer;e.calculateCurrentDirection();var o=i.getActiveCamera();n.cameraModifiedSub=o.onModified(e.calculateCurrentDirection),r.requestAnimation(gg),n.animationSub=r.onAnimation((function(){0!==n.keysDown.length&&(n.skipUpdateDirection=!0,e.moveCamera(i.getActiveCamera(),n.direction,t.movementSpeed),i.resetCameraClippingRange(),r.getLightFollowCamera()&&i.updateLightsGeometryToFollowCamera(),n.skipUpdateDirection=!1)}))}},e.endMovement=function(){n.animationSub&&(n.animationSub.unsubscribe(),n.animationSub=null),t.interactor.cancelAnimation(gg),n.cameraModifiedSub&&(n.cameraModifiedSub.unsubscribe(),n.cameraModifiedSub=null)},e.calculateCurrentDirection=function(){if(!n.skipUpdateDirection){n.direction=[0,0,0];var r=t.renderer;if(r){var i=r.getActiveCamera();if(i&&0!==n.keysDown.length){var o=n.keysDown.map((function(t){return e.getDirectionFromKey(t,i)}));if(0!==(o=o.filter((function(e){return e}))).length){var a=o.reduce((function(e,t){return Ke(e,t,t),t}));nt(a),n.direction=a}}}}},e.getDirectionFromKey=function(e,n){var r;if(t.moveForwardKeys.includes(e))r=n.getDirectionOfProjection();else if(t.moveLeftKeys.includes(e)){var i=n.getDirectionOfProjection();r=[0,0,0],et(n.getViewUp(),i,r)}else if(t.moveBackwardKeys.includes(e))r=n.getDirectionOfProjection().map((function(e){return-e}));else if(t.moveRightKeys.includes(e))r=[0,0,0],et(n.getDirectionOfProjection(),n.getViewUp(),r);else if(t.moveUpKeys.includes(e))r=n.getViewUp();else{if(!t.moveDownKeys.includes(e))return;r=n.getViewUp().map((function(e){return-e}))}return nt(r),r},e.moveCamera=function(e,t,n){var r=e.getPosition(),i=e.getFocalPoint();e.setFocalPoint(i[0]+t[0]*n,i[1]+t[1]*n,i[2]+t[2]*n),e.setPosition(r[0]+t[0]*n,r[1]+t[1]*n,r[2]+t[2]*n)},e.onKeyPress=function(e,t,n){},e.onKeyDown=function(r,i,o){n.keysDown.includes(o)||(n.keysDown.push(o),e.calculateCurrentDirection()),e.inMotion()||(Object.assign(t,{interactor:r,renderer:i}),e.startMovement())},e.onKeyUp=function(t,r,i){n.keysDown=n.keysDown.filter((function(e){return e.toUpperCase()!==i.toUpperCase()})),e.calculateCurrentDirection(),0===n.keysDown.length&&e.endMovement()}}var yg={movementSpeed:null,moveForwardKeys:["w","W","ArrowUp"],moveLeftKeys:["a","A","ArrowLeft"],moveBackwardKeys:["s","S","ArrowDown"],moveRightKeys:["d","D","ArrowRight"],moveUpKeys:[" "],moveDownKeys:["Shift"],interactor:null,renderer:null};function bg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yg,n),de.obj(e,t),dm.extend(e,t,n),de.setGet(e,t,["movementSpeed","moveForwardKeys","moveLeftKeys","moveBackwardKeys","moveRightKeys","moveUpKeys","moveDownKeys","interactor","renderer"]),vg(e,t)}var wg={newInstance:de.newInstance(bg,"vtkKeyboardCameraManipulator"),extend:bg};function xg(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 Sg(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_g(n)),W(e,t),hm.extend(e,t,n),te(e,t,"BoxSelectChange"),te(e,t,"BoxSelectInput"),Y(e,t,["renderSelection","selectionStyle"]),Pg(e,t)}var Eg={newInstance:ne(Og,"vtkMouseBoxSelectionManipulator"),extend:Og};function Tg(e,t){t.classHierarchy.push("vtkMouseCameraAxisRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(16),o=new Float64Array(3),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,u,c){if(c){var d=u.getActiveCamera(),p=d.getPosition(),f=d.getFocalPoint(),h=d.getViewUp(),m=d.getDirectionOfProjection();Do(i);var g=t.center,v=t.rotationFactor,b=t.rotationAxis;Fo(i,i,g);var w=t.previousPosition.x-c.x,x=t.previousPosition.y-c.y,S=e.getView().getSize();if(Lo(i,i,Pe(360*w/S[0]*v),b),et(m,h,o),Lo(i,i,Pe(-360*x/S[1]*v),o),a[0]=-g[0],a[1]=-g[1],a[2]=-g[2],Fo(i,i,a),io(n,p,i),io(r,f,i),Fi(l,n,r),Ji(l,l),Math.abs(Qi(l,b))>.95)t.previousPosition=c;else{if(t.useHalfAxis){var C=Ki(n,g);Fi(s,n,g),Ji(s,s);var A=Qi(b,s);if(A<0){Hi(n,n,b,-A*C),Fi(s,n,g),Ji(s,s),Hi(n,g,s,C),Fi(o,p,g),Ji(o,o);var P=Math.min(1,Math.max(-1,Qi(s,o))),_=Math.acos(P);$i(o,o,s),Ji(o,o),Fi(r,f,g);var O=Ii(r),E=y(r);Es.buildFromRadian().rotate(_,o).apply(E),Hi(r,g,E,O)}}d.setPosition(n[0],n[1],n[2]),d.setFocalPoint(r[0],r[1],r[2]),d.setViewUp(b),u.resetCameraClippingRange(),e.getLightFollowCamera()&&u.updateLightsGeometryToFollowCamera(),t.previousPosition=c}}}}var Dg={rotationAxis:[0,0,1],useHalfAxis:!0};function Ig(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dg,n),de.obj(e,t),de.setGet(e,t,["rotationAxis","useHalfAxis"]),hm.extend(e,t,n),om.extend(e,t,n),Tg(e,t)}var kg={newInstance:de.newInstance(Ig,"vtkMouseCameraAxisRotateManipulator"),extend:Ig};function Mg(e,t){t.classHierarchy.push("vtkMouseCameraSliceManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var i=r.y-t.previousPosition.y,o=n.getActiveCamera(),a=o.getClippingRange(),s=o.getDistance(),l=0;if(o.getParallelProjection())l=o.getParallelScale();else{var u=Pe(o.getViewAngle());l=2*s*Math.tan(.5*u)}(s+=i*l/e.getView().getViewportSize(n)[1])a[1]&&(s=a[1]-.001*l),o.setDistance(s),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=1-n;r*=25;var i=t.getActiveCamera(),o=i.getClippingRange(),a=i.getDistance();(a+=r)o[1]&&(a=o[1]),i.setDistance(a)}}}var Ng={};function Rg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ng,n),de.obj(e,t),om.extend(e,t,n),hm.extend(e,t,n),Mg(e,t)}var Fg={newInstance:de.newInstance(Rg,"vtkMouseCameraSliceManipulator"),extend:Rg};function Bg(){var e=new Pi(4);return Pi!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Lg(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Vg(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=r*c+a*s+i*u-o*l,e[1]=i*c+a*l+o*s-r*u,e[2]=o*c+a*u+r*l-i*s,e[3]=a*c-r*s-i*l-o*u,e}var jg=function(e,t,n,r){var i=new Pi(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i};function Ug(e){return function(){return de.vtkErrorMacro("vtkProp::".concat(e," - NOT IMPLEMENTED"))}}function Gg(e,t){t.classHierarchy.push("vtkProp"),e.getMTime=function(){for(var e=t.mtime,n=0;ne&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=Ug("pick"),e.hasKey=Ug("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()}}Ti(),ki(1,0,0),ki(0,1,0),Bg(),Bg(),ya();var zg={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function Wg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zg,n),de.obj(e,t),de.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),de.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier"]),Gg(e,t)}var Hg={newInstance:de.newInstance(Wg,"vtkProp"),extend:Wg};function Kg(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=Bg();Qo(e,t.rotation);var n=new Float64Array(3);return[_e(function(e,t){var n=2*Math.acos(t[3]),r=Math.sin(n/2);return r>Ai?(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)),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Vo(t.rotation,t.rotation,Pe(n)),e.modified())},e.rotateY=function(n){0!==n&&(jo(t.rotation,t.rotation,Pe(n)),e.modified())},e.rotateZ=function(n){0!==n&&(Uo(t.rotation,t.rotation,Pe(n)),e.modified())},e.rotateWXYZ=function(n,r,i,o){if(0!==n&&(0!==r||0!==i||0!==o)){var a=Pe(n),s=Bg();Lg(s,[r,i,o],a);var l=new Float64Array(16);ta(l,s),Ro(t.rotation,t.rotation,l),e.modified()}},e.setOrientation=function(n,r,i){return(n!==t.orientation[0]||r!==t.orientation[1]||i!==t.orientation[2])&&(t.orientation=[n,r,i],Do(t.rotation),e.rotateZ(i),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){Oo(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){Do(t.matrix),t.userMatrix&&Ro(t.matrix,t.matrix,t.userMatrix),Fo(t.matrix,t.matrix,t.origin),Fo(t.matrix,t.matrix,t.position),Ro(t.matrix,t.matrix,t.rotation),Bo(t.matrix,t.matrix,t.scale),Fo(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Io(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 Xr.getCenter(t.bounds)},e.getLength=function(){return Xr.getLength(t.bounds)},e.getXRange=function(){return Xr.getXRange(t.bounds)},e.getYRange=function(){return Xr.getYRange(t.bounds)},e.getZRange=function(){return Xr.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var qg={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 Xg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qg,n),Hg.extend(e,t,n),t.matrixMTime={},de.obj(t.matrixMTime),de.get(e,t,["bounds","isIdentity"]),de.getArray(e,t,["orientation"]),de.setGetArray(e,t,["origin","position","scale"],3),t.matrix=Do(new Float64Array(16)),t.rotation=Do(new Float64Array(16)),t.userMatrix=Do(new Float64Array(16)),t.transform=null,Kg(e,t)}var Yg={newInstance:de.newInstance(Xg,"vtkProp3D"),extend:Xg},Zg={FLAT:0,GOURAUD:1,PHONG:2},Jg={POINTS:0,WIREFRAME:1,SURFACE:2},Qg={Shading:Zg,Representation:Jg,Interpolation:Zg};function $g(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 ev=Qg.Representation,tv=Qg.Interpolation;function nv(e){return function(){return de.vtkErrorMacro("vtkProperty::".concat(e," - NOT IMPLEMENTED"))}}function rv(e,t){t.classHierarchy.push("vtkProperty"),e.setColor=function(n,r,i){Array.isArray(n)?t.color[0]===n[0]&&t.color[1]===n[1]&&t.color[2]===n[2]||(t.color[0]=n[0],t.color[1]=n[1],t.color[2]=n[2],e.modified()):t.color[0]===n&&t.color[1]===r&&t.color[2]===i||(t.color[0]=n,t.color[1]=r,t.color[2]=i,e.modified()),e.setDiffuseColor(t.color),e.setAmbientColor(t.color),e.setSpecularColor(t.color)},e.computeCompositeColor=nv("ComputeCompositeColor"),e.getColor=function(){var e=0;t.ambient+t.diffuse+t.specular>0&&(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=nv("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(tv.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(tv.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(tv.PHONG)},e.getInterpolationAsString=function(){return de.enumToString(tv,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(ev.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(ev.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(ev.POINTS)},e.getRepresentationAsString=function(){return de.enumToString(ev,t.representation)}}var iv={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:tv.GOURAUD,representation:ev.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function ov(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iv,n),de.obj(e,t),de.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),de.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),rv(e,t)}var av=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=av.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()){lv("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];Xr.getCorners(n,r),e.computeMatrix();var i=new Float64Array(16);Io(i,t.matrix),r.forEach((function(e){return io(e,e,i)})),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 i=t.backfaceProperty.getMTime();e=i>e?i: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 cv={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function dv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cv,n),Yg.extend(e,t,n),t.boundsMTime={},de.obj(t.boundsMTime),de.set(e,t,["property"]),de.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),uv(e,t)}var pv={newInstance:de.newInstance(dv,"vtkActor"),extend:dv};function fv(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,hv,n),de.obj(e,t),de.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),fv(e,t)}};function gv(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 i=0;i<3;i++)r+=(n=t.bounds[2*i+1]-t.bounds[2*i])*n;return Math.sqrt(r)},e.getClippingPlaneInDataCoords=function(e,n,r){var i=t.clippingPlanes,o=e;if(i){var a=i.length;if(n>=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vv,n),mv.extend(e,t,n),t.bounds||en(t.bounds),t.center||(t.center=[0,0,0]),gv(e,t)}},bv=1,wv=0,xv=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Sv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;wv=e}var Cv={getResolveCoincidentTopologyAsString:function(){return xv[wv]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return bv},getResolveCoincidentTopology:function(){return wv},setResolveCoincidentTopology:Sv,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){bv=e},setResolveCoincidentTopologyToDefault:function(){Sv(0)},setResolveCoincidentTopologyToOff:function(){Sv(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Sv(1)}};function Av(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 Pv=["Polygon","Line","Point"],_v={};Av(_v,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},Pv.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Ov={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),de.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Cv).forEach((function(t){e[t]=Cv[t]})),Object.keys(_v).forEach((function(t){e[t]=_v[t]})),Av(e,t.topologyOffset,Pv.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=_v.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=_v.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=_v.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:_v,otherStaticMethods:Cv,CATEGORIES:Pv};function Ev(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 Tv(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:i}},e.createColorTextureCoordinates=function(t,n,r,i,o,a,s,l,u){var c=(a[1]-a[0])/l,d=[];d[0]=a[0]-c,d[1]=a[1]+c;var p=1/(d[1]-d[0]),f=n.getData(),h=t.getData(),m=0,g=0;if(o<0||o>=i)for(var v=0;vt.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var s=t.lookupTable.getNumberOfAvailableColors();s>4094&&(s=4094),s+=2;for(var l=(i[1]-i[0])/(s-1-2),u=new Float64Array(2*s),c=0;ct.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var f=n.getNumberOfComponents(),h=n.getNumberOfTuples();t.colorCoordinates=Ln.newInstance({numberOfComponents:2,values:new Float32Array(2*h)});var m=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===Rv.MAGNITUDE&&n.getNumberOfComponents()>1&&(m=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,h,f,m,i,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),i=r.scalars;return!(!i||r.cellFlag||t.colorMode===kv.DEFAULT&&i.getDataType()===Fv.UNSIGNED_CHAR||t.colorMode===kv.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=Bv("AcquireInvertibleLookupTable"),e.valueToColor=Bv("ValueToColor"),e.colorToValue=Bv("ColorToValue"),e.useInvertibleColorFor=Bv("UseInvertibleColorFor"),e.clearInvertibleColor=Bv("ClearInvertibleColor")}var Vv={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 jv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vv,n),yv.extend(e,t,n),de.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),de.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),de.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Ov.implementCoincidentTopologyMethods(e,t),Lv(e,t)}var Uv=Tv(Tv(Tv({newInstance:de.newInstance(jv,"vtkMapper"),extend:jv},Dv),Iv),as);function Gv(e,t){t.classHierarchy.push("vtkAbstractPicker"),e.initialize=function(){t.renderer=null,t.selectionPoint[0]=0,t.selectionPoint[1]=0,t.selectionPoint[2]=0,t.pickPosition[0]=0,t.pickPosition[1]=0,t.pickPosition[2]=0},e.initializePickList=function(){t.pickList=[]},e.addPickList=function(e){t.pickList.push(e)},e.deletePickList=function(e){var n=t.pickList.indexOf(e);-1!==n&&t.pickList.splice(n,1)}}var zv={renderer:null,selectionPoint:[0,0,0],pickPosition:[0,0,0],pickFromList:0,pickList:[]};function Wv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zv,n),de.obj(e,t),de.get(e,t,["renderer"]),de.getArray(e,t,["selectionPoint","pickPosition"]),de.setGet(e,t,["pickFromList","pickList"]),Gv(e,t)}var Hv={newInstance:de.newInstance(Wv,"vtkAbstractPicker"),extend:Wv};function Kv(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 qv=de.vtkErrorMacro,Xv=de.vtkWarningMacro;function Yv(e,t){t.classHierarchy.push("vtkPicker");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zv,n),Hv.extend(e,t,n),de.setGet(e,t,["tolerance"]),de.setGetArray(e,t,["mapperPosition"],3),de.get(e,t,["mapper","dataSet","actors","pickedPositions"]),de.event(e,t,"pickChange"),Yv(e,t)}var Qv={newInstance:de.newInstance(Jv,"vtkPicker"),extend:Jv},$v=de.vtkErrorMacro;function ey(e,t){t.classHierarchy.push("vtkPointPicker"),e.intersectWithLine=function(n,r,i,o){var a=Number.MAX_VALUE;if(o.isA("vtkImageMapper")){var s=o.intersectWithLineForPointPicking(n,r);s&&(a=s.t,t.pointIJK=s.ijk)}else o.isA("vtkMapper")&&(a=e.intersectActorWithLine(n,r,i,o));return a},e.intersectActorWithLine=function(e,n,r,i){var o=i.getInputData(),a=0,s=o.getPoints().getNumberOfPoints();if(s<=a)return 2;for(var l=[],u=0;u<3;u++)l[u]=n[u]-e[u];var c,d=Qe(l,l);if(0===d)return $v("Cannot process points"),2;var p=-1,f=Number.MAX_VALUE,h=Number.MAX_VALUE,m=[],g=[],v=[],y=o.getPoints();if(t.useCells)for(var b=o.getPolys().getData(),w=b[0],x=o.getPolys().getNumberOfCells(),S=0;S=0&&c<=1&&c<=f+t.tolerance){for(var O=0,E=0;E<3;E++){m[E]=e[E]+c*l[E];var T=Math.abs(v[E]-m[E]);T>O&&(O=T)}O<=r&&O=0&&c<=1&&c<=f+t.tolerance){for(var D=0,I=0;I<3;I++){m[I]=e[I]+c*l[I];var k=Math.abs(v[I]-m[I]);k>D&&(D=k)}D<=r&&D2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ty,n),Qv.extend(e,t,n),de.getArray(e,t,["pointIJK"]),de.get(e,t,["pointId"]),de.setGet(e,t,["useCells"]),ey(e,t)}var ry={newInstance:de.newInstance(ny,"vtkPointPicker"),extend:ny},iy=Hm.States;function oy(e,t){t.classHierarchy.push("vtkMouseCameraUnicamRotateManipulator"),t.picker=ry.newInstance(),t.downPoint=[0,0,0],t.isDot=!1,t.state=iy.IS_NONE;var n=Jf.newInstance();n.setThetaResolution(6),n.setPhiResolution(6);var r=Uv.newInstance();r.setInputConnection(n.getOutputPort()),t.focusSphere=pv.newInstance(),t.focusSphere.setMapper(r),t.focusSphere.getProperty().setColor(.89,.66,.41),t.focusSphere.getProperty().setAmbient(1),t.focusSphere.getProperty().setDiffuse(0),t.focusSphere.getProperty().setRepresentationToWireframe();var i=function(e){if(e){if(t.useWorldUpVec){var n=e.findPokedRenderer().getActiveCamera();Ot(t.worldUpVec,n.getViewPlaneNormal())||n.setViewUp(t.worldUpVec)}e.render()}},o=function(e,t){var n=g(t.getView().getSize(),2),r=n[0],i=n[1];return{x:2*e.x/r-1,y:2*e.y/i-1}},a=function(e,t,n,r,i,o,a,s){var l=e.getPosition(),u=e.getFocalPoint(),c=e.getViewUp();l[3]=1,u[3]=1,c[3]=0;var d=Do(new Float64Array(16));Fo(d,d,[t,n,r]),Lo(d,d,s,[i,o,a]),Fo(d,d,[-t,-n,-r]);var p=[],f=[];io(p,l,d),io(f,u,d),Do(d),Lo(d,d,s,[i,o,a]);var h=[];io(h,c,d),e.setPosition.apply(e,p),e.setFocalPoint.apply(e,f),e.setViewUp.apply(e,h)},s=function(e){!function(e){var n,r=e.findPokedRenderer();(n=t.focusSphere).setPosition.apply(n,y(t.downPoint));var i=r.getActiveCamera(),o=i.getPosition(),a=[];qe(t.downPoint,o,a),i.getParallelProjection()&&Xe(a,i.getParallelScale());var s=i.getDirectionOfProjection();nt(s);var l=.02*Qe(s,a)*t.focusSphereRadiusFactor;t.focusSphere.setScale(l,l,l)}(e),e.findPokedRenderer().addActor(t.focusSphere),t.isDot=!0};e.onButtonDown=function(e,n,r){t.buttonPressed=!0,t.startPosition=r,t.previousPosition=r;var i=o(r,e);if(Math.abs(i.x)>.9||Math.abs(i.y)>.9)return t.state=iy.IS_ROTATE,void s(e);t.downPoint=function(e,n){var r=e.findPokedRenderer(),i=null;if(t.useHardwareSelector){var o=e.getView().getSelector();o.setCaptureZValues(!0),o.setFieldAssociation(di.FIELD_ASSOCIATION_POINTS),o.attach(e.getView(),r),o.setArea(n.x,n.y,n.x,n.y),i=o.select()}return i&&0!==i.length?Array.from(i[0].getProperties().worldPosition):function(e,n){var r=e.findPokedRenderer();t.picker.pick([n.x,n.y,n.z],r);var i=t.picker.getPickedPositions();if(0===i.length)return t.picker.getPickPosition();var o=r.getActiveCamera().getPosition();return i.sort((function(e,t){return st(e,o)-st(t,o)})),i[0]}(e,n)}(e,r),t.isDot?t.state=iy.IS_ROTATE:(t.state=iy.IS_NONE,t.displayFocusSphereOnButtonDown&&s(e))},e.onMouseMove=function(n,r,s){t.buttonPressed&&(t.state=iy.IS_ROTATE,function(n,r){var s,l=n.findPokedRenderer(),u=o(r,n),c=o(t.previousPosition,n),d=t.focusSphere.getPosition(),p=(s=n.getView()).worldToDisplay.apply(s,y(d).concat([l]));p=[(p=o({x:d[0],y:d[1]},n)).x,p.y,d[2]];var f=Math.pow(1+Math.abs(p[0]),2),h=[c.x,0,0],m=[u.x,0,0],g=Math.pow(h[0],2),v=Math.pow(m[0],2),b=g>f?0:Math.sqrt(f-g),w=v>f?0:Math.sqrt(f-v),x=[h[0],0,b];nt(x);var S=[m[0],0,w];nt(S);var C=Qe(x,S);if(Math.abs(C)>1e-4){var A=-2*Math.acos(rn(C,-1,1))*Math.sign(u.x-c.x)*e.getRotationFactor(),P=l.getActiveCamera(),_=t.useWorldUpVec?t.worldUpVec:P.getViewUp();nt(_),a.apply(void 0,[P].concat(y(d),y(_),[A]));var O=[];qe(P.getPosition(),r,O);var E=(u.y-c.y)*e.getRotationFactor();nt(O);var T=P.getViewPlaneNormal(),D=[];et(P.getViewUp(),T,D),nt(D),t.useWorldUpVec&&(Qe(_,T)>.99&&E<0&&(E=0),Qe(_,T)<-.99&&E>0&&(E=0)),a.apply(void 0,[P].concat(y(d),D,[E])),t.useWorldUpVec&&!Ot(_,P.getViewPlaneNormal())&&P.setViewUp.apply(P,y(_)),t.previousPosition=r,l.resetCameraClippingRange(),i(n)}}(n,s),t.previousPosition=s)},e.onButtonUp=function(e){var n=e.findPokedRenderer();t.buttonPressed=!1,(t.state!==iy.IS_ROTATE||t.isDot)&&(t.state===iy.IS_ROTATE?function(e){e.findPokedRenderer().removeActor(t.focusSphere),t.isDot=!1}(e):t.state===iy.IS_NONE&&s(e),n.resetCameraClippingRange(),i(e))},e.getFocusSphereColor=function(){t.focusSphere.getProperty().getColor()},e.setFocusSphereColor=function(e,n,r){t.focusSphere.getProperty().setColor(e,n,r)}}var ay={focusSphereRadiusFactor:1,displayFocusSphereOnButtonDown:!0,useHardwareSelector:!0,useWorldUpVec:!0,worldUpVec:[0,0,1]};function sy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ay,n),de.obj(e,t),om.extend(e,t,n),hm.extend(e,t,n),de.setGet(e,t,["focusSphereRadiusFactor","displayFocusSphereOnButtonDown","useHardwareSelector","useWorldUpVec"]),de.get(e,t,["state"]),de.getArray(e,t,["downPoint"],3),de.setGetArray(e,t,["worldUpVec"],3),oy(e,t)}var ly={newInstance:de.newInstance(sy,"vtkMouseCameraUnicamRotateManipulator"),extend:sy},uy=Hm.States;function cy(e,t){t.classHierarchy.push("vtkMouseCameraUnicamManipulator"),t.state=uy.IS_NONE,t.rotateManipulator=ly.newInstance({button:t.button,shift:t.shift,control:t.control,alt:t.alt,dragEnabled:t.dragEnabled,scrollEnabled:t.scrollEnabled,displayFocusSphereOnButtonDown:!1});var n=function(e,t){var n=g(t.getView().getSize(),2),r=n[0],i=n[1];return{x:2*e.x/r-1,y:2*e.y/i-1}},r=function(e,t){var n=t.findPokedRenderer().getActiveCamera(),r=[0,0,0];qe(e,n.getPosition(),r),n.getParallelProjection()&&Xe(r,n.getParallelScale());var i=n.getViewPlaneNormal();nt(i);var o=Qe(r,i),a=Pe(n.getViewAngle()),s=g(t.getView().getSize(),2),l=s[0]/s[1]*(2*o*Math.tan(a/2)/2),u=2*o*Math.tan(a/2)/2,c=n.getViewUp(),d=[];return et(c,i,d),et(i,d,c),nt(d),nt(c),Xe(d,l),Xe(c,u),{rightV:d,upV:c}};e.onButtonDown=function(e,n,r){t.buttonPressed=!0,t.startPosition=r,t.previousPosition=r,t.time=Date.now()/1e3,t.dist=0,t.rotateManipulator.onButtonDown(e,n,r),t.downPoint=t.rotateManipulator.getDownPoint()},e.onMouseMove=function(e,i,o){if(t.buttonPressed){if(t.rotateManipulator.getState()===uy.IS_ROTATE)t.rotateManipulator.onMouseMove(e,i,o);else switch(t.state){case uy.IS_NONE:!function(e,r){var i=n(r,e),o=n(t.previousPosition,e),a={x:i.x-o.x,y:i.y-o.y};t.previousPosition=r;var s=Date.now()/1e3-t.time;t.dist+=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));var l={x:r.x-t.startPosition.x,y:r.y-t.startPosition.y},u=Math.sqrt(Math.pow(l.x,2)+Math.pow(l.y,2));Math.abs(l.y)/u>.9&&s>.05?t.state=uy.IS_DOLLY:(s>=.1||t.dist>=.03)&&(Math.abs(l.x)/u>.6?t.state=uy.IS_PAN:t.state=uy.IS_DOLLY)}(e,o);break;case uy.IS_PAN:!function(e,i){var o=e.findPokedRenderer(),a=n(i,e),s=n(t.previousPosition,e),l=a.x-s.x,u=a.y-s.y,c=o.getActiveCamera();t.previousPosition=i;for(var d=r(t.downPoint,e),p=d.rightV,f=d.upV,h=[],m=0;m<3;m++)h[m]=l*p[m]+u*f[m];c.translate.apply(c,h),o.resetCameraClippingRange(),e.render()}(e,o);break;case uy.IS_DOLLY:!function(e,i){var o=e.findPokedRenderer(),a=n(i,e),s=n(t.previousPosition,e),l={x:a.x-s.x,y:a.y-s.y},u=o.getActiveCamera(),c=u.getPosition();if(u.getParallelProjection())u.zoom(1-l.y);else{var d=[];qe(t.downPoint,c,d),Xe(d,-4*l.y),u.translate.apply(u,d)}var p=r(t.downPoint,e).rightV;Xe(p,l.x),u.translate.apply(u,y(p)),o.resetCameraClippingRange(),e.render()}(e,o)}t.previousPosition=o}},e.onButtonUp=function(e){t.buttonPressed=!1,t.state===uy.IS_NONE&&t.rotateManipulator.onButtonUp(e),t.state=uy.IS_NONE},e.getUseWorldUpVec=function(){return t.rotateManipulator.getUseWorldUpVec()},e.setUseWorldUpVec=function(e){t.rotateManipulator.setUseWorldUpVec(e)},e.getWorldUpVec=function(){return t.rotateManipulator.getWorldUpVec()},e.setWorldUpVec=function(e,n,r){t.rotateManipulator.setWorldUpVec(e,n,r)},e.getUseHardwareSelector=function(){return t.rotateManipulator.getUseHardwareSelector()},e.setUseHardwareSelector=function(e){t.rotateManipulator.setUseHardwareSelector(e)},e.getFocusSphereColor=function(){t.rotateManipulator.getFocusSphereColor()},e.setFocusSphereColor=function(e,n,r){t.rotateManipulator.setFocusSphereColor(e,n,r)},e.getFocusSphereRadiusFactor=function(){return t.rotateManipulator.getFocusSphereRadiusFactor()},e.setFocusSphereRadiusFactor=function(e){t.rotateManipulator.setFocusSphereRadiusFactor(e)}}var dy={};function py(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dy,n),de.obj(e,t),om.extend(e,t,n),hm.extend(e,t,n),cy(e,t)}var fy={newInstance:de.newInstance(py,"vtkMouseCameraUnicamManipulator"),extend:py};function hy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballFirstPersonManipulator");var n={interactor:null,renderer:null,previousPosition:null};e.onButtonDown=function(r,i,o){n.previousPosition=o,t.usePointerLock&&!r.isPointerLocked()&&(Object.assign(n,{interactor:r,renderer:i}),r.requestPointerLock(),e.startPointerLockInteraction())},e.startPointerLockInteraction=function(){var t=n.interactor;document.addEventListener("mousemove",e.onPointerLockMove);var r=null;r=t.onEndPointerLock((function(){document.removeEventListener("mousemove",e.onPointerLockMove),r.unsubscribe()}))},e.onPointerLockMove=function(n){var r=t.sensitivity,i=-1*n.movementX*r,o=-1*n.movementY*r;e.moveCamera(i,o)},e.onMouseMove=function(r,i,o){if(o){var a=n.previousPosition,s=t.sensitivity,l=(a.x-o.x)*s,u=(o.y-a.y)*s;Object.assign(n,{interactor:r,renderer:i}),e.moveCamera(l,u),n.previousPosition=o}},e.moveCamera=function(e,r){var i=n.renderer,o=n.interactor,a=i.getActiveCamera(),s=t.numAnimationSteps,l=e/s,u=r/s,c=performance.now().toString(),d="".concat("vtkMouseCameraTrackballFirstPersonManipulator",".").concat(c),p=0,f=null;o.requestAnimation(d),f=o.onAnimation((function(){return a.yaw(l),a.pitch(u),a.orthogonalizeViewUp(),void((p+=1)===s&&(f.unsubscribe(),i.resetCameraClippingRange(),o.getLightFollowCamera()&&i.updateLightsGeometryToFollowCamera(),setTimeout((function(){n.interactor.cancelAnimation(d)}),0)))}))}}var my={numAnimationSteps:5,sensitivity:.05,usePointerLock:!0};function gy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,my,n),de.obj(e,t),om.extend(e,t,n),hm.extend(e,t,n),de.setGet(e,t,["numAnimationSteps","sensitivity","usePointerLock"]),hy(e,t)}var vy={newInstance:de.newInstance(gy,"vtkMouseCameraTrackballFirstPersonManipulator"),extend:gy};function yy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(16),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,u,c){if(c){var d=u.getActiveCamera(),p=d.getPosition(),f=d.getFocalPoint();Do(o);var h=t.center,m=t.rotationFactor;Fo(o,o,h);var g=t.previousPosition.x-c.x,v=t.previousPosition.y-c.y,y=e.getView().getSize(),b=d.getViewUp();Lo(o,o,Pe(360*g/y[0]*m),b),et(d.getDirectionOfProjection(),b,a),Lo(o,o,Pe(-360*v/y[1]*m),a),s[0]=-h[0],s[1]=-h[1],s[2]=-h[2],Fo(o,o,s),io(n,p,o),io(r,f,o),l[0]=b[0]+p[0],l[1]=b[1]+p[1],l[2]=b[2]+p[2],io(i,l,o),d.setPosition(n[0],n[1],n[2]),d.setFocalPoint(r[0],r[1],r[2]),d.setViewUp(i[0]-n[0],i[1]-n[1],i[2]-n[2]),d.orthogonalizeViewUp(),u.resetCameraClippingRange(),e.getLightFollowCamera()&&u.updateLightsGeometryToFollowCamera(),t.previousPosition=c}}}var by={};function wy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,by,n),de.obj(e,t),hm.extend(e,t,n),om.extend(e,t,n),yy(e,t)}var xy={newInstance:de.newInstance(wy,"vtkMouseCameraTrackballRotateManipulator"),extend:wy};function Sy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(16),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(u,c,d){if(d){var p=c.getActiveCamera(),f=p.getPosition(),h=p.getFocalPoint(),m=p.getViewUp();n[0]=h[0]-f[0],n[1]=h[1]-f[1],n[2]=h[2]-f[2],e.computeDisplayCenter(u.getInteractorStyle(),c);var g=t.previousPosition.x-t.displayCenter[0],v=d.x-t.displayCenter[0],y=t.previousPosition.y-t.displayCenter[1],b=d.y-t.displayCenter[1];if(!(0===v&&0===b||0===g&&0===y)){var w=_e((g*b-y*v)/(Math.sqrt(g*g+y*y)*Math.sqrt(v*v+b*b))),x=t.center;Do(o),i[0]=-x[0],i[1]=-x[1],i[2]=-x[2],Fo(o,o,x),Lo(o,o,Pe(w),n),Fo(o,o,i),io(a,f,o),io(s,h,o),r[0]=m[0]+f[0],r[1]=m[1]+f[1],r[2]=m[2]+f[2],io(l,r,o),p.setPosition(a[0],a[1],a[2]),p.setFocalPoint(s[0],s[1],s[2]),p.setViewUp(l[0]-a[0],l[1]-a[1],l[2]-a[2]),p.orthogonalizeViewUp(),c.resetCameraClippingRange(),u.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=d}}}}var Cy={};function Ay(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cy,n),de.obj(e,t),om.extend(e,t,n),hm.extend(e,t,n),Sy(e,t)}var Py={newInstance:de.newInstance(Ay,"vtkMouseCameraTrackballRollManipulator"),extend:Ay};function _y(e){return e*e}function Oy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=xy.newInstance(),r=Py.newInstance(),i=null;e.onButtonDown=function(t,o,a){var s,l,u=t.getView().getSize(),c=[.5*u[0],.5*u[1]],d=.9*((s=c[0])<(l=c[1])?l:s),p=_y(c[0]-a.x)+_y(c[1]-a.y);(i=d*d>p?n:r).setButton(e.getButton()),i.setShift(e.getShift()),i.setControl(e.getControl()),i.setCenter(e.getCenter()),i.onButtonDown(t,a)},e.onButtonUp=function(e){i&&i.onButtonUp(e)},e.onMouseMove=function(e,t,n){i&&i.onMouseMove(e,t,n)}}var Ey={};function Ty(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ey,n),de.obj(e,t),hm.extend(e,t,n),om.extend(e,t,n),Oy(e,t)}var Dy={newInstance:de.newInstance(Ty,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Ty};function Iy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var i=r,o=t.previousPosition;t.previousPosition=r;var a=n.getActiveCamera(),s=a.getPosition(),l=a.getFocalPoint();if(a.getParallelProjection()){a.orthogonalizeViewUp();var u=a.getViewUp(),c=[0,0,0];et(a.getViewPlaneNormal(),u,c);var d=e.getView().getSize()[1],p=(i.x-o.x)/d,f=(o.y-i.y)/d,h=a.getParallelScale();f*=2*h;var m=c[0]*(p*=2*h)+u[0]*f;s[0]+=m,l[0]+=m,m=c[1]*p+u[1]*f,s[1]+=m,l[1]+=m,m=c[2]*p+u[2]*f,s[2]+=m,l[2]+=m,a.setPosition(s[0],s[1],s[2]),a.setFocalPoint(l[0],l[1],l[2])}else{var g=t.center,v=e.getInteractorStyle(),y=v.computeWorldToDisplay(n,g[0],g[1],g[2])[2],b=v.computeDisplayToWorld(n,i.x,i.y,y),w=v.computeDisplayToWorld(n,o.x,o.y,y),x=[s[0]+(w[0]-b[0]),s[1]+(w[1]-b[1]),s[2]+(w[2]-b[2])],S=[l[0]+(w[0]-b[0]),l[1]+(w[1]-b[1]),l[2]+(w[2]-b[2])];a.setPosition(x[0],x[1],x[2]),a.setFocalPoint(S[0],S[1],S[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var ky={};function My(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ky,n),de.obj(e,t),om.extend(e,t,n),hm.extend(e,t,n),Iy(e,t)}var Ny={newInstance:de.newInstance(My,"vtkMouseCameraTrackballPanManipulator"),extend:My};function Ry(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var i=e.getView().getSize(),o=n.getActiveCamera(),a=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/i[1]*a;else{var s=o.getClippingRange();t.zoomScale=s[1]/i[1]*1.5*a}},e.onMouseMove=function(e,n,r){if(r){var i=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var a=i*t.zoomScale;o.setParallelScale((1-a)*o.getParallelScale())}else{var s=o.getPosition(),l=o.getFocalPoint(),u=o.getDirectionOfProjection(),c=i*t.zoomScale,d=c*u[0];s[0]+=d,l[0]+=d,d=c*u[1],s[1]+=d,l[1]+=d,d=c*u[2],s[2]+=d,l[2]+=d,o.getFreezeFocalPoint()||o.setFocalPoint(l[0],l[1],l[2]),o.setPosition(s[0],s[1],s[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),i=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/i):(r.dolly(i),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var Fy={zoomScale:0,flipDirection:!1};function By(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fy,n),de.obj(e,t),hm.extend(e,t,n),om.extend(e,t,n),de.setGet(e,t,["flipDirection"]),Ry(e,t)}var Ly={newInstance:de.newInstance(By,"vtkMouseCameraTrackballZoomManipulator"),extend:By};function Vy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,i){n(e,r,i),t.zoomPosition=i},e.onMouseMove=function(e,n,r){if(r){var i=(t.previousPosition.y-r.y)*t.zoomScale;cg.dollyToPosition(1-i,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var i=1-.1*n;cg.dollyToPosition(i,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var jy={zoomPosition:null};function Uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jy,n),Ly.extend(e,t,n),Vy(e,t)}var Gy={newInstance:de.newInstance(Uy,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:Uy};function zy(e,t){t.classHierarchy.push("vtkMouseRangeManipulator");var n=new Map;function r(e,t){return t*((e.max-e.min)/(e.step+1))}function i(e,t){var r=e.getValue(),i=t*e.scale+n.get(e),o=r+i,a=o-e.min,s=Math.round(a/e.step);o=e.min+e.step*s,o=Math.max(o,e.min),(o=Math.min(o,e.max))!==r?(e.setValue(o),n.set(e,0)):o===e.min&&i<0||o===e.max&&i>0?n.set(e,0):n.set(e,i)}e.setHorizontalListener=function(r,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=Number.isFinite(a)?function(){return a}:a;t.horizontalListener={min:r,max:i,step:o,getValue:u,setValue:s,scale:l},n.set(t.horizontalListener,0),e.modified()},e.setVerticalListener=function(r,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=Number.isFinite(a)?function(){return a}:a;t.verticalListener={min:r,max:i,step:o,getValue:u,setValue:s,scale:l},n.set(t.verticalListener,0),e.modified()},e.setScrollListener=function(r,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=Number.isFinite(a)?function(){return a}:a;t.scrollListener={min:r,max:i,step:o,getValue:u,setValue:s,scale:l},n.set(t.scrollListener,0),e.modified()},e.removeHorizontalListener=function(){t.verticalListener&&(n.delete(t.verticalListener),delete t.verticalListener,e.modified())},e.removeVerticalListener=function(){t.horizontalListener&&(n.delete(t.horizontalListener),delete t.horizontalListener,e.modified())},e.removeScrollListener=function(){t.scrollListener&&(n.delete(t.scrollListener),delete t.scrollListener,e.modified())},e.removeAllListeners=function(){e.removeHorizontalListener(),e.removeVerticalListener(),e.removeScrollListener()},e.onButtonDown=function(e,n,r){t.previousPosition=r;var i=e.getView(),o=i.getContainerSize()[0]/i.getSize()[0],a=i.getViewportSize(n);t.containerSize=a.map((function(e){return e*o}))},e.onMouseMove=function(e,n,o){if((t.verticalListener||t.horizontalListener)&&o){if(t.horizontalListener){var a=(o.x-t.previousPosition.x)/t.containerSize[0],s=r(t.horizontalListener,a);i(t.horizontalListener,s)}if(t.verticalListener){var l=(o.y-t.previousPosition.y)/t.containerSize[1],u=r(t.verticalListener,l);i(t.verticalListener,u)}t.previousPosition=o}},e.onScroll=function(e,n,r){t.scrollListener&&r&&i(t.scrollListener,r*t.scrollListener.step)},e.onStartScroll=e.onScroll}var Wy={horizontalListener:null,verticalListener:null,scrollListener:null};function Hy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wy,n),de.obj(e,t),hm.extend(e,t,n),zy(e,t)}var Ky={newInstance:de.newInstance(Hy,"vtkMouseRangeManipulator"),extend:Hy};function qy(e,t){t.classHierarchy.push("vtkVRButtonPanManipulator"),e.onButton3D=function(e,t,n,r,i,o){o?e.startCameraPose():n===Wm.IS_CAMERA_POSE&&e.endCameraPose()},e.onMove3D=function(e,t,n,r){if(n===Wm.IS_CAMERA_POSE){var i=t.getActiveCamera(),o=i.getPhysicalTranslation(),a=.05*r.gamepad.axes[1]/i.getPhysicalScale(),s=i.physicalOrientationToWorldDirection(r.orientation);i.setPhysicalTranslation(o[0]+s[0]*a,o[1]+s[1]*a,o[2]+s[2]*a)}}}var Xy={device:mm.RightController,input:gm.TrackPad};function Yy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xy,n),de.obj(e,t),wm.extend(e,t,n),qy(e,t)}var Zy=de.newInstance(Yy,"vtkVRButtonPanManipulator"),Jy={vtkCompositeCameraManipulator:om,vtkCompositeGestureManipulator:lm,vtkCompositeKeyboardManipulator:dm,vtkCompositeMouseManipulator:hm,vtkCompositeVRManipulator:wm,vtkGestureCameraManipulator:hg,vtkKeyboardCameraManipulator:wg,vtkMouseBoxSelectorManipulator:Eg,vtkMouseCameraAxisRotateManipulator:kg,vtkMouseCameraSliceManipulator:Fg,vtkMouseCameraUnicamManipulator:fy,vtkMouseCameraUnicamRotateManipulator:ly,vtkMouseCameraTrackballFirstPersonManipulator:vy,vtkMouseCameraTrackballMultiRotateManipulator:Dy,vtkMouseCameraTrackballPanManipulator:Ny,vtkMouseCameraTrackballRollManipulator:Py,vtkMouseCameraTrackballRotateManipulator:xy,vtkMouseCameraTrackballZoomManipulator:Ly,vtkMouseCameraTrackballZoomToMouseManipulator:Gy,vtkMouseRangeManipulator:Ky,vtkVRButtonPanManipulator:{newInstance:Zy,extend:Yy}},Qy=[],$y={device:{},screen:window.orientation||0,supported:!!window.DeviceMotionEvent,update:!1},eb={"landscape-primary":90,"landscape-secondary":-90,"portrait-secondary":180,"portrait-primary":0};function tb(e){$y.device=e,Number.isFinite(e.alpha)||($y.supported=!1)}function nb(){$y.screen=eb[window.screen.orientation||window.screen.mozOrientation]||window.orientation||0}var rb={vtkDeviceOrientationToCamera:{addCameraToSynchronize:function(e,t,n){var r={subscription:e.onAnimation((function(){if($y.update&&(s=$y.device,Number.isFinite(s.alpha))){var e=$y.device,r=e.alpha,i=e.beta,o=e.gamma,a=$y.screen;t.setDeviceAngles(r,i,o,a),n&&n()}var s})),renderWindowInteractor:e},i=Qy.length;return Qy.push(r),$y.update&&r.renderWindowInteractor.requestAnimation(),i},addWindowListeners:function(){window.addEventListener("orientationchange",nb,!1),window.addEventListener("deviceorientation",tb,!1),$y.update=!0,Qy.filter((function(e){return!!e})).forEach((function(e){return e.renderWindowInteractor.requestAnimation(e)}))},isDeviceOrientationSupported:function(){return $y.supported},removeCameraToSynchronize:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Qy[e];n&&(n.subscription.unsubscribe(),t&&n.renderWindowInteractor.cancelAnimation()),Qy[e]=null},removeWindowListeners:function(){window.removeEventListener("orientationchange",nb,!1),window.removeEventListener("deviceorientation",tb,!1),$y.update=!1,Qy.filter((function(e){return!!e})).forEach((function(e){return e.renderWindowInteractor.cancelAnimation(e)}))}}},ib=Hm.States;function ob(e,t){t.classHierarchy.push("vtkInteractorStyleTrackballCamera"),e.handleMouseMove=function(n){var r=n.position,i=n.pokedRenderer;switch(t.state){case ib.IS_ROTATE:e.handleMouseRotate(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case ib.IS_PAN:e.handleMousePan(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case ib.IS_DOLLY:e.handleMouseDolly(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case ib.IS_SPIN:e.handleMouseSpin(i,r),e.invokeInteractionEvent({type:"InteractionEvent"})}t.previousPosition=r},e.handleButton3D=function(n){n&&n.pressed&&n.device===mm.RightController&&n.input===gm.TrackPad?e.startCameraPose():n&&!n.pressed&&n.device===mm.RightController&&n.input===gm.TrackPad&&t.state===ib.IS_CAMERA_POSE&&e.endCameraPose()},e.handleMove3D=function(n){switch(t.state){case ib.IS_CAMERA_POSE:e.updateCameraPose(n)}},e.updateCameraPose=function(e){var t=e.pokedRenderer.getActiveCamera(),n=t.getPhysicalTranslation(),r=.05*e.gamepad.axes[1]/t.getPhysicalScale(),i=t.physicalOrientationToWorldDirection(e.orientation);t.setPhysicalTranslation(n[0]+i[0]*r,n[1]+i[1]*r,n[2]+i[2]*r)},e.handleLeftButtonPress=function(n){var r=n.position;t.previousPosition=r,n.shiftKey?n.controlKey||n.altKey?e.startDolly():e.startPan():n.controlKey||n.altKey?e.startSpin():e.startRotate()},e.handleLeftButtonRelease=function(){switch(t.state){case ib.IS_DOLLY:e.endDolly();break;case ib.IS_PAN:e.endPan();break;case ib.IS_SPIN:e.endSpin();break;case ib.IS_ROTATE:e.endRotate()}},e.handleStartMouseWheel=function(t){e.startDolly(),e.handleMouseWheel(t)},e.handleEndMouseWheel=function(){e.endDolly()},e.handleStartPinch=function(n){t.previousScale=n.scale,e.startDolly()},e.handleEndPinch=function(){e.endDolly()},e.handleStartRotate=function(n){t.previousRotation=n.rotation,e.startRotate()},e.handleEndRotate=function(){e.endRotate()},e.handleStartPan=function(n){t.previousTranslation=n.translation,e.startPan()},e.handleEndPan=function(){e.endPan()},e.handlePinch=function(n){e.dollyByFactor(n.pokedRenderer,n.scale/t.previousScale),t.previousScale=n.scale},e.handlePan=function(n){var r=n.pokedRenderer.getActiveCamera(),i=r.getFocalPoint(),o=(i=e.computeWorldToDisplay(n.pokedRenderer,i[0],i[1],i[2]))[2],a=n.translation,s=t.previousTranslation,l=e.computeDisplayToWorld(n.pokedRenderer,i[0]+a[0]-s[0],i[1]+a[1]-s[1],o),u=e.computeDisplayToWorld(n.pokedRenderer,i[0],i[1],o),c=[];c[0]=u[0]-l[0],c[1]=u[1]-l[1],c[2]=u[2]-l[2],i=r.getFocalPoint();var d=r.getPosition();r.setFocalPoint(c[0]+i[0],c[1]+i[1],c[2]+i[2]),r.setPosition(c[0]+d[0],c[1]+d[1],c[2]+d[2]),t.interactor.getLightFollowCamera()&&n.pokedRenderer.updateLightsGeometryToFollowCamera(),r.orthogonalizeViewUp(),t.previousTranslation=n.translation},e.handleRotate=function(e){var n=e.pokedRenderer.getActiveCamera();n.roll(e.rotation-t.previousRotation),n.orthogonalizeViewUp(),t.previousRotation=e.rotation},e.handleMouseRotate=function(e,n){var r=t.interactor,i=n.x-t.previousPosition.x,o=n.y-t.previousPosition.y,a=r.getView().getViewportSize(e),s=-.1,l=-.1;a[0]&&a[1]&&(s=-20/a[1],l=-20/a[0]);var u=i*l*t.motionFactor,c=o*s*t.motionFactor,d=e.getActiveCamera();Number.isNaN(u)||Number.isNaN(c)||(d.azimuth(u),d.elevation(c),d.orthogonalizeViewUp()),t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange(),r.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()},e.handleMouseSpin=function(e,n){var r=t.interactor,i=e.getActiveCamera(),o=r.getView().getViewportCenter(e),a=_e(Math.atan2(t.previousPosition.y-o[1],t.previousPosition.x-o[0])),s=_e(Math.atan2(n.y-o[1],n.x-o[0]))-a;Number.isNaN(s)||(i.roll(s),i.orthogonalizeViewUp())},e.handleMousePan=function(n,r){var i=n.getActiveCamera(),o=i.getFocalPoint(),a=(o=e.computeWorldToDisplay(n,o[0],o[1],o[2]))[2],s=e.computeDisplayToWorld(n,r.x,r.y,a),l=e.computeDisplayToWorld(n,t.previousPosition.x,t.previousPosition.y,a),u=[];u[0]=l[0]-s[0],u[1]=l[1]-s[1],u[2]=l[2]-s[2],o=i.getFocalPoint();var c=i.getPosition();i.setFocalPoint(u[0]+o[0],u[1]+o[1],u[2]+o[2]),i.setPosition(u[0]+c[0],u[1]+c[1],u[2]+c[2]),t.interactor.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()},e.handleMouseDolly=function(n,r){var i=r.y-t.previousPosition.y,o=t.interactor.getView().getViewportCenter(n),a=t.motionFactor*i/o[1];e.dollyByFactor(n,Math.pow(1.1,a))},e.handleMouseWheel=function(t){var n=1-t.spinY/10;e.dollyByFactor(t.pokedRenderer,n)},e.dollyByFactor=function(e,n){if(!Number.isNaN(n)){var r=e.getActiveCamera();r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/n):(r.dolly(n),t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange()),t.interactor.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()}}}var ab={motionFactor:10};function sb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ab,n),Qm.extend(e,t,n),de.setGet(e,t,["motionFactor"]),ob(e,t)}var lb={newInstance:de.newInstance(sb,"vtkInteractorStyleTrackballCamera"),extend:sb};function ub(e,t){t.classHierarchy.push("vtkInteractorStyleImage"),e.superHandleMouseMove=e.handleMouseMove,e.handleMouseMove=function(n){var r=n.position,i=n.pokedRenderer;switch(t.state){case Wm.IS_WINDOW_LEVEL:e.windowLevel(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case Wm.IS_SLICE:e.slice(i,r),e.invokeInteractionEvent({type:"InteractionEvent"})}e.superHandleMouseMove(n)},e.superHandleLeftButtonPress=e.handleLeftButtonPress,e.handleLeftButtonPress=function(n){var r=n.position;if(n.shiftKey||n.controlKey)"IMAGE3D"===t.interactionMode&&n.shiftKey?e.startRotate():"IMAGE_SLICING"===t.interactionMode&&n.controlKey?(t.lastSlicePosition=r.y,e.startSlice()):e.superHandleLeftButtonPress(n);else{t.windowLevelStartPosition[0]=r.x,t.windowLevelStartPosition[1]=r.y,e.setCurrentImageNumber(t.currentImageNumber);var i=t.currentImageProperty;i&&(t.windowLevelInitial[0]=i.getColorWindow(),t.windowLevelInitial[1]=i.getColorLevel()),e.startWindowLevel()}},e.superHandleLeftButtonRelease=e.handleLeftButtonRelease,e.handleLeftButtonRelease=function(){switch(t.state){case Wm.IS_WINDOW_LEVEL:e.endWindowLevel();break;case Wm.IS_SLICE:e.endSlice();break;default:e.superHandleLeftButtonRelease()}},e.handleStartMouseWheel=function(t){e.startSlice(),e.handleMouseWheel(t)},e.handleEndMouseWheel=function(){e.endSlice()},e.handleMouseWheel=function(e){var t=e.pokedRenderer.getActiveCamera(),n=t.getDistance();n+=e.spinY;var r=t.getClippingRange();nr[1]&&(n=r[1]),t.setDistance(n)},e.windowLevel=function(e,n){t.windowLevelCurrentPosition[0]=n.x,t.windowLevelCurrentPosition[1]=n.y;var r=t.interactor;if(t.currentImageProperty){var i=r.getView().getViewportSize(e),o=t.windowLevelInitial[0],a=t.windowLevelInitial[1],s=4*(t.windowLevelCurrentPosition[0]-t.windowLevelStartPosition[0])/i[0],l=4*(t.windowLevelStartPosition[1]-t.windowLevelCurrentPosition[1])/i[1];Math.abs(o)>.01?s*=o:s*=o<0?-.01:.01,Math.abs(a)>.01?l*=a:l*=a<0?-.01:.01,o<0&&(s*=-1),a<0&&(l*=-1);var u=s+o,c=a-l;u<.01&&(u=.01),t.currentImageProperty.setColorWindow(u),t.currentImageProperty.setColorLevel(c)}},e.slice=function(e,n){var r=t.interactor,i=n.y-t.lastSlicePosition,o=e.getActiveCamera(),a=o.getClippingRange(),s=o.getDistance(),l=0;if(o.getParallelProjection())l=o.getParallelScale();else{var u=Pe(o.getViewAngle());l=2*s*Math.tan(.5*u)}(s+=i*l/r.getView().getViewportSize(e)[1])a[1]&&(s=a[1]-.001*l),o.setDistance(s),t.lastSlicePosition=n.y},e.setCurrentImageNumber=function(n){if(null!==n){var r=t.interactor.getCurrentRenderer();if(r){t.currentImageNumber=n;var i=r.getViewProps(),o=n;n<0&&(o+=i.length);for(var a=null,s=!1,l=0;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cb,n),lb.extend(e,t,n),de.setGet(e,t,["interactionMode"]),ub(e,t)}var pb={newInstance:de.newInstance(db,"vtkInteractorStyleImage"),extend:db};function fb(e,t,n){return en?n:e}function hb(e,t){t.classHierarchy.push("vtkInteractorStyleMPRSlice"),t.trackballManipulator=xy.newInstance({button:1}),t.panManipulator=Ny.newInstance({button:1,shift:!0}),t.zoomManipulator=Ly.newInstance({button:3}),t.scrollManipulator=Ky.newInstance({scrollEnabled:!0,dragEnabled:!1});var n={sliceNormal:[0,0,0],sliceRange:[0,0]},r=null;function i(){var n=e.getSliceRange();t.scrollManipulator.removeScrollListener(),t.scrollManipulator.setScrollListener(n[0],n[1],1,e.getSlice,e.setSlice)}var o=e.setInteractor;e.setInteractor=function(t){if(o(t),r&&(r.unsubscribe(),r=null),t){var n=t.getCurrentRenderer().getActiveCamera();r=n.onModified((function(){i(),e.modified()}))}},e.handleMouseMove=de.chain(e.handleMouseMove,(function(){var e=t.interactor.getCurrentRenderer().getActiveCamera(),n=e.getDistance();e.setClippingRange(n,n+.1)}));var a=e.setVolumeMapper;e.setVolumeMapper=function(n){if(a(n)){var r=t.interactor.getCurrentRenderer().getActiveCamera();n?(r.setFreezeFocalPoint(!0),e.setSliceNormal.apply(e,y(e.getSliceNormal()))):r.setFreezeFocalPoint(!1)}},e.getSlice=function(){var n=t.interactor.getCurrentRenderer().getActiveCamera(),r=e.getSliceNormal(),i=Es.buildFromDegree().identity().rotateFromDirections(r,[1,0,0]),o=n.getFocalPoint();return i.apply(o),o[0]},e.setSlice=function(n){var r=t.interactor.getCurrentRenderer().getActiveCamera();if(t.volumeMapper){var i=e.getSliceRange(),o=t.volumeMapper.getBounds(),a=fb.apply(void 0,[n].concat(y(i))),s=[(o[0]+o[1])/2,(o[2]+o[3])/2,(o[4]+o[5])/2],l=r.getDistance(),u=r.getDirectionOfProjection();nt(u);var c=(i[1]+i[0])/2,d=[s[0]-u[0]*c,s[1]-u[1]*c,s[2]-u[2]*c],p=[d[0]+u[0]*a,d[1]+u[1]*a,d[2]+u[2]*a],f=[p[0]-u[0]*l,p[1]-u[1]*l,p[2]-u[2]*l];r.setPosition.apply(r,f),r.setFocalPoint.apply(r,p)}},e.getSliceRange=function(){if(t.volumeMapper){var r=e.getSliceNormal();if(r[0]===n.sliceNormal[0]&&r[1]===n.sliceNormal[1]&&r[2]===n.sliceNormal[2])return n.sliceRange;var i=[[(c=t.volumeMapper.getBounds())[0],c[2],c[4]],[c[0],c[2],c[5]],[c[0],c[3],c[4]],[c[0],c[3],c[5]],[c[1],c[2],c[4]],[c[1],c[2],c[5]],[c[1],c[3],c[4]],[c[1],c[3],c[5]]],o=Es.buildFromDegree().identity().rotateFromDirections(r,[1,0,0]);i.forEach((function(e){return o.apply(e)}));for(var a=1/0,s=-1/0,l=0;l<8;l++){var u=i[l][0];u>s&&(s=u),u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mb,n),cg.extend(e,t,n),de.setGet(e,t,["volumeMapper"]),hb(e,t)}var vb={newInstance:de.newInstance(gb,"vtkInteractorStyleMPRSlice"),extend:gb};function yb(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 bb(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ab,n),Qm.extend(e,t,n),de.setGet(e,t,["sendMouseMove","remoteEventAddOn","throttleDelay"]),de.event(e,t,"RemoteMouseEvent"),de.event(e,t,"RemoteWheelEvent"),de.event(e,t,"RemoteGestureEvent"),Cb(e,t)}var _b={newInstance:de.newInstance(Pb,"vtkInteractorStyleRemoteMouse"),extend:Pb},Ob={vtkInteractorStyleImage:pb,vtkInteractorStyleManipulator:cg,vtkInteractorStyleMPRSlice:vb,vtkInteractorStyleRemoteMouse:_b,vtkInteractorStyleTrackballCamera:lb},Eb=n(3379),Tb=n.n(Eb),Db=n(8071),Ib=(Tb()(Db.Z,{insert:"head",singleton:!1}),Db.Z.locals||{});function kb(){}var Mb={nw:"northWestContainer",n:"northContainer",ne:"northEastContainer",w:"westContainer",e:"eastContainer",sw:"southWestContainer",s:"southContainer",se:"southEastContainer"};function Nb(e,t){function n(){for(var e=Object.keys(t.templates),n=e.length;n--;){var r=t[Mb[e[n]]],i=t.templates[e[n]];r&&i&&(r.innerHTML=i(t.metadata))}}t.classHierarchy.push("vtkCornerAnnotation"),t.templates||(t.templates={}),t.metadata||(t.metadata={}),t.annotationContainer=document.createElement("div"),t.annotationContainer.setAttribute("class",Ib.container),t.annotationContainer.innerHTML='\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),t.northWestContainer=t.annotationContainer.querySelector(".js-nw"),t.northContainer=t.annotationContainer.querySelector(".js-n"),t.northEastContainer=t.annotationContainer.querySelector(".js-ne"),t.westContainer=t.annotationContainer.querySelector(".js-w"),t.eastContainer=t.annotationContainer.querySelector(".js-e"),t.southWestContainer=t.annotationContainer.querySelector(".js-sw"),t.southContainer=t.annotationContainer.querySelector(".js-s"),t.southEastContainer=t.annotationContainer.querySelector(".js-se"),e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.annotationContainer),t.container!==n&&(t.container=n,t.container&&(t.container.appendChild(t.annotationContainer),e.resize()),e.modified())},e.resize=kb,e.updateTemplates=function(r){t.templates=Object.assign(t.templates,r),n(),e.modified()},e.updateMetadata=function(r){t.metadata=Object.assign(t.metadata,r),n(),e.modified()}}var Rb={templates:null,metadata:null};function Fb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rb,n),de.obj(e,t),de.get(e,t,["annotationContainer","northWestContainer","northContainer","northEastContainer","westContainer","eastContainer","southWestContainer","southContainer","southEastContainer","metadata"]),Nb(e,t)}var Bb={newInstance:de.newInstance(Fb,"vtkCornerAnnotation"),extend:Fb,applyTemplate:function(e,t,n){return e.replace(/\${([^{]+)}/g,(function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"${".concat(e,"}");return e.split(".").reduce((function(e,t){return void 0!==e[t]?e[t]:n}),t)}(e.substr(2,e.length-3).trim(),t,n)}))}},Lb=n(631),Vb=(Tb()(Lb.Z,{insert:"head",singleton:!1}),Lb.Z.locals||{});function jb(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 Ub(e){for(var t=1;t1e3;)t.push("000".concat(n%1e3).slice(-3)),n=Math.floor(n/1e3);return n>0&&t.push(n),t.reverse(),t.join("'")}function Wb(e,t){function n(){if(t.title.style.display=t.titleVisibility?"block":"none",t.titleVisibility){var e=t.buffer[t.buffer.length-1],n="Mean: ".concat(Math.round(t.fpsSum/t.buffer.length)," - Current: ").concat(Math.round(e));n!==t.lastText&&(t.lastText=n,t.title.innerHTML=n)}}function r(){if(t.info.style.display=t.infoVisibility?"grid":"none",t.infoVisibility){var e=[];if(t.renderWindow){var n=t.renderWindow.getViews()[0];n&&n.getSize&&e.push('').concat(n.getSize().join("x"),""));var r=Ub(Ub({},t.renderWindow.getStatistics()),t.addOnStats),i=Object.keys(r);i.sort();for(var o=0;o').concat(i[o],'').concat(zb(r[i[o]]),""))}t.info.innerHTML=e.join("")}}function i(){if(t.canvas.style.display=t.canvasVisibility?"block":"none",t.canvasVisibility){t.canvas.setAttribute("width",t.bufferSize),t.canvas.setAttribute("height",t.graphHeight);var e=t.canvas.getContext("2d"),n=t.canvas,r=n.width,i=n.height;e.clearRect(0,0,r,i),e.strokeStyle="green",e.beginPath(),e.moveTo(0,i-t.buffer[0]);for(var o=1;ot.bufferSize;)t.fpsSum-=t.buffer.shift();n(),i()}}t.classHierarchy.push("vtkFPSMonitor"),t.fpsMonitorContainer=document.createElement("div"),t.fpsMonitorContainer.setAttribute("class",t.orientationClass),t.fpsMonitorContainer.innerHTML='\n
\n
Mean N/A - Current N/A
\n \n
\n
\n
'),t.canvas=t.fpsMonitorContainer.querySelector(".js-graph"),t.title=t.fpsMonitorContainer.querySelector(".js-title"),t.info=t.fpsMonitorContainer.querySelector(".js-info"),e.update=function(){e.render()},e.setRenderWindow=function(e){for(;t.subscriptions.length;)t.subscriptions.pop().unsubscribe();t.renderWindow=e,t.interactor=e?e.getInteractor():null,t.interactor&&t.subscriptions.push(t.interactor.onAnimation(o))},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.fpsMonitorContainer),t.container!==n&&(t.container=n,t.container&&(t.container.appendChild(t.fpsMonitorContainer),e.resize()),e.modified())},e.render=function(){n(),r(),i()},e.resize=Gb,e.setOrientationToHorizontal=function(){t.fpsMonitorContainer.classList.remove(t.orientationClass),t.orientationClass=Vb.horizontalContainer,t.fpsMonitorContainer.classList.add(t.orientationClass)},e.setOrientationToVertical=function(){t.fpsMonitorContainer.classList.remove(t.orientationClass),t.orientationClass=Vb.verticalContainer,t.fpsMonitorContainer.classList.add(t.orientationClass)},e.setOrientation=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"horizontal";"horizontal"===t?e.setOrientationToHorizontal():e.setOrientationToVertical()},e.setAddOnStats=function(e){t.addOnStats||(t.addOnStats={}),Object.assign(t.addOnStats,e),r()},e.setMonitorVisibility=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.setCanvasVisibility(n),e.setInfoVisibility(r),e.setTitleVisibility(t)};var a=e.delete;e.delete=function(){e.setRenderWindow(null),e.setContainer(null),a()},t.subscriptions.push(e.onModified(e.update))}var Hb={bufferSize:200,graphHeight:120,buffer:[60],subscriptions:[],fpsSum:0,orientationClass:Vb.horizontalContainer,canvasVisibility:!0,titleVisibility:!0,infoVisibility:!0};function Kb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hb,n),de.obj(e,t),de.get(e,t,["fpsMonitorContainer","renderWindow","addOnStats"]),de.setGet(e,t,["bufferSize","canvasVisibility","infoVisibility","titleVisibility"]),Wb(e,t)}var qb={newInstance:de.newInstance(Kb,"vtkFPSMonitor"),extend:Kb},Xb='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n Contrast\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n',Yb='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n VTK-js favicon-logo\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n',Zb='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n Spacing\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n',Jb={Contrast:Xb,Logo:Yb,Spacing:Zb,Tint:'\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n Tint\n Created with Sketch.\n \n \n \n \n \n \n'},Qb={SliderOrientation:{VERTICAL:0,HORIZONTAL:1}},$b=n(1995),ew=(Tb()($b.Z,{insert:"head",singleton:!1}),$b.Z.locals||{});function tw(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 nw(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ow,n),de.obj(e,t),de.get(e,t,["orientation","value","values"]),de.set(e,t,["orientation"]),de.event(e,t,"ValueChange"),iw(e,t)}var sw=nw({newInstance:de.newInstance(aw,"vtkSlider"),extend:aw},Qb),lw=JSON.parse('[{"ColorSpace":"Diverging","Name":"Cool to Warm","NanColor":[1,1,0],"RGBPoints":[0,0.23137254902,0.298039215686,0.752941176471,0.5,0.865,0.865,0.865,1,0.705882352941,0.0156862745098,0.149019607843]},{"ColorSpace":"Diverging","Name":"Warm to Cool","NanColor":[1,1,0],"RGBPoints":[0,0.705882352941,0.0156862745098,0.149019607843,0.5,0.865,0.865,0.865,1,0.23137254902,0.298039215686,0.752941176471]},{"ColorSpace":"RGB","Name":"Rainbow Desaturated","NanColor":[1,1,0],"RGBPoints":[0,0.278431372549,0.278431372549,0.858823529412,0.143,0,0,0.360784313725,0.285,0,1,1,0.429,0,0.501960784314,0,0.571,1,1,0,0.714,1,0.380392156863,0,0.857,0.419607843137,0,0,1,0.878431372549,0.301960784314,0.301960784314]},{"ColorSpace":"RGB","Name":"Cold and Hot","NanColor":[1,1,0],"RGBPoints":[0,0,1,1,0.45,0,0,1,0.5,0,0,0.501960784314,0.55,1,0,0,1,1,1,0]},{"ColorSpace":"RGB","Name":"Black-Body Radiation","NanColor":[0,0.498039215686,1],"RGBPoints":[0,0,0,0,0.4,0.901960784314,0,0,0.8,0.901960784314,0.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,0.333,0,0,0.501960784314,0.666,0,0.501960784314,1,1,1,1,1]},{"ColorSpace":"RGB","Name":"Black, Orange and White","NanColor":[1,1,0],"RGBPoints":[0,0,0,0,0.333,0.501960784314,0,0,0.666,1,0.501960784314,0,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_rainbow_bright","RGBPoints":[-1,0.32549,0.14902,0.960784,-0.866221,0.297047,0.375586,0.963836,-0.732441,0.180302,0.536818,0.964627,-0.598662,0.1302,0.649207,0.929647,-0.464883,0.0445143,0.749654,0.855998,-0.331104,0.0271325,0.830713,0.721527,-0.197324,0.259504,0.866145,0.543555,-0.0635452,0.428364,0.890725,0.329819,0.0702341,0.568503,0.898508,0.187623,0.204013,0.738259,0.890317,0.0825461,0.337793,0.84546,0.86136,0.0147555,0.471572,0.912191,0.808018,0,0.605351,0.962848,0.710445,0,0.73913,0.999469,0.600258,0.0176284,0.87291,0.994156,0.445975,0.193912,1,0.980407,0.247105,0.262699]},{"ColorSpace":"Lab","Name":"erdc_rainbow_dark","RGBPoints":[-1,0,0,0.423499,-0.866221,0,0.119346,0.529237,-0.732441,0,0.238691,0.634976,-0.598662,0,0.346852,0.68788,-0.464883,0,0.45022,0.718141,-0.331104,0,0.553554,0.664839,-0.197324,0,0.651082,0.519303,-0.0635452,0.115841,0.72479,0.352857,0.0702341,0.326771,0.781195,0.140187,0.204013,0.522765,0.798524,0.0284624,0.337793,0.703162,0.788685,0.00885756,0.471572,0.845118,0.751133,0,0.605351,0.955734,0.690825,0,0.73913,0.995402,0.567916,0.0618524,0.87291,0.987712,0.403398,0.164851,1,0.980407,0.247105,0.262699]}]'),uw=Object.create(null);lw.filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){uw[e.Name]=e}));var cw=Object.keys(uw);cw.sort();var dw={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(uw[e.Name]||(cw.push(e.Name),cw.sort()),uw[e.Name]=e)},removePresetByName:function(e){var t=cw.indexOf(e);t>-1&&cw.splice(t,1),delete uw[e]},getPresetByName:function(e){return uw[e]},rgbPresetNames:cw};function pw(){return lp()('/*! For license information please see ComputeHistogram.worker.worker.js.LICENSE.txt */\n!function(){"use strict";var e,t,r={666:function(e,t,r){var n=function(){function e(e,t){for(var r=0;r1?t-1:0),n=1;n1?n-1:0),a=1;a3&&void 0!==arguments[3]?arguments[3]:[];v([0,e,t,r],n)},_=function(e,t,r){if(!t)throw new Error("eventName is required");if("string"!=typeof t)throw new Error("eventName should be string");v([1,e,t,r])};return self.addEventListener("message",(function(e){var t=e.data;Array.isArray(t)?b.apply(void 0,a(t)):t&&t.eventName&&h.emitLocally.apply(h,[t.eventName].concat(a(t.args)))})),h},e.exports.TransferableResponse=c},197:function(e){var t=function(){function e(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+s||do+l?p===l?o:o+p/(p-l)*(d-o-l):-p===l?o:o-p/(p+l)*(d-o-l))-o)/p,h=Math.exp(-4*f*f),m=1-f*f,g=1,v=a*(u<1?u*m+(1-u)*h:(2-u)*m+(u-1)*g);v>n[c]&&(n[c]=v)}}return n}function ww(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},i=t[3],o=t[2]/(n.length-1),a=!!r.fillStyle,s=i+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var l=0;l3&&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 Sw(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,y(n));return n.indexOf(r)}function Cw(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,i=n.offsetY;t&&n.preventDefault(),e(r,i)}}function Aw(){vw.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,y(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function Pw(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(i){var o=i.target.getBoundingClientRect(),a=Array.prototype.map.call(i.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/i.touches.length}));"touchstart"===i.type?(clearTimeout(vw[e].timeout),vw[e].ts=i.timeStamp,vw[e].singleTouche=a,vw[e].touches=i.touches.length):"touchmove"===i.type?(vw[e].ts=0,vw[e].count=0,vw[e].ready=!1):"touchend"===i.type&&(i.timeStamp-vw[e].ts1&&void 0!==arguments[1]?arguments[1]:{},i=r.numberOfBinToConsiders,o=void 0===i?1:i,a=r.numberOfBinsToSkip,s=void 0===a?1:a,l=r.numberOfComponents,u=void 0===l?1:l,c=r.component,d=void 0===c?0:c;t.histogram=null,t.histogramArray=n,t.dataRange=Ne(n,d,u);var p=g(t.dataRange,2),f=p[0],h=p[1],m=4,v=Math.floor(n.length/m)||1;v+=v%u;for(var y=0,b=[],w=[];yr;)i.shift();for(var l=i.reduce((function(e,t){return e+t}),0)/r,u=0,c=t.histogram.length;u1){for(var s=t.style.iconSize+t.style.padding,l=s,u=0;r>l;)u+=1,l+=s;switch(u){case 0:var c=e.addGaussian(0,1,.1,0,0),d=t.gaussians[c],p=hw({},d),f=yw.adjustPosition;t.activeGaussian=c,t.selectedGaussian=c,de.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:f,gaussian:d,originalGaussian:p}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(o<0||o>1||a<0||a>1)t.selectedGaussian=-1,t.dragAction=null;else{var h=Sw(o,t.gaussians);h!==t.selectedGaussian&&(t.selectedGaussian=h,e.modified())}return!0},e.onHover=function(n,r){var i=20/t.canvas.height,o=g(xw(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),2),a=o[0],s=o[1],l=g(xw(n,r,t.graphArea),1)[0],u=a<0?t.selectedGaussian:Sw(a,t.gaussians);t.canvas.style.cursor="default";var c=t.gaussians[u];if(t.enableRangeZoom&&l>=0&&rt.rangeZoom[1]-d?t.canvas.style.cursor=gw.adjustZoom:t.canvas.style.cursor=gw.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:yw.adjustZoom}}else if(c&&l>=0){var p,f=1-s;p=f>c.height+i?"adjustPosition":f>c.height-i?Math.abs(a-c.position).5*c.height+i?"adjustPosition":f>.5*c.height-i?Math.abs(a-c.position)i?"adjustPosition":"adjustWidth",t.canvas.style.cursor=gw[p];var h=yw[p],m=hw({},c);t.dragAction={originalXY:[a,s],action:h,gaussian:c,originalGaussian:m}}return u!==t.activeGaussian&&(t.activeGaussian=u,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var i=xw(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Sw(i,t.gaussians);t.gaussianSide=0;var a=t.gaussians[o];return a&&(t.gaussianSide=a.position-i),o!==t.selectedGaussian&&i>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var i=g(xw(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),2),o=i[0],a=i[1];(0,t.dragAction.action)(o,a,hw({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=bw(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 i=g(xw(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),2),o=i[0],a=i[1];return o>=0&&e.addGaussian(o,1-a,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var i=xw(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=Sw(i,t.gaussians);return i>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=vw.length,t=arguments.length,n=new Array(t),r=0;r1){var l=Math.round(t.style.iconSize/2-t.style.strokeWidth),u=Math.round(l+o+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(u-o/2,u,l,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(u-l+t.style.strokeWidth+2-o/2,u),e.lineTo(u+l-t.style.strokeWidth-2-o/2,u),e.stroke(),e.moveTo(u-o/2,u-l+t.style.strokeWidth+2),e.lineTo(u-o/2,u+l-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(u-o/2,u+o/2+t.style.iconSize,l,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(u-l+t.style.strokeWidth+2-o/2,u+o/2+t.style.iconSize),e.lineTo(u+l-t.style.strokeWidth-2-o/2,u+o/2+t.style.iconSize),e.stroke()}if(t.histogram&&ww(e,a,Ow(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),ww(e,a,Ow(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var c=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 i=r||document.createElement("canvas");i.setAttribute("width",t),i.setAttribute("height",256);for(var o=i.getContext("2d"),a=e.getUint8Table(n[0],n[1],t,4),s=o.getImageData(0,0,t,256),l=0;l<256;l++)s.data.set(a,4*l*t);for(var u=256*t*4,c=4*t,d=3;d0&&(i=Math.min(i,a)),t.opacities[a]>0&&(o=Math.max(o,a));return[n[0]+i*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,y(t.size))}var Dw={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 Iw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dw,n),de.obj(e,t),de.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),de.setGetArray(e,t,["rangeZoom"],2),de.get(e,t,["size","canvas","gaussians"]),de.event(e,t,"opacityChange"),de.event(e,t,"animation"),de.event(e,t,"zoomChange"),Tw(e,t)}var kw=hw({newInstance:de.newInstance(Iw,"vtkPiecewiseGaussianWidget"),extend:Iw},Ew),Mw=n(4734),Nw=(Tb()(Mw.Z,{insert:"head",singleton:!1}),Mw.Z.locals||{}),Rw=dw.rgbPresetNames.map((function(e){return'")}));function Fw(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(),i=dw.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(i),o.setMappingRange.apply(o,y(r)),o.updateRange(),t.renderWindow.render()}}function i(){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 i=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*i*i),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",Nw.container),t.widget=kw.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(a,s,l){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(s),e.setRenderWindow(a);var d=t.actor.getMapper().getInputData(),p=d.getPointData().getScalars()||d.getPointData().getArrays()[0],f=t.actor.getProperty().getRGBTransferFunction(0),h=t.actor.getProperty().getScalarOpacity(0),m=l?"DarkBG":"BrightBG",g={};["button","presets","shadow"].forEach((function(e){g[e]=Nw["".concat(e).concat(m)]})),t.el.innerHTML='\n
\n
').concat(Yb,'
\n \n \n
\n
\n
\n
').concat(Zb,'
\n \n
\n
\n
').concat(Xb,'
\n \n
\n
\n
\n ');var v=t.el.querySelector(".js-button"),y=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),w=t.el.querySelector(".js-spacing"),x=t.el.querySelector(".js-edge"),S=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(p.getData()),t.widget.setColorTransferFunction(f),t.widget.applyOpacity(h),t.widget.setContainer(S),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),v.addEventListener("click",e.toggleVisibility),y.addEventListener("change",n),b.addEventListener("change",r),w.addEventListener("input",i),x.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(h),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())})),f.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),y.value=Number(u)?"1":"0",b.value=c,n(),r(),i(),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 a=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!a(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,y(t.size))}var Bw={size:[600,300],expanded:!0,rescaleColorMap:!1};function Lw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bw,n),de.obj(e,t),de.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),de.get(e,t,["widget"]),Fw(e,t)}var Vw=de.newInstance(Lw,"vtkVolumeController"),jw={vtkCornerAnnotation:Bb,vtkFPSMonitor:qb,vtkIcons:Jb,vtkSlider:sw,vtkVolumeController:{newInstance:Vw,extend:Lw}};function Uw(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 Gw(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=Gw(Gw({},Ww),n);zm.extend(e,t,r),de.setGet(e,t,["widgetRep","parent","dragable"]),zw(e,t)}var Kw={newInstance:de.newInstance(Hw,"vtkAbstractWidget"),extend:Hw};function qw(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,i,o){if(t.callback){var a=n.getCompositeProjectionMatrix(r,-1,1);Io(a,a);for(var s=e.getPoints(),l=new Float64Array(3),u=i.usize,c=i.vsize,d=u/2,p=c/2,f=[],h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xw,n),Uv.extend(e,t,n),de.setGet(e,t,["callback","useZValues"]),qw(e,t)}var Zw={newInstance:de.newInstance(Yw,"vtkPixelSpaceCallbackMapper"),extend:Yw},Jw={OUTSIDE:0,NEARBY:1,SELECTING:2,TRANSLATING:3,SCALING:4},Qw={InteractionState:Jw},$w={DISPLAY:0,NORMALIZED_DISPLAY:1,VIEWPORT:2,NORMALIZED_VIEWPORT:3,PROJECTION:4,VIEW:5,WORLD:6},ex={Coordinate:$w};function tx(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 nx=ex.Coordinate,rx=de.vtkErrorMacro;function ix(e,t){t.classHierarchy.push("vtkCoordinate"),e.setValue=function(){if(t.deleted)return rx("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ox,n),de.obj(e,t),de.set(e,t,["property"]),de.get(e,t,["value"]),de.setGet(e,t,["coordinateSystem","referenceCoordinate","renderer"]),de.getArray(e,t,["value"],3),ix(e,t)}var sx=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ux,n),de.obj(e,t),de.setGet(e,t,["pixelTolerance","worldTolerance"]),lx(e,t)}var dx={newInstance:de.newInstance(cx,"vtkPointPlacer"),extend:cx},px=de.vtkErrorMacro;function fx(e,t){t.classHierarchy.push("vtkWidgetRepresentation"),e.getPickedActor=function(e,n,r,i){return i.pick(e,n,r,t.renderer),i.getActors[0]},e.adjustBounds=function(e,n,r){6===e.length?(r[0]=(e[0]+e[1])/2,r[1]=(e[2]+e[3])/2,r[2]=(e[4]+e[5])/2,n[0]=r[0]+t.placeFactor*(e[0]-r[0]),n[1]=r[0]+t.placeFactor*(e[1]-r[0]),n[2]=r[1]+t.placeFactor*(e[2]-r[1]),n[3]=r[1]+t.placeFactor*(e[3]-r[1]),n[4]=r[2]+t.placeFactor*(e[4]-r[2]),n[5]=r[2]+t.placeFactor*(e[5]-r[2])):px("vtkWidgetRepresentation::adjustBounds Can't process bounds, not enough values...")},e.sizeHandlesInPixels=function(e,n){var r=t.renderer;if(!t.validPick||!r||!r.getActiveCamera())return t.handleSize*e*t.initialLength;var i=zm.computeWorldToDisplay(r,n[0],n[1],n[2]),o=i[2],a=i[0]-t.handleSize/2,s=i[1]-t.handleSize/2,l=zm.computeDisplayToWorld(r,a,s,o);a=i[0]+t.handleSize/2,s=i[1]+t.handleSize/2;for(var u=zm.computeDisplayToWorld(r,a,s,o),c=0,d=0;d<3;d++)c+=(u[d]-l[d])*(u[d]-l[d]);return e*(Math.sqrt(c)/2)},e.sizeHandlesRelativeToViewport=function(e,n){var r=t.renderer;if(!t.validPick||!r||!r.getActiveCamera())return t.handleSize*e*t.initialLength;var i=r.getViewport(),o=r.getRenderWindow().getViews()[0].getViewportSize(r),a=zm.computeWorldToDisplay(r,n[0],n[1],n[2])[2],s=o[0]*i[0],l=o[1]*i[1],u=zm.computeDisplayToWorld(r,s,l,a);s=o[0]*i[2],l=o[1]*i[3];for(var c=zm.computeDisplayToWorld(r,s,l,a),d=0,p=0;p<3;p++)d+=(c[p]-u[p])*(c[p]-u[p]);return e*(Math.sqrt(d)/2)}}var hx={renderer:null,interactionState:0,startEventPosition:[0,0,0],lastEventPosition:[0,0,0],placeFactor:.5,placed:0,handleSize:.05,validPick:0,initialBounds:[0,1,0,1,0,1],initialLength:0,needToRender:0};function mx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hx,n),Hg.extend(e,t,n),de.setGet(e,t,["renderer","handleSize","placeFactor","needToRender","interactionState"]),fx(e,t)}var gx={newInstance:de.newInstance(mx,"vtkWidgetRepresentation"),extend:mx};function vx(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 yx=Qw.InteractionState;function bx(e,t){t.classHierarchy.push("vtkHandleRepresentation"),e.setDisplayPosition=function(e){if(t.renderer&&t.pointPlacer){var n=[];t.pointPlacer.computeWorldPosition(t.renderer,e,n)&&(t.displayPosition.setValue(e),t.worldPosition.setValue(n))}else t.displayPosition.setValue(e)},e.getDisplayPosition=function(e){if(t.renderer){var n=t.worldPosition.getComputedDisplayValue(t.renderer);t.displayPosition.setValue(n[0],n[1],0)}e[0]=t.displayPosition.getValue()[0],e[1]=t.displayPosition.getValue()[1],e[2]=t.displayPosition.getValue()[2]},e.getDisplayPosition=function(){if(t.renderer){var e=t.worldPosition.getComputedDisplayValue(t.renderer);t.displayPosition.setValue(e[0],e[1],0)}return t.displayPosition.getValue()},e.setWorldPosition=function(e){t.worldPosition.setValue(e)},e.getWorldPosition=function(e){t.worldPosition.getValue(e)},e.getWorldPosition=function(){return t.worldPosition.getValue()}}var wx={displayPosition:null,worldPosition:null,tolerance:15,activeRepresentation:0,constrained:0,pointPlacer:null};function xx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wx,n),gx.extend(e,t,n),t.displayPosition=sx.newInstance(),t.displayPosition.setCoordinateSystemToDisplay(),t.worldPosition=sx.newInstance(),t.worldPosition.setCoordinateSystemToWorld(),t.pointPlacer=dx.newInstance(),t.interactionState=yx.OUTSIDE,de.setGet(e,t,["activeRepresentation","tolerance"]),bx(e,t)}var Sx=function(e){for(var t=1;t=o.left&&e[0]<=o.left+i&&e[1]>=o.bottom&&e[1]<=o.bottom+r?t.interactionState=Jw.SELECTING:t.interactionState=Jw.OUTSIDE}return t.interactionState},e.startComplexWidgetInteraction=function(e){t.startEventPosition[0]=e[0],t.startEventPosition[1]=e[1],t.startEventPosition[2]=0,t.lastEventPosition[0]=e[0],t.lastEventPosition[1]=e[1]},e.complexWidgetInteraction=function(n){if(t.interactionState===Jw.SELECTING){var r=t.point.getCenter(),i=zm.computeWorldToDisplay(t.renderer,r[0],r[1],r[2])[2],o=zm.computeDisplayToWorld(t.renderer,t.lastEventPosition[0],t.lastEventPosition[1],i),a=zm.computeDisplayToWorld(t.renderer,n[0],n[1],i);e.moveFocus(o,a),t.lastEventPosition[0]=n[0],t.lastEventPosition[1]=n[1],e.modified()}},e.setWorldPosition=function(r){t.point.setCenter(r),n.setWorldPosition(t.point.getCenter()),e.modified()},e.setDisplayPosition=function(r){n.setDisplayPosition(r),e.setWorldPosition(t.worldPosition.getValue())},e.moveFocus=function(n,r){var i=[];qe(r,n,i);var o=t.point.getCenter();Ke(o,i,o),e.setWorldPosition(o)},e.getBounds=function(){var e=t.point.getCenter(),n=[];return n[0]=t.placeFactor*(e[0]-1),n[1]=t.placeFactor*(e[0]+1),n[2]=t.placeFactor*(e[1]-1),n[3]=t.placeFactor*(e[1]+1),n[4]=t.placeFactor*(e[2]-1),n[5]=t.placeFactor*(e[2]+1),n},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.canvas),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.canvas),e.modified())},e.setLabelStyle=function(n){t.labelStyle=Tx(Tx({},t.labelStyle),n),e.modified()},e.setSelectLabelStyle=function(n){t.selectLabelStyle=Tx(Tx({},t.selectLabelStyle),n),e.modified()},e.computeTextDimensions=function(e){var n=t.highlight?t.selectLabelStyle:t.labelStyle,r=/\r?\n/.exec(e),i=null!==r?r[0]:null,o=e.split(i),a=n.fontSize*(1+n.lineSpace),s=n.fontSize/4,l=2*s+n.fontSize+(o.length-1)*a;return{width:o.reduce((function(e,n){return Math.max(e,Math.round(t.context.measureText(n).width))}),0),height:l,lineSpace:a,padding:s,lines:o}},e.updateLabel=function(){if(t.context&&t.canvas&&(t.context.clearRect(0,0,t.canvas.width,t.canvas.height),t.canvas.hidden=!t.actor.getVisibility(),t.actor.getVisibility())){var n=t.highlight?t.selectLabelStyle:t.labelStyle,r=e.computeTextDimensions(t.labelText),i=r.width,o=r.height,a=r.lineSpace,s=r.padding,l=r.lines;t.canvas.height=Math.round(o),t.canvas.width=i+2*s,t.context.strokeStyle=n.strokeColor,t.context.lineWidth=n.strokeSize,t.context.fillStyle=n.fontColor,t.context.font="".concat(n.fontStyle," ").concat(n.fontSize,"px ").concat(n.fontFamily);var u=s,c=n.fontSize;l.forEach((function(e){var n=0;t.textAlign===Ax?n=i-Math.round(t.context.measureText(e).width):t.textAlign===Px&&(n=.5*(i-Math.round(t.context.measureText(e).width))),t.context.strokeText(e,u+n,c),t.context.fillText(e,u+n,c),c+=a}))}},e.highlight=function(n){t.highlight=n,e.modified()},e.getCanvasSize=function(){return t.canvas?{height:t.canvas.height,width:t.canvas.width}:null}}function Ix(e){return Tx({container:null,labelStyle:{fontColor:"white",fontStyle:"normal",fontSize:15,fontFamily:"Arial",strokeColor:"black",strokeSize:1,lineSpace:.2},labelText:"",textAlign:Cx,verticalAlign:_x,selectLabelStyle:{fontColor:"rgb(0, 255, 0)",fontStyle:"normal",fontSize:15,fontFamily:"Arial",strokeColor:"black",strokeSize:1,lineSpace:.2}},e)}function kx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ix(n)),Sx.extend(e,t,n),e.setPlaceFactor(1),t.canvas=document.createElement("canvas"),t.canvas.style.position="absolute",t.context=t.canvas.getContext("2d"),t.point=Vf.newInstance(),t.point.setNumberOfPoints(1),t.point.setRadius(0),t.mapper=Zw.newInstance(),t.mapper.setInputConnection(t.point.getOutputPort()),t.mapper.setCallback((function(n){if(t.canvas){var r=0;t.verticalAlign===_x?r=-t.canvas.height:t.verticalAlign===Ox&&(r=-.5*t.canvas.height);var i=window.devicePixelRatio;t.canvas.style.left="".concat(Math.round(n[0][0])/i,"px"),t.canvas.style.bottom="".concat(Math.round(n[0][1]/i+r),"px"),e.modified()}})),t.actor=pv.newInstance(),t.actor.setMapper(t.mapper),t.actorVisibility=!0,t.highlight=!1,t.actor.onModified((function(){t.actorVisibility!==t.actor.getVisibility()&&(t.actorVisibility=t.actor.getVisibility(),e.modified())})),e.onModified((function(){e.updateLabel()})),de.setGet(e,t,["labelText","textAlign","verticalAlign"]),de.get(e,t,["container","labelStyle"]),Dx(e,t)}var Mx={newInstance:de.newInstance(kx,"vtkLabelRepresentation"),extend:kx},Nx={OUTSIDE:0,ONP1:1,ONP2:2,TRANSLATINGP1:3,TRANSLATINGP2:4,ONLINE:5,SCALING:6},Rx=Nx;function Fx(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 Bx(e){for(var t=1;t=i.t1&&(i.t1=c,i.planeId=s):c<=i.t2&&(i.t2=c),i.t1>i.t2)return i.intersect=0,i}}return i.intersect=1,i}var Vx={clipLineWithPlane:Lx};function jx(e,t){t.classHierarchy.push("vtkCellPicker");var n=Bx({},e);function r(){t.dataSet=null,t.mapper=null,t.cellId=-1,t.pCoords[0]=0,t.pCoords[1]=0,t.pCoords[2]=0,t.cellIJK[0]=0,t.cellIJK[1]=0,t.cellIJK[2]=0,t.mapperNormal[0]=0,t.mapperNormal[1]=0,t.mapperNormal[2]=1,t.pickNormal[0]=0,t.pickNormal[1]=0,t.pickNormal[2]=1}e.initialize=function(){r(),n.initialize()},e.computeSurfaceNormal=function(e,t,n,r){var i=e.getPointData().getNormals();if(!i)return 0;r[0]=0,r[1]=0,r[2]=0;for(var o=[],a=0;a<3;a++)i.getTuple(t.getPointsIds()[a],o),r[0]+=o[0]*n[a],r[1]+=o[1]*n[a],r[2]+=o[2]*n[a];return nt(r),1},e.pick=function(r,i){e.initialize();var o=n.pick(r,i);if(o){var a=i.getActiveCamera(),s=[];if(a.getPosition(s),a.getParallelProjection()){var l=[];a.getFocalPoint(l),t.pickNormal[0]=s[0]-l[0],t.pickNormal[1]=s[1]-l[1],t.pickNormal[2]=s[2]-l[2]}else t.pickNormal[0]=s[0]-t.pickPosition[0],t.pickNormal[1]=s[1]-t.pickPosition[1],t.pickNormal[2]=s[2]-t.pickPosition[2];nt(t.pickNormal)}return o},e.intersectWithLine=function(n,r,i,o){var a=Number.MAX_VALUE,s=Lx(o,t.transformMatrix,n,r);if(o&&!s.intersect)return Number.MAX_VALUE;if(o.isA("vtkImageMapper")){var l=o.intersectWithLineForCellPicking(n,r);l&&(a=l.t,t.cellIJK=l.ijk,t.pCoords=l.pCoords)}else o.isA("vtkMapper")&&(a=e.intersectActorWithLine(n,r,0,1,i,o));if(a=0){t.mapperPosition[0]=1*n[0]+0*r[0],t.mapperPosition[1]=1*n[1]+0*r[1],t.mapperPosition[2]=1*n[2]+0*r[2];var u=[];o.getClippingPlaneInDataCoords(t.transformMatrix,s.clippingPlaneId,u),nt(u),t.mapperNormal[0]=-u[0],t.mapperNormal[1]=-u[1],t.mapperNormal[2]=-u[2]}io(t.pickPosition,t.mapperPosition,t.transformMatrix);var c=t.transformMatrix;t.mapperNormal[0]=c[0]*t.pickNormal[0]+c[4]*t.pickNormal[1]+c[8]*t.pickNormal[2],t.mapperNormal[1]=c[1]*t.pickNormal[0]+c[5]*t.pickNormal[1]+c[9]*t.pickNormal[2],t.mapperNormal[2]=c[2]*t.pickNormal[0]+c[6]*t.pickNormal[1]+c[10]*t.pickNormal[2]}return a},e.intersectActorWithLine=function(n,i,o,a,s,l){var u=Number.MAX_VALUE,c=[0,0,0],d=Number.MAX_VALUE,p=[0,0,0],f=-1,h=Mu.newInstance(),m=[],g=l.getInputData(),v=[0,0,0],y=[0,0,0];if(v[0]=n[0],v[1]=n[1],v[2]=n[2],y[0]=i[0],y[1]=i[1],y[2]=i[2],0!==o||1!==a)for(var b=0;b<3;b++)v[b]=n[b]*(1-o)+i[b]*o,y[b]=n[b]*(1-a)+i[b]*a;if(g.getPolys)for(var w=g.getPolys(),x=g.getPoints(),S=w.getData(),C=0,A=[-1,-1,-1],P=Mu.newInstance(),_=Ns.newInstance(),O=0;O=o&&I.t<=a){var k=P.getParametricDistance(E);if(k=0&&uB&&(L=V,B=R[V]);-1!==L&&(t.pointId=h.getPointsIds()[L]),t.mapperPosition[0]=c[0],t.mapperPosition[1]=c[1],t.mapperPosition[2]=c[2],e.computeSurfaceNormal(g,h,R,t.mapperNormal)||(t.mapperNormal[0]=n[0]-i[0],t.mapperNormal[1]=n[1]-i[1],t.mapperNormal[2]=n[2]-i[2],nt(t.mapperNormal))}return u}}var Ux={cellId:-1,pCoords:[],cellIJK:[],pickNormal:[],mapperNormal:[]};function Gx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ux,n),Qv.extend(e,t,n),de.getArray(e,t,["pickNormal","mapperNormal","pCoords","cellIJK"]),de.get(e,t,["cellId"]),jx(e,t)}var zx=Bx({newInstance:de.newInstance(Gx,"vtkCellPicker"),extend:Gx},Vx);function Wx(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 Hx(e,t){t.classHierarchy.push("vtkSphereHandleRepresentation");var n=function(e){for(var t=1;t=0&&e<3)return e;if(!t.waitingForMotion){var r=st(t.cursorPicker.getPickPosition(),t.startEventPosition),i=t.hotSpotSize*t.initialLength;return r>i*i?(t.waitingForMotion=0,t.cursorPicker.getCellId()):(t.waitingForMotion=1,t.waitCount=0,-1)}if(t.waitingForMotion&&n){t.waitingForMotion=0;var o=[];return o[0]=Math.abs(n[0]-t.startEventPosition[0]),o[1]=Math.abs(n[1]-t.startEventPosition[1]),o[2]=Math.abs(n[2]-t.startEventPosition[2]),o[0]>o[1]?o[0]>o[2]?0:2:o[1]>o[2]?1:2}return-1},e.startComplexWidgetInteraction=function(n){t.startEventPosition[0]=n[0],t.startEventPosition[1]=n[1],t.startEventPosition[2]=0,t.lastEventPosition[0]=n[0],t.lastEventPosition[1]=n[1];var r=[n[0],n[1],0];t.cursorPicker.pick(r,t.renderer),t.cursorPicker.getDataSet()?(t.interactionState=Jw.SELECTING,t.constraintAxis=e.determineConstraintAxis(-1,null),t.lastPickPosition=t.cursorPicker.getPickPosition()):(t.interactionState=Jw.OUTSIDE,t.constraintAxis=-1)},e.displayToWorld=function(e,n){return zm.computeDisplayToWorld(t.renderer,e[0],e[1],n)},e.complexWidgetInteraction=function(n){var r=zm.computeWorldToDisplay(t.renderer,t.lastPickPosition[0],t.lastPickPosition[1],t.lastPickPosition[2])[2],i=e.displayToWorld(t.lastEventPosition,r),o=e.displayToWorld(n,r);t.interactionState===Jw.SELECTING||t.interactionState===Jw.TRANSLATING?(!t.waitingForMotion||t.waitCount++>3)&&(t.constraintAxis=e.determineConstraintAxis(t.constraintAxis,o),t.interactionState!==Jw.SELECTING||t.translationMode?e.translate(i,o):e.moveFocus(i,o)):t.interactionState===Jw.SCALING&&e.scale(i,o,n),t.lastEventPosition[0]=n[0],t.lastEventPosition[1]=n[1],e.modified()},e.moveFocus=function(n,r){var i=[];i[0]=r[0]-n[0],i[1]=r[1]-n[1],i[2]=r[2]-n[2];var o=t.sphere.getCenter();t.constraintAxis>=0?o[t.constraintAxis]+=i[t.constraintAxis]:(o[0]+=i[0],o[1]+=i[1],o[2]+=i[2]),e.setWorldPosition(o)},e.translate=function(n,r){var i=[];i[0]=r[0]-n[0],i[1]=r[1]-n[1],i[2]=r[2]-n[2];var o=t.sphere.getCenter();if(t.constraintAxis>=0)for(var a=0;a<3;a++)a!==t.constraintAxis&&(i[a]=0);for(var s=[],l=0;l<3;l++)s[l]=o[l]+i[l];e.setWorldPosition(s);var u=e.sizeHandlesInPixels(1,s);u*=t.currentHandleSize/t.handleSize,t.sphere.setRadius(u)},e.sizeBounds=function(){var n=t.sphere.getCenter(),r=e.sizeHandlesInPixels(1,n);r*=t.currentHandleSize/t.handleSize,t.sphere.setRadius(r)},e.scale=function(n,r,i){var o=[];o[0]=r[0]-n[0],o[1]=r[1]-n[1],o[2]=r[2]-n[2];var a=e.getBounds(),s=tt(o)/Math.sqrt((a[1]-a[0])*(a[1]-a[0])+(a[3]-a[2])*(a[3]-a[2])+(a[5]-a[4])*(a[5]-a[4]));i[1]>t.lastEventPosition[1]?s+=1:s=1-s,t.currentHandleSize*=s,t.currentHandleSize=t.currentHandleSize<.001?.001:t.currentHandleSize,e.sizeBounds()},e.highlight=function(n){n?e.applyProperty(t.selectProperty):e.applyProperty(t.property)},e.buildRepresentation=function(){t.renderer&&(t.placed||(t.validPick=1,t.placed=1),e.sizeBounds(),t.sphere.update(),e.modified())},e.applyProperty=function(e){t.actor.setProperty(e)}}var Kx={actor:null,mapper:null,sphere:null,cursorPicker:null,lastPickPosition:[0,0,0],lastEventPosition:[0,0],constraintAxis:-1,translationMode:1,property:null,selectProperty:null,placeFactor:1,waitingForMotion:0,hotSpotSize:.05};function qx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kx,n),Sx.extend(e,t,n),de.setGet(e,t,["glyphResolution","defaultScale"]),de.setGet(e,t,["translationMode","property","selectProperty"]),de.get(e,t,["actor"]),t.sphere=Jf.newInstance(),t.sphere.setThetaResolution(16),t.sphere.setPhiResolution(8),t.mapper=Uv.newInstance(),t.mapper.setInputConnection(t.sphere.getOutputPort()),t.actor=pv.newInstance(),t.actor.setMapper(t.mapper),e.setHandleSize(15),t.currentHandleSize=t.handleSize,t.cursorPicker=zx.newInstance(),t.cursorPicker.setPickFromList(1),t.cursorPicker.initializePickList(),t.cursorPicker.addPickList(t.actor),t.property=av.newInstance(),t.property.setColor(1,1,1),t.selectProperty=av.newInstance(),t.selectProperty.setColor(0,1,0),t.actor.setProperty(t.property),Hx(e,t)}var Xx={newInstance:de.newInstance(qx,"vtkSphereHandleRepresentation"),extend:qx};function Yx(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 Zx=Rx;function Jx(e,t){t.classHierarchy.push("vtkLineRepresentation");var n=function(e){for(var t=1;t0?(t.interactionState=Zx.ONLINE,e.setRepresentationState(Zx.ONLINE),o=e.getPoint1WorldPosition(),a=e.getPoint2WorldPosition()):(t.interactionState=Zx.OUTSIDE,e.setRepresentationState(Zx.OUTSIDE)),t.interactionState},e.setRepresentationState=function(n){t.representationState!==n&&(t.representationState=n,e.modified(),n===Zx.OUTSIDE?(e.highlightPoint(0,0),e.highlightPoint(1,0),e.highlightLine(0)):n===Zx.ONP1?(e.highlightPoint(0,1),e.highlightPoint(1,0),e.highlightLine(0)):n===Zx.ONP2?(e.highlightPoint(0,0),e.highlightPoint(1,1),e.highlightLine(0)):n===Zx.ONLINE?(e.highlightPoint(0,0),e.highlightPoint(1,0),e.highlightLine(1)):(e.highlightPoint(0,1),e.highlightPoint(1,1),e.highlightLine(1)))},e.sizeHandles=function(){},e.buildRepresentation=function(){var n,r;t.point1Representation.buildRepresentation(),t.point2Representation.buildRepresentation(),0===t.initializeDisplayPosition&&t.renderer&&(e.setPoint1WorldPosition(t.lineSource.getPoint1()),e.setPoint2WorldPosition(t.lineSource.getPoint2()),t.validPick=1,t.initializeDisplayPosition=1),t.point1Representation.setTolerance(t.tolerance),t.point2Representation.setTolerance(t.tolerance);var i=e.getPoint1WorldPosition();(n=t.lineSource).setPoint1.apply(n,y(i)),t.point1Representation.setWorldPosition(i);var o=e.getPoint2WorldPosition();(r=t.lineSource).setPoint2.apply(r,y(o)),t.point2Representation.setWorldPosition(o),e.sizeHandles(),e.modified()},e.highlightPoint=function(e,n){0===e?n?t.point1Representation.applyProperty(t.selectedEndPointProperty):t.point1Representation.applyProperty(t.endPointProperty):1===e&&(n?t.point2Representation.applyProperty(t.selectedEndPoint2Property):t.point2Representation.applyProperty(t.endPoint2Property))},e.highlightLine=function(e){e?t.lineActor.setProperty(t.selectedLineProperty):t.lineActor.setProperty(t.lineProperty)},e.setLineColor=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;nt.initialBounds[2*n+1]&&(e[n]=t.initialBounds[2*n+1])},e.getBounds=function(){return t.boundingBox.setBounds(t.lineActor.getBounds()),t.boundingBox.addBounds(t.point1Representation.getBounds()),t.boundingBox.addBounds(t.point2Representation.getBounds()),t.boundingBox.getBounds()},e.getActors=function(){var e=[];return e.push.apply(e,y(t.point1Representation.getActors())),e.push.apply(e,y(t.point2Representation.getActors())),e.push(t.lineActor),e},e.getNestedProps=function(){return e.getActors()}}var Qx={point1Representation:null,point2Representation:null,lineSource:null,lineMapper:null,lineActor:null,endPointProperty:null,selectedEndPointProperty:null,endPoint2Property:null,selectedEndPoint2Property:null,lineProperty:null,selectedLineProperty:null,tolerance:5,placed:0,representationState:Zx.OUTSIDE,startP1:[0,0,0],startP2:[0,0,0],length:0,restrictFlag:{NONE:0,X:1,Y:2,Z:3}.NONE,initializeDisplayPosition:0,boundingBox:null};function $x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qx,n),gx.extend(e,t,n),de.get(e,t,["point1Representation","point2Representation","endPointProperty","selectedEndPointProperty","endPoint2Property","selectedEndPoint2Property","lineProperty","selectedLineProperty"]),e.setHandleSize(5),t.boundingBox=il.newInstance(),t.point1Representation=Xx.newInstance(),t.point2Representation=Xx.newInstance();var r=10;t.point1Representation.setHandleSize(r),t.point2Representation.setHandleSize(r),t.lineSource=Df.newInstance({point1:[-.5,0,0],point2:[.5,0,0],resolution:5}),t.lineSource.setResolution(5),t.lineMapper=Uv.newInstance(),t.lineMapper.setInputConnection(t.lineSource.getOutputPort()),t.lineActor=pv.newInstance(),t.lineActor.setMapper(t.lineMapper),t.endPointProperty=av.newInstance(),t.endPointProperty.setColor(1,1,1),t.selectedEndPointProperty=av.newInstance(),t.selectedEndPointProperty.setColor(0,1,0),t.endPoint2Property=av.newInstance(),t.endPoint2Property.setColor(1,1,1),t.selectedEndPoint2Property=av.newInstance(),t.selectedEndPoint2Property.setColor(0,1,0),t.lineProperty=av.newInstance(),t.lineProperty.setAmbient(1),t.lineProperty.setAmbientColor(1,1,1),t.lineProperty.setLineWidth(2),t.selectedLineProperty=av.newInstance(),t.selectedLineProperty.setAmbient(1),t.selectedLineProperty.setColor(0,1,0),t.selectedLineProperty.setLineWidth(2),t.point1Representation.applyProperty(t.endPointProperty),t.point2Representation.applyProperty(t.endPoint2Property),t.point1Representation.setWorldPosition(t.lineSource.getPoint1()),t.point2Representation.setWorldPosition(t.lineSource.getPoint2()),t.lineActor.setProperty(t.lineProperty),Jx(e,t)}var eS={newInstance:de.newInstance($x,"vtkLineRepresentation"),extend:$x};function tS(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 nS(e,t){t.classHierarchy.push("vtkDistanceRepresentation");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rS,n),eS.extend(e,t,n),t.labelRepresentation=Mx.newInstance(),de.setGet(e,t,["numberOfDecimals","labelPosition"]),de.get(e,t,["labelRepresentation"]),nS(e,t)}var oS={newInstance:de.newInstance(iS,"vtkDistanceRepresentation"),extend:iS},aS={WidgetState:{START:0,ACTIVE:1}};function sS(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 lS=de.VOID,uS=de.EVENT_ABORT,cS=Sx.InteractionState,dS=aS.WidgetState;function pS(e,t){function n(){e.setCursor(t.widgetRep.getInteractionState()),t.widgetRep.highlight(1),e.invokeStartInteractionEvent(),e.render()}t.classHierarchy.push("vtkHandleWidget"),e.createDefaultRepresentation=function(){t.widgetRep||(t.widgetRep=Xx.newInstance())},e.handleMouseMove=function(t){return e.moveAction(t)},e.handleLeftButtonPress=function(t){return e.selectAction(t)},e.handleLeftButtonRelease=function(t){return e.endSelectAction(t)},e.handleMiddleButtonPress=function(t){return e.translateAction(t)},e.handleMiddleButtonRelease=function(t){return e.endSelectAction(t)},e.handleRightButtonPress=function(t){return e.scaleAction(t)},e.handleRightButtonRelease=function(t){return e.endSelectAction(t)},e.setCursor=function(e){switch(e){case cS.OUTSIDE:t.interactor.getView().setCursor("default");break;default:t.interactor.getView().setCursor("pointer")}},e.selectAction=function(e){var r=[e.position.x,e.position.y];return t.widgetRep.computeInteractionState(r),t.widgetRep.getInteractionState()===cS.OUTSIDE?lS:(t.widgetRep.startComplexWidgetInteraction(r),t.widgetState=dS.ACTIVE,t.widgetRep.setInteractionState(cS.SELECTING),n(),uS)},e.translateAction=function(e){var r=[e.position.x,e.position.y];return t.widgetRep.computeInteractionState(r),t.widgetRep.getInteractionState()===cS.OUTSIDE?lS:(t.widgetRep.startComplexWidgetInteraction(r),t.widgetState=dS.ACTIVE,t.widgetRep.setInteractionState(cS.TRANSLATING),n(),uS)},e.scaleAction=function(e){if(!t.allowHandleResize)return lS;var r=[e.position.x,e.position.y];return t.widgetRep.computeInteractionState(r),t.widgetRep.getInteractionState()===cS.OUTSIDE?lS:(t.widgetRep.startComplexWidgetInteraction(r),t.widgetState=dS.ACTIVE,t.widgetRep.setInteractionState(cS.SCALING),n(),uS)},e.endSelectAction=function(){return t.widgetState!==dS.ACTIVE?lS:(t.widgetState=dS.START,t.widgetRep.highlight(0),e.invokeEndInteractionEvent(),e.render(),uS)},e.moveAction=function(n){var r=[n.position.x,n.position.y],i=t.widgetRep.getInteractionState();return t.widgetState===dS.START?(t.widgetRep.computeInteractionState(r),i=t.widgetRep.getInteractionState(),e.setCursor(i),t.widgetRep.getActiveRepresentation()&&i!==t.widgetRep.getInteractionState()&&e.render(),i===cS.OUTSIDE?lS:uS):e.isDragable()?(e.setCursor(i),t.widgetRep.complexWidgetInteraction(r),e.invokeInteractionEvent(),e.render(),uS):lS}}var fS={allowHandleResize:1,widgetState:dS.START};function hS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fS,n),Kw.extend(e,t,n),de.setGet(e,t,["allowHandleResize"]),pS(e,t)}var mS=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bS,n),mS.extend(e,t,n),yS(e,t)}var xS={newInstance:de.newInstance(wS,"vtkLabelWidget"),extend:wS};function SS(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 CS=0,AS=2,PS=3,_S=Qw.InteractionState;function OS(e,t){t.classHierarchy.push("vtkLineWidget");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ES,n),Kw.extend(e,t,n),t.point1Widget=mS.newInstance(),t.point1Widget.setParent(e),t.point1Widget.createDefaultRepresentation(),t.point2Widget=mS.newInstance(),t.point2Widget.setParent(e),t.point2Widget.createDefaultRepresentation(),OS(e,t)}var DS={newInstance:de.newInstance(TS,"vtkLineWidget"),extend:TS};function IS(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 kS(e,t){t.classHierarchy.push("vtkDistanceWidget");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MS,n),DS.extend(e,t,n),t.labelWidget=xS.newInstance(),t.labelWidget.setProcessEvents(!1),kS(e,t)}var RS={newInstance:de.newInstance(NS,"vtkDistanceWidget"),extend:NS},FS=26,BS=[2,0,1,2,2,3,2,4,5,2,6,7,2,0,2,2,1,3,2,4,6,2,5,7,2,0,4,2,1,5,2,2,6,2,3,7];function LS(e){for(var t=0;t<6;t+=2)if(e[t]>e[t+1]){var n=e[t+1];e[t+1]=e[t],e[t]=n}}function VS(e,t){t.classHierarchy.push("vtkImageCroppingRegionsRepresentation"),t.placeFactor=1,t.picker=zx.newInstance(),t.picker.setPickFromList(1),t.picker.initializePickList(),t.handles=Array(FS).fill(null).map((function(){var e=Jf.newInstance(),n=Uv.newInstance(),r=pv.newInstance();return n.setInputConnection(e.getOutputPort()),r.setMapper(n),t.picker.addPickList(r),{source:e,mapper:n,actor:r}})),t.outline={polydata:ju.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance()},t.outline.polydata.getPoints().setData(new Float32Array(24),3),t.outline.polydata.getLines().setData(Uint16Array.from(BS)),t.outline.mapper.setInputData(t.outline.polydata),t.outline.actor.setMapper(t.outline.mapper),e.getActors=function(){for(var e=[t.outline.actor],n=0;n1){var l=t.picker.getPickedPositions().map((function(t){return st(e.pokedRenderer.getActiveCamera().getPosition(),t)})),u=1/0;l.forEach((function(e,t){u>e&&(s=t,u=e)}))}var c=a[s];return t.handles.findIndex((function(e){return e.actor===c}))}return-1},e.placeWidget=function(){for(var n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jS,n),gx.extend(e,t,n),de.setGet(e,t,["activeHandleIndex"]),de.setGetArray(e,t,["edgeColor"],3),de.setGetArray(e,t,["handlePositions"],FS),de.setGetArray(e,t,["handleSizes"],FS),de.setGetArray(e,t,["bboxCorners"],8),VS(e,t)}var GS={newInstance:de.newInstance(US,"vtkImageCroppingRegionsRepresentation"),extend:US};function zS(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 WS(e){for(var t=1;t>2&1)],e[2+(p>>1&1)],e[4+(p>>0&1)]];for(var f=0;f-1)return t.activeHandleIndex=r,e.updateWidgetState({activeHandleIndex:r,controlState:XS.CROPPING}),qS}return KS},e.moveAction=function(n){var r=t.widgetState,o=r.controlState,a=r.planes,s=r.activeHandleIndex;if(o===XS.IDLE||-1===s)return KS;var l=e.planesToHandles(a),u=[n.position.x,n.position.y],c=l[s],d=e.getInteractor().getCurrentRenderer().getActiveCamera().getDirectionOfProjection(),p=e.displayToPlane(u,c,d);if(!p)return qS;var f=a.slice();if(s<6){var h=Math.floor(s/2),m=3*h,g=t.volumeMapper.getInputData().getDirection().slice(m,m+3),v=[0,0,0],b=[0,0,0],w=[0,0,0];qe(p,c,b),it(b,g,w),Ke(c,w,v);var x=i(v);f[s]=x[h]}else if(s<18){var S=s-6,C=Math.floor(S/4),A=3*C,P=t.volumeMapper.getInputData().getDirection().slice(A,A+3),_=[0,0,0],O=[0,0,0],E=[0,0,0];qe(p,c,O),pr.projectVector(O,P,E),Ke(c,E,_);for(var T=i(_),D=ZS[S%4].slice(),I=[],k=0;k<3;++k)k!==C&&I.push(2*k+D.shift());I.forEach((function(e){f[e]=T[Math.floor(e/2)]}))}else{var M=s-18,N=i(p);[0+(M>>2&1),2+(M>>1&1),4+(M>>0&1)].forEach((function(e){f[e]=N[Math.floor(e/2)]}))}return e.setCroppingPlanes.apply(e,y(f)),qS},e.endMoveAction=function(){t.widgetState.activeHandleIndex>-1&&e.updateWidgetState({activeHandleIndex:-1,controlState:XS.IDLE})}}var QS={handleSize:5,faceHandlesEnabled:!1,edgeHandlesEnabled:!1,cornerHandlesEnabled:!0};function $S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QS,n),Kw.extend(e,t,QS,n),YS.forEach((function(n){return de.event(e,t,n)})),de.get(e,t,["volumeMapper","handleSize","faceHandlesEnabled","edgeHandlesEnabled","cornerHandlesEnabled"]),JS(e,t)}var eC={newInstance:de.newInstance($S,"vtkImageCroppingRegionsWidget"),extend:$S},tC=de.vtkDebugMacro;function nC(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),i=new Float64Array([0,1,0]),o=Do(new Float64Array(16)),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3),u=Do(new Float64Array(16)),c=Do(new Float64Array(16)),d=new Float64Array(3),p=new Float64Array(3);function f(){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,i){n===t.position[0]&&r===t.position[1]&&i===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=i,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,i){n===t.focalPoint[0]&&r===t.focalPoint[1]&&i===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=i,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,tC("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,tC("Distance is set to minimum.");var i=t.directionOfProjection;t.focalPoint[0]=t.position[0]+i[0]*t.distance,t.focalPoint[1]=t.position[1]+i[1]*t.distance,t.focalPoint[2]=t.position[2]+i[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,f()},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,i=t.focalPoint,o=t.viewUp,a=new Float64Array([o[0],o[1],o[2],0]);Do(u);var s=new Float64Array([i[0]-r[0],i[1]-r[1],i[2]-r[2]]);Lo(u,u,Pe(n),s),Vh(a,a,u),t.viewUp[0]=a[0],t.viewUp[1]=a[1],t.viewUp[2]=a[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;Do(c),Fo(c,c,r),Lo(c,c,Pe(n),t.viewUp),Fo(c,c,[-r[0],-r[1],-r[2]]),io(d,t.position,c),e.setPosition(d[0],d[1],d[2])},e.yaw=function(n){var r=t.position;Do(c),Fo(c,c,r),Lo(c,c,Pe(n),t.viewUp),Fo(c,c,[-r[0],-r[1],-r[2]]),io(p,t.focalPoint,c),e.setFocalPoint(p[0],p[1],p[2])},e.elevation=function(n){var r=t.focalPoint,i=e.getViewMatrix(),o=[-i[0],-i[1],-i[2]];Do(c),Fo(c,c,r),Lo(c,c,Pe(n),o),Fo(c,c,[-r[0],-r[1],-r[2]]),io(d,t.position,c),e.setPosition(d[0],d[1],d[2])},e.pitch=function(n){var r=t.position,i=e.getViewMatrix(),o=[i[0],i[1],i[2]];Do(c),Fo(c,c,r),Lo(c,c,Pe(n),o),Fo(c,c,[-r[0],-r[1],-r[2]]),io(p,t.focalPoint,c),e.setFocalPoint.apply(e,y(p))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,i){var o=[n,r,i];Ke(t.position,o,t.position),Ke(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(y(t.viewUp),[1]),i=[],o=[],a=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],Vh(i,[].concat(y(t.position),[1]),n),Vh(o,[].concat(y(t.focalPoint),[1]),n),Vh(a,r,n),a[0]-=i[0],a[1]-=i[1],a[2]-=i[2],e.setPosition.apply(e,y(i.slice(0,3))),e.setFocalPoint.apply(e,y(o.slice(0,3))),e.setViewUp.apply(e,y(a.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,tC("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,tC("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=jg(e[0],e[1],e[2],e[3]),i=Bg(),o=jg(0,0,1,0);return n=r,(t=i)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],Vg(o,r,o),Vg(o,o,i),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),ko(t,t)},e.getWorldToPhysicalMatrix=function(e){Do(e);var n=[3];et(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],Io(e,e),Ni(a,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Bo(e,e,a),Fo(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(u){ko(o,u),io(a,n,o),e.computeDistance();var c=t.distance;e.setPosition(a[0],a[1],a[2]),io(s,r,o),Fi(s,s,a),Ji(s,s),e.setDirectionOfProjection(s[0],s[1],s[2]),io(l,i,o),Fi(l,l,a),Ji(l,l),e.setViewUp(l[0],l[1],l[2]),e.setDistance(c)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),Ro(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(Oo(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Io(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;aa(o,t.position,t.focalPoint,t.viewUp),Io(o,o);var e=new Float64Array(16);return Oo(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var i=new Float64Array(16);if(Do(i),t.projectionMatrix){var s=1/t.physicalScale;return Ni(a,s,s,s),Oo(i,t.projectionMatrix),Bo(i,i,a),Io(i,i),i}Do(o);var l=t.clippingRange[1]-t.clippingRange[0],u=[t.clippingRange[0]+(n+1)*l/2,t.clippingRange[0]+(r+1)*l/2];if(t.parallelProjection){var c=t.parallelScale*e,d=t.parallelScale,p=(t.windowCenter[0]-1)*c,f=(t.windowCenter[0]+1)*c,h=(t.windowCenter[1]-1)*d,m=(t.windowCenter[1]+1)*d;oa(o,p,f,h,m,u[0],u[1]),Io(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var g,v,y=Math.tan(Pe(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(g=t.clippingRange[0]*y,v=t.clippingRange[0]*y/e):(g=t.clippingRange[0]*y*e,v=t.clippingRange[0]*y);var b=(t.windowCenter[0]-1)*g,w=(t.windowCenter[0]+1)*g,x=(t.windowCenter[1]-1)*v,S=(t.windowCenter[1]+1)*v,C=u[0],A=u[1];o[0]=2*C/(w-b),o[5]=2*C/(S-x),o[2]=(b+w)/(w-b),o[6]=(x+S)/(S-x),o[10]=-(C+A)/(A-C),o[14]=-1,o[11]=-2*C*A/(A-C),o[15]=0}return Oo(i,o),i},e.getCompositeProjectionMatrix=function(t,n,r){var i=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return Ro(o,i,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 i=t.directionOfProjection;t.focalPoint[0]=t.position[0]+i[0]*t.distance,t.focalPoint[1]=t.position[1]+i[1]*t.distance,t.focalPoint[2]=t.position[2]+i[2]*t.distance,f()}},e.setDeviceAngles=function(n,r,i,o){var a=[3];et(t.physicalViewNorth,t.physicalViewUp,a);var s=Do(new Float64Array(16));Lo(s,s,Pe(n),t.physicalViewUp),Lo(s,s,Pe(r),a),Lo(s,s,Pe(i),t.physicalViewNorth),Lo(s,s,Pe(-o),t.physicalViewUp);var l=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),u=new Float64Array(t.physicalViewNorth);io(l,l,s),io(u,u,s),e.setDirectionOfProjection(l[0],l[1],l[2]),e.setViewUp(u[0],u[1],u[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,i){var o=Do(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==i)){var a=Pe(t),s=Bg();Lg(s,[n,r,i],a),ta(o,s)}var l=new Float64Array(3);io(l,[0,0,-1],o);var u=new Float64Array(3);io(u,[0,1,0],o),e.setDirectionOfProjection.apply(e,y(l)),e.setViewUp.apply(e,y(u)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var i=-n[0],o=-n[1],a=-n[2],s=-(i*r[0]+o*r[1]+a*r[2]),l=[i*e[0]+o*e[2]+a*e[4]+s,1e-18],u=0;u<2;u++)for(var c=0;c<2;c++)for(var d=0;d<2;d++){var p=i*e[d]+o*e[2+c]+a*e[4+u]+s;l[0]=pl[1]?p:l[1]}return l}}var rC={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 iC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rC,n),de.obj(e,t),de.get(e,t,["distance"]),de.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),de.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),de.setGetArray(e,t,["clippingRange","windowCenter"],2),de.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),nC(e,t)}var oC={newInstance:de.newInstance(iC,"vtkCamera"),extend:iC};function aC(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,sC,n),de.obj(e,t),de.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),de.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),aC(e,t)}var uC={newInstance:de.newInstance(lC,"vtkLight"),extend:lC,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},cC=de.vtkErrorMacro;function dC(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 i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pC,n),de.obj(e,t),de.event(e,t,"event"),de.setGetArray(e,t,["viewport"],4),de.setGetArray(e,t,["background","background2"],3),dC(e,t)}var hC={newInstance:de.newInstance(fC,"vtkViewport"),extend:fC},mC=k,gC=M,vC=N;function yC(e){return function(){return gC("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function bC(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},i={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(mC("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())):gC("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=yC("allocateTime"),e.updateGeometry=yC("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){mC(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=oC.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=uC.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,i){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],i),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,i){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],i),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return gC("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var i=t.activeCamera.getViewMatrix();ko(i,i),Io(i,i);var o=new Float64Array([e,n,r]);return io(o,o,i),o},e.projectionToView=function(e,n,r,i){if(null===t.activeCamera)return gC("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(i,-1,1);ko(o,o),Io(o,o);var a=new Float64Array([e,n,r]);return io(a,a,o),a},e.worldToView=function(e,n,r){if(null===t.activeCamera)return gC("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var i=t.activeCamera.getViewMatrix();Io(i,i);var o=new Float64Array([e,n,r]);return io(o,o,i),o},e.viewToProjection=function(e,n,r,i){if(null===t.activeCamera)return gC("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(i,-1,1);Io(o,o);var a=new Float64Array([e,n,r]);return io(a,a,o),a},e.computeVisiblePropBounds=function(){t.allBounds[0]=Xr.INIT_BOUNDS[0],t.allBounds[1]=Xr.INIT_BOUNDS[1],t.allBounds[2]=Xr.INIT_BOUNDS[2],t.allBounds[3]=Xr.INIT_BOUNDS[3],t.allBounds[4]=Xr.INIT_BOUNDS[4],t.allBounds[5]=Xr.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var i=0;it.allBounds[1]&&(t.allBounds[1]=a[1]),a[2]t.allBounds[3]&&(t.allBounds[3]=a[3]),a[4]t.allBounds[5]&&(t.allBounds[5]=a[5]))}}return r&&(en(t.allBounds),mC("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(!tn(r))return mC("Cannot reset camera!"),!1;var a=null;if(!e.getActiveCamera())return gC("Trying to reset non-existent camera"),!1;a=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 s=r[1]-r[0],l=r[3]-r[2],u=r[5]-r[4],c=(s*=s)+(l*=l)+(u*=u);c=0===c?1:c,c=.5*Math.sqrt(c);var d=Pe(t.activeCamera.getViewAngle()),p=c,f=c/Math.sin(.5*d),h=t.activeCamera.getViewUp();return Math.abs(Qe(h,a))>.999&&(vC("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-h[2],h[0],h[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+f*a[0],o[1]+f*a[1],o[2]+f*a[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(p),t.activeCamera.setPhysicalScale(c),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(i),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=n||e.computeVisiblePropBounds();if(!tn(i))return mC("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return gC("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(i),a=0;if(t.activeCamera.getParallelProjection())a=.1*t.activeCamera.getParallelScale();else{var s=Pe(t.activeCamera.getViewAngle());a=.2*Math.tan(s/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 wC={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:bn(),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 xC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wC,n),hC.extend(e,t,n),H(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),Y(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),Z(e,t,["actors","volumes","lights"]),Q(e,t,["background"],4,1),bC(e,t)}var SC={newInstance:ne(xC,"vtkRenderer"),extend:xC},CC={Corners:{TOP_LEFT:"TOP_LEFT",TOP_RIGHT:"TOP_RIGHT",BOTTOM_LEFT:"BOTTOM_LEFT",BOTTOM_RIGHT:"BOTTOM_RIGHT"}};function AC(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 PC(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,TC,n),de.obj(e,t),de.get(e,t,["enabled","viewportCorner","viewportSize"]),de.setGet(e,t,["interactor","minPixelSize","maxPixelSize"]),de.get(e,t,["actor"]),EC(e,t)}var IC=PC({newInstance:de.newInstance(DC,"vtkOrientationMarkerWidget"),extend:DC},CC),kC=0,MC=2;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}var RC=de.vtkErrorMacro;function FC(e,t){t.classHierarchy.push("vtkResliceCursor");var n=function(e){for(var t=1;t=t[0]&&e[0]<=t[1]&&e[1]>=t[2]&&e[1]<=t[3]&&e[2]>=t[4]&&e[2]<=t[5]||(e[0]=rn(e[0],t[0],t[1]),e[1]=rn(e[1],t[2],t[3]),e[2]=rn(e[2],t[4],t[5])),e}e.buildCursorTopology=function(){for(var e=0;e<3;++e){t.centerlinesAxis[e].getPoints().setNumberOfPoints(2);var n=new Float32Array(3),r=Kn.newInstance({values:n});n[0]=2,n[1]=0,n[2]=1,t.centerlinesAxis[e].setLines(r)}},e.buildCursorGeometry=function(){e.computeAxes();for(var n=t.image.getBounds(),r=10*Math.sqrt((n[1]-n[0])*(n[1]-n[0])+(n[3]-n[2])*(n[3]-n[2])+(n[5]-n[4])*(n[5]-n[4])),i=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],o=0;o<3;o++)i[0][o]=t.center[o]-r*t.xAxis[o],i[1][o]=t.center[o]+r*t.xAxis[o],i[2][o]=t.center[o]-r*t.yAxis[o],i[3][o]=t.center[o]+r*t.yAxis[o],i[4][o]=t.center[o]-r*t.zAxis[o],i[5][o]=t.center[o]+r*t.zAxis[o];for(var a=0;a<3;a++){var s=t.centerlinesAxis[a].getPoints().getData();s[0]=i[2*a][0],s[1]=i[2*a][1],s[2]=i[2*a][2],s[3]=i[2*a+1][0],s[4]=i[2*a+1][1],s[5]=i[2*a+1][2],t.centerlinesAxis[a].modified()}t.polyDataBuildTime.modified()},e.computeAxes=function(){for(var n=[],r=0;r<3;++r)n[r]=e.getPlane(r).getNormal();et(n[0],n[1],t.zAxis),et(n[1],n[2],t.xAxis),et(n[2],n[0],t.yAxis),nt(t.xAxis),nt(t.yAxis),nt(t.zAxis)},e.reset=function(){t.xAxis=[1,0,0],t.yAxis=[0,1,0],t.zAxis=[0,0,1],t.xViewUp=[0,0,1],t.yViewUp=[0,0,1],t.zViewUp=[0,-1,0],e.getImage()?t.center=e.getImage().getCenter():t.center=[0,0,0];for(var n=0;n<3;++n)e.getPlane(n).setOrigin(t.center);t.reslicePlanes[0].setNormal([1,0,0]),t.reslicePlanes[1].setNormal([0,-1,0]),t.reslicePlanes[2].setNormal([0,0,1]),e.buildCursorTopology(),e.buildCursorGeometry()},e.getPlane=function(e){return t.reslicePlanes[e]},e.update=function(){e.getImage()?e.getMTime()>t.polyDataBuildTime.getMTime()&&(e.buildCursorTopology(),e.buildCursorGeometry()):RC("Image not set! ")},e.getPolyData=function(){return e.update(),t.polyData},e.setCenter=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kC;if((t.center[0]!==n[0]||t.center[1]!==n[1]||t.center[2]!==n[2])&&t.image){var o=t.image.getBounds(),a=y(n);if(i===kC&&(a[0]o[1]||a[1]o[3]||a[2]o[5]))return;if(i===MC&&3!==(a=r(a,o)).length)return;t.center=a,e.getPlane(0).setOrigin(t.center),e.getPlane(1).setOrigin(t.center),e.getPlane(2).setOrigin(t.center),e.modified()}},e.getCenterlineAxisPolyData=function(n){return e.update(),t.centerlinesAxis[n]},e.getAxis=function(e){return 0===e?t.xAxis:1===e?t.yAxis:t.zAxis},e.getViewUp=function(e){return 0===e?t.xViewUp:1===e?t.yViewUp:t.zViewUp},e.getMTime=function(){for(var t=n.getMTime(),r=0;r<3;++r){var i=e.getPlane(r).getMTime();i>t&&(t=i)}return t}}var BC={image:null,center:[0,0,0],xAxis:[1,0,0],yAxis:[0,1,0],zAxis:[0,0,1],xViewUp:[0,0,1],yViewUp:[0,0,1],zViewUp:[0,-1,0]};function LC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,BC,n),de.obj(e,t),de.setGet(e,t,["image"]),de.setGetArray(e,t,["xAxis","yAxis","zAxis","xViewUp","yViewUp","zViewUp"],3),de.getArray(e,t,["center"],3),t.reslicePlanes=[],t.centerlinesAxis=[],t.polyDataBuildTime={},de.obj(t.polyDataBuildTime),FC(e,t);for(var r=0;r<3;++r)t.reslicePlanes.push(pr.newInstance()),t.centerlinesAxis.push(ju.newInstance());t.reslicePlanes[0].setNormal([1,0,0]),t.reslicePlanes[1].setNormal([0,-1,0]),t.reslicePlanes[2].setNormal([0,0,-1]),e.buildCursorTopology()}var VC={newInstance:de.newInstance(LC,"vtkResliceCursor"),extend:LC},jC=0,UC=1,GC=2;function zC(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 WC(e,t){t.classHierarchy.push("vtkResliceCursorPolyDataAlgorithm");var n=function(e){for(var t=1;te&&(e=r)}return e},e.requestData=function(n,r){if(t.resliceCursor){var i=e.getAxis1();r[0]=t.resliceCursor.getCenterlineAxisPolyData(i);var o=e.getAxis2();r[1]=t.resliceCursor.getCenterlineAxisPolyData(o)}}}var HC={reslicePlaneNormal:jC};function KC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,HC,n),t.resliceCursor=null,de.obj(e,t),de.algo(e,t,0,2),de.setGet(e,t,["reslicePlaneNormal","resliceCursor"]),WC(e,t)}var qC={newInstance:de.newInstance(KC,"vtkResliceCursorPolyDataAlgorithm"),extend:KC};function XC(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 YC(e,t){t.classHierarchy.push("vtkResliceCursorActor");var n=function(e){for(var t=1;te&&(e=r)}return e},e.getCenterlineProperty=function(e){return t.centerlineProperty[e]},e.getCenterlineActor=function(e){return t.cursorCenterlineActor[e]},e.setUserMatrix=function(e){t.cursorCenterlineActor[0].setUserMatrix(e),t.cursorCenterlineActor[1].setUserMatrix(e),t.cursorCenterlineActor[2].setUserMatrix(e),n.setUserMatrix(e)}}var ZC={};function JC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZC,n),Yg.extend(e,t,n),t.cursorAlgorithm=qC.newInstance(),t.cursorCenterlineMapper=[],t.cursorCenterlineActor=[],t.centerlineProperty=[];for(var r=0;r<3;r++)t.cursorCenterlineMapper[r]=Uv.newInstance(),t.cursorCenterlineMapper[r].setScalarVisibility(!1),t.cursorCenterlineMapper[r].setResolveCoincidentTopologyToPolygonOffset(),t.cursorCenterlineMapper[r].setResolveCoincidentTopologyLineOffsetParameters(-1,-1),t.cursorCenterlineActor[r]=pv.newInstance(),t.cursorCenterlineActor[r].setMapper(t.cursorCenterlineMapper[r]),t.centerlineProperty[r]=av.newInstance(),t.cursorCenterlineActor[r].setProperty(t.centerlineProperty[r]);t.centerlineProperty[0].setColor(1,0,0),t.centerlineProperty[1].setColor(0,1,0),t.centerlineProperty[2].setColor(0,0,1),de.get(e,t,["cursorAlgorithm"]),YC(e,t)}var QC={newInstance:de.newInstance(JC,"vtkResliceCursorActor"),extend:JC},$C={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}};function eA(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 tA(e){for(var t=1;to&&(o=u,s=r[l]<0,a=l)}if(1!==o){var c="IJKXYZ"[t.slicingMode],d="IJKXYZ"[a];iA("Unaccurate slicing along ".concat(c," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(o,"% 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:a,flip:s}}function r(n,r){var i=e.getInputData(),o=i.getExtent(),a=[o[0],o[2],o[4]],s=e.getClosestIJKAxis().ijkMode,l=t.slice;s!==t.slicingMode&&(l=e.getSliceAtPosition(l)),a[s]+=l;var u=[0,0,0];i.indexToWorld(a,u),a[s]+=1;var c=[0,0,0];i.indexToWorld(a,c),c[0]-=u[0],c[1]-=u[1],c[2]-=u[2],Ji(c,c);var d=pr.intersectWithLine(n,r,u,c);if(d.intersection){var p=d.x,f=[0,0,0];return i.worldToIndex(p,f),{t:d.t,absoluteIJK:f}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,i=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=i.getBounds();switch(t.slicingMode){case oA.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case oA.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case oA.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var a=[0,0,0];i.worldToIndex(r,a);var s=i.getExtent(),l=0;switch(e.getClosestIJKAxis().ijkMode){case oA.I:l=rn(a[0],s[0],s[1]),l=Math.round(l);break;case oA.J:l=rn(a[1],s[2],s[3]),l=Math.round(l);break;case oA.K:l=rn(a[2],s[4],s[5]),l=Math.round(l);break;default:return 0}return l},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case oA.I:case oA.J:case oA.K:var i=e.getSliceAtPosition(r);e.setSlice(i);break;case oA.X:e.setSlice(r[0]);break;case oA.Y:e.setSlice(r[1]);break;case oA.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(oA.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(oA.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(oA.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(oA.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(oA.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(oA.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),i=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case oA.X:n[0]=1;break;case oA.Y:n[1]=1;break;case oA.Z:n[2]=1;break;case oA.I:bt(i,[1,0,0],n);break;case oA.J:bt(i,[0,1,0],n);break;case oA.K:bt(i,[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!==oA.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return bn();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),i=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(i!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),i){case oA.I:r[0]=o,r[1]=o;break;case oA.J:r[2]=o,r[3]=o;break;case oA.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,i=e.getInputData();if(!i)return bn();var o=i.getExtent(),a=e.getClosestIJKAxis(),s=a.ijkMode,l=n;switch(s!==t.slicingMode&&(l=e.getSliceAtPosition(n)),s){case oA.I:o[0]=l-r,o[1]=l+r;break;case oA.J:o[2]=l-r,o[3]=l+r;break;case oA.K:o[4]=l-r,o[5]=l+r}return i.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var i=r(t,n);if(i){var o=e.getInputData().getExtent(),a=[Math.round(i.absoluteIJK[0]),Math.round(i.absoluteIJK[1]),Math.round(i.absoluteIJK[2])];return a[0]o[1]||a[1]o[3]||a[2]o[5]?null:{t:i.t,ijk:a}}return null},e.intersectWithLineForCellPicking=function(t,n){var i=r(t,n);if(i){var o=e.getInputData().getExtent(),a=i.absoluteIJK,s=[Math.floor(a[0]),Math.floor(a[1]),Math.floor(a[2])];if(s[0]o[1]-1||s[1]o[3]-1||s[2]o[5]-1)return null;var l=[a[0]-s[0],a[1]-s[1],a[2]-s[2]];return{t:i.t,ijk:s,pCoords:l}}return null}}var sA={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:oA.NONE,closestIJKAxis:{ijkMode:oA.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function lA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sA,n),mv.extend(e,t,n),de.get(e,t,["slicingMode"]),de.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),de.setGetArray(e,t,["customDisplayExtent"],4),Ov.implementCoincidentTopologyMethods(e,t),aA(e,t)}var uA=tA(tA(tA({newInstance:de.newInstance(lA,"vtkImageMapper"),extend:lA},nA),rA),$C),cA={NEAREST:0,LINEAR:1},dA=cA,pA=de.vtkErrorMacro;function fA(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 i=n,o=r;return Number.isInteger(n)||(o=n,i=0),t.componentData[i].rGBTransferFunction!==o&&(t.componentData[i].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 i=n,o=r;return Number.isInteger(n)||(o=n,i=0),t.componentData[i].piecewiseFunction!==o&&(t.componentData[i].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,i=n;return Number.isInteger(t)||(i=t,r=0),e.setPiecewiseFunction(r,i)},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 pA("Invalid index"),!1;var i=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==i&&(t.componentData[n].componentWeight=i,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(pA("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(dA.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(dA.LINEAR)},e.getInterpolationTypeAsString=function(){return de.enumToString(dA,t.interpolationType)}}var hA={independentComponents:!1,interpolationType:dA.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function mA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,hA,n),de.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}de.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),fA(e,t)}var gA={newInstance:de.newInstance(mA,"vtkImageProperty"),extend:mA},vA=de.vtkDebugMacro;function yA(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=gA.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()){vA("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var i=[];Xr.getCorners(r,i),e.computeMatrix();var o=new Float64Array(16);Io(o,t.matrix),i.forEach((function(e){return io(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?i.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):i.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,i=t.mapper.getBoundsForSlice(n,r);if(!i||6!==i.length)return i;if(i[0]>i[1])return i;var o=[];Xr.getCorners(i,o),e.computeMatrix();var a=new Float64Array(16);Io(a,t.matrix),o.forEach((function(e){return io(e,e,a)}));var s=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return s.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 bA={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function wA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bA,n),Yg.extend(e,t,n),t.boundsMTime={},de.obj(t.boundsMTime),de.set(e,t,["property"]),de.setGet(e,t,["mapper"]),de.getArray(e,t,["bounds"],6),yA(e,t)}var xA={newInstance:de.newInstance(wA,"vtkImageSlice"),extend:wA},SA={DEFAULT:0,GEOMETRY:1,SLICE:2,VOLUME:3,YZ_PLANE:4,XZ_PLANE:5,XY_PLANE:6},CA={PICKING_BUFFER:0,FRONT_BUFFER:1},AA={ViewTypes:SA,RenderingTypes:CA,CaptureOn:{MOUSE_MOVE:0,MOUSE_RELEASE:1}};function PA(e,t,n,r){var i=[];qe(n,t,i),nt(i);var o=[];qe(r,t,o),nt(o);var a=[0,0,1];et(i,o,a),nt(a);var s=pr.newInstance();s.setOrigin.apply(s,y(t)),s.setNormal.apply(s,a);var l=vf.newInstance();l.setBounds(e);var u=Tc.newInstance();u.setCutFunction(s),u.setInputConnection(l.getOutputPort());var c=u.getOutputData();if(0!==c.getNumberOfPoints())for(var d=qr.computeLocalBounds(c.getPoints(),i,o,a),p=0;p<3;p+=1)t[p]=d[0]*i[p]+d[2]*o[p]+d[4]*a[p],n[p]=d[1]*i[p]+d[2]*o[p]+d[4]*a[p],r[p]=d[0]*i[p]+d[3]*o[p]+d[4]*a[p]}function _A(e,t,n){var r=y(e);return Es.buildFromRadian().rotate(n,t).apply(r),r}function OA(e,t,n,r,i){var o=[t[0]-r*n[0],t[1]-r*n[1],t[2]-r*n[2]],a=[t[0]+r*n[0],t[1]+r*n[1],t[2]+r*n[2]],s=[t[0]-i*n[0],t[1]-i*n[1],t[2]-i*n[2]],l=[t[0]+i*n[0],t[1]+i*n[1],t[2]+i*n[2]];e.setPoint1(o),e.setPoint2(a),e.setRotationPoint1(s),e.setRotationPoint2(l)}function EA(e){var t=e.getPlanes()[SA.YZ_PLANE].normal,n=e.getPlanes()[SA.XZ_PLANE].normal,r=e.getPlanes()[SA.XY_PLANE].normal,i=et(n,r,[]),o=et(r,t,[]),a=et(t,n,[]),s=e.getImage().getBounds(),l=e.getCenter(),u=.425,c=(s[1]-s[0])*u,d=(s[3]-s[2])*u,p=(s[5]-s[4])*u,f=10*Xr.getDiagonalLength(s);OA(e.getAxisXinY(),l,a,f,p),OA(e.getAxisYinX(),l,a,f,p),OA(e.getAxisYinZ(),l,i,f,c),OA(e.getAxisZinY(),l,i,f,c),OA(e.getAxisXinZ(),l,o,f,d),OA(e.getAxisZinX(),l,o,f,d)}function TA(e,t,n,r){e.setNormal(n);var i=ut(qe(e.getPoint2(),e.getOrigin(),[]),r,n);e.rotate(i,n),e.setCenter(t)}function DA(e){switch(e){case"AxisXinY":return"AxisZinY";case"AxisXinZ":return"AxisYinZ";case"AxisYinX":return"AxisZinX";case"AxisYinZ":return"AxisXinZ";case"AxisZinX":return"AxisYinX";case"AxisZinY":return"AxisXinY";default:return""}}var IA=de.vtkErrorMacro;function kA(e,t){t.classHierarchy.push("vtkResliceCursorRepresentation");var n={};de.obj(n),e.getResliceCursor=function(){},e.getCursorAlgorithm=function(){},e.createDefaultResliceAlgorithm=function(){t.reslice||(t.reslice=Yh.newInstance(),t.reslice.setTransformInputSampling(!1),t.reslice.setAutoCropOutput(!0),t.reslice.setOutputDimensionality(2))},e.buildRepresentation=function(){if(e.getResliceCursor()){var r=e.getResliceCursor().getImage();if(r){t.reslice.setInputData(r),t.imageActor.setVisibility(t.showReslicedImage);var i=Math.max(e.getMTime(),e.getResliceCursor().getMTime());n.getMTime()P)IA("Invalid X extent: ",A),S=0;else for(S=1;SP)IA("Invalid Y extent:",_),C=0;else for(C=1;C<_;)C<<=1;for(var O=0===S?1:f/S,E=0===C?1:h/C,T=!1,D=0;D<4;D++)for(var I=0;I<4;I++){var k=4*I+D,M=t.newResliceAxes[k];M!==t.resliceAxes[k]&&(t.resliceAxes[k]=M,T=!0)}T&&(e.setResliceParameters(O,E,S,C),e.modified()),n.modified(),e.resetCamera()}},e.setResliceParameters=function(e,n,r,i){t.reslice&&(t.reslice.setResliceAxes(t.resliceAxes),t.reslice.setOutputSpacing([e,n,1]),t.reslice.setOutputOrigin([.5*e,.5*n,0]),t.reslice.setOutputExtent([0,r-1,0,i-1,0,0]),t.imageActor.setUserMatrix(t.resliceAxes),t.reslice.update())},e.computeOrigin=function(t){var n=e.getResliceCursor().getCenter(),r=[];Vh(r,n,t);for(var i=0;i<3;i++)t[12+i]=t[12+i]+n[i]-r[i]},e.getActors=function(){return t.imageActor},e.getNestedProps=function(){return e.getActors()},e.boundPoint=function(t,n,r,i){if(e.getResliceCursor()){for(var o=e.getResliceCursor().getImage().getBounds(),a=n.map((function(e){return Math.abs(e)})),s=r.map((function(e){return Math.abs(e)})),l=1e-5,u=0,c=0,d=0;d<3;d++){var p=0,f=a[d]>s[d],h=f?n:r,m=f?a:s;t[d]l?(o[2*d]-t[d])/h[d]:0:t[d]>o[2*d+1]&&(p=m[d]!==l?(o[2*d+1]-t[d])/h[d]:0),f?Math.abs(p)>Math.abs(u)&&(u=p):Math.abs(p)>Math.abs(c)&&(c=p)}if(i[0]=t[0],i[1]=t[1],i[2]=t[2],0!==u){var g=[];g[0]=n[0]*u,g[1]=n[1]*u,g[2]=n[2]*u,Ke(i,g,i)}if(0!==c){var v=[];v[0]=r[0]*c,v[1]=r[1]*c,v[2]=r[2]*c,Ke(i,v,i)}}},e.getBounds=function(){return t.imageActor.getBounds()}}var MA={tolerance:5,showReslicedImage:!0};function NA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MA,n),gx.extend(e,t,n),t.reslice=null,t.planeSource=Rf.newInstance(),t.resliceAxes=Do(new Float64Array(16)),t.newResliceAxes=Do(new Float64Array(16)),t.imageActor=xA.newInstance(),t.imageMapper=uA.newInstance(),t.imageMapper.setResolveCoincidentTopologyToPolygonOffset(),t.imageMapper.setRelativeCoincidentTopologyPolygonOffsetParameters(1,1),t.planeInitialized=!1,de.setGet(e,t,["tolerance","planeSource","showReslicedImage"]),de.get(e,t,["resliceAxes","reslice","imageActor"]),kA(e,t),e.createDefaultResliceAlgorithm(),t.imageMapper.setInputConnection(t.reslice.getOutputPort()),t.imageActor.setMapper(t.imageMapper)}var RA={newInstance:de.newInstance(NA,"vtkResliceCursorRepresentation"),extend:NA};function FA(e,t,n,r){var i=n.getPoints(),o=[];i.getPoint(0,o);var a=zm.computeWorldToDisplay(e,o[0],o[1],o[2]),s=[];i.getPoint(i.getNumberOfPoints()-1,s);var l=zm.computeWorldToDisplay(e,s[0],s[1],s[2]),u=[r[0],r[1],0],c=[a[0],a[1],0],d=[l[0],l[1],0],p=Ul.distanceToLine(u,c,d);return p.distance<=t*t&&p.t<1&&p.t>0}function BA(e,t){t.classHierarchy.push("vtkResliceCursorLineRepresentation"),e.getResliceCursor=function(){return t.resliceCursorActor.getCursorAlgorithm().getResliceCursor()},e.getCursorAlgorithm=function(){return t.resliceCursorActor.getCursorAlgorithm()},e.displayToReslicePlaneIntersection=function(n){var r=t.renderer.getActiveCamera().getPosition(),i=e.getResliceCursor(),o=function(e,t){var n=t.getActiveCamera().getFocalPoint(),r=zm.computeWorldToDisplay(t,n[0],n[1],n[2]);return zm.computeDisplayToWorld(t,e[0],e[1],r[2])}(n,t.renderer);if(!i)return null;var a=t.resliceCursorActor.getCursorAlgorithm().getReslicePlaneNormal(),s=i.getPlane(a);return pr.intersectWithLine(o,r,s.getOrigin(),s.getNormal()).x},e.computeInteractionState=function(n){if(t.interactionState=0,!t.renderer||!t.resliceCursorActor.getVisibility())return t.interactionState;var r=e.getResliceCursor();if(!r)return t.interactionState;var i=t.resliceCursorActor.getCursorAlgorithm().getAxis1(),o=t.resliceCursorActor.getCenterlineActor(i).getBounds();if(o[1]0?1:-1)?0:(e.applyRotation(r,d),d)},e.applyRotation=function(n,r){var i=e.getResliceCursor(),o=t.resliceCursorActor.getCursorAlgorithm().getReslicePlaneNormal(),a=i.getPlane(n),s=i.getViewUp(n),l=a.getNormal(),u=i.getPlane(o).getNormal(),c=y(l);Es.buildFromRadian().rotate(r,u).apply(c),Es.buildFromRadian().rotate(r,u).apply(s),a.setNormal(c)},e.getBounds=function(){var t=[];en(t);var n=e.getResliceCursor();return n&&n.getImage()&&(t=n.getImage().getBounds()),t},e.getActors=function(){return e.buildRepresentation(),e.updateCamera(),[t.imageActor].concat(y(t.resliceCursorActor.getActors()))},e.updateCamera=function(){var n=t.resliceCursorActor.getCursorAlgorithm().getReslicePlaneNormal(),r=t.renderer.getActiveCamera().getFocalPoint(),i=t.renderer.getActiveCamera().getPosition(),o=e.getResliceCursor().getPlane(n),a=o.getNormal(),s=Math.sqrt(st(i,r)),l=[r[0]+s*a[0],r[1]+s*a[1],r[2]+s*a[2]],u=pr.intersectWithLine(r,l,o.getOrigin(),o.getNormal()).x;t.renderer.getActiveCamera().setFocalPoint(u[0],u[1],u[2]);var c=[u[0]+s*a[0],u[1]+s*a[1],u[2]+s*a[2]];t.renderer.getActiveCamera().setPosition(c[0],c[1],c[2]);var d=t.renderer.computeVisiblePropBounds(),p=e.getBounds();d[0]=Math.min(p[0],d[0]),d[1]=Math.max(p[1],d[1]),d[2]=Math.min(p[2],d[2]),d[3]=Math.max(p[3],d[3]),d[4]=Math.min(p[4],d[4]),d[5]=Math.max(p[5],d[5]),t.renderer.resetCameraClippingRange(d)},e.resetCamera=function(){if(t.renderer){var n=e.getCursorAlgorithm().getReslicePlaneNormal(),r=e.getResliceCursor().getPlane(n).getNormal(),i=e.getResliceCursor().getViewUp(n),o=t.renderer.getActiveCamera().getFocalPoint(),a=t.renderer.getActiveCamera().getPosition(),s=Math.sqrt(st(a,o)),l=[o[0]+s*r[0],o[1]+s*r[1],o[2]+s*r[2]];t.renderer.getActiveCamera().setPosition(l[0],l[1],l[2]),t.renderer.getActiveCamera().setViewUp(i[0],i[1],i[2])}}}var LA={};function VA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,LA,n),RA.extend(e,t,LA,n),t.resliceCursorActor=QC.newInstance(),t.startPickPosition=null,t.startCenterPosition=null,de.get(e,t,["resliceCursorActor"]),BA(e,t)}var jA={newInstance:de.newInstance(VA,"vtkResliceCursorLineRepresentation"),extend:VA},UA=0,GA=1,zA=2;function WA(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 HA=de.VOID,KA=de.EVENT_ABORT;function qA(e,t){t.classHierarchy.push("vtkResliceCursorWidget");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,XA,n),Kw.extend(e,t,XA,n),t.imageInteractorStyle=pb.newInstance({currentImageNumber:null}),qA(e,t)}var ZA=de.newInstance(YA,"vtkResliceCursorWidget"),JA={Manipulators:Jy,Misc:rb,Style:Ob,UI:jw,Widgets:{vtkAbstractWidget:Kw,vtkDistanceRepresentation:oS,vtkDistanceWidget:RS,vtkHandleRepresentation:Sx,vtkHandleWidget:mS,vtkImageCroppingRegionsRepresentation:GS,vtkImageCroppingRegionsWidget:eC,vtkLabelRepresentation:Mx,vtkLabelWidget:xS,vtkLineRepresentation:eS,vtkLineWidget:DS,vtkOrientationMarkerWidget:IC,vtkPiecewiseGaussianWidget:kw,vtkPointPlacer:dx,vtkResliceCursor:VC,vtkResliceCursorLineRepresentation:jA,vtkResliceCursorWidget:{newInstance:ZA,extend:YA},vtkSphereHandleRepresentation:Xx,vtkWidgetRepresentation:gx}};function QA(e){let t=e.length;for(;--t>=0;)e[t]=0}const $A=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]),eP=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]),tP=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),nP=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rP=new Array(576);QA(rP);const iP=new Array(60);QA(iP);const oP=new Array(512);QA(oP);const aP=new Array(256);QA(aP);const sP=new Array(29);QA(sP);const lP=new Array(30);function uP(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let cP,dP,pP;function fP(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}QA(lP);const hP=e=>e<256?oP[e]:oP[256+(e>>>7)],mP=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},gP=(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<{gP(e,n[2*t],n[2*t+1])},yP=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},bP=(e,t,n)=>{const r=new Array(16);let i,o,a=0;for(i=1;i<=15;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=yP(r[t]++,t))}},wP=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},xP=e=>{e.bi_valid>8?mP(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},SP=(e,t,n,r)=>{const i=2*t,o=2*n;return e[i]{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o,a,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?vP(e,i,t):(o=aP[i],vP(e,o+256+1,t),a=$A[o],0!==a&&(i-=sP[o],gP(e,i,a)),r--,o=hP(r),vP(e,o,n),a=eP[o],0!==a&&(r-=lP[o],gP(e,r,a)))}while(s{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,l,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)CP(e,n,a);l=o;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],CP(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[2*l]=n[2*a]+n[2*s],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[2*a+1]=n[2*s+1]=l,e.heap[1]=l++,CP(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,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,p,f,h,m=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(n[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)c=e.heap[u],p=n[2*n[2*c+1]+1]+1,p>l&&(p=l,m++),n[2*c+1]=p,c>r||(e.bl_count[p]++,f=0,c>=s&&(f=a[c-s]),h=n[2*c],e.opt_len+=h*(p+f),o&&(e.static_len+=h*(i[2*c+1]+f)));if(0!==m){do{for(p=l-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(p=l;0!==p;p--)for(c=e.bl_count[p];0!==c;)d=e.heap[--u],d>r||(n[2*d+1]!==p&&(e.opt_len+=(p-n[2*d+1])*n[2*d],n[2*d+1]=p),c--)}})(e,t),bP(n,u,e.bl_count)},_P=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s{let r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s{gP(e,0+(r?1:0),3),((e,t,n,r)=>{xP(e),mP(e,n),mP(e,~n),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n)};var DP={_tr_init:e=>{EP||((()=>{let e,t,n,r,i;const o=new Array(16);for(n=0,r=0;r<28;r++)for(sP[r]=n,e=0;e<1<<$A[r];e++)aP[n++]=r;for(aP[n-1]=r,i=0,r=0;r<16;r++)for(lP[r]=i,e=0;e<1<>=7;r<30;r++)for(lP[r]=i<<7,e=0;e<1<{let i,o,a=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)),PP(e,e.l_desc),PP(e,e.d_desc),a=(e=>{let t;for(_P(e,e.dyn_ltree,e.l_desc.max_code),_P(e,e.dyn_dtree,e.d_desc.max_code),PP(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*nP[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?TP(e,t,n,r):4===e.strategy||o===i?(gP(e,2+(r?1:0),3),AP(e,rP,iP)):(gP(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(gP(e,t-257,5),gP(e,n-1,5),gP(e,r-4,4),i=0;i(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*(aP[n]+256+1)]++,e.dyn_dtree[2*hP(t)]++),e.last_lit===e.lit_bufsize-1),_tr_align:e=>{gP(e,2,3),vP(e,256,rP),(e=>{16===e.bi_valid?(mP(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)}},IP=(e,t,n,r)=>{let i=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+t[r++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0};const kP=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 MP=(e,t,n,r)=>{const i=kP,o=r+n;e^=-1;for(let n=r;n>>8^i[255&(e^t[n])];return-1^e},NP={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"},RP={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:FP,_tr_stored_block:BP,_tr_flush_block:LP,_tr_tally:VP,_tr_align:jP}=DP,{Z_NO_FLUSH:UP,Z_PARTIAL_FLUSH:GP,Z_FULL_FLUSH:zP,Z_FINISH:WP,Z_BLOCK:HP,Z_OK:KP,Z_STREAM_END:qP,Z_STREAM_ERROR:XP,Z_DATA_ERROR:YP,Z_BUF_ERROR:ZP,Z_DEFAULT_COMPRESSION:JP,Z_FILTERED:QP,Z_HUFFMAN_ONLY:$P,Z_RLE:e_,Z_FIXED:t_,Z_DEFAULT_STRATEGY:n_,Z_UNKNOWN:r_,Z_DEFLATED:i_}=RP,o_=258,a_=262,s_=103,l_=113,u_=666,c_=(e,t)=>(e.msg=NP[t],t),d_=e=>(e<<1)-(e>4?9:0),p_=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let f_=(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))},m_=(e,t)=>{LP(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,h_(e.strm)},g_=(e,t)=>{e.pending_buf[e.pending++]=t},v_=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},y_=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=IP(e.adler,t,i,n):2===e.state.wrap&&(e.adler=MP(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},b_=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-a_?e.strstart-(e.w_size-a_):0,u=e.window,c=e.w_mask,d=e.prev,p=e.strstart+o_;let f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+a]===h&&u[n+a-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&oa){if(e.match_start=t,a=r,r>=s)break;f=u[o+a-1],h=u[o+a]}}}while((t=d[t&c])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead},w_=e=>{const t=e.w_size;let n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-a_)){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{i=e.head[--n],e.head[n]=i>=t?i-t:0}while(--r);r=t,n=r;do{i=e.prev[--n],e.prev[n]=i>=t?i-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=y_(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=f_(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=f_(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let n,r;for(;;){if(e.lookahead=3&&(e.ins_h=f_(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-a_&&(e.match_length=b_(e,n)),e.match_length>=3)if(r=VP(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=f_(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=f_(e,e.ins_h,e.window[e.strstart+1]);else r=VP(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(m_(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===WP?(m_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m_(e,!1),0===e.strm.avail_out)?1:2},S_=(e,t)=>{let n,r,i;for(;;){if(e.lookahead=3&&(e.ins_h=f_(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){i=e.strstart+e.lookahead-3,r=VP(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=f_(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&&(m_(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=VP(e,0,e.window[e.strstart-1]),r&&m_(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=VP(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===WP?(m_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m_(e,!1),0===e.strm.avail_out)?1:2};function C_(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const A_=[new C_(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(w_(e),0===e.lookahead&&t===UP)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,m_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-a_&&(m_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===WP?(m_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(m_(e,!1),e.strm.avail_out),1)})),new C_(4,4,8,4,x_),new C_(4,5,16,8,x_),new C_(4,6,32,32,x_),new C_(4,4,16,16,S_),new C_(8,16,32,32,S_),new C_(8,16,128,128,S_),new C_(8,32,128,256,S_),new C_(32,128,258,1024,S_),new C_(32,258,258,4096,S_)];function P_(){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=i_,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),p_(this.dyn_ltree),p_(this.dyn_dtree),p_(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),p_(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),p_(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 __=e=>{if(!e||!e.state)return c_(e,XP);e.total_in=e.total_out=0,e.data_type=r_;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:l_,e.adler=2===t.wrap?0:1,t.last_flush=UP,FP(t),KP},O_=e=>{const t=__(e);var n;return t===KP&&((n=e.state).window_size=2*n.w_size,p_(n.head),n.max_lazy_match=A_[n.level].max_lazy,n.good_match=A_[n.level].good_length,n.nice_match=A_[n.level].nice_length,n.max_chain_length=A_[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},E_=(e,t,n,r,i,o)=>{if(!e)return XP;let a=1;if(t===JP&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==i_||r<8||r>15||t<0||t>9||o<0||o>t_)return c_(e,XP);8===r&&(r=9);const s=new P_;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<e&&e.state?2!==e.state.wrap?XP:(e.state.gzhead=t,KP):XP,I_=(e,t)=>{let n,r;if(!e||!e.state||t>HP||t<0)return e?c_(e,XP):XP;const i=e.state;if(!e.output||!e.input&&0!==e.avail_in||i.status===u_&&t!==WP)return c_(e,0===e.avail_out?ZP:XP);i.strm=e;const o=i.last_flush;if(i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,g_(i,31),g_(i,139),g_(i,8),i.gzhead?(g_(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),g_(i,255&i.gzhead.time),g_(i,i.gzhead.time>>8&255),g_(i,i.gzhead.time>>16&255),g_(i,i.gzhead.time>>24&255),g_(i,9===i.level?2:i.strategy>=$P||i.level<2?4:0),g_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(g_(i,255&i.gzhead.extra.length),g_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=MP(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(g_(i,0),g_(i,0),g_(i,0),g_(i,0),g_(i,0),g_(i,9===i.level?2:i.strategy>=$P||i.level<2?4:0),g_(i,3),i.status=l_);else{let t=i_+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=$P||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=l_,v_(i,t),0!==i.strstart&&(v_(i,e.adler>>>16),v_(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=MP(e.adler,i.pending_buf,i.pending-n,n)),h_(e),n=i.pending,i.pending!==i.pending_buf_size));)g_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=MP(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=MP(e.adler,i.pending_buf,i.pending-n,n)),h_(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(e.adler=MP(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=MP(e.adler,i.pending_buf,i.pending-n,n)),h_(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(e.adler=MP(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=s_)}else i.status=s_;if(i.status===s_&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&h_(e),i.pending+2<=i.pending_buf_size&&(g_(i,255&e.adler),g_(i,e.adler>>8&255),e.adler=0,i.status=l_)):i.status=l_),0!==i.pending){if(h_(e),0===e.avail_out)return i.last_flush=-1,KP}else if(0===e.avail_in&&d_(t)<=d_(o)&&t!==WP)return c_(e,ZP);if(i.status===u_&&0!==e.avail_in)return c_(e,ZP);if(0!==e.avail_in||0!==i.lookahead||t!==UP&&i.status!==u_){let n=i.strategy===$P?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(w_(e),0===e.lookahead)){if(t===UP)return 1;break}if(e.match_length=0,n=VP(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(m_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===WP?(m_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m_(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===e_?((e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=o_){if(w_(e),e.lookahead<=o_&&t===UP)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+o_;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=VP(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=VP(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(m_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===WP?(m_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(m_(e,!1),0===e.strm.avail_out)?1:2})(i,t):A_[i.level].func(i,t);if(3!==n&&4!==n||(i.status=u_),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),KP;if(2===n&&(t===GP?jP(i):t!==HP&&(BP(i,0,0,!1),t===zP&&(p_(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),h_(e),0===e.avail_out))return i.last_flush=-1,KP}return t!==WP?KP:i.wrap<=0?qP:(2===i.wrap?(g_(i,255&e.adler),g_(i,e.adler>>8&255),g_(i,e.adler>>16&255),g_(i,e.adler>>24&255),g_(i,255&e.total_in),g_(i,e.total_in>>8&255),g_(i,e.total_in>>16&255),g_(i,e.total_in>>24&255)):(v_(i,e.adler>>>16),v_(i,65535&e.adler)),h_(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?KP:qP)},k_=e=>{if(!e||!e.state)return XP;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==s_&&t!==l_&&t!==u_?c_(e,XP):(e.state=null,t===l_?c_(e,YP):KP)},M_=(e,t)=>{let n=t.length;if(!e||!e.state)return XP;const r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return XP;if(1===i&&(e.adler=IP(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(p_(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,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,w_(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=f_(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,w_(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=a,e.input=s,e.avail_in=o,r.wrap=i,KP};const N_=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var R_=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)N_(n,t)&&(e[t]=n[t])}}return e},F_=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;L_[254]=L_[254]=1;var V_=e=>{let t,n,r,i,o,a=e.length,s=0;for(i=0;i>>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},j_=(e,t)=>{let n,r;const i=t||e.length,o=new Array(2*i);for(r=0,n=0;n4)o[r++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>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&&B_)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+L_[e[n]]>t?n:t},G_=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 z_=Object.prototype.toString,{Z_NO_FLUSH:W_,Z_SYNC_FLUSH:H_,Z_FULL_FLUSH:K_,Z_FINISH:q_,Z_OK:X_,Z_STREAM_END:Y_,Z_DEFAULT_COMPRESSION:Z_,Z_DEFAULT_STRATEGY:J_,Z_DEFLATED:Q_}=RP;function $_(e){this.options=R_({level:Z_,method:Q_,chunkSize:16384,windowBits:15,memLevel:8,strategy:J_},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 G_,this.strm.avail_out=0;let n=T_(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==X_)throw new Error(NP[n]);if(t.header&&D_(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?V_(t.dictionary):"[object ArrayBuffer]"===z_.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=M_(this.strm,e),n!==X_)throw new Error(NP[n]);this._dict_set=!0}}function eO(e,t){const n=new $_(t);if(n.push(e,!0),n.err)throw n.msg||NP[n.err];return n.result}$_.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?q_:W_,"string"==typeof e?n.input=V_(e):"[object ArrayBuffer]"===z_.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===H_||o===K_)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=I_(n,o),i===Y_)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=k_(this.strm),this.onEnd(i),this.ended=!0,i===X_;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},$_.prototype.onData=function(e){this.chunks.push(e)},$_.prototype.onEnd=function(e){e===X_&&(this.result=F_(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var tO={Deflate:$_,deflate:eO,deflateRaw:function(e,t){return(t=t||{}).raw=!0,eO(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,eO(e,t)},constants:RP},nO=function(e,t){let n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,w,x,S,C,A,P;const _=e.state;n=e.next_in,A=e.input,r=n+(e.avail_in-5),i=e.next_out,P=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=_.dmax,l=_.wsize,u=_.whave,c=_.wnext,d=_.window,p=_.hold,f=_.bits,h=_.lencode,m=_.distcode,g=(1<<_.lenbits)-1,v=(1<<_.distbits)-1;e:do{f<15&&(p+=A[n++]<>>24,p>>>=b,f-=b,b=y>>>16&255,0===b)P[i++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=h[(65535&y)+(p&(1<>>=b,f-=b),f<15&&(p+=A[n++]<>>24,p>>>=b,f-=b,b=y>>>16&255,!(16&b)){if(0==(64&b)){y=m[(65535&y)+(p&(1<s){e.msg="invalid distance too far back",_.mode=30;break e}if(p>>>=b,f-=b,b=i-o,x>b){if(b=x-b,b>u&&_.sane){e.msg="invalid distance too far back",_.mode=30;break e}if(S=0,C=d,0===c){if(S+=l-b,b2;)P[i++]=C[S++],P[i++]=C[S++],P[i++]=C[S++],w-=3;w&&(P[i++]=C[S++],w>1&&(P[i++]=C[S++]))}else{S=i-x;do{P[i++]=P[S++],P[i++]=P[S++],P[i++]=P[S++],w-=3}while(w>2);w&&(P[i++]=P[S++],w>1&&(P[i++]=P[S++]))}break}}break}}while(n>3,n-=w,f-=w<<3,p&=(1<{const l=s.bits;let u,c,d,p,f,h,m=0,g=0,v=0,y=0,b=0,w=0,x=0,S=0,C=0,A=0,P=null,_=0;const O=new Uint16Array(16),E=new Uint16Array(16);let T,D,I,k=null,M=0;for(m=0;m<=15;m++)O[m]=0;for(g=0;g=1&&0===O[y];y--);if(b>y&&(b=y),0===y)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===e||1!==y))return-1;for(E[1]=0,m=1;m<15;m++)E[m+1]=E[m]+O[m];for(g=0;g852||2===e&&C>592)return 1;for(;;){T=m-x,a[g]h?(D=k[M+a[g]],I=P[_+a[g]]):(D=96,I=0),u=1<>x)+c]=T<<24|D<<16|I|0}while(0!==c);for(u=1<>=1;if(0!==u?(A&=u-1,A+=u):A=0,g++,0==--O[m]){if(m===y)break;m=t[n+a[g]]}if(m>b&&(A&p)!==d){for(0===x&&(x=b),f+=v,w=m-x,S=1<852||2===e&&C>592)return 1;d=A&p,i[d]=b<<24|w<<16|f-o|0}}return 0!==A&&(i[f+A]=m-x<<24|64<<16|0),s.bits=b,0};const{Z_FINISH:lO,Z_BLOCK:uO,Z_TREES:cO,Z_OK:dO,Z_STREAM_END:pO,Z_NEED_DICT:fO,Z_STREAM_ERROR:hO,Z_DATA_ERROR:mO,Z_MEM_ERROR:gO,Z_BUF_ERROR:vO,Z_DEFLATED:yO}=RP,bO=12,wO=30,xO=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function SO(){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 CO=e=>{if(!e||!e.state)return hO;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,dO},AO=e=>{if(!e||!e.state)return hO;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,CO(e)},PO=(e,t)=>{let n;if(!e||!e.state)return hO;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?hO:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,AO(e))},_O=(e,t)=>{if(!e)return hO;const n=new SO;e.state=n,n.window=null;const r=PO(e,t);return r!==dO&&(e.state=null),r};let OO,EO,TO=!0;const DO=e=>{if(TO){OO=new Int32Array(512),EO=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(sO(1,e.lens,0,288,OO,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sO(2,e.lens,0,32,EO,0,e.work,{bits:5}),TO=!1}e.lencode=OO,e.lenbits=9,e.distcode=EO,e.distbits=5},IO=(e,t,n,r)=>{let i;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):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,w,x,S,C,A=0;const P=new Uint8Array(4);let _,O;const E=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 hO;n=e.state,n.mode===bO&&(n.mode=13),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,d=s,p=l,C=dO;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;c<16;){if(0===s)break e;s--,u+=r[o++]<>>8&255,n.check=MP(n.check,P,2,0),u=0,c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=wO;break}if((15&u)!==yO){e.msg="unknown compression method",n.mode=wO;break}if(u>>>=4,c-=4,S=8+(15&u),0===n.wbits)n.wbits=S;else if(S>n.wbits){e.msg="invalid window size",n.mode=wO;break}n.dmax=1<>8&1),512&n.flags&&(P[0]=255&u,P[1]=u>>>8&255,n.check=MP(n.check,P,2,0)),u=0,c=0,n.mode=3;case 3:for(;c<32;){if(0===s)break e;s--,u+=r[o++]<>>8&255,P[2]=u>>>16&255,P[3]=u>>>24&255,n.check=MP(n.check,P,4,0)),u=0,c=0,n.mode=4;case 4:for(;c<16;){if(0===s)break e;s--,u+=r[o++]<>8),512&n.flags&&(P[0]=255&u,P[1]=u>>>8&255,n.check=MP(n.check,P,2,0)),u=0,c=0,n.mode=5;case 5:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,u+=r[o++]<>>8&255,n.check=MP(n.check,P,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f=n.length,f>s&&(f=s),f&&(n.head&&(S=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+f),S)),512&n.flags&&(n.check=MP(n.check,r,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;f=0;do{S=r[o+f++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&f>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=bO;break;case 10:for(;c<32;){if(0===s)break e;s--,u+=r[o++]<>>=7&c,c-=7&c,n.mode=27;break}for(;c<3;){if(0===s)break e;s--,u+=r[o++]<>>=1,c-=1,3&u){case 0:n.mode=14;break;case 1:if(DO(n),n.mode=20,t===cO){u>>>=2,c-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=wO}u>>>=2,c-=2;break;case 14:for(u>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,u+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=wO;break}if(n.length=65535&u,u=0,c=0,n.mode=15,t===cO)break e;case 15:n.mode=16;case 16:if(f=n.length,f){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;i.set(r.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,n.length-=f;break}n.mode=bO;break;case 17:for(;c<14;){if(0===s)break e;s--,u+=r[o++]<>>=5,c-=5,n.ndist=1+(31&u),u>>>=5,c-=5,n.ncode=4+(15&u),u>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=wO;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[E[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,_={bits:n.lenbits},C=sO(0,n.lens,0,19,n.lencode,0,n.work,_),n.lenbits=_.bits,C){e.msg="invalid code lengths set",n.mode=wO;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,v=A>>>16&255,y=65535&A,!(g<=c);){if(0===s)break e;s--,u+=r[o++]<>>=g,c-=g,n.lens[n.have++]=y;else{if(16===y){for(O=g+2;c>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=wO;break}S=n.lens[n.have-1],f=3+(3&u),u>>>=2,c-=2}else if(17===y){for(O=g+3;c>>=g,c-=g,S=0,f=3+(7&u),u>>>=3,c-=3}else{for(O=g+7;c>>=g,c-=g,S=0,f=11+(127&u),u>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=wO;break}for(;f--;)n.lens[n.have++]=S}}if(n.mode===wO)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=wO;break}if(n.lenbits=9,_={bits:n.lenbits},C=sO(1,n.lens,0,n.nlen,n.lencode,0,n.work,_),n.lenbits=_.bits,C){e.msg="invalid literal/lengths set",n.mode=wO;break}if(n.distbits=6,n.distcode=n.distdyn,_={bits:n.distbits},C=sO(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,_),n.distbits=_.bits,C){e.msg="invalid distances set",n.mode=wO;break}if(n.mode=20,t===cO)break e;case 20:n.mode=21;case 21:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=c,nO(e,p),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,n.mode===bO&&(n.back=-1);break}for(n.back=0;A=n.lencode[u&(1<>>24,v=A>>>16&255,y=65535&A,!(g<=c);){if(0===s)break e;s--,u+=r[o++]<>b)],g=A>>>24,v=A>>>16&255,y=65535&A,!(b+g<=c);){if(0===s)break e;s--,u+=r[o++]<>>=b,c-=b,n.back+=b}if(u>>>=g,c-=g,n.back+=g,n.length=y,0===v){n.mode=26;break}if(32&v){n.back=-1,n.mode=bO;break}if(64&v){e.msg="invalid literal/length code",n.mode=wO;break}n.extra=15&v,n.mode=22;case 22:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=n.distcode[u&(1<>>24,v=A>>>16&255,y=65535&A,!(g<=c);){if(0===s)break e;s--,u+=r[o++]<>b)],g=A>>>24,v=A>>>16&255,y=65535&A,!(b+g<=c);){if(0===s)break e;s--,u+=r[o++]<>>=b,c-=b,n.back+=b}if(u>>>=g,c-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=wO;break}n.offset=y,n.extra=15&v,n.mode=24;case 24:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=wO;break}n.mode=25;case 25:if(0===l)break e;if(f=p-l,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=wO;break}f>n.wnext?(f-=n.wnext,h=n.wsize-f):h=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=i,h=a-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{i[a++]=m[h++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===l)break e;i[a++]=n.length,l--,n.mode=21;break;case 27:if(n.wrap){for(;c<32;){if(0===s)break e;s--,u|=r[o++]<{if(!e||!e.state)return hO;let t=e.state;return t.window&&(t.window=null),e.state=null,dO},FO=(e,t)=>{if(!e||!e.state)return hO;const n=e.state;return 0==(2&n.wrap)?hO:(n.head=t,t.done=!1,dO)},BO=(e,t)=>{const n=t.length;let r,i,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?hO:11===r.mode&&(i=1,i=IP(i,t,n,0),i!==r.check)?mO:(o=IO(e,t,n,n),o?(r.mode=31,gO):(r.havedict=1,dO))):hO},LO=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 VO=Object.prototype.toString,{Z_NO_FLUSH:jO,Z_FINISH:UO,Z_OK:GO,Z_STREAM_END:zO,Z_NEED_DICT:WO,Z_STREAM_ERROR:HO,Z_DATA_ERROR:KO,Z_MEM_ERROR:qO}=RP;function XO(e){this.options=R_({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 G_,this.strm.avail_out=0;let n=MO(this.strm,t.windowBits);if(n!==GO)throw new Error(NP[n]);if(this.header=new LO,FO(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=V_(t.dictionary):"[object ArrayBuffer]"===VO.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=BO(this.strm,t.dictionary),n!==GO)))throw new Error(NP[n])}function YO(e,t){const n=new XO(t);if(n.push(e),n.err)throw n.msg||NP[n.err];return n.result}XO.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=t===~~t?t:!0===t?UO:jO,"[object ArrayBuffer]"===VO.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=NO(n,a),o===WO&&i&&(o=BO(n,i),o===GO?o=NO(n,a):o===KO&&(o=WO));n.avail_in>0&&o===zO&&n.state.wrap>0&&0!==e[n.next_in];)kO(n),o=NO(n,a);switch(o){case HO:case KO:case WO:case qO:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||o===zO))if("string"===this.options.to){let e=U_(n.output,n.next_out),t=n.next_out-e,i=j_(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(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==GO||0!==s){if(o===zO)return o=RO(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},XO.prototype.onData=function(e){this.chunks.push(e)},XO.prototype.onEnd=function(e){e===GO&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=F_(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ZO={Inflate:XO,inflate:YO,inflateRaw:function(e,t){return(t=t||{}).raw=!0,YO(e,t)},ungzip:YO,constants:RP};const{Deflate:JO,deflate:QO,deflateRaw:$O,gzip:eE}=tO,{Inflate:tE,inflate:nE,inflateRaw:rE,ungzip:iE}=ZO;var oE={Deflate:JO,deflate:QO,deflateRaw:$O,gzip:eE,Inflate:tE,inflate:nE,inflateRaw:rE,ungzip:iE,constants:RP},aE={};function sE(e){return!!aE[e]}function lE(e,t){aE[e]=t}var uE={get:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return aE[e](t)},has:sE,registerType:lE},cE=de.vtkErrorMacro,dE=de.vtkDebugMacro,pE=0;function fE(e){var t=document.querySelector('.webResource[data-url="'.concat(e,'"]'));return t?t.innerHTML:null}function hE(e){return document.querySelector('.webResource[data-url="'.concat(e,'"]'))}function mE(e){return"/"===e[0]?e.substr(1):e}var gE={fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0;return new Promise((function(t,n){var r=fE(mE(e));null===r?n(new Error("No such JSON ".concat(e))):t(JSON.parse(r))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0;return new Promise((function(t,n){var r=fE(e);null===r?n(new Error("No such text ".concat(e))):t(r)}))},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 new Promise((function(i,o){var a=mE([t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/")),s=fE(a);if(null===s)o(new Error("No such array ".concat(a)));else{if("string"===n.dataType){var l=atob(s);r.compression&&(l=oE.inflate(l,{to:"string"})),n.values=JSON.parse(l)}else{var u=new Uint8Array(p.toArrayBuffer(s));n.buffer=new ArrayBuffer(u.length),new Uint8Array(n.buffer).set(u),r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=oE.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=oE.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(Xn.ENDIANNESS!==n.ref.encode&&Xn.ENDIANNESS&&(dE("Swap bytes of ".concat(n.name)),Xn.swapBytes(n.buffer,pe[n.dataType])),n.values=de.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&cE("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==--pE&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),i(n)}}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0;return new Promise((function(t,n){var r=hE(e);r?t(r):n(new Error("No such image ".concat(e)))}))}};lE("html",(function(e){return gE}));var vE=de.vtkErrorMacro,yE=de.vtkDebugMacro,bE=0;function wE(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=g(e,2),n=t[0],i=t[1];return r.setRequestHeader(n,i)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var xE={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(i,o){var a=wE("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);a.onreadystatechange=function(t){1===a.readyState&&(n.ref.pending=!0,1==++bE&&e.invokeBusy&&e.invokeBusy(!0)),4===a.readyState&&(n.ref.pending=!1,200===a.status||0===a.status?(n.buffer=a.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=oE.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=oE.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(Xn.ENDIANNESS!==n.ref.encode&&Xn.ENDIANNESS&&(yE("Swap bytes of ".concat(n.name)),Xn.swapBytes(n.buffer,pe[n.dataType])),n.values=de.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&vE("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==--bE&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),i(n)):o({xhr:a,e:t}))},a.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",a.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,i){var o=wE("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++bE&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--bE&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(oE.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):i({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&&(vE("Supported algorithms are: [gz]"),vE("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,i){var o=wE("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++bE&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--bE&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(oE.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):i({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 i=wE("GET",e,t);i.onreadystatechange=function(e){4===i.readyState&&(200===i.status||0===i.status?n(i.response):r({xhr:i,e:e}))},i.responseType="arraybuffer",i.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 i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin),i.onload=function(){return n(i)},i.onerror=r,i.src=e}))}};lE("http",(function(e){return xE}));var SE=n(6085),CE=n.n(SE),AE=de.vtkErrorMacro,PE=de.vtkDebugMacro;function _E(e){var t=e.split(".").pop().toLowerCase();return"jpg"===t?"jpeg":t}var OE={uint8array:function(e,t,n){return function(r){e.buffer=new ArrayBuffer(r.length),new Uint8Array(e.buffer).set(r),t&&("string"===e.dataType||"JSON"===e.dataType?e.buffer=oE.inflate(new Uint8Array(e.buffer),{to:"string"}):e.buffer=oE.inflate(new Uint8Array(e.buffer)).buffer),"JSON"===e.ref.encode?e.values=JSON.parse(e.buffer):(Xn.ENDIANNESS!==e.ref.encode&&Xn.ENDIANNESS&&(PE("Swap bytes of ".concat(e.name)),Xn.swapBytes(e.buffer,pe[e.dataType])),e.values=de.newTypedArray(e.dataType,e.buffer)),e.values.length!==e.size&&AE("Error in FetchArray: ".concat(e.name," does not have the proper array size. Got ").concat(e.values.length,", instead of ").concat(e.size)),n()}},string:function(e,t,n){return function(r){e.values=t?JSON.parse(oE.inflate(r,{to:"string"})):JSON.parse(r),n()}}};function EE(e){return function(e){return"/"===e[0]?e.substr(1):e}(function(e){return new URL(e,"http://any").pathname}(e))}var TE=function(e){var t=!1,n=0,r=new(CE()),i=r;return r.loadAsync(e.zipContent).then((function(){t=!0;var n=[];r.forEach((function(e,t){-1!==e.indexOf("index.json")&&n.push(e)})),n.sort((function(e,t){return e.length-t.length}));for(var o=n[0].split("/");o.length>1;){var a=o.shift();i=i.folder(a)}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,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(s,l){t||AE("ERROR!!! zip not ready...");var u=EE([r,o.ref.basepath,a.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var c="string"!==o.dataType||a.compression?"uint8array":"string",d=OE[c](o,a.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),s(o)}));i.file(u).async(c).then(d)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=EE(e);return t||AE("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?i.file(r).async("uint8array").then((function(e){var t=oE.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):i.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=EE(e);return t||AE("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?i.file(r).async("uint8array").then((function(e){var t=oE.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):i.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=EE(e);return t||AE("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,i.file(n).async("base64").then((function(e){r.src="data:image/".concat(_E(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=EE(e);return t||AE("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?i.file(r).then((function(e){var t=oE.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):i.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}};function DE(e){if("TextDecoder"in window)return new TextDecoder("latin1").decode(e);for(var t=new Uint8Array(e),n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:null,r=DE(e),i=t.exec(r);if(!i)return{text:r};var o=i.index+i[0].length,a=r.substring(0,o),s=null,l=n?n.exec(r):null;if(l){var u=r.substr(l.index);s={text:a+u,binaryBuffer:e.slice(o,l.index)}}else s={text:a,binaryBuffer:e.slice(o)};return s}},kE=de.vtkErrorMacro,ME=de.vtkDebugMacro,NE=function(){return kE("LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead."),Promise.reject(new Error("LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead."))},RE=0;function FE(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=g(e,2),n=t[0],i=t[1];return r.setRequestHeader(n,i)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var BE={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?NE():n.ref&&!n.ref.pending?new Promise((function(i,o){var a=FE("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);a.onreadystatechange=function(t){1===a.readyState&&(n.ref.pending=!0,1==++RE&&e.invokeBusy&&e.invokeBusy(!0)),4===a.readyState&&(n.ref.pending=!1,200===a.status||0===a.status?(n.buffer=a.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(Xn.ENDIANNESS!==n.ref.encode&&Xn.ENDIANNESS&&(ME("Swap bytes of ".concat(n.name)),Xn.swapBytes(n.buffer,pe[n.dataType])),n.values=de.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&kE("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==--RE&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),i(n)):o({xhr:a,e:t}))},a.responseType="string"!==n.dataType?"arraybuffer":"text",a.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?NE():new Promise((function(r,i){var o=FE("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++RE&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--RE&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):i({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?NE():new Promise((function(r,i){var o=FE("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++RE&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--RE&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):i({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 i=FE("GET",e,t);i.onreadystatechange=function(e){4===i.readyState&&(200===i.status||0===i.status?n(i.response):r({xhr:i,e:e}))},i.responseType="arraybuffer",i.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 i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin),i.onload=function(){return n(i)},i.onerror=r,i.src=e}))}};sE("http")||lE("http",(function(e){return BE}));var LE=["pointData","cellData","fieldData"],VE={vtkDataArray:Ln,vtkStringArray:Ws},jE={},UE={vtkPolyData:function(e){var t=[];return t.push(e.points),["verts","lines","polys","strips"].forEach((function(n){e[n]&&t.push(e[n])})),t},vtkImageData:function(e){return[]},vtkUnstructuredGrid:function(e){var t=[];return t.push(e.points),t.push(e.cells),t.push(e.cellTypes),t},vtkRectilinearGrid:function(e){var t=[];return t.push(e.xCoordinates),t.push(e.yCoordinates),t.push(e.zCoordinates),t}};function GE(e,t,n,r,i,o,a){var s=t.enableArray;t.arrays=[],LE.forEach((function(e){n[e]&&(n[e].arrays.map((function(e){return e.data})).forEach((function(n){t.arrays.push({name:n.name,enable:s,location:e,array:n,registration:n.ref.registration||"addArray"})})),n[e].arrays=[])}));var l=[],u=t.progressCallback,c=t.fetchGzip?"gz":null;function d(){t.dataset=A(n),a?e.loadData().then((function(){t.output[0]=t.dataset,i(e,t.output[0])})):(t.output[0]=t.dataset,i(e,t.output[0]))}UE[n.vtkClass](n).forEach((function(e){l.push(r(e,{compression:c,progressCallback:u}))})),l.length?Promise.all(l).then(d,(function(e){o(e)})):d()}function zE(e,t){function n(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="".concat(n.ref.id,"|").concat(n.vtkClass);return jE[i]?Promise.resolve(jE[i]).then((function(e){n!==e&&(Object.assign(n,e),delete n.ref)})):jE[i]=t.dataAccessHelper.fetchArray(e,t.baseURL,n,r).then((function(e){return jE[i]=e,e})),Promise.resolve(jE[i])}t.classHierarchy.push("vtkHttpDataSetReader"),t.output[0]=A({vtkClass:"vtkPolyData"}),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.updateMetadata=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"zip"===t.compression?new Promise((function(i,o){uE.get("http").fetchBinary(t.url).then((function(a){t.dataAccessHelper=uE.get("zip",{zipContent:a,callback:function(a){t.baseURL="",t.dataAccessHelper.fetchJSON(e,"index.json").then((function(a){GE(e,t,a,n,i,o,r)}),(function(e){o(e)}))}})}),(function(e){o(e)}))})):new Promise((function(i,o){t.dataAccessHelper.fetchJSON(e,t.url).then((function(a){GE(e,t,a,n,i,o,r)}),(function(e){o(e)}))}))},e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf("index.json")||r.fullpath){t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.json");return t.compression=r.compression,e.updateMetadata(!!r.loadData)},e.loadData=function(){var r=t.dataset,i=t.arrays.filter((function(e){return e.enable})).filter((function(e){return e.array.ref})).map((function(e){return e.array}));return new Promise((function(o,a){var s=function(e){a(e)};!function a(){if(i.length){var l=t.progressCallback,u=t.fetchGzip?"gz":null;n(i.pop(),{compression:u,progressCallback:l}).then(a,s)}else r&&(t.arrays.filter((function(e){return e.registration&&!e.array.ref})).forEach((function(e){var t=VE[e.array.vtkClass].newInstance(e.array);r["get".concat(de.capitalize(e.location))]()[e.registration](t),delete e.registration})),r.modified(),o(e,r))}()}))},e.requestData=function(e,t){},e.enableArray=function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.arrays.filter((function(t){return t.name===n&&t.location===e}));1===i.length&&(i[0].enable=r)},e.isBusy=function(){return!!t.requestCount}}var WE={enableArray:!0,fetchGzip:!1,arrays:[],url:null,baseURL:null,requestCount:0};function HE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,WE,n),de.obj(e,t),de.get(e,t,["enableArray","fetchGzip","url","baseURL","dataAccessHelper"]),de.set(e,t,["dataAccessHelper","progressCallback"]),de.getArray(e,t,["arrays"]),de.algo(e,t,0,1),de.event(e,t,"busy"),zE(e,t),void 0===t.progressCallback&&(t.progressCallback=null)}var KE={newInstance:de.newInstance(HE,"vtkHttpDataSetReader"),extend:HE},qE={ColorSpace:{RGB:0,HSV:1,LAB:2,DIVERGING:3},Scale:{LINEAR:0,LOG10:1}};function XE(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 YE=qE.ColorSpace,ZE=qE.Scale,JE=ys.ScalarMappingTarget,QE=de.vtkDebugMacro,$E=de.vtkErrorMacro,eT=de.vtkWarningMacro;function tT(e,t){var n=e[0],r=e[1],i=e[2],o=Math.sqrt(n*n+r*r+i*i),a=o>.001?Math.acos(n/o):0,s=a>.001?Math.atan2(i,r):0;t[0]=o,t[1]=a,t[2]=s}function nT(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 rT(e,t,n,r){var i=[],o=[];Qt(t,i),Qt(n,o);var a=[],s=[];tT(i,a),tT(o,s);var l=e;if(a[1]>.05&&s[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}(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=nT(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=nT(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var d=[];!function(e,t){var n=e[0],r=e[1],i=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(i),t[2]=n*Math.sin(r)*Math.sin(i)}(c,d),$t(d,r)}function iT(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,i){return e.addRGBPointLong(t,n,r,i,.5,0)},e.addRGBPointLong=function(n,r,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(a<0||a>1)return $E("Midpoint outside range [0.0, 1.0]"),-1;if(s<0||s>1)return $E("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var l={x:n,r:r,g:i,b:o,midpoint:a,sharpness:s};t.nodes.push(l),e.sortAndUpdateRange();for(var u=0;u4&&void 0!==arguments[4]?arguments[4]:.5,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=[],l=[n,r,i];return qt(l,s),e.addRGBPoint(t,s[0],s[1],s[2],o,a)},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(),i},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var i=0;i=n&&t.nodes[c].x<=a?t.nodes.splice(c,1):c++;e.addRGBPointLong(n,r,i,o,.5,0),e.addRGBPointLong(a,s,l,u,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,i,o,a,s,l){var u=[a,s,l],c=[],d=[];qt([n,r,i],c),qt(u,d),e.addRGBSegment(t,c[0],c[1],c[2],o,d[0],d[1],d[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 i=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===i)e.getNanColor(r);else{var a=[];e.getNodeValue(o%i,a),r[0]=a.r,r[1]=a.g,r[2]=a.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,i,o){if(yn(n)||yn(r))for(var a=0;a0);var x=0,S=0,C=0;w&&(x=Math.log10(n),S=Math.log10(r));for(var A=0;A1?w?(C=x+A/(i-1)*(S-x),p=Math.pow(10,C)):p=n+A/(i-1)*(r-n):w?(C=.5*(x+S),p=Math.pow(10,C)):p=.5*(n+r),t.discretize){var _=t.mappingRange;if(p>=_[0]&&p<=_[1]){var O=t.numberOfValues,E=_[1]-_[0];if(O<=1)p=_[0]+E/2;else{var T=(p-_[0])/E,D=Ee(O*T);p=_[0]+D/(O-1)*E}}}for(;st.nodes[s].x;)++s.99999&&(v=.99999));if(p>t.mappingRange[1])o[P]=0,o[P+1]=0,o[P+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[P]=t.aboveRangeColor[0],o[P+1]=t.aboveRangeColor[1],o[P+2]=t.aboveRangeColor[2]):(o[P]=u,o[P+1]=c,o[P+2]=d));else if(p0&&(o[P]=t.nodes[0].r,o[P+1]=t.nodes[0].g,o[P+2]=t.nodes[0].b));else if(0===s&&(Math.abs(p-n)<1e-6||t.discretize))l>0?(o[P]=t.nodes[0].r,o[P+1]=t.nodes[0].g,o[P+2]=t.nodes[0].b):(o[P]=0,o[P+1]=0,o[P+2]=0);else{var I=0;if(I=(I=w?(C-f)/(h-f):(p-f)/(h-f)).99){if(I<.5){o[P]=m[0],o[P+1]=m[1],o[P+2]=m[2];continue}o[P]=g[0],o[P+1]=g[1],o[P+2]=g[2];continue}if(y<.01){if(t.colorSpace===YE.RGB)o[P]=(1-I)*m[0]+I*g[0],o[P+1]=(1-I)*m[1]+I*g[1],o[P+2]=(1-I)*m[2]+I*g[2];else if(t.colorSpace===YE.HSV){var k=[],M=[];Kt(m,k),Kt(g,M),t.hSVWrap&&(k[0]-M[0]>.5||M[0]-k[0]>.5)&&(k[0]>M[0]?k[0]-=1:M[0]-=1);var N=[];N[0]=(1-I)*k[0]+I*M[0],N[0]<0&&(N[0]+=1),N[1]=(1-I)*k[1]+I*M[1],N[2]=(1-I)*k[2]+I*M[2],qt(N,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else if(t.colorSpace===YE.LAB){var R=[],F=[];Qt(m,R),Qt(g,F);var B=[];B[0]=(1-I)*R[0]+I*F[0],B[1]=(1-I)*R[1]+I*F[1],B[2]=(1-I)*R[2]+I*F[2],$t(B,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else t.colorSpace===YE.DIVERGING?(rT(I,m,g,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]):$E("ColorSpace set to invalid value.",t.colorSpace);continue}I<.5?I=.5*Math.pow(2*I,1+10*y):I>.5&&(I=1-.5*Math.pow(2*(1-I),1+10*y));var L=I*I,V=L*I,j=2*V-3*L+1,U=-2*V+3*L,G=V-2*L+I,z=V-L,W=void 0;if(t.colorSpace===YE.RGB)for(var H=0;H<3;H++)W=(1-y)*(g[H]-m[H]),o[P+H]=j*m[H]+U*g[H]+G*W+z*W;else if(t.colorSpace===YE.HSV){var K=[],q=[];Kt(m,K),Kt(g,q),t.hSVWrap&&(K[0]-q[0]>.5||q[0]-K[0]>.5)&&(K[0]>q[0]?K[0]-=1:q[0]-=1);for(var X=[],Y=0;Y<3;Y++)W=(1-y)*(q[Y]-K[Y]),X[Y]=j*K[Y]+U*q[Y]+G*W+z*W,0===Y&&X[Y]<0&&(X[Y]+=1);qt(X,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else if(t.colorSpace===YE.LAB){var Z=[],J=[];Qt(m,Z),Qt(g,J);for(var Q=[],$=0;$<3;$++)W=(1-y)*(J[$]-Z[$]),Q[$]=j*Z[$]+U*J[$]+G*W+z*W;$t(Q,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else t.colorSpace===YE.DIVERGING?(rT(I,m,g,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]):$E("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[P+ee]=o[P+ee]<0?0:o[P+ee],o[P+ee]=o[P+ee]>1?1:o[P+ee]}}}},e.getUint8Table=function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===i&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return $E("Attempting to lookup a value with no points in the function"),t.table;var a=o?4:3;t.tableSize===i&&t.tableWithAlpha===o||(t.table=new Uint8Array(i*a),t.tableSize=i,t.tableWithAlpha=o);var s=[];e.getTable(n,r,i,s);for(var l=0;l1&&(a=(r-n)/(i-1));for(var s=0;s=t.nodes.length?($E("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 $E("Index out of range!"),-1;var i=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],i!==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 i=[];e.getNodeValue(t%r,i);for(var o=0;o<3;++o)n[o]=i[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],i),e.addRGBPoint(n[1],i[0],i[1],i[2])):(e.getColor(r[1],i),e.addRGBPoint(n[1],i[0],i[1],i[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,oT,n),ys.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={},de.obj(t.buildTime),de.get(e,t,["buildTime","mappingRange"]),de.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),de.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),de.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),iT(e,t)}var sT=function(e){for(var t=1;t(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?(hT("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var i=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,i=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,i=!0),i&&e.modified(),i},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Jl.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 i=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,i=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,i=!0),i&&e.modified(),i},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=sT.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=Jl.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 hT("Invalid index"),!1;var i=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==i&&(t.componentData[n].componentWeight=i,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(hT("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(pT.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(pT.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(pT.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return de.enumToString(pT,t.interpolationType)},["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=de.capitalize(n);e["set".concat(r)]=function(r,i){return t.componentData[r]["".concat(n)]!==i&&(t.componentData[r]["".concat(n)]=i,e.modified(),!0)}})),["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=de.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var gT={independentComponents:!0,interpolationType:pT.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function vT(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,gT,n),de.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:fT.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}de.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),mT(e,t)}var yT=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()){bT("Recomputing bounds..."),t.mapperBounds=r.map((function(e){return e}));var i=[];Xr.getCorners(r,i),e.computeMatrix();var o=new Float64Array(16);Io(o,t.matrix),i.forEach((function(e){return io(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?i.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):i.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 xT={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function ST(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xT,n),Yg.extend(e,t,n),t.boundsMTime={},de.obj(t.boundsMTime),de.set(e,t,["property"]),de.setGet(e,t,["mapper"]),de.getArray(e,t,["bounds"],6),wT(e,t)}var CT={newInstance:de.newInstance(ST,"vtkVolume"),extend:ST},AT=uE.get("http");function PT(e,t,n,r,i,o){t.readers=[];var a=[];return n.series.forEach((function(e){var n=KE.newInstance({fetchGzip:t.fetchGzip,dataAccessHelper:t.dataAccessHelper});a.push(n.setUrl("".concat(t.baseURL,"/").concat(e.url),{loadData:o})),t.readers.push({timeStep:e.timeStep,reader:n})})),Promise.all(a).then((function(){var t=e.getTimeRange();t&&0!==t.length&&e.setUpdateTimeStep(t[0]),r(e)}),(function(e){i(e)}))}function _T(e,t){t.classHierarchy.push("vtkHttpDataSetSeriesReader"),t.output[0]=A({vtkClass:"vtkPolyData"}),t.dataAccessHelper||(t.dataAccessHelper=AT),t.currentReader=null,e.updateMetaData=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"zip"===t.compression?new Promise((function(r,i){AT.fetchBinary(t.baseURL).then((function(o){t.dataAccessHelper=uE.get("zip",{zipContent:o,callback:function(o){t.baseURL="",t.dataAccessHelper.fetchJSON(e,"index.json").then((function(o){PT(e,t,o,r,i,n)}),(function(e){i(e)}))}})}))})):new Promise((function(r,i){t.dataAccessHelper.fetchJSON(e,t.url).then((function(o){return PT(e,t,o,r,i,n)}),(function(e){i(e)}))}))},e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.endsWith("index.json")||r.fullpath){t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.json");return t.compression=r.compression,e.updateMetaData(r.loadData)},e.getTimeSteps=function(){return t.readers.map((function(e){return e.timeStep})).sort()},e.getTimeRange=function(){var t=e.getTimeSteps(),n=t.length;return n>=1?[t[0],t[n-1]]:[]},e.setUpdateTimeStep=function(n){var r=t.readers.reduce((function(e,t){return t.timeStep<=n?t:e}));void 0!==r&&(t.currentReader=r.reader,t.output[0]=t.currentReader.getOutputData(),t.output[0].modified(),e.modified())},e.requestData=function(e,n){t.currentReader&&(n[0]=t.currentReader.getOutputData())},e.enableArray=function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.currentReader&&t.currentReader.reader.enableArray(e,n,r)},e.loadData=function(){t.currentReader&&t.currentReader.reader.loadData()}}var OT={fetchGzip:!1,url:null,baseURL:null,dataAccessHelper:null};function ET(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OT,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.set(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),_T(e,t)}var TT={newInstance:de.newInstance(ET,"vtkHttpDataSetSeriesReader"),extend:ET};function DT(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 IT={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function kT(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,IT,n),de.obj(e,t),de.algo(e,t,6,0),de.get(e,t,["imageLoaded"]),de.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),DT(e,t)}var MT={newInstance:de.newInstance(kT,"vtkTexture"),extend:kT},NT=de.vtkErrorMacro;function RT(e,t){t.classHierarchy.push("vtkTextureLODsDownloader");var n={downloadStack:[]};e.startDownloads=function(){if(t.texture)if(t.files&&0!==t.files.length){var e=t.baseUrl;e&&!e.endsWith("/")&&(e+="/"),n.downloadStack=[],t.files.forEach((function(t){return n.downloadStack.push("".concat(e).concat(t))})),setTimeout((function e(){if(0!==n.downloadStack.length){var r=function(){setTimeout(e,t.waitTimeBetweenDownloads)},i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin);var o=n.downloadStack.shift();(function(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var i=r.getResponseHeader("Content-Length");t(i)}else console.log("Failed to get remote file size of",e),n(r)},r.send()}))})(o).then((function(e){if(!e||e/1024>t.maxTextureLODSize)return e?console.log("Skipping image",o,", because it is larger","than the max texture size:",t.maxTextureLODSize,"KiB"):console.log("Failed to get image size"),void r();i.src=o,i.decode().then((function(){t.texture.setImage(i),t.stepFinishedCallback&&t.stepFinishedCallback(),r()})).catch((function(e){console.log("Failed to decode image:",i.src),console.log("Error is:",e),r()}))})).catch((function(e){console.log("Failed to get size of:",o),console.log("status was:",e.status),console.log("statusText was:",e.statusText),r()}))}}),t.waitTimeToStart)}else NT("No files set.");else NT("Texture was not set.")}}var FT={baseUrl:"",files:[],texture:null,crossOrigin:void 0,maxTextureLODSize:5e4,stepFinishedCallback:null,waitTimeToStart:4e3,waitTimeBetweenDownloads:0};function BT(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FT,n),de.obj(e,t),de.setGet(e,t,["baseUrl","files","texture","crossOrigin","maxTextureLODSize","stepFinishedCallback","waitTimeToStart","waitTimeBetweenDownloads"]),RT(e,t)}var LT={newInstance:de.newInstance(BT,"vtkTextureLODsDownloader"),extend:BT},VT=de.vtkErrorMacro;function jT(e,t){t.classHierarchy.push("vtkHttpDataSetLODsLoader");var n={downloadStack:[]};e.startDownloads=function(){if(t.mapper)if(t.files&&0!==t.files.length){var e=t.baseUrl;e&&!e.endsWith("/")&&(e+="/"),n.downloadStack=[],t.files.forEach((function(t){return n.downloadStack.push("".concat(e).concat(t))})),setTimeout((function e(){var r=n.downloadStack.shift(),i=KE.newInstance({dataAccessHelper:uE.get("http")});t.currentSource=i,i.setUrl(r,{compression:"zip",loadData:!0,fullpath:!0}).then((function(){if(t.mapper.setInputConnection(i.getOutputPort()),t.sceneItem){var r=t.sceneItem.defaultSettings;r.mapper&&r.mapper.colorByArrayName&&i.enableArray(r.mapper.colorByArrayName,r.mapper.colorByArrayName),t.sceneItem.source=i}t.stepFinishedCallback&&t.stepFinishedCallback(),0!==n.downloadStack.length&&setTimeout(e,t.waitTimeBetweenDownloads)}))}),t.waitTimeToStart)}else VT("No files set.");else VT("Mapper was not set.")}}var UT={baseUrl:"",currentSource:null,files:[],mapper:null,sceneItem:null,stepFinishedCallback:null,waitTimeToStart:4e3,waitTimeBetweenDownloads:0};function GT(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,UT,n),de.obj(e,t),de.setGet(e,t,["baseUrl","files","mapper","sceneItem","stepFinishedCallback","waitTimeToStart","waitTimeBetweenDownloads"]),de.get(e,t,["currentSource"]),jT(e,t)}var zT={newInstance:de.newInstance(GT,"vtkHttpDataSetLODsLoader"),extend:GT},WT={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3,ADDITIVE_INTENSITY_BLEND:4},HT=WT;function KT(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=bn(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(HT.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(HT.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(HT.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(HT.AVERAGE_INTENSITY_BLEND)},e.setBlendModeToAdditiveIntensity=function(){e.setBlendMode(HT.ADDITIVE_INTENSITY_BLEND)},e.setAverageIPScalarRange=function(t,n){console.warn("setAverageIPScalarRange is deprecated use setIpScalarRange"),e.setIpScalarRange(t,n)},e.getBlendModeAsString=function(){return de.enumToString(HT,t.blendMode)}}var qT={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:HT.COMPOSITE_BLEND,ipScalarRange:[-1e6,1e6]};function XT(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qT,n),mv.extend(e,t,n),de.obj(e,t),de.algo(e,t,1,0),de.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode"]),de.setGetArray(e,t,["ipScalarRange"],2),de.event(e,t,"lightingActivated"),KT(e,t)}var YT={newInstance:de.newInstance(XT,"vtkVolumeMapper"),extend:XT};function ZT(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 JT(e){for(var t=1;t=e&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$T,n),de.obj(e,t),de.get(e,t,["applySettings","currentTimeStep","data","originalMetada","scene","timeRange","timeSteps"]),de.setGet(e,t,["renderers"]),QT(e,t)}var tD={newInstance:de.newInstance(eD,"vtkTimeStepBasedAnimationHandler"),extend:eD};function nD(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 rD(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hD,n),de.obj(e,t),de.get(e,t,["fetchGzip","url","baseURL","scene","metadata","animationHandler"]),de.setGet(e,t,["renderer"]),de.event(e,t,"ready"),fD(e,t)}var gD={newInstance:de.newInstance(mD,"vtkHttpSceneLoader"),extend:mD,applySettings:aD,updateDatasetTypeMapping:function(e,t){dD[e]=t}};function vD(e){return{subscribeToImageStream:function(t){return e.subscribe("viewport.image.push.subscription",t)},unsubscribeToImageStream:function(t){return e.unsubscribe(t)},registerView:function(t){return e.call("viewport.image.push.observer.add",[t])},unregisterView:function(t){return e.call("viewport.image.push.observer.remove",[t])},enableView:function(t,n){return e.call("viewport.image.push.enabled",[t,n])},render:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{size:[400,400],view:-1};return e.call("viewport.image.push",[t])},resetCamera:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return e.call("viewport.camera.reset",[t])},invalidateCache:function(t){return e.call("viewport.image.push.invalidate.cache",[t])},setQuality:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e.call("viewport.image.push.quality",[t,n,r])},setSize:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return e.call("viewport.image.push.original.size",[t,n,r])},setServerAnimationFPS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return e.call("viewport.image.animation.fps.max",[t])},getServerAnimationFPS:function(){return e.call("viewport.image.animation.fps.get",[])},startAnimation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return e.call("viewport.image.animation.start",[t])},stopAnimation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return e.call("viewport.image.animation.stop",[t])},updateCamera:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return e.call("viewport.camera.update",[t,n,r,i,o])},updateCameraParameters:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.call("viewport.camera.update.params",[t,n,r])}}}function yD(e,t){function n(n){var r=Number(this.dataset.id);e.invokeImageReady(t.eventPool[r])}t.classHierarchy.push("vtkViewStream"),t.imageDecodingPool=[new Image,new Image],t.eventPool=[],t.nextPoolImageIndex=0,t.urlToRevoke=[],t.activeURL=null,t.fps=[],t.lastTime=Date.now(),t.lastImageEvent=null,e.pushCamera=function(){var n,r=t.camera.getReferenceByName("focalPoint"),i=t.camera.getReferenceByName("viewUp"),o=t.camera.getReferenceByName("position"),a=t.camera.getParallelProjection(),s=t.camera.getViewAngle(),l=t.camera.getParallelScale();return n=t.useCameraParameters?t.protocol.updateCameraParameters(t.viewId,{focalPoint:r,viewUp:i,position:o,parallelProjection:a,viewAngle:s,parallelScale:l},!1):t.protocol.updateCamera(t.viewId,r,i,o,!1),t.isAnimating&&setTimeout(e.pushCamera,1e3/t.cameraUpdateRate),n},e.invalidateCache=function(){return t.protocol.invalidateCache(t.viewId)},e.render=function(){return t.protocol.render({view:t.viewId,size:t.size})},e.resetCamera=function(){return t.protocol.resetCamera(t.viewId)},e.startAnimation=function(){return t.protocol.startAnimation(t.viewId)},e.stopAnimation=function(){return t.protocol.stopAnimation(t.viewId)},e.setSize=function(n,r){var i=!1;return t.size[0]===n&&t.size[1]===r||(t.size=[n,r],i=!0),i&&(e.modified(),t.protocol)?t.protocol.setSize(t.viewId,n,r):Promise.resolve(!1)},e.startInteraction=function(){var n=[t.protocol.setQuality(t.viewId,t.interactiveQuality,t.interactiveRatio)];return t.camera&&(n.push(e.startAnimation()),t.isAnimating=!0,n.push(e.pushCamera())),Promise.all(n)},e.endInteraction=function(){var n=[];return n.push(t.protocol.setQuality(t.viewId,t.stillQuality,t.stillRatio)),t.camera?(n.push(e.stopAnimation()),t.isAnimating=!1,n.push(e.pushCamera())):n.push(e.render()),Promise.all(n)},e.setViewId=function(e){return!(t.viewId===e||!t.protocol||(t.viewId&&t.protocol.unregisterView(t.viewId),t.viewId=e,t.viewId&&t.protocol.registerView(t.viewId).then((function(e){var n=e.viewId;t.viewId=n})),0))},e.processMessage=function(n){if(n.id==t.viewId){var r=new Blob([n.image],{type:t.mimeType});if(t.activeURL)for(t.urlToRevoke.push(t.activeURL),t.activeURL=null;t.urlToRevoke.length>60;){var i=t.urlToRevoke.shift();window.URL.revokeObjectURL(i)}t.activeURL=URL.createObjectURL(r);var o,a=Date.now(),s=Math.floor(1e4/(a-t.lastTime))/10;for(t.fps.push(s),t.lastTime=a,t.lastImageEvent={url:t.activeURL,fps:s,metadata:{size:n.size,id:n.id,memory:n.memsize,workTime:n.workTime}},t.decodeImage?(o=t.lastImageEvent,t.eventPool[t.nextPoolImageIndex]=o,o.image=t.imageDecodingPool[t.nextPoolImageIndex++],t.nextPoolImageIndex%=t.imageDecodingPool.length,o.image.src=o.url):e.invokeImageReady(t.lastImageEvent);t.fps.length>t.fpsWindowSize;)t.fps.shift()}},e.delete=de.chain((function(){for(t.unregisterViewStream(e),e.setViewId(null);t.urlToRevoke.length;)window.URL.revokeObjectURL(t.urlToRevoke.pop())}),e.delete),function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;t.imageDecodingPool.length2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bD,n),de.obj(e,t),de.event(e,t,"ImageReady"),de.get(e,t,["viewId","size","fps","lastImageEvent"]),de.setGet(e,t,["camera","cameraUpdateRate","decodeImage","fpsWindowSize","interactiveQuality","interactiveRatio","stillQuality","stillRatio","useCameraParameters"]),yD(e,t),Object.assign(e,t.sharedAPI)}var xD={newInstance:de.newInstance(wD,"vtkViewStream"),extend:wD};function SD(e,t){function n(e){var n=e[0];if(n&&n.image)for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:30,r=!1;return t.serverAnimationFPS!==n&&(t.serverAnimationFPS=n,r=!0),t.protocol?(r&&e.modified(),t.protocol.setServerAnimationFPS(n)):Promise.resolve(!0)},e.connect=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vD;!t.connected&&e&&r&&(t.protocol=r(e),t.protocol.subscribeToImageStream(n).then((function(e){t.renderTopicSubscription=e,t.connected=!0})).catch((function(e){t.connected=!1,console.error(e)})))},e.disconnect=function(){t.protocol&&t.connected&&t.renderTopicSubscription&&(t.protocol.unsubscribeToImageStream(t.renderTopicSubscription),t.renderTopicSubscription=null),t.connected=!1},e.registerViewStream=function(e){t.viewStreams.push(e)},e.unregisterViewStream=function(e){t.viewStreams=t.viewStreams.filter((function(t){return t!==e}))},e.createViewStream=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"-1",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[400,400],i=e.setServerAnimationFPS,o=e.getServerAnimationFPS,a=e.unregisterViewStream,s=xD.newInstance({protocol:t.protocol,unregisterViewStream:a,sharedAPI:{setServerAnimationFPS:i,getServerAnimationFPS:o}});return s.setViewId(n),s.setSize(r[0],r[1]),e.registerViewStream(s),s},e.delete=de.chain((function(){for(;t.viewStreams.length;)t.viewStreams.pop().delete();e.disconnect()}),e.delete)}var CD={viewStreams:[],serverAnimationFPS:-1};function AD(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,CD,n),de.obj(e,t),de.get(e,t,["serverAnimationFPS","protocol"]),SD(e,t)}var PD={newInstance:de.newInstance(AD,"vtkImageStream"),extend:AD},_D=[],OD={loadScript:function(e){return new Promise((function(t,n){if(-1===_D.indexOf(e)){_D.push(e);var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=t,r.onerror=n,document.body.appendChild(r)}else t(!1)}))},loadCSS:function(e){return new Promise((function(t,n){if(-1===_D.indexOf(e)){_D.push(e);var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=t,r.onerror=n,document.head.appendChild(r)}else t(!1)}))},LOADED_URLS:_D},ED=null;function TD(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:[],r={};return Object.keys(e).forEach((function(i){-1===n.indexOf(i)?r[i]=TD(e[i],t):r[i]=e[i]})),r}function ID(e,t){function n(){e.invokeBusyChange(t.busyCount)}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t.busyCount+=e,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=0),t.busyCount?n():t.timeoutId=setTimeout(n,t.notificationTimeout)}t.classHierarchy.push("vtkWSLinkClient"),e.beginBusy=function(){return r(1)},e.endBusy=function(){return r(-1)},e.isBusy=function(){return!!t.busyCount},e.isConnected=function(){return!!t.connection},e.connect=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return ED?t.connection?Promise.reject(new Error("Need to disconnect first")):(t.config=n,t.configDecorator=i||t.configDecorator,new Promise((function(i,o){t.smartConnect=ED.newInstance({config:n,configDecorator:t.configDecorator}),t.smartConnect.onConnectionReady((function(n){t.connection=n,t.remote={},t.config=t.smartConnect.getConfig();var o=n.getSession();t.protocols=t.protocols||{},Object.keys(t.protocols).forEach((function(e){t.remote[e]=DD(t.protocols[e](o),r,t.notBusyList)})),t.createImageStream&&(t.imageStream=PD.newInstance(),t.imageStream.connect(o)),e.invokeConnectionReady(e),i(e)})),t.smartConnect.onConnectionError((function(t){e.invokeConnectionError(t),o(t)})),t.smartConnect.onConnectionClose((function(t){e.invokeConnectionClose(t),o(t)})),t.smartConnect.connect()}))):Promise.reject(new Error("Need to provide SmartConnect"))},e.disconnect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;t.connection&&(t.connection.destroy(e),t.connection=null)},e.registerProtocol=function(e,n){t.remote[e]=DD(n(t.connection.getSession()),r,t.notBusyList)},e.unregisterProtocol=function(e){delete t.remote[e]}}var kD={notBusyList:[],busyCount:0,timeoutId:0,notificationTimeout:50,createImageStream:!0};function MD(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kD,n),de.obj(e,t),de.setGet(e,t,["protocols","notBusyList","createImageStream","configDecorator"]),de.get(e,t,["connection","config","remote","imageStream"]),de.event(e,t,"BusyChange"),de.event(e,t,"ConnectionReady"),de.event(e,t,"ConnectionError"),de.event(e,t,"ConnectionClose"),ID(e,t)}var ND=de.newInstance(MD,"vtkWSLinkClient"),RD={BinaryHelper:IE,DataAccessHelper:uE,vtkHttpDataSetReader:KE,vtkHttpSceneLoader:gD,vtkImageStream:PD,vtkResourceLoader:OD,vtkWSLinkClient:{newInstance:ND,extend:MD,setSmartConnectClass:function(e){ED=e}}},FD=de.vtkErrorMacro;function BD(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},i=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkSTLReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback,binary:!!r.binary})},e.loadData=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r(t.url,n);return i.then(e.parse),i},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(r){if(r&&r!==t.parseData)if(e.modified(),t.parseData=r,84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var i=r.slice(0,80),o=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,jD,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),VD(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var GD={extend:UD,newInstance:de.newInstance(UD,"vtkSTLReader")},zD="ascii",WD={diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"},HD={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function KD(e){var t="",n=0,r=HD.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var i,o,a,s={comments:[],elements:[],headerLength:n},l=t.split("\n"),u=0;u0,d=e.uvs.length>0,p=e.normals.length>0,f=e.faceVertexUvs.length>0,h=0;h0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(i)}}function JD(e,t,n,r){var i;switch(n){case"int8":case"char":i=[e.getInt8(t),1];break;case"uint8":case"uchar":i=[e.getUint8(t),1];break;case"int16":case"short":i=[e.getInt16(t,r),2];break;case"uint16":case"ushort":i=[e.getUint16(t,r),2];break;case"int32":case"int":i=[e.getInt32(t,r),4];break;case"uint32":case"uint":i=[e.getUint32(t,r),4];break;case"float32":case"float":i=[e.getFloat32(t,r),4];break;case"float64":case"double":i=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return i}function QD(e,t,n,r){for(var i,o={},a=0,s=0;s1&&void 0!==arguments[1]?arguments[1]:{},i=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.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]:{},i=n(t.url,r);return i.then(e.parse),i},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=KD(IE.arrayBufferToString(n));if(r.format!==zD){t.parseData=n;for(var i,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},a="binary_little_endian"===r.format,s=n instanceof ArrayBuffer?n:n.buffer,l=new DataView(s,r.headerLength),u=0,c=0;c=i.elements[u].count&&(u++,c=0);var f=YD(i.elements[u].properties,p);ZD(o,i.elements[u].name,f),c++}}var h=qD(o,i.elements);t.output[0]=h}}},e.requestData=function(n,r){e.parse(t.parseData)}}var eI={};function tI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eI,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),$D(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var nI={extend:tI,newInstance:de.newInstance(tI,"vtkPLYReader")},rI=de.vtkErrorMacro,iI={};function oI(e,t){var n=new iI.Decoder,r=n.GetAttribute(e,t),i=r.num_components(),o=e.num_points(),a=new iI.DracoFloat32Array;n.GetAttributeFloatForAllPoints(e,r,a);for(var s=o*i,l=new Float32Array(s);s--;)l[s]=a.GetValue(s);return l}function aI(e,t){function n(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkDracoReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.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]:{},i=n(t.url,r);return i.then(e.parse),i},e.parse=function(t){e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified(),t.parseData=n;var r=function(e){var t,n=new Int8Array(e),r=new iI.Decoder,i=new iI.DecoderBuffer;if(i.Init(n,n.length),r.GetEncodedGeometryType(i)===iI.TRIANGULAR_MESH){t=new iI.Mesh;var o=r.DecodeBufferToMesh(i,t);o.ok()||rI("Could not decode Draco file: ".concat(o.error_msg()))}else rI("Wrong geometry type, expected mesh, got point cloud.");return iI.destroy(i),iI.destroy(r),t}(n),i=function(e){var t=new iI.Decoder,n=t.GetAttributeId(e,iI.POSITION);if(-1===n)return console.error("No position attribute found in the decoded model."),iI.destroy(t),iI.destroy(e),null;for(var r=oI(e,n),i=e.num_faces(),o=new Uint32Array(4*i),a=new iI.DracoInt32Array;i--;){t.GetFaceFromMesh(e,i,a);var s=4*i;o[s]=3,o[s+1]=a.GetValue(0),o[s+2]=a.GetValue(1),o[s+3]=a.GetValue(2)}var l=Kn.newInstance({values:o}),u=ju.newInstance({polys:l});u.getPoints().setData(r);var c=u.getPointData();if(-1!==t.GetAttributeId(e,iI.NORMAL)){var d=oI(e,iI.NORMAL),p=Ln.newInstance({numberOfComponents:3,values:d,name:"Normals"});c.setNormals(p)}var f=t.GetAttributeId(e,iI.TEX_COORD);if(-1!==f){var h=oI(e,f),m=Ln.newInstance({numberOfComponents:2,values:h,name:"TCoords"});c.setTCoords(m)}var g=t.GetAttributeId(e,iI.COLOR);if(-1!==g){var v=oI(e,g),y=Ln.newInstance({numberOfComponents:3,values:v,name:"Scalars"});c.setScalars(y)}return iI.destroy(t),u}(r);iI.destroy(r),t.output[0]=i}},e.requestData=function(){e.parse(t.parseData)}}var sI={};function lI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sI,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),aI(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var uI={extend:lI,newInstance:de.newInstance(lI,"vtkDracoReader"),setDracoDecoder:function(e){iI=e({})},setWasmBinary:function(e,t){var n={};return new Promise((function(r,i){n.wasmBinaryFile=t;var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){200===o.status?(n.wasmBinary=o.response,iI=window.DracoDecoderModule(n),r(!0)):i(Error("WASM binary could not be loaded: ".concat(o.statusText)))},o.send(null)}))},getDracoDecoder:function(){return iI}},cI="ascii",dI="binary";function pI(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 fI=de.vtkErrorMacro;function hI(e,t,n){return e.setFloat32(t,n.toPrecision(6),!0),t+4}function mI(e,t,n){var r=hI(e,t,n[0]);return r=hI(e,r,n[1]),hI(e,r,n[2])}var gI=function(){var e=0,t=null;return{init:function(e){var n=e.getPolys().getData(),r=new ArrayBuffer(84+50*n.length/4);t=new DataView(r)},writeHeader:function(n){e+=80,t.setUint32(e,n.getNumberOfCells(),!0),e+=4},writeTriangle:function(n,r,i,o){e=mI(t,e,o),e=mI(t,e,n),e=mI(t,e,r),e=mI(t,e,i),e+=2},writeFooter:function(e){},getOutputData:function(){return t}}},vI=function(){var e="";return{init:function(e){},writeHeader:function(t){e+="solid ascii\n"},writeTriangle:function(t,n,r,i){e+=" facet normal ".concat(i[0].toPrecision(6)," ").concat(i[1].toPrecision(6)," ").concat(i[2].toPrecision(6),"\n"),e+=" outer loop\n",e+=" vertex ".concat(t[0].toPrecision(6)," ").concat(t[1].toPrecision(6)," ").concat(t[2].toPrecision(6),"\n"),e+=" vertex ".concat(n[0].toPrecision(6)," ").concat(n[1].toPrecision(6)," ").concat(n[2].toPrecision(6),"\n"),e+=" vertex ".concat(r[0].toPrecision(6)," ").concat(r[1].toPrecision(6)," ").concat(r[2].toPrecision(6),"\n"),e+=" endloop\n",e+=" endfacet\n"},writeFooter:function(t){e+="endsolid\n"},getOutputData:function(){return e}}};function yI(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dI,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;t===dI?r=gI():t===cI?r=vI():fI("Invalid format type"),r.init(e),r.writeHeader(e);var i=e.getPolys().getData(),o=e.getPoints().getData(),a=e.getStrips()?e.getStrips().getData():null,s=[],l=[],u=[],c=[];if(a&&a.length>0)throw new Error("Unsupported strips");for(var d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xI,n),de.obj(e,t),de.algo(e,t,1,1),de.setGet(e,t,["format","transform"]),wI(e,t)}var CI={vtkSTLReader:GD,vtkPLYReader:nI,vtkDracoReader:uI,vtkSTLWriter:function(e){for(var t=1;t0?Number(a):1,l=t[t.activeFieldLocation]*s,u=new PI[o](l),c=Ln.newInstance({name:i,empty:!0});return t.dataset[AI[t.activeFieldLocation]]()[_I[r]](c),t.arrayHandler=OI(u,c.setData,s),!0},parse:function(e,t){return"LOOKUP_TABLE"===e.split(" ")[0]||t.arrayHandler(e)}},COLOR_SCALARS:{init:function(e,t){var n=g(e.split(" "),3),r=n[0],i=n[1],o=n[2],a=Number(o)>0?Number(o):1,s=t[t.activeFieldLocation]*a,l=new Uint8Array(s),u=Ln.newInstance({name:i,empty:!0});return t.dataset[AI[t.activeFieldLocation]]()[_I[r]](u),t.arrayHandler=OI(l,u.setData,a),!0},parse:function(e,t){return"LOOKUP_TABLE"===e.split(" ")[0]||t.arrayHandler(e)}},VECTORS:{init:function(e,t){var n=g(e.split(" "),3),r=n[0],i=n[1],o=n[2],a=3*t[t.activeFieldLocation],s=new PI[o](a),l=Ln.newInstance({name:i,empty:!0});return t.dataset[AI[t.activeFieldLocation]]()[_I[r]](l),t.arrayHandler=OI(s,l.setData,3),!0},parse:function(e,t){return t.arrayHandler(e)}},NORMALS:{init:function(e,t){var n=g(e.split(" "),2),r=n[0],i=n[1],o=3*t[t.activeFieldLocation],a=new Float32Array(o),s=Ln.newInstance({name:i,empty:!0});return t.dataset[AI[t.activeFieldLocation]]()[_I[r]](s),t.arrayHandler=OI(a,s.setData,3),!0},parse:function(e,t){return t.arrayHandler(e)}},TEXTURE_COORDINATES:{init:function(e,t){var n=g(e.split(" "),4),r=n[0],i=n[1],o=n[2],a=n[3],s=t[t.activeFieldLocation]*Number(o),l=new PI[a](s),u=Ln.newInstance({name:i,empty:!0});return t.dataset[AI[t.activeFieldLocation]]()[_I[r]](u),t.arrayHandler=OI(l,u.setData,3),!0},parse:function(e,t){return t.arrayHandler(e)}},TENSORS:{init:function(e,t){var n=g(e.split(" "),3),r=n[0],i=n[1],o=n[2],a=9*t[t.activeFieldLocation],s=new PI[o](a),l=Ln.newInstance({name:i,empty:!0});return t.dataset[AI[t.activeFieldLocation]]()[_I[r]](l),t.arrayHandler=OI(s,l.setData,9),!0},parse:function(e,t){return t.arrayHandler(e)}}};function DI(e,t){var n=e.split(" ");return TI[n[0]]}var II={parseLegacyASCII:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=/\r?\n/,i=r.exec(e),o=null!==i?i[0]:null;return e.split(o).forEach((function(e,r){if(!(r<2))if(n)n&&!n.parse(e,t)&&(n=null);else{if(!(n=DI(e)))return;n=n.init(e,t)?n:null}})),t}};function kI(e,t){function n(n){var r=t.compression,i=t.progressCallback;return t.dataAccessHelper.fetchText(e,n,{compression:r,progressCallback:i})}t.classHierarchy.push("vtkPolyDataReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback})},e.loadData=function(){var r=n(t.url);return r.then(e.parseAsText),r},e.parseAsText=function(n){n&&n!==t.parseData&&(e.modified(),t.parseData=n,t.output[0]=II.parseLegacyASCII(t.parseData).dataset)},e.requestData=function(n,r){e.parseAsText(t.parseData)}}var MI={};function NI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MI,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),kI(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var RI=de.newInstance(NI,"vtkPolyDataReader"),FI={vtkLegacyAsciiParser:II,vtkPolyDataReader:{newInstance:RI,extend:NI}};function BI(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.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=ju.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var i=t.elevation.length,o=t.elevation[0].length,a=r.getPoints();a.setNumberOfPoints(o*i,3);var s=a.getData(),l=Kn.newInstance({size:5*(o-1)*(i-1)});r.setPolys(l);var u=l.getData(),c=0,d=new Float32Array(o*i*2),p=Ln.newInstance({numberOfComponents:2,values:d,name:"TextureCoordinates"});r.getPointData().setTCoords(p);for(var f=0;f0&&f>0&&(u[c++]=4,u[c++]=m,u[c++]=m-1,u[c++]=m-1-o,u[c++]=m-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var LI={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};function VI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,LI,n),de.obj(e,t),de.get(e,t,["url"]),de.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),de.algo(e,t,0,1),de.event(e,t,"busy"),BI(e,t)}var jI={newInstance:de.newInstance(VI,"vtkElevationReader"),extend:VI},UI=xl.convertItkToVtkImage,GI=null,zI=function(e){return e};function WI(e,t){t.classHierarchy.push("vtkITKImageReader"),e.parseAsArrayBuffer=function(n){return n&&n!==t.rawDataBuffer?(t.rawDataBuffer=n,GI(n,t.fileName).then(zI).then((function(n){var r,i,o,a=UI(n,{scalarArrayName:t.arrayName||(r=t.fileName,i=r.lastIndexOf("."),o=i>-1?r.substring(0,i):r,"Scalars ".concat(o))});t.output[0]=a,e.modified()}))):Promise.resolve()},e.requestData=function(n,r){e.parseAsArrayBuffer(t.rawDataBuffer,t.fileName)}}var HI={fileName:"",arrayName:null};function KI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,HI,n),de.obj(e,t),de.algo(e,t,0,1),de.setGet(e,t,["fileName","arrayName"]),WI(e,t),GI||console.error("\n // Dependency needs to be added inside your project\n import readImageArrayBuffer from 'itk/readImageArrayBuffer';\n vtkITKImageReader.setReadImageArrayBufferFromITK(readImageArrayBuffer);\n ")}var qI={newInstance:de.newInstance(KI,"vtkITKImageReader"),extend:KI,setReadImageArrayBufferFromITK:function(e){4===(GI=e).length&&(GI=function(){for(var t=arguments.length,n=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,JI,n),de.obj(e,t),de.algo(e,t,0,1),de.setGet(e,t,["fileName","arrayName"]),ZI(e,t),XI||console.error("\n // Dependency needs to be added inside your project\n import readPolyDataArrayBuffer from 'itk/readPolyDataArrayBuffer';\n vtkITKPolyDataReader.setReadPolyDataArrayBufferFromITK(readPolyDataArrayBuffer);\n ")}var $I={newInstance:de.newInstance(QI,"vtkITKPolyDataReader"),extend:QI,setReadPolyDataArrayBufferFromITK:function(e){XI=e,XI=function(){for(var t=arguments.length,n=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tk,n),de.obj(e,t),de.get(e,t,["url"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),ek(e,t)}var rk={newInstance:de.newInstance(nk,"vtkJSONNucleoReader"),extend:nk};function ik(e,t){function n(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkJSONReader"),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.url=n,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&&(t.data=JSON.parse(n),e.modified(),!0)},e.requestData=function(e,n){n[0]=t.data},e.isBusy=function(){return!1},e.getNumberOfOutputPorts=function(){return t.numberOfOutputs}}var ok={};function ak(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ok,n),de.obj(e,t),de.get(e,t,["url"]),de.algo(e,t,0,1),de.event(e,t,"busy"),ik(e,t)}var sk={newInstance:de.newInstance(ak,"vtkJSONReader"),extend:ak};function lk(e,t){function n(){t.requestCount--,0===t.requestCount&&e.invokeBusy(!1)}function r(e){if("#"!==e[0]&&0!==e.length){var r=e.split(/[ \t]+/).map((function(e){return e.trim()})).filter((function(e){return e.length}));if("newmtl"===r[0])r.shift(),t.currentMaterial=r.join(" ").trim();else if(t.currentMaterial){if(r.length<2)return;if(t.materials[t.currentMaterial]||(t.materials[t.currentMaterial]={}),t.materials[t.currentMaterial][r[0]]=r.slice(1),"map_Kd"===r[0]){var i=new Image;i.onload=function(){return setTimeout(n,0)},i.src=[t.baseURL,r[1]].join("/"),t.materials[t.currentMaterial].image=i,t.requestCount++}}}}t.classHierarchy.push("vtkMTLReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".mtl")||r.fullpath){t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.mtl");return e.loadData(r)},e.loadData=function(n){return new Promise((function(r,i){(function(n,r){return t.dataAccessHelper.fetchText(e,n,r)})(t.url,n).then((function(t){e.parseAsText(t),r()}),(function(e){i()}))}))},e.parseAsText=function(n){e.modified(),t.materials={},n.split("\n").forEach(r)},e.isBusy=function(){return!!t.requestCount},e.getMaterialNames=function(){return Object.keys(t.materials)},e.getMaterial=function(e){return t.materials[e]},e.listImages=function(){return Object.keys(t.materials).map((function(e){return t.materials[e].map_Kd})).filter((function(e){return!!e})).map((function(e){return e[0].trim()}))},e.setImageSrc=function(e,n){return new Promise((function(r,i){var o=Object.keys(t.materials).find((function(n){return t.materials[n].map_Kd&&t.materials[n].map_Kd[0].trim()===e.trim()})),a=t.materials[o];a&&a.image?(a.image.src=n,a.image.onload=function(){return setTimeout(r,0)}):r()}))},e.applyMaterialToActor=function(e,n){var r=t.materials[e];if(r&&n){var i=[1,1,1],o={ambientColor:r.Ka?r.Ka.map((function(e){return Number(e)})):i,specularColor:r.Ks?r.Ks.map((function(e){return Number(e)})):i,diffuseColor:r.Kd?r.Kd.map((function(e){return Number(e)})):i,opacity:r.d?Number(r.d):1,specularPower:r.Ns?Number(r.Ns):1},a=Number(r.illum||2);if(["ambient","diffuse","specular"].forEach((function(e,t){o[e]=t<=a?1:0})),r.image){var s=MT.newInstance({interpolate:t.interpolateTextures});s.setImage(r.image),n.addTexture(s)}n.getProperty().set(o)}}}var uk={numberOfOutputs:1,requestCount:0,materials:{},interpolateTextures:!0};function ck(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uk,n),W(e,t),H(e,t,["url","baseURL"]),Y(e,t,["dataAccessHelper","interpolateTextures","splitGroup"]),te(e,t,"busy"),lk(e,t)}var dk={newInstance:ne(ck,"vtkMTLReader"),extend:ck},pk={};function fk(e,t,n,r){for(var i=0;i0&&"\r"!==e})),i=r.length;n.push(i);for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.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 i=n.split("/");i.pop(),t.baseURL=i.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,pk.splitOn=r,pk.pieces=[],pk.v=[],pk.vt=[],pk.vn=[],pk.f=[[]],pk.size=0,n.split("\n").forEach(mk),function(e){var t=!!pk.vt.length,n=!!pk.vn.length;if(e.splitMode){e.numberOfOutputs=pk.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vk,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.setGet(e,t,["dataAccessHelper","splitMode"]),de.algo(e,t,0,1),de.event(e,t,"busy"),gk(e,t)}var bk={newInstance:de.newInstance(yk,"vtkOBJReader"),extend:yk},wk=JSON.parse('{"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 xk(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.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=Kl.newInstance();if(t.molecule){var i=t.molecule.length,o=[],a=[];t.numberOfAtoms=0;for(var s=0;s=78&&(m=u.substr(76,2).replace(/\s+/g,"")),""===m&&(m=d.substr(0,2).replace(/\d/g,"")),o.push(p),o.push(f),o.push(h);var v=g(wk[m],1)[0];a.push(v),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(a),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(o)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var Sk={numberOfAtoms:0,requestCount:0};function Ck(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Sk,n),de.obj(e,t),de.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),de.event(e,t,"busy"),xk(e,t)}var Ak=de.newInstance(Ck,"vtkPDBReader");function Pk(e,t){function n(e){var n=t.compression,r=t.progressCallback;return t.dataAccessHelper.fetchBinary(e,{compression:n,progressCallback:r})}t.classHierarchy.push("vtkSkyboxReader"),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.url=n,e.loadData(r)},e.loadData=function(){return n(t.url).then(e.parseAsArrayBuffer)},e.parseAsArrayBuffer=function(n){if(!n)return!1;t.textures={},t.busy=!0,e.invokeBusy(t.busy),t.dataMapping={};var r=0,i=!1,o=[];function a(){if(0==--r||i){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_k,n),de.obj(e,t),de.get(e,t,["url","positions","position"]),de.setGet(e,t,["faceMapping"]),de.event(e,t,"busy"),de.algo(e,t,0,6),Pk(e,t)}var Ek={vtkElevationReader:jI,vtkITKImageReader:qI,vtkITKPolyDataReader:$I,vtkJSONNucleoReader:rk,vtkJSONReader:sk,vtkMTLReader:dk,vtkOBJReader:bk,vtkPDBReader:{newInstance:Ak,extend:Ck},vtkSkyboxReader:{newInstance:de.newInstance(Ok,"vtkSkyboxReader"),extend:Ok}},Tk={Int8:Int8Array,UInt8:Uint8Array,Int16:Int16Array,UInt16:Uint16Array,Int32:Int32Array,UInt32:Uint32Array,Int64:Int32Array,UInt64:Uint32Array,Float32:Float32Array,Float64:Float64Array},Dk={Int8:1,UInt8:1,Int16:2,UInt16:2,Int32:4,UInt32:4,Int64:8,UInt64:8,Float32:4,Float64:8};function Ik(e){var t=e.length-1;return e.filter((function(e,n){return n1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=uE.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.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 IE.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),i=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var a=function(e){if(window.ActiveXObject){var t=new window.ActiveXObject("Microsoft.XMLDOM");return t.loadXML(e),t}return(new DOMParser).parseFromString(e,"application/xml")}(i).firstChild,s=a.getAttribute("type"),l=a.getAttribute("compressor"),u=a.getAttribute("byte_order"),c=a.getAttribute("header_type")||"UInt32";if(l&&"vtkZLibDataCompressor"!==l)return console.error("Invalid compressor",l),!1;if(u&&"LittleEndian"!==u)return console.error("Only LittleEndian encoding is supported"),!1;if(s!==t.dataType)return console.error("Invalid data type",s,"expecting",t.dataType),!1;if(a.querySelector("AppendedData")){var d=a.querySelector("AppendedData"),f=d.getAttribute("encoding"),h=a.querySelectorAll("DataArray"),m=t.binaryBuffer;"base64"===f&&(m=d.textContent.trim().substr(1));for(var g=[],v=0;v0?0===C[3]?new ArrayBuffer(C[2]*A):new ArrayBuffer(C[2]*(A-1)+C[3]):new ArrayBuffer(0);for(var _=new Uint8Array(x),O={offset:0,uint8:_},E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fk,n),de.obj(e,t),de.get(e,t,["url","baseURL"]),de.setGet(e,t,["dataAccessHelper"]),de.algo(e,t,0,1),Rk(e,t)},processDataArray:Nk,processFieldData:function(e,t,n,r,i,o,a){if(t){var s={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(s[r]=n["set".concat(e)])}));for(var l=t.getElementsByTagName("DataArray"),u=l.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vk,n),Bk.extend(e,t,n),Lk(e,t)}var Uk={newInstance:de.newInstance(jk,"vtkXMLImageDataReader"),extend:jk},Gk=n(9420),zk=n(9742),Wk={ASCII:"ascii",BINARY:"binary",APPENDED:"appended"},Hk={Int8Array:"Int8",Uint8Array:"UInt8",Int16Array:"Int16",Uint16Array:"UInt16",Int32Array:"Int32",Uint32Array:"UInt32",Float32Array:"Float32",Float64Array:"Float64"};function Kk(e){return oE.deflate(e)}function qk(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vtkZLibDataCompressor";if(t===Wk.ASCII)return e.getData().join(" ");if(t===Wk.BINARY){if("vtkZLibDataCompressor"===r){var i=e.getElementComponentSize(),o=e.getNumberOfValues()*i,a=n,s=Math.trunc(o/a),l=o%a,u=s+(l?1:0),c=new Uint32Array(3+u);c[0]=u,c[1]=a,c[2]=l;for(var d=0,p=[],f=0,h=u-1,m=0;m2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yk,n),de.obj(e,t),de.setGet(e,t,["blockSize","format"]),de.get(e,t,["file"]),de.algo(e,t,1,0),Xk(e,t)},compressBlock:Kk,processDataArray:qk,FormatTypes:Wk};function Jk(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 Qk(e,t){t.classHierarchy.push("vtkXMLImageDataWriter");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$k,n),Zk.extend(e,t,n),Qk(e,t)}var tM={newInstance:de.newInstance(eM,"vtkXMLImageDataWriter"),extend:eM};function nM(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,i,o){var a=e.getElementsByTagName(t.dataType)[0],s=a.getElementsByTagName("FieldData")[0],l=a.getElementsByTagName("Piece"),u=l.length,c=[];s&&(c=y(s.getElementsByTagName("DataArray")).map((function(e){return function(e,t,n,r,i){var o=Number(e.getAttribute("NumberOfTuples"));return Ln.newInstance(Bk.processDataArray(o,e,t,n,r,i))}(e,r,i,o,t.binaryBuffer)})));for(var d=function(e){var n=ju.newInstance(),a=l[e],s=function(e,t,n,r,i,o,a){var s=Number(n.getAttribute("NumberOf".concat(t)));if(s>0){var l=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],u=Bk.processDataArray(s,l,r,i,o,a),c=u.values,d=u.numberOfComponents;e["get".concat(t)]().setData(c,d)}return s}(n,"Points",a,r,i,o,t.binaryBuffer),u=0;["Verts","Lines","Strips","Polys"].forEach((function(e){u+=function(e,t,n,r,i,o,a){var s=Number(n.getAttribute("NumberOf".concat(t)));if(s>0){var l=Bk.processCells(s,n.getElementsByTagName(t)[0],r,i,o,a);e["get".concat(t)]().setData(l)}return s}(n,e,a,r,i,o,t.binaryBuffer)})),Bk.processFieldData(s,a.getElementsByTagName("PointData")[0],n.getPointData(),r,i,o,t.binaryBuffer),Bk.processFieldData(u,a.getElementsByTagName("CellData")[0],n.getCellData(),r,i,o,t.binaryBuffer);for(var d=n.getFieldData(),p=0;p2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rM,n),Bk.extend(e,t,n),nM(e,t)}var oM=de.newInstance(iM,"vtkXMLPolyDataReader");function aM(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 sM(e,t){t.classHierarchy.push("vtkXMLPolyDataWriter");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lM,n),Zk.extend(e,t,n),sM(e,t)}var cM={Core:RD,Geometry:CI,Legacy:FI,Misc:Ek,XML:{vtkXMLImageDataReader:Uk,vtkXMLImageDataWriter:tM,vtkXMLPolyDataReader:{newInstance:oM,extend:iM},vtkXMLPolyDataWriter:{newInstance:de.newInstance(uM,"vtkXMLPolyDataWriter"),extend:uM},vtkXMLReader:Bk,vtkXMLWriter:Zk}},dM=JSON.parse('[{"Name":"KAAMS","IndexedColors":[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0.63,0.63,1,0.67,0.5,0.33,1,0.5,0.75,0.53,0.35,0.7,1,0.75,0.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,0.23137254902,0.298039215686,0.752941176471,0.5,0.865,0.865,0.865,1,0.705882352941,0.0156862745098,0.149019607843]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Cool to Warm (Extended)","NanColor":[0.25,0,0],"RGBPoints":[0,0,0,0.34902,0.03125,0.039216,0.062745,0.380392,0.0625,0.062745,0.117647,0.411765,0.09375,0.090196,0.184314,0.45098,0.125,0.12549,0.262745,0.501961,0.15625,0.160784,0.337255,0.541176,0.1875,0.2,0.396078,0.568627,0.21875,0.239216,0.454902,0.6,0.25,0.286275,0.521569,0.65098,0.28125,0.337255,0.592157,0.701961,0.3125,0.388235,0.654902,0.74902,0.34375,0.466667,0.737255,0.819608,0.375,0.572549,0.819608,0.878431,0.40625,0.654902,0.866667,0.909804,0.4375,0.752941,0.917647,0.941176,0.46875,0.823529,0.956863,0.968627,0.5,0.988235,0.960784,0.901961,0.5,0.941176,0.984314,0.988235,0.52,0.988235,0.945098,0.85098,0.54,0.980392,0.898039,0.784314,0.5625,0.968627,0.835294,0.698039,0.59375,0.94902,0.733333,0.588235,0.625,0.929412,0.65098,0.509804,0.65625,0.909804,0.564706,0.435294,0.6875,0.878431,0.458824,0.352941,0.71875,0.839216,0.388235,0.286275,0.75,0.760784,0.294118,0.211765,0.78125,0.701961,0.211765,0.168627,0.8125,0.65098,0.156863,0.129412,0.84375,0.6,0.094118,0.094118,0.875,0.54902,0.066667,0.098039,0.90625,0.501961,0.05098,0.12549,0.9375,0.45098,0.054902,0.172549,0.96875,0.4,0.054902,0.192157,1,0.34902,0.070588,0.211765]},{"ColorSpace":"Diverging","Name":"Warm to Cool","NanColor":[1,1,0],"RGBPoints":[0,0.705882352941,0.0156862745098,0.149019607843,0.5,0.865,0.865,0.865,1,0.23137254902,0.298039215686,0.752941176471]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Warm to Cool (Extended)","NanColor":[0.250004,0,0],"RGBPoints":[0,0.34902,0,0.129412,0.025,0.4,0.00392157,0.101961,0.05,0.470588,0.0156863,0.0901961,0.075,0.54902,0.027451,0.0705882,0.1,0.619608,0.0627451,0.0431373,0.125,0.690196,0.12549,0.0627451,0.15,0.741176,0.184314,0.0745098,0.175,0.788235,0.266667,0.0941176,0.2,0.811765,0.345098,0.113725,0.225,0.831373,0.411765,0.133333,0.25,0.85098,0.47451,0.145098,0.275,0.870588,0.54902,0.156863,0.3,0.878431,0.619608,0.168627,0.325,0.890196,0.658824,0.196078,0.35,0.909804,0.717647,0.235294,0.375,0.929412,0.776471,0.278431,0.395522,0.94902,0.823529,0.321569,0.418905,0.968627,0.87451,0.407843,0.444278,0.980392,0.917647,0.509804,0.470149,0.988235,0.956863,0.643137,0.483582,0.992157,0.964706,0.713725,0.499,0.988235,0.980392,0.870588,0.5,1,1,1,0.501,0.913725,0.988235,0.937255,0.516418,0.827451,0.980392,0.886275,0.531343,0.764706,0.980392,0.866667,0.546766,0.658824,0.980392,0.843137,0.564179,0.572549,0.964706,0.835294,0.587562,0.423529,0.941176,0.87451,0.60597,0.262745,0.901961,0.862745,0.629851,0.0705882,0.854902,0.870588,0.651741,0.0509804,0.8,0.85098,0.681592,0.0235294,0.709804,0.831373,0.712935,0.0313725,0.615686,0.811765,0.75,0.0313725,0.537255,0.788235,0.775,0.0392157,0.466667,0.768627,0.8,0.0509804,0.396078,0.741176,0.825,0.054902,0.317647,0.709804,0.85,0.054902,0.243137,0.678431,0.875,0.0431373,0.164706,0.639216,0.9,0.0313725,0.0980392,0.6,0.925,0.0392157,0.0392157,0.560784,0.95,0.105882,0.0509804,0.509804,0.975,0.113725,0.0235294,0.45098,1,0.12549,0,0.380392]},{"ColorSpace":"RGB","Name":"Rainbow Desaturated","NanColor":[1,1,0],"RGBPoints":[0,0.278431372549,0.278431372549,0.858823529412,0.143,0,0,0.360784313725,0.285,0,1,1,0.429,0,0.501960784314,0,0.571,1,1,0,0.714,1,0.380392156863,0,0.857,0.419607843137,0,0,1,0.878431372549,0.301960784314,0.301960784314]},{"ColorSpace":"RGB","Name":"Cold and Hot","NanColor":[1,1,0],"RGBPoints":[0,0,1,1,0.45,0,0,1,0.5,0,0,0.501960784314,0.55,1,0,0,1,1,1,0]},{"ColorSpace":"RGB","Name":"Black-Body Radiation","NanColor":[0,0.498039215686,1],"RGBPoints":[0,0,0,0,0.4,0.901960784314,0,0,0.8,0.901960784314,0.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,0.333,0,0,0.501960784314,0.666,0,0.501960784314,1,1,1,1,1]},{"ColorSpace":"RGB","Name":"Black, Orange and White","NanColor":[1,1,0],"RGBPoints":[0,0,0,0,0.333,0.501960784314,0,0,0.666,1,0.501960784314,0,1,1,1,1]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Linear YGB 1211g","NanColor":[0.25,0,0],"RGBPoints":[0,1,0.988235,0.968627,0.02,1,0.952941,0.878431,0.05,0.968627,0.905882,0.776471,0.1,0.94902,0.898039,0.647059,0.15,0.901961,0.878431,0.556863,0.2,0.847059,0.858824,0.482353,0.25,0.690196,0.819608,0.435294,0.3,0.513725,0.768627,0.384314,0.35,0.337255,0.721569,0.337255,0.4,0.278431,0.658824,0.392157,0.45,0.231373,0.639216,0.435294,0.5,0.203922,0.6,0.486275,0.55,0.172549,0.568627,0.537255,0.6,0.141176,0.517647,0.54902,0.65,0.133333,0.458824,0.541176,0.7,0.12549,0.396078,0.529412,0.75,0.117647,0.321569,0.521569,0.8,0.121569,0.258824,0.509804,0.85,0.133333,0.227451,0.501961,0.9,0.145098,0.192157,0.490196,0.95,0.188235,0.164706,0.470588,1,0.258824,0.196078,0.439216]},{"ColorSpace":"CIELAB","Creator":"Francesca Samsel","Name":"Linear Green (Gr4L)","NanColor":[0.25,0,0],"RGBPoints":[0,0.054902,0.109804,0.121569,0.05,0.07451,0.172549,0.180392,0.1,0.086275,0.231373,0.219608,0.15,0.094118,0.278431,0.25098,0.2,0.109804,0.34902,0.278431,0.25,0.113725,0.4,0.278431,0.3,0.117647,0.45098,0.270588,0.35,0.117647,0.490196,0.243137,0.4,0.113725,0.521569,0.203922,0.45,0.109804,0.54902,0.152941,0.5,0.082353,0.588235,0.082353,0.55,0.109804,0.631373,0.05098,0.6,0.211765,0.678431,0.082353,0.65,0.317647,0.721569,0.113725,0.7,0.431373,0.760784,0.160784,0.75,0.556863,0.8,0.239216,0.8,0.666667,0.839216,0.294118,0.85,0.784314,0.878431,0.396078,0.9,0.886275,0.921569,0.533333,0.95,0.960784,0.94902,0.670588,1,1,0.984314,0.901961]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Linear Blue (8_31f)","NanColor":[0.25,0,0],"RGBPoints":[0,0.960784,1,0.980392,0.05,0.815686,0.960784,0.913725,0.1,0.670588,0.929412,0.870588,0.15,0.556863,0.901961,0.843137,0.2,0.478431,0.870588,0.823529,0.25,0.439216,0.831373,0.803922,0.3,0.4,0.8,0.788235,0.35,0.376471,0.768627,0.768627,0.4,0.34902,0.709804,0.729412,0.45,0.32549,0.654902,0.690196,0.5,0.301961,0.607843,0.658824,0.55,0.247059,0.545098,0.619608,0.6,0.239216,0.494118,0.580392,0.65,0.227451,0.439216,0.541176,0.7,0.227451,0.403922,0.521569,0.75,0.231373,0.368627,0.501961,0.8,0.227451,0.321569,0.470588,0.85,0.219608,0.282353,0.439216,0.9,0.192157,0.235294,0.4,0.95,0.160784,0.184314,0.34902,1,0.133333,0.12549,0.301961]},{"ColorSpace":"HSV","Name":"Blue to Red Rainbow","NanColor":[0.498039215686,0.498039215686,0.498039215686],"RGBPoints":[0,0,0,1,1,1,0,0]},{"ColorSpace":"HSV","Name":"Red to Blue Rainbow","NanColor":[0.498039215686,0.498039215686,0.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,0.17,0,0,1,0.34,0,1,1,0.5,0,1,0,0.67,1,1,0,0.84,1,0,0,1,0.878431372549,0,1]},{"ColorSpace":"RGB","Name":"Rainbow Blended Grey","NanColor":[1,1,0],"RGBPoints":[0,0.317647058824,0.341176470588,0.43137254902,0.17,0,0,1,0.34,0,1,1,0.5,0,1,0,0.67,1,1,0,0.84,1,0,0,1,0.878431372549,0,1]},{"ColorSpace":"RGB","Name":"Rainbow Blended Black","NanColor":[1,1,0],"RGBPoints":[0,0,0,0,0.17,0,0,1,0.34,0,1,1,0.5,0,1,0,0.67,1,1,0,0.84,1,0,0,1,0.878431372549,0,1]},{"ColorSpace":"RGB","Name":"Blue to Yellow","NanColor":[1,0,0],"RGBPoints":[0,0.0392156862745,0.0392156862745,0.949019607843,1,0.949019607843,0.949019607843,0.0392156862745]},{"ColorSpace":"HSV","Name":"blot","RGBPoints":[0,0,0,1,0.166,0,0,1,0.167,1,0,1,0.332,1,0,1,0.333,0,1,1,0.5,0,1,1,0.501,0,1,0,0.666,0,1,0,0.667,1,1,0,0.832,1,1,0,0.833,1,0,0,1,1,0,0]},{"ColorSpace":"Lab","Name":"CIELab Blue to Red","NanColor":[1,1,0],"RGBPoints":[0,0,0.6,0.749019607843,1,0.76862745098,0.466666666667,0.341176470588]},{"ColorSpace":"RGB","Name":"jet","RGBPoints":[-1,0,0,0.5625,-0.777778,0,0,1,-0.269841,0,1,1,-0.015873,0.5,1,0.5,0.238095,1,1,0,0.746032,1,0,0,1,0.5,0,0]},{"ColorSpace":"RGB","Name":"rainbow","RGBPoints":[-1,0,0,1,-0.5,0,1,1,0,0,1,0,0.5,1,1,0,1,1,0,0]},{"ColorSpace":"Lab","Name":"erdc_rainbow_bright","RGBPoints":[-1,0.32549,0.14902,0.960784,-0.866221,0.297047,0.375586,0.963836,-0.732441,0.180302,0.536818,0.964627,-0.598662,0.1302,0.649207,0.929647,-0.464883,0.0445143,0.749654,0.855998,-0.331104,0.0271325,0.830713,0.721527,-0.197324,0.259504,0.866145,0.543555,-0.0635452,0.428364,0.890725,0.329819,0.0702341,0.568503,0.898508,0.187623,0.204013,0.738259,0.890317,0.0825461,0.337793,0.84546,0.86136,0.0147555,0.471572,0.912191,0.808018,0,0.605351,0.962848,0.710445,0,0.73913,0.999469,0.600258,0.0176284,0.87291,0.994156,0.445975,0.193912,1,0.980407,0.247105,0.262699]},{"ColorSpace":"Lab","Name":"erdc_rainbow_dark","RGBPoints":[-1,0,0,0.423499,-0.866221,0,0.119346,0.529237,-0.732441,0,0.238691,0.634976,-0.598662,0,0.346852,0.68788,-0.464883,0,0.45022,0.718141,-0.331104,0,0.553554,0.664839,-0.197324,0,0.651082,0.519303,-0.0635452,0.115841,0.72479,0.352857,0.0702341,0.326771,0.781195,0.140187,0.204013,0.522765,0.798524,0.0284624,0.337793,0.703162,0.788685,0.00885756,0.471572,0.845118,0.751133,0,0.605351,0.955734,0.690825,0,0.73913,0.995402,0.567916,0.0618524,0.87291,0.987712,0.403398,0.164851,1,0.980407,0.247105,0.262699]},{"ColorSpace":"Lab","Name":"nic_CubicL","RGBPoints":[-1,0.479965,0.0118108,0.5307,-0.87451,0.522213,0.0551282,0.706919,-0.74902,0.50839,0.237278,0.867764,-0.623529,0.451617,0.373834,0.987255,-0.498039,0.39365,0.497255,0.97506,-0.372549,0.328631,0.599639,0.891843,-0.247059,0.250043,0.690286,0.778553,-0.121569,0.249656,0.764905,0.645857,0.00392157,0.297954,0.821466,0.50449,0.129412,0.337509,0.872595,0.358447,0.254902,0.430011,0.913789,0.297079,0.380392,0.587191,0.931381,0.333353,0.505882,0.727937,0.93591,0.353742,0.631373,0.826403,0.921081,0.365066,0.756863,0.893201,0.846317,0.372662,0.882353,0.965347,0.73884,0.378506,1,0.983235,0.597451,0.366856]},{"ColorSpace":"Lab","Name":"nic_CubicYF","RGBPoints":[-1,0.5151,0.0482,0.6697,-0.87451,0.520711,0.168955,0.800574,-0.74902,0.493694,0.278596,0.911824,-0.623529,0.440026,0.369475,0.984978,-0.498039,0.398932,0.457593,0.987053,-0.372549,0.350651,0.540644,0.929608,-0.247059,0.298827,0.615625,0.857729,-0.121569,0.239928,0.685061,0.769531,0.00392157,0.228832,0.739349,0.673287,0.129412,0.263297,0.78608,0.569988,0.254902,0.298107,0.828337,0.460214,0.380392,0.33092,0.864071,0.352674,0.505882,0.38306,0.898169,0.287309,0.631373,0.49023,0.917481,0.307961,0.756863,0.62372,0.926026,0.332309,0.882353,0.717458,0.92527,0.342476,1,0.8,0.9255,0.3529]},{"ColorSpace":"Lab","Name":"gist_earth","RGBPoints":[-1,0,0,0,-0.87451,0.239216,0.027451,0.415686,-0.74902,0.0901961,0.254902,0.556863,-0.623529,0.0941176,0.352941,0.54902,-0.498039,0.105882,0.435294,0.533333,-0.372549,0.12549,0.52549,0.501961,-0.247059,0.156863,0.596078,0.443137,-0.121569,0.196078,0.65098,0.380392,0.00392157,0.282353,0.717647,0.301961,0.129412,0.466667,0.772549,0.27451,0.254902,0.678431,0.784314,0.309804,0.380392,0.901961,0.756863,0.376471,0.505882,0.992157,0.705882,0.521569,0.631373,1,0.721569,0.701961,0.756863,1,0.784314,0.784314,0.882353,1,0.866667,0.866667,1,1,1,1]},{"ColorSpace":"Lab","Name":"2hot","RGBPoints":[-1,0.0416667,0,0,-0.873016,0.208333,0,0,-0.746032,0.375,0,0,-0.619048,0.541667,0,0,-0.492063,0.708333,0,0,-0.365079,0.854137,0,0,-0.238095,0.937488,0.039062,0,-0.111111,1,0.208333,0,0.015873,1,0.375,0,0.142857,1,0.541667,0,0.269841,1,0.708333,0,0.396825,1,0.858805,0.03125,0.52381,1,0.947392,0.15625,0.650794,1,1,0.3125,0.777778,1,1,0.5625,0.904762,1,1,0.8125,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_red2yellow_BW","RGBPoints":[-1,7.54296e-7,0,0.0000109827,-0.87451,0.18285,0.0264094,0,-0.74902,0.3066,0,0,-0.623529,0.422841,0,0,-0.498039,0.522945,0,0,-0.372549,0.605721,0,0,-0.247059,0.672502,0.14168,0,-0.121569,0.728167,0.244025,0,0.00392157,0.781215,0.333454,0,0.129412,0.825,0.423586,0,0.254902,0.855893,0.516793,0,0.380392,0.880491,0.608846,0,0.505882,0.910305,0.695505,0,0.631373,0.94109,0.779067,0.223528,0.756863,0.967873,0.858572,0.473521,0.882353,0.986815,0.933211,0.751583,1,1,1,0.999997]},{"ColorSpace":"Lab","Name":"erdc_marine2gold_BW","RGBPoints":[-1,1.11641e-7,0,0.00000162551,-0.87451,0.0413146,0.0619808,0.209857,-0.74902,0.0185557,0.101341,0.350684,-0.623529,0.00486405,0.149847,0.461054,-0.498039,0.0836345,0.210845,0.517906,-0.372549,0.173222,0.276134,0.541793,-0.247059,0.259857,0.343877,0.535869,-0.121569,0.362299,0.408124,0.504293,0.00392157,0.468266,0.468276,0.468257,0.129412,0.582781,0.527545,0.374914,0.254902,0.691591,0.585251,0.274266,0.380392,0.784454,0.645091,0.247332,0.505882,0.862299,0.710383,0.27518,0.631373,0.920863,0.782923,0.351563,0.756863,0.955792,0.859699,0.533541,0.882353,0.976162,0.93433,0.780671,1,1,1,0.999983]},{"ColorSpace":"Lab","Name":"erdc_blue2gold_BW","RGBPoints":[-1,0,0,0,-0.87451,0.0742735,0.0440331,0.230013,-0.74902,0.125276,0.0258685,0.415826,-0.623529,0.143879,0.0163031,0.591346,-0.498039,0.212261,0.0627855,0.705239,-0.372549,0.306048,0.141178,0.763636,-0.247059,0.391537,0.232286,0.773263,-0.121569,0.461734,0.336633,0.708321,0.00392157,0.54209,0.427581,0.590007,0.129412,0.61704,0.508623,0.460978,0.254902,0.702703,0.579586,0.309117,0.380392,0.790336,0.644811,0.170397,0.505882,0.870173,0.710733,0.117134,0.631373,0.93656,0.781991,0.157144,0.756863,0.965672,0.862068,0.409836,0.882353,0.985751,0.936296,0.714162,1,1,1,0.999999]},{"ColorSpace":"Lab","Name":"erdc_sapphire2gold_BW","RGBPoints":[-1,0.107704,0.107708,0.107694,-0.87451,0.1851,0.112354,0.308554,-0.74902,0.236782,0.114233,0.48788,-0.623529,0.28296,0.126187,0.639464,-0.498039,0.344787,0.171643,0.739713,-0.372549,0.413325,0.242371,0.76913,-0.247059,0.481863,0.3131,0.719841,-0.121569,0.550402,0.383829,0.612222,0.00392157,0.61894,0.454558,0.51126,0.129412,0.687478,0.525287,0.39993,0.254902,0.756017,0.596016,0.289923,0.380392,0.824555,0.666745,0.255498,0.505882,0.892979,0.736822,0.27696,0.631373,0.938851,0.804966,0.351734,0.756863,0.966491,0.874853,0.53572,0.882353,0.982105,0.94153,0.782579,1,1,1,0.999986]},{"ColorSpace":"Lab","Name":"erdc_red2purple_BW","RGBPoints":[-1,0,0,0,-0.87451,0.167793,0.0166271,0.0431278,-0.74902,0.262608,0.0107595,0.0791181,-0.623529,0.351902,0.0101858,0.100926,-0.498039,0.441257,0.0160835,0.131919,-0.372549,0.5221,0.0555972,0.195625,-0.247059,0.593852,0.104294,0.310234,-0.121569,0.654628,0.158115,0.448486,0.00392157,0.707443,0.220914,0.570253,0.129412,0.749504,0.293268,0.67897,0.254902,0.781587,0.370517,0.779269,0.380392,0.809951,0.451099,0.855831,0.505882,0.84424,0.531462,0.900451,0.631373,0.865174,0.620901,0.91606,0.756863,0.875041,0.714054,0.910284,0.882353,0.880764,0.80554,0.896276,1,0.887572,0.887591,0.887556]},{"ColorSpace":"Lab","Name":"erdc_purple2pink_BW","RGBPoints":[-1,0,0,0,-0.87451,0.117562,0.0291202,0.175876,-0.74902,0.178368,0.0458476,0.285454,-0.623529,0.237731,0.0680173,0.387717,-0.498039,0.300877,0.0956291,0.484802,-0.372549,0.370929,0.136858,0.554985,-0.247059,0.449033,0.189273,0.58863,-0.121569,0.529971,0.245796,0.598587,0.00392157,0.609914,0.300643,0.610244,0.129412,0.697079,0.351286,0.616371,0.254902,0.785858,0.401991,0.617376,0.380392,0.862517,0.45745,0.64463,0.505882,0.91359,0.525462,0.705336,0.631373,0.932583,0.61064,0.767412,0.756863,0.922478,0.706966,0.817522,0.882353,0.901302,0.803071,0.856311,1,0.887571,0.887591,0.887549]},{"ColorSpace":"Lab","Name":"erdc_pbj_lin","RGBPoints":[-1,0,0,0,-0.87451,0.091821,0.0611476,0.10617,-0.74902,0.160311,0.0900022,0.192713,-0.623529,0.22484,0.12126,0.272128,-0.498039,0.291263,0.157469,0.340828,-0.372549,0.360015,0.200388,0.388903,-0.247059,0.437497,0.250058,0.387201,-0.121569,0.512636,0.304969,0.355955,0.00392157,0.582603,0.360874,0.33488,0.129412,0.655126,0.416374,0.306351,0.254902,0.725889,0.473329,0.279051,0.380392,0.778125,0.537928,0.302697,0.505882,0.815894,0.606931,0.382431,0.631373,0.839159,0.679308,0.497608,0.756863,0.854748,0.751666,0.631792,0.882353,0.869483,0.822508,0.768592,1,0.887572,0.887589,0.887565]},{"ColorSpace":"Lab","Name":"erdc_blue2green_muted","RGBPoints":[-1,0.107704,0.107708,0.107695,-0.87451,0.141522,0.13066,0.270741,-0.74902,0.180123,0.146119,0.42308,-0.623529,0.210161,0.169674,0.551795,-0.498039,0.239701,0.212939,0.634969,-0.372549,0.253916,0.282947,0.653641,-0.247059,0.242791,0.366933,0.608521,-0.121569,0.226302,0.446776,0.52693,0.00392157,0.236237,0.514689,0.458798,0.129412,0.274641,0.577589,0.376069,0.254902,0.349625,0.633993,0.288131,0.380392,0.4437,0.683677,0.260497,0.505882,0.536247,0.731214,0.285424,0.631373,0.628472,0.777128,0.349151,0.756863,0.718259,0.819287,0.496825,0.882353,0.804768,0.856164,0.703299,1,0.887571,0.887591,0.887548]},{"ColorSpace":"Lab","Name":"erdc_blue2green_BW","RGBPoints":[-1,3.63578e-7,0,0.00000529374,-0.87451,0.0539915,0.0577948,0.212806,-0.74902,0.0620393,0.0758942,0.388959,-0.623529,0.0697499,0.102032,0.54177,-0.498039,0.113295,0.156156,0.64334,-0.372549,0.152047,0.243196,0.670283,-0.247059,0.158096,0.344084,0.622864,-0.121569,0.151142,0.43922,0.532767,0.00392157,0.17155,0.521588,0.457719,0.129412,0.225861,0.599141,0.363997,0.254902,0.32328,0.67007,0.259083,0.380392,0.442344,0.733697,0.223754,0.505882,0.558409,0.794941,0.257411,0.631373,0.673875,0.854344,0.340822,0.756863,0.787244,0.909326,0.524717,0.882353,0.896483,0.958063,0.775914,1,1,1,0.999982]},{"ColorSpace":"Lab","Name":"GREEN-WHITE_LINEAR","RGBPoints":[-1,0,0,0,-0.87451,0,0.062745,0,-0.74902,0,0.12549,0,-0.623529,0,0.188235,0,-0.498039,0,0.25098,0,-0.372549,0,0.313725,0,-0.247059,0,0.376471,0,-0.121569,0.094118,0.439216,0,0.00392157,0.196078,0.501961,0,0.129412,0.294118,0.564706,0,0.254902,0.396078,0.627451,0,0.380392,0.498039,0.690196,0,0.505882,0.6,0.752941,0.145098,0.631373,0.701961,0.815686,0.364706,0.756863,0.8,0.878431,0.580392,0.882353,0.901961,0.941176,0.796078,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_green2yellow_BW","RGBPoints":[-1,0,0,0,-0.87451,0,0.105542,0.0603919,-0.74902,0,0.159454,0.104148,-0.623529,0,0.219502,0.15542,-0.498039,0,0.282276,0.203811,-0.372549,0,0.346331,0.235652,-0.247059,0,0.411765,0.235428,-0.121569,0,0.477177,0.217977,0.00392157,0.0593644,0.541635,0.21361,0.129412,0.233081,0.604722,0.210591,0.254902,0.369803,0.664942,0.226536,0.380392,0.498446,0.722367,0.288237,0.505882,0.601929,0.782244,0.380815,0.631373,0.703207,0.840497,0.512134,0.756863,0.803186,0.896433,0.674462,0.882353,0.903834,0.950266,0.846715,1,1,1,0.999981]},{"ColorSpace":"Lab","Name":"blue2cyan","RGBPoints":[-1,0,0,0,-0.87451,0,0.152941,0.364706,-0.74902,0,0.254902,0.470588,-0.623529,0,0.34902,0.572549,-0.498039,0,0.443137,0.670588,-0.372549,0,0.537255,0.772549,-0.247059,0,0.627451,0.870588,-0.121569,0,0.717647,0.964706,0.00392157,0.0784314,0.772549,1,0.129412,0.207843,0.858824,1,0.254902,0.32549,0.941176,1,0.380392,0.45098,1,1,0.505882,0.560784,1,1,0.631373,0.662745,1,1,0.756863,0.760784,1,1,0.882353,0.870588,1,1,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_blue2cyan_BW","RGBPoints":[-1,4.05298e-7,0,0.0000059012,-0.87451,0.0207526,0.0740933,0.18093,-0.74902,0,0.121033,0.30343,-0.623529,0,0.166892,0.416095,-0.498039,0,0.216768,0.524796,-0.372549,0.0164769,0.275471,0.608585,-0.247059,0.0544527,0.344824,0.659267,-0.121569,0.0880643,0.419118,0.688675,0.00392157,0.127938,0.492556,0.720256,0.129412,0.149476,0.566946,0.756918,0.254902,0.188961,0.641333,0.792122,0.380392,0.245482,0.715336,0.827609,0.505882,0.329216,0.786235,0.874761,0.631373,0.453558,0.852803,0.918466,0.756863,0.626281,0.910493,0.954,0.882353,0.82257,0.958709,0.980146,1,1,1,0.999989]},{"ColorSpace":"Lab","Name":"erdc_blue_BW","RGBPoints":[-1,0,0,0,-0.87451,0.0425591,0.0763529,0.150682,-0.74902,0.0569472,0.119154,0.275403,-0.623529,0.0635978,0.164772,0.395427,-0.498039,0.0774342,0.213851,0.510014,-0.372549,0.106815,0.267034,0.615102,-0.247059,0.122093,0.324649,0.720068,-0.121569,0.160851,0.387068,0.806956,0.00392157,0.213754,0.453516,0.878012,0.129412,0.26722,0.524656,0.932436,0.254902,0.326844,0.599279,0.968038,0.380392,0.403403,0.674712,0.984784,0.505882,0.499703,0.745519,1,0.631373,0.615055,0.813983,1,0.756863,0.74405,0.879228,1,0.882353,0.877909,0.941913,1,1,1,1,0.999996]},{"ColorSpace":"Lab","Name":"BLUE-WHITE","RGBPoints":[-1,0,0,0,-0.87451,0,0,0.082353,-0.74902,0,0,0.168627,-0.623529,0,0,0.254902,-0.498039,0,0,0.337255,-0.372549,0,0,0.423529,-0.247059,0,0,0.509804,-0.121569,0,0.101961,0.592157,0.00392157,0,0.203922,0.678431,0.129412,0,0.301961,0.764706,0.254902,0,0.403922,0.85098,0.380392,0,0.505882,0.933333,0.505882,0,0.603922,1,0.631373,0.254902,0.705882,1,0.756863,0.509804,0.807843,1,0.882353,0.764706,0.905882,1,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_purple_BW","RGBPoints":[-1,4.264e-8,0,6.20844e-7,-0.87451,0.100579,0.0593111,0.145666,-0.74902,0.167794,0.0889224,0.254953,-0.623529,0.231446,0.123339,0.360511,-0.498039,0.296699,0.163027,0.461278,-0.372549,0.363211,0.209286,0.55306,-0.247059,0.431136,0.260776,0.637195,-0.121569,0.498202,0.320012,0.705799,0.00392157,0.567456,0.380459,0.778091,0.129412,0.629381,0.445284,0.8448,0.254902,0.688373,0.517374,0.895694,0.380392,0.74891,0.590906,0.93976,0.505882,0.805017,0.667956,0.977626,0.631373,0.850914,0.752618,0.992396,0.756863,0.89724,0.838454,0.994093,0.882353,0.948461,0.922603,0.994449,1,1,1,0.999967]},{"ColorSpace":"Lab","Name":"erdc_magenta_BW","RGBPoints":[-1,0,0,0.0000254023,-0.87451,0.128696,0.0456782,0.11635,-0.74902,0.228133,0.0476299,0.201452,-0.623529,0.327273,0.0374065,0.282107,-0.498039,0.420953,0.0408166,0.35709,-0.372549,0.511562,0.0642203,0.430511,-0.247059,0.599552,0.102686,0.504257,-0.121569,0.684646,0.150536,0.579429,0.00392157,0.765817,0.205978,0.656062,0.129412,0.839176,0.27229,0.731807,0.254902,0.89536,0.357594,0.797309,0.380392,0.930238,0.457825,0.846984,0.505882,0.945921,0.564536,0.880571,0.631373,0.948995,0.670753,0.902279,0.756863,0.947124,0.772819,0.918171,0.882353,0.947265,0.869424,0.934352,1,0.954719,0.95475,0.954726]},{"ColorSpace":"Lab","Name":"magenta","RGBPoints":[-1,0,0,0,-0.87451,0.364706,0,0.152941,-0.74902,0.470588,0,0.254902,-0.623529,0.572549,0,0.34902,-0.498039,0.670588,0,0.443137,-0.372549,0.772549,0,0.537255,-0.247059,0.870588,0,0.627451,-0.121569,0.964706,0,0.717647,0.00392157,1,0.0784314,0.772549,0.129412,1,0.207843,0.858824,0.254902,1,0.32549,0.941176,0.380392,1,0.45098,1,0.505882,1,0.560784,1,0.631373,1,0.662745,1,0.756863,1,0.760784,1,0.882353,1,0.870588,1,1,1,1,1]},{"ColorSpace":"Lab","Name":"RED-PURPLE","RGBPoints":[-1,0,0,0,-0.87451,0.188235,0,0.007843,-0.74902,0.345098,0,0.035294,-0.623529,0.439216,0,0.098039,-0.498039,0.533333,0,0.152941,-0.372549,0.627451,0.015686,0.211765,-0.247059,0.721569,0.031373,0.266667,-0.121569,0.8,0.047059,0.329412,0.00392157,0.862745,0.047059,0.403922,0.129412,0.941176,0.062745,0.466667,0.254902,0.988235,0.078431,0.54902,0.380392,0.988235,0.141176,0.643137,0.505882,0.988235,0.25098,0.729412,0.631373,0.988235,0.376471,0.811765,0.756863,0.988235,0.54902,0.886275,0.882353,0.988235,0.752941,0.952941,1,0.996078,0.996078,0.996078]},{"ColorSpace":"Lab","Name":"erdc_red_BW","RGBPoints":[-1,0,0,0,-0.87451,0.147204,0.0480135,0.0401815,-0.74902,0.253411,0.0617478,0.0301333,-0.623529,0.356059,0.0746331,0.0446897,-0.498039,0.457731,0.0934935,0.0636931,-0.372549,0.557199,0.122714,0.0860013,-0.247059,0.665179,0.144238,0.105585,-0.121569,0.763833,0.187056,0.138326,0.00392157,0.847035,0.254558,0.189407,0.129412,0.905663,0.345937,0.258215,0.254902,0.941431,0.447111,0.346277,0.380392,0.962608,0.546927,0.457571,0.505882,0.987833,0.637276,0.569944,0.631373,0.994202,0.732176,0.687958,0.756863,0.993304,0.826268,0.800567,0.882353,0.994413,0.917205,0.906393,1,1,1,0.999979]},{"ColorSpace":"Lab","Name":"RED_TEMPERATURE","RGBPoints":[-1,0,0,0,-0.87451,0.090196,0,0,-0.74902,0.180392,0,0,-0.623529,0.270588,0,0,-0.498039,0.360784,0,0,-0.372549,0.45098,0,0,-0.247059,0.545098,0,0,-0.121569,0.635294,0,0,0.00392157,0.72549,0.058824,0,0.129412,0.815686,0.176471,0,0.254902,0.905882,0.294118,0,0.380392,1,0.411765,0,0.505882,1,0.533333,0.027451,0.631373,1,0.65098,0.27451,0.756863,1,0.768627,0.521569,0.882353,1,0.886275,0.768627,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_orange_BW","RGBPoints":[-1,0,0,0.0000253806,-0.87451,0.135871,0.0593824,0,-0.74902,0.224328,0.0907216,0,-0.623529,0.318083,0.119647,0,-0.498039,0.414443,0.150246,0,-0.372549,0.511077,0.184884,0,-0.247059,0.605501,0.226033,0,-0.121569,0.695274,0.275491,0,0.00392157,0.777826,0.334445,0,0.129412,0.851498,0.402441,0,0.254902,0.915899,0.47759,0.000602975,0.380392,0.971984,0.557882,0.0361443,0.505882,1,0.641287,0.135967,0.631373,1,0.725198,0.27997,0.756863,1,0.808205,0.438135,0.882353,1,0.89306,0.587036,1,1,0.977928,0.721599]},{"ColorSpace":"Lab","Name":"heated_object","RGBPoints":[-1,0,0,0,-0.87451,0.34902,0.0862745,0,-0.74902,0.45098,0.172549,0,-0.623529,0.52549,0.231373,0,-0.498039,0.580392,0.278431,0,-0.372549,0.623529,0.313725,0,-0.247059,0.670588,0.352941,0,-0.121569,0.717647,0.392157,0,0.00392157,0.772549,0.439216,0,0.129412,0.839216,0.494118,0,0.254902,0.901961,0.541176,0,0.380392,0.968627,0.6,0,0.505882,1,0.658824,0,0.631373,1,0.721569,0,0.756863,1,0.827451,0.298039,0.882353,1,0.976471,0.72549,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_gold_BW","RGBPoints":[-1,0,0,0.0000190933,-0.87451,0.128363,0.0636265,0,-0.74902,0.193795,0.111057,0,-0.623529,0.25976,0.15987,0,-0.498039,0.328546,0.210589,0,-0.372549,0.399726,0.26332,0,-0.247059,0.472969,0.318261,0,-0.121569,0.546245,0.375827,0,0.00392157,0.61745,0.436719,0,0.129412,0.685545,0.501113,0,0.254902,0.749578,0.568799,0,0.380392,0.80962,0.6394,0,0.505882,0.865572,0.712699,0.10257,0.631373,0.917709,0.787569,0.233665,0.756863,0.966914,0.863138,0.369608,0.882353,1,0.939405,0.496104,1,0.999225,1,0.612275]},{"ColorSpace":"Lab","Name":"erdc_brown_BW","RGBPoints":[-1,3.3216e-7,0,0.00000483629,-0.87451,0.14693,0.0518172,0,-0.74902,0.225806,0.0814996,0,-0.623529,0.301681,0.111452,0,-0.498039,0.370487,0.150664,0,-0.372549,0.43108,0.199477,0,-0.247059,0.4849,0.255107,0,-0.121569,0.536798,0.313486,0,0.00392157,0.59286,0.371167,0,0.129412,0.653119,0.428135,0,0.254902,0.714589,0.485917,0.0379541,0.380392,0.774667,0.54565,0.116634,0.505882,0.831222,0.608047,0.183895,0.631373,0.880305,0.674199,0.260298,0.756863,0.922314,0.742472,0.367086,0.882353,0.959408,0.811222,0.497258,1,0.993548,0.875183,0.622093]},{"ColorSpace":"Lab","Name":"copper_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.0784314,0.0501961,0.0313725,-0.74902,0.156863,0.100392,0.0627451,-0.623529,0.235294,0.150588,0.0941176,-0.498039,0.313725,0.200784,0.12549,-0.372549,0.392157,0.25098,0.156863,-0.247059,0.470588,0.301176,0.188235,-0.121569,0.54902,0.351373,0.219608,0.00392157,0.627451,0.401569,0.25098,0.129412,0.705882,0.451765,0.282353,0.254902,0.784314,0.501961,0.313725,0.380392,0.862745,0.552157,0.345098,0.505882,0.941176,0.602353,0.376471,0.631373,1,0.652549,0.407843,0.756863,1,0.702745,0.439216,0.882353,1,0.752941,0.470588,1,1,0.8,0.5]},{"ColorSpace":"Lab","Name":"pink_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.312416,0.204524,0.204524,-0.74902,0.441822,0.289241,0.289241,-0.623529,0.54112,0.354246,0.354246,-0.498039,0.624831,0.409048,0.409048,-0.372549,0.698582,0.45733,0.45733,-0.247059,0.764404,0.502282,0.500979,-0.121569,0.791292,0.591516,0.54112,0.00392157,0.817297,0.66895,0.578481,0.129412,0.842499,0.738308,0.613572,0.254902,0.866968,0.801687,0.646762,0.380392,0.890766,0.86041,0.678329,0.505882,0.913944,0.913944,0.711254,0.631373,0.936549,0.936549,0.79459,0.756863,0.958621,0.958621,0.869979,0.882353,0.980196,0.980196,0.939336,1,1,1,1]},{"ColorSpace":"Lab","Name":"bone_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.054902,0.054902,0.075817,-0.74902,0.109804,0.109804,0.151634,-0.623529,0.164706,0.164706,0.227451,-0.498039,0.219608,0.219608,0.303268,-0.372549,0.27451,0.27451,0.379085,-0.247059,0.329412,0.329902,0.454412,-0.121569,0.384314,0.405719,0.509314,0.00392157,0.439216,0.481536,0.564216,0.129412,0.494118,0.557353,0.619118,0.254902,0.54902,0.63317,0.67402,0.380392,0.603922,0.708987,0.728922,0.505882,0.660294,0.783824,0.783824,0.631373,0.746569,0.838725,0.838725,0.756863,0.832843,0.893627,0.893627,0.882353,0.919118,0.948529,0.948529,1,1,1,1]},{"ColorSpace":"Lab","Name":"gray_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.0627451,0.0627451,0.0627451,-0.74902,0.12549,0.12549,0.12549,-0.623529,0.188235,0.188235,0.188235,-0.498039,0.25098,0.25098,0.25098,-0.372549,0.313725,0.313725,0.313725,-0.247059,0.376471,0.376471,0.376471,-0.121569,0.439216,0.439216,0.439216,0.00392157,0.501961,0.501961,0.501961,0.129412,0.564706,0.564706,0.564706,0.254902,0.627451,0.627451,0.627451,0.380392,0.690196,0.690196,0.690196,0.505882,0.752941,0.752941,0.752941,0.631373,0.815686,0.815686,0.815686,0.756863,0.878431,0.878431,0.878431,0.882353,0.941176,0.941176,0.941176,1,1,1,1]},{"ColorSpace":"Lab","Name":"Purples","RGBPoints":[-1,0.247059,0,0.490196,-0.87451,0.288397,0.07677,0.525629,-0.74902,0.32975,0.153587,0.561092,-0.623529,0.373057,0.236263,0.600461,-0.498039,0.416363,0.319,0.639923,-0.372549,0.459669,0.405613,0.685198,-0.247059,0.503345,0.491534,0.730058,-0.121569,0.562399,0.54862,0.757616,0.00392157,0.621453,0.606075,0.785544,0.129412,0.680508,0.674971,0.824914,0.254902,0.739562,0.743406,0.863899,0.380392,0.798616,0.800492,0.893426,0.505882,0.85684,0.856655,0.922491,0.631373,0.898178,0.894056,0.942176,0.756863,0.938654,0.930919,0.961646,0.882353,0.964245,0.958478,0.977393,1,0.988235,0.984314,0.992157]},{"ColorSpace":"Lab","Name":"Blues","RGBPoints":[-1,0.031373,0.188235,0.419608,-0.87451,0.031373,0.253195,0.516063,-0.74902,0.031757,0.318139,0.612149,-0.623529,0.080969,0.38113,0.661361,-0.498039,0.130427,0.444152,0.710327,-0.372549,0.195386,0.509112,0.743791,-0.247059,0.260715,0.573841,0.777209,-0.121569,0.341423,0.628958,0.808704,0.00392157,0.422745,0.684075,0.839892,0.129412,0.523137,0.739193,0.861546,0.254902,0.622684,0.793464,0.883429,0.380392,0.701423,0.826928,0.910988,0.505882,0.778685,0.8603,0.937993,0.631373,0.825928,0.891795,0.953741,0.756863,0.87328,0.923291,0.969489,0.882353,0.922491,0.954787,0.985236,1,0.968627,0.984314,1]},{"ColorSpace":"Lab","Name":"Greens","RGBPoints":[-1,0,0.266667,0.105882,-0.87451,0,0.347374,0.139346,-0.74902,0.000538,0.427912,0.172933,-0.623529,0.069435,0.486967,0.222145,-0.498039,0.138178,0.546082,0.271326,-0.372549,0.197232,0.609073,0.31857,-0.247059,0.257255,0.671742,0.365859,-0.121569,0.357647,0.720953,0.415071,0.00392157,0.45767,0.769919,0.465021,0.129412,0.546251,0.811257,0.537855,0.254902,0.634295,0.852211,0.610688,0.380392,0.709097,0.883706,0.683522,0.505882,0.78316,0.914833,0.755894,0.631373,0.842215,0.938454,0.818885,0.756863,0.899977,0.961538,0.880692,0.882353,0.935409,0.975317,0.92203,1,0.968627,0.988235,0.960784]},{"ColorSpace":"Lab","Name":"PuBu","RGBPoints":[-1,0.301961,0,0.294118,-0.87451,0.404321,0.029527,0.390573,-0.74902,0.50599,0.059592,0.486782,-0.623529,0.519769,0.158016,0.551742,-0.498039,0.533456,0.256194,0.616301,-0.372549,0.54133,0.33887,0.655671,-0.247059,0.54902,0.421592,0.695087,-0.121569,0.54902,0.506236,0.736424,0.00392157,0.550127,0.590573,0.777701,0.129412,0.585559,0.665375,0.81707,0.254902,0.622145,0.739023,0.855825,0.380392,0.687105,0.784298,0.879446,0.505882,0.752065,0.829758,0.903253,0.631373,0.817024,0.87897,0.930811,0.756863,0.880907,0.927213,0.957832,0.882353,0.926182,0.958708,0.975548,1,0.968627,0.988235,0.992157]},{"ColorSpace":"Lab","Name":"BuPu","RGBPoints":[-1,0.007843,0.219608,0.345098,-0.87451,0.01178,0.286536,0.449427,-0.74902,0.015702,0.35328,0.553479,-0.623529,0.01767,0.396586,0.622376,-0.498039,0.021115,0.4402,0.690688,-0.372549,0.11757,0.503191,0.722184,-0.247059,0.214625,0.565859,0.753633,-0.121569,0.336671,0.615071,0.78316,0.00392157,0.457978,0.663975,0.812503,0.129412,0.556401,0.703345,0.836125,0.254902,0.65421,0.742714,0.859669,0.380392,0.736886,0.782084,0.881323,0.505882,0.81827,0.821638,0.903068,0.631373,0.873387,0.864944,0.92669,0.756863,0.927536,0.907605,0.949988,0.882353,0.964937,0.9391,0.967705,1,1,0.968627,0.984314]},{"ColorSpace":"Lab","Name":"BuGn","RGBPoints":[-1,0.031373,0.25098,0.505882,-0.87451,0.031373,0.329719,0.590527,-0.74902,0.031911,0.408397,0.674787,-0.623529,0.100807,0.479262,0.710219,-0.498039,0.169704,0.550219,0.745744,-0.372549,0.238601,0.62699,0.787082,-0.247059,0.307958,0.703114,0.826759,-0.121569,0.39654,0.752326,0.797232,0.00392157,0.485121,0.801046,0.767705,0.129412,0.573702,0.83451,0.738178,0.254902,0.661592,0.867743,0.711034,0.380392,0.732457,0.895302,0.74253,0.505882,0.801845,0.922307,0.774579,0.631373,0.841215,0.938055,0.817885,0.756863,0.880907,0.95391,0.861084,0.882353,0.926182,0.971626,0.902422,1,0.968627,0.988235,0.941176]},{"ColorSpace":"Lab","Name":"GnBu","RGBPoints":[-1,0,0.266667,0.105882,-0.87451,0,0.347374,0.139346,-0.74902,0.000538,0.427912,0.172933,-0.623529,0.069435,0.486967,0.222145,-0.498039,0.138178,0.546175,0.272095,-0.372549,0.197232,0.615071,0.368551,-0.247059,0.256609,0.683276,0.464867,-0.121569,0.329443,0.722645,0.555417,0.00392157,0.403137,0.762138,0.645413,0.129412,0.503529,0.805444,0.718247,0.254902,0.603922,0.848597,0.790465,0.380392,0.704314,0.887966,0.847551,0.505882,0.802307,0.926321,0.903714,0.631373,0.851519,0.944037,0.941115,0.756863,0.899977,0.961538,0.976901,0.882353,0.935409,0.975317,0.984775,1,0.968627,0.988235,0.992157]},{"ColorSpace":"Lab","Name":"GnBuPu","RGBPoints":[-1,0.003922,0.27451,0.211765,-0.87451,0.003922,0.349312,0.280661,-0.74902,0.003937,0.423852,0.349773,-0.623529,0.005905,0.46519,0.446228,-0.498039,0.009443,0.506344,0.542837,-0.372549,0.111803,0.535871,0.649135,-0.247059,0.214025,0.565859,0.753633,-0.121569,0.310481,0.615071,0.78316,0.00392157,0.407797,0.663975,0.812503,0.129412,0.531811,0.703345,0.836125,0.254902,0.65421,0.742714,0.859669,0.380392,0.736886,0.782084,0.881323,0.505882,0.81827,0.821176,0.902884,0.631373,0.873387,0.854641,0.922568,0.756863,0.927536,0.888535,0.942361,0.882353,0.964937,0.929873,0.964014,1,1,0.968627,0.984314]},{"ColorSpace":"Lab","Name":"BuGnYl","RGBPoints":[-1,0.031373,0.113725,0.345098,-0.87451,0.088458,0.159,0.463206,-0.74902,0.145052,0.204567,0.5807,-0.623529,0.139146,0.287243,0.620069,-0.498039,0.13318,0.370196,0.659562,-0.372549,0.123337,0.470588,0.706805,-0.247059,0.115386,0.570335,0.753126,-0.121569,0.186251,0.643168,0.761,0.00392157,0.258716,0.71514,0.768074,0.129412,0.380761,0.760415,0.750358,0.254902,0.503576,0.806075,0.732795,0.380392,0.645306,0.861192,0.719016,0.505882,0.783899,0.91511,0.705606,0.631373,0.858701,0.944637,0.6997,0.756863,0.931349,0.973303,0.698424,0.882353,0.966782,0.987082,0.777163,1,1,1,0.85098]},{"ColorSpace":"Lab","Name":"PuRd","RGBPoints":[-1,0.286275,0,0.415686,-0.87451,0.38273,0.001968,0.441276,-0.74902,0.479231,0.003922,0.466774,-0.623529,0.581592,0.003922,0.480554,-0.498039,0.683799,0.00549,0.494887,-0.372549,0.776317,0.105882,0.544098,-0.247059,0.867866,0.206321,0.592618,-0.121569,0.919047,0.308681,0.612303,0.00392157,0.968812,0.411226,0.632603,0.129412,0.974717,0.519493,0.671972,0.254902,0.980546,0.626451,0.71065,0.380392,0.984483,0.701253,0.732303,0.505882,0.988328,0.77504,0.755617,0.631373,0.990296,0.828189,0.812703,0.756863,0.992372,0.880907,0.869035,0.882353,0.996309,0.926182,0.912341,1,1,0.968627,0.952941]},{"ColorSpace":"Lab","Name":"RdPu","RGBPoints":[-1,0.403922,0,0.121569,-0.87451,0.500377,0,0.192434,-0.74902,0.596909,0.000277,0.263037,-0.623529,0.703206,0.035709,0.300438,-0.498039,0.808612,0.071296,0.338854,-0.372549,0.857824,0.116571,0.441215,-0.247059,0.905513,0.163552,0.54293,-0.121569,0.889765,0.281661,0.617732,0.00392157,0.873156,0.39897,0.691611,0.129412,0.82985,0.491488,0.736886,0.254902,0.789081,0.583237,0.781853,0.380392,0.810734,0.656071,0.819254,0.505882,0.833126,0.729181,0.85684,0.631373,0.870527,0.80792,0.898178,0.756863,0.907605,0.884398,0.938331,0.882353,0.9391,0.921799,0.958016,1,0.968627,0.956863,0.976471]},{"ColorSpace":"Lab","Name":"Oranges","RGBPoints":[-1,0.498039,0.152941,0.015686,-0.87451,0.57481,0.182468,0.013718,-0.74902,0.651765,0.212042,0.011734,-0.623529,0.752157,0.247474,0.007797,-0.498039,0.851719,0.283368,0.004475,-0.372549,0.898962,0.348328,0.039908,-0.247059,0.945652,0.413426,0.076401,-0.121569,0.969273,0.484291,0.157109,0.00392157,0.992157,0.554971,0.238185,0.129412,0.992157,0.619931,0.330704,0.254902,0.992157,0.684967,0.423837,0.380392,0.992157,0.751895,0.532103,0.505882,0.992249,0.817716,0.639354,0.631373,0.994218,0.861023,0.725967,0.756863,0.996186,0.903576,0.810965,0.882353,0.998155,0.933103,0.868051,1,1,0.960784,0.921569]},{"ColorSpace":"Lab","Name":"Reds","RGBPoints":[-1,0.403922,0,0.05098,-0.87451,0.525967,0.029527,0.066728,-0.74902,0.647643,0.058962,0.082476,-0.623529,0.722445,0.076678,0.098224,-0.498039,0.797186,0.095194,0.114187,-0.372549,0.868051,0.164091,0.143714,-0.247059,0.937809,0.233541,0.173933,-0.121569,0.96143,0.326059,0.232987,0.00392157,0.984375,0.418147,0.292657,0.129412,0.986344,0.496886,0.371396,0.254902,0.988235,0.575702,0.450673,0.380392,0.988235,0.656409,0.543191,0.505882,0.98842,0.736747,0.635894,0.631373,0.992357,0.809581,0.732349,0.756863,0.996186,0.880692,0.826759,0.882353,0.998155,0.92203,0.885813,1,1,0.960784,0.941176]},{"ColorSpace":"Lab","Name":"RdOr","RGBPoints":[-1,0.498039,0,0,-0.87451,0.6004,0,0,-0.74902,0.702514,0.000738,0.000477,-0.623529,0.773379,0.095225,0.061499,-0.498039,0.843875,0.189865,0.12283,-0.372549,0.891119,0.294195,0.203537,-0.247059,0.937855,0.397924,0.283137,-0.121569,0.963445,0.476663,0.316601,0.00392157,0.988297,0.555771,0.351665,0.129412,0.990265,0.646321,0.436309,0.254902,0.992157,0.735256,0.519646,0.380392,0.992157,0.784468,0.570827,0.505882,0.992249,0.833218,0.623483,0.631373,0.994218,0.872587,0.706159,0.756863,0.996186,0.911419,0.788189,0.882353,0.998155,0.940946,0.859054,1,1,0.968627,0.92549]},{"ColorSpace":"Lab","Name":"BrOrYl","RGBPoints":[-1,0.4,0.145098,0.023529,-0.87451,0.500392,0.174625,0.019592,-0.74902,0.600784,0.204291,0.015656,-0.623529,0.701176,0.251534,0.011719,-0.498039,0.800984,0.299146,0.008397,-0.372549,0.863975,0.370012,0.043829,-0.247059,0.926321,0.441107,0.0794,-0.121569,0.961753,0.521815,0.120738,0.00392157,0.996078,0.602645,0.163122,0.129412,0.996078,0.68729,0.237924,0.254902,0.996078,0.771011,0.314879,0.380392,0.996078,0.832034,0.444798,0.505882,0.996171,0.892042,0.572595,0.631373,0.998139,0.931411,0.65724,0.756863,1,0.969489,0.741669,0.882353,1,0.985236,0.822376,1,1,1,0.898039]},{"ColorSpace":"Lab","Name":"RdOrYl","RGBPoints":[-1,0.501961,0,0.14902,-0.87451,0.622038,0,0.14902,-0.74902,0.741761,0.0004,0.148866,-0.623529,0.816563,0.05158,0.129181,-0.498039,0.890965,0.10356,0.110235,-0.372549,0.940177,0.205921,0.137793,-0.247059,0.988281,0.308789,0.165536,-0.121569,0.99025,0.432803,0.200969,0.00392157,0.992218,0.555217,0.236278,0.129412,0.994187,0.628051,0.267774,0.254902,0.996078,0.701038,0.301269,0.380392,0.996078,0.777809,0.383945,0.505882,0.996171,0.852826,0.466621,0.631373,0.998139,0.892195,0.549296,0.756863,1,0.931349,0.632188,0.882353,1,0.966782,0.7188,1,1,1,0.8]},{"ColorSpace":"Lab","Name":"CIELab_blue2red","RGBPoints":[-1,0,0.6,0.74902,1,0.76863,0.46667,0.34118]},{"ColorSpace":"Lab","Name":"blue2yellow","RGBPoints":[-1,0,0,1,0,0.5,0.5,0.5,1,1,1,0]},{"ColorSpace":"Lab","Name":"erdc_blue2gold","RGBPoints":[-1,0.175119,0.0438468,1,-0.874016,0.22383,0.159771,0.94557,-0.748031,0.27254,0.233611,0.891216,-0.622047,0.321251,0.296526,0.836857,-0.496063,0.369962,0.354296,0.782359,-0.370079,0.418672,0.409139,0.72754,-0.244094,0.467383,0.462152,0.672148,-0.11811,0.51609,0.51396,0.615825,0.00787402,0.572863,0.55452,0.559172,0.133858,0.630269,0.593822,0.517729,0.259843,0.689588,0.624668,0.47446,0.385827,0.745394,0.656113,0.428638,0.511811,0.798624,0.688104,0.379105,0.637795,0.849926,0.720593,0.323834,0.76378,0.899765,0.753543,0.258657,0.889764,0.948487,0.78692,0.171778,1,0.990413,0.816451,0.00729848]},{"ColorSpace":"Lab","Name":"erdc_blue2yellow","RGBPoints":[-1,0.0830122,0,0.495617,-0.87451,0.141973,0.0551288,0.57363,-0.74902,0.193048,0.110258,0.604561,-0.623529,0.234231,0.165386,0.57643,-0.498039,0.275413,0.220515,0.548299,-0.372549,0.316596,0.275644,0.520169,-0.247059,0.357778,0.330773,0.492038,-0.121569,0.398961,0.385901,0.463908,0.00392157,0.449929,0.438487,0.426815,0.129412,0.511572,0.488299,0.379944,0.254902,0.581222,0.53603,0.325741,0.380392,0.650871,0.583761,0.271538,0.505882,0.720521,0.631493,0.217335,0.631373,0.79017,0.679224,0.163132,0.756863,0.85982,0.726955,0.108929,0.882353,0.910254,0.774159,0.14112,1,0.927513,0.81759,0.306289]},{"ColorSpace":"Lab","Name":"erdc_cyan2orange","RGBPoints":[-1,0.0471513,0.213874,0.414329,-0.87451,0.0674702,0.256648,0.439027,-0.74902,0.0959957,0.299331,0.462089,-0.623529,0.132428,0.341872,0.483212,-0.498039,0.188743,0.38277,0.500597,-0.372549,0.268511,0.420229,0.512179,-0.247059,0.352945,0.455602,0.519101,-0.121569,0.43893,0.489368,0.521538,0.00392157,0.522445,0.522495,0.522436,0.129412,0.600089,0.555682,0.53205,0.254902,0.67988,0.587981,0.539163,0.380392,0.761011,0.619586,0.544439,0.505882,0.84278,0.650741,0.548567,0.631373,0.910713,0.687347,0.557822,0.756863,0.952232,0.734972,0.577775,0.882353,0.975642,0.789858,0.604868,1,0.990752,0.843643,0.632857]},{"ColorSpace":"Lab","Name":"erdc_purple2green","RGBPoints":[-1,0.235006,0.0483128,0.530899,-0.87451,0.302968,0.108419,0.552391,-0.74902,0.360241,0.166059,0.569502,-0.623529,0.406746,0.226782,0.579373,-0.498039,0.444073,0.28964,0.582094,-0.372549,0.473648,0.353774,0.577947,-0.247059,0.497636,0.418154,0.567911,-0.121569,0.519086,0.481741,0.553968,0.00392157,0.542884,0.542914,0.542875,0.129412,0.566303,0.603989,0.527499,0.254902,0.595218,0.662965,0.516857,0.380392,0.628641,0.720701,0.510673,0.505882,0.665373,0.777849,0.508165,0.631373,0.704182,0.834921,0.508303,0.756863,0.743846,0.892328,0.50999,0.882353,0.783158,0.950422,0.512181,1,0.818617,1,0.513888]},{"ColorSpace":"Lab","Name":"erdc_purple2green_dark","RGBPoints":[-1,0.107656,0,0.428682,-0.87451,0.1924,0,0.449799,-0.74902,0.255118,0.0648939,0.466726,-0.623529,0.304256,0.133066,0.476703,-0.498039,0.343202,0.19716,0.479793,-0.372549,0.373876,0.260353,0.476241,-0.247059,0.398497,0.322872,0.466953,-0.121569,0.420016,0.384252,0.453785,0.00392157,0.44319,0.443216,0.443186,0.129412,0.465553,0.502139,0.428233,0.254902,0.492959,0.559151,0.417591,0.380392,0.524654,0.615092,0.411016,0.505882,0.55959,0.670583,0.40779,0.631373,0.596614,0.726102,0.406948,0.756863,0.634544,0.782032,0.407439,0.882353,0.672183,0.838703,0.408237,1,0.706131,0.892759,0.408452]},{"ColorSpace":"Lab","Name":"coolwarm","RGBPoints":[-1,0.229806,0.298718,0.753683,-0.875,0.303869,0.406535,0.844959,-0.75,0.383013,0.509419,0.917388,-0.625,0.466667,0.604563,0.968155,-0.5,0.552953,0.688929,0.995376,-0.375,0.639176,0.7596,0.998151,-0.25,0.722193,0.813953,0.976575,-0.125,0.798692,0.849786,0.931689,0,0.865395,0.86541,0.865396,0.125,0.924128,0.827385,0.774508,0.25,0.958853,0.769768,0.678008,0.375,0.969954,0.694267,0.579375,0.5,0.958003,0.602842,0.481776,0.625,0.923945,0.497309,0.38797,0.75,0.869187,0.378313,0.300267,0.875,0.795632,0.241284,0.220526,1,0.705673,0.0155562,0.150233]},{"ColorSpace":"Lab","Name":"BuRd","RGBPoints":[-1,0.019608,0.188235,0.380392,-0.87451,0.088504,0.321107,0.564937,-0.74902,0.163399,0.444983,0.697501,-0.623529,0.247059,0.555709,0.754095,-0.498039,0.420684,0.676432,0.818685,-0.372549,0.606459,0.789773,0.880277,-0.247059,0.761476,0.868512,0.924567,-0.121569,0.878047,0.925721,0.951942,0.00392157,0.969089,0.966474,0.964937,0.129412,0.983852,0.897578,0.846828,0.254902,0.982468,0.800692,0.706113,0.380392,0.960323,0.66782,0.536332,0.505882,0.894579,0.503806,0.399769,0.631373,0.81707,0.33218,0.281046,0.756863,0.728489,0.155017,0.197386,0.882353,0.576932,0.055363,0.14925,1,0.403922,0,0.121569]},{"ColorSpace":"Lab","Name":"Spectral_lowBlue","RGBPoints":[-1,0.368627,0.309804,0.635294,-0.87451,0.260361,0.450058,0.70173,-0.74902,0.248058,0.591311,0.717186,-0.623529,0.376009,0.734025,0.658132,-0.498039,0.537947,0.814764,0.64506,-0.372549,0.702345,0.879585,0.636678,-0.247059,0.84752,0.938639,0.607151,-0.121569,0.940408,0.976163,0.656055,0.00392157,0.999923,0.997616,0.745021,0.129412,0.997463,0.921338,0.61707,0.254902,0.995002,0.824606,0.499885,0.380392,0.992541,0.701576,0.39654,0.505882,0.973472,0.547405,0.318108,0.631373,0.937793,0.398539,0.270127,0.756863,0.861515,0.282891,0.299654,0.882353,0.746482,0.144637,0.288812,1,0.619608,0.003922,0.258824]},{"ColorSpace":"Lab","Name":"GnRP","RGBPoints":[-1,0,0.266667,0.105882,-0.87451,0.066436,0.394617,0.174779,-0.74902,0.168858,0.524567,0.25767,-0.623529,0.323875,0.657439,0.361015,-0.498039,0.504883,0.772318,0.506344,-0.372549,0.678431,0.870127,0.654902,-0.247059,0.803922,0.921799,0.780392,-0.121569,0.897116,0.951942,0.882814,0.00392157,0.967397,0.965936,0.967474,0.129412,0.928028,0.879815,0.930565,0.254902,0.866052,0.780777,0.882891,0.380392,0.77501,0.665129,0.821376,0.505882,0.675663,0.537024,0.737024,0.631373,0.57847,0.396155,0.645982,0.756863,0.492349,0.223914,0.547559,0.882353,0.375548,0.096886,0.423299,1,0.25098,0,0.294118]},{"ColorSpace":"Lab","Name":"GYPi","RGBPoints":[-1,0.152941,0.392157,0.098039,-0.87451,0.246444,0.505344,0.117724,-0.74902,0.351942,0.614533,0.161399,-0.623529,0.474971,0.717878,0.240138,-0.498039,0.611995,0.811226,0.392849,-0.372549,0.746328,0.893118,0.565321,-0.247059,0.859516,0.94233,0.747405,-0.121569,0.928105,0.96386,0.875663,0.00392157,0.969089,0.966859,0.968012,0.129412,0.983852,0.910265,0.948328,0.254902,0.979239,0.833218,0.914648,0.380392,0.949712,0.729873,0.862976,0.505882,0.905652,0.58293,0.763552,0.631373,0.85521,0.410073,0.652211,0.756863,0.793695,0.183699,0.531642,0.882353,0.683737,0.063899,0.420761,1,0.556863,0.003922,0.321569]},{"ColorSpace":"Lab","Name":"GnYlRd","RGBPoints":[-1,0,0.407843,0.215686,-0.87451,0.063975,0.525952,0.277201,-0.74902,0.177932,0.633064,0.332718,-0.623529,0.364937,0.724106,0.379469,-0.498039,0.527951,0.797155,0.40223,-0.372549,0.678431,0.862822,0.433449,-0.247059,0.803922,0.916955,0.514648,-0.121569,0.909419,0.961861,0.625067,0.00392157,0.999923,0.997616,0.745021,0.129412,0.997463,0.921338,0.61707,0.254902,0.995002,0.824606,0.499885,0.380392,0.992541,0.701576,0.39654,0.505882,0.973472,0.547405,0.318108,0.631373,0.939023,0.389927,0.245521,0.756863,0.867666,0.239831,0.176624,0.882353,0.762399,0.110727,0.151326,1,0.647059,0,0.14902]},{"ColorSpace":"Lab","Name":"GBBr","RGBPoints":[-1,0,0.235294,0.188235,-0.87451,0.002461,0.338639,0.301423,-0.74902,0.055902,0.448981,0.417609,-0.623529,0.183852,0.56955,0.538178,-0.498039,0.357785,0.700115,0.660746,-0.372549,0.540177,0.819531,0.77624,-0.247059,0.714879,0.890888,0.864821,-0.121569,0.851134,0.934564,0.922645,0.00392157,0.960861,0.959785,0.95694,0.129412,0.963322,0.927797,0.83391,0.254902,0.939946,0.868897,0.68935,0.380392,0.883353,0.775394,0.517109,0.505882,0.808074,0.625836,0.324106,0.631373,0.717647,0.476355,0.15494,0.756863,0.592157,0.358247,0.06882,0.882353,0.458593,0.26436,0.031142,1,0.329412,0.188235,0.019608]},{"ColorSpace":"Lab","Name":"PuOr","RGBPoints":[-1,0.498039,0.231373,0.031373,-0.87451,0.62599,0.30273,0.026451,-0.74902,0.746943,0.387082,0.037524,-0.623529,0.85767,0.490427,0.071972,-0.498039,0.936409,0.617762,0.236371,-0.372549,0.992695,0.743099,0.43291,-0.247059,0.995156,0.841523,0.63714,-0.121569,0.985313,0.913802,0.813687,0.00392157,0.966244,0.966398,0.967705,0.129412,0.889965,0.89504,0.938178,0.254902,0.806151,0.804306,0.894656,0.380392,0.712649,0.688658,0.833141,0.505882,0.594233,0.554325,0.744637,0.631373,0.474894,0.404229,0.652364,0.756863,0.366628,0.217224,0.563783,0.882353,0.266436,0.089965,0.434833,1,0.176471,0,0.294118]},{"ColorSpace":"Lab","Name":"PRGn","RGBPoints":[-1,0.25098,0,0.294118,-0.87451,0.383852,0.103345,0.431911,-0.74902,0.497732,0.234679,0.55371,-0.623529,0.583852,0.40692,0.652134,-0.498039,0.681968,0.545175,0.742561,-0.372549,0.7807,0.672357,0.825221,-0.247059,0.871742,0.788005,0.886736,-0.121569,0.930488,0.885198,0.932872,0.00392157,0.966321,0.968089,0.965859,0.129412,0.892503,0.950865,0.877278,0.254902,0.796078,0.91857,0.772549,0.380392,0.670588,0.866897,0.647059,0.505882,0.493195,0.765398,0.496655,0.631373,0.314187,0.649135,0.354556,0.756863,0.15917,0.516263,0.251211,0.882353,0.062284,0.386621,0.170473,1,0,0.266667,0.105882]},{"ColorSpace":"Lab","Name":"PiYG","RGBPoints":[-1,0.556863,0.003922,0.321569,-0.87451,0.692195,0.067897,0.427374,-0.74902,0.797539,0.197847,0.539177,-0.623529,0.859054,0.424221,0.659746,-0.498039,0.908574,0.592618,0.770319,-0.372549,0.951557,0.736332,0.866205,-0.247059,0.981084,0.839677,0.917878,-0.121569,0.98293,0.913802,0.949558,0.00392157,0.96732,0.968474,0.965629,0.129412,0.92549,0.963552,0.869666,0.254902,0.852441,0.939254,0.736025,0.380392,0.739254,0.890042,0.553941,0.505882,0.60323,0.805536,0.382238,0.631373,0.467282,0.711419,0.235217,0.756863,0.344252,0.608074,0.156478,0.882353,0.2406,0.49827,0.116494,1,0.152941,0.392157,0.098039]},{"ColorSpace":"Lab","Name":"OrPu","RGBPoints":[-1,0.176471,0,0.294118,-0.87451,0.272434,0.095963,0.444214,-0.74902,0.373395,0.228912,0.56932,-0.623529,0.481661,0.415917,0.657901,-0.498039,0.601922,0.562937,0.750481,-0.372549,0.718493,0.695886,0.836986,-0.247059,0.811995,0.811534,0.898501,-0.121569,0.894733,0.8995,0.940023,0.00392157,0.969166,0.966859,0.963629,0.129412,0.98639,0.910265,0.803691,0.254902,0.995002,0.835371,0.624375,0.380392,0.992541,0.736947,0.420146,0.505882,0.931949,0.609458,0.224221,0.631373,0.85075,0.483968,0.069819,0.756863,0.740023,0.380623,0.035371,0.882353,0.617993,0.29827,0.026759,1,0.498039,0.231373,0.031373]},{"ColorSpace":"Lab","Name":"BrBG","RGBPoints":[-1,0.329412,0.188235,0.019608,-0.87451,0.467205,0.269435,0.031911,-0.74902,0.6,0.365629,0.074202,-0.623529,0.72549,0.483737,0.160323,-0.498039,0.812995,0.635832,0.336409,-0.372549,0.88689,0.781238,0.527874,-0.247059,0.943483,0.87474,0.700115,-0.121569,0.963168,0.929796,0.841599,0.00392157,0.957247,0.959938,0.959554,0.129412,0.84406,0.932872,0.920185,0.254902,0.70396,0.886428,0.859285,0.380392,0.529258,0.815071,0.770704,0.505882,0.346251,0.691811,0.653057,0.631373,0.175855,0.562015,0.530642,0.756863,0.047905,0.441446,0.410073,0.882353,0.002307,0.33218,0.294348,1,0,0.235294,0.188235]},{"ColorSpace":"Lab","Name":"GyRd","RGBPoints":[-1,0.101961,0.101961,0.101961,-0.87451,0.227451,0.227451,0.227451,-0.74902,0.359939,0.359939,0.359939,-0.623529,0.502653,0.502653,0.502653,-0.498039,0.631373,0.631373,0.631373,-0.372549,0.749865,0.749865,0.749865,-0.247059,0.843368,0.843368,0.843368,-0.121569,0.926105,0.926105,0.926105,0.00392157,0.999846,0.997232,0.995694,0.129412,0.994925,0.908651,0.857901,0.254902,0.982468,0.800692,0.706113,0.380392,0.960323,0.66782,0.536332,0.505882,0.894579,0.503806,0.399769,0.631373,0.81707,0.33218,0.281046,0.756863,0.728489,0.155017,0.197386,0.882353,0.576932,0.055363,0.14925,1,0.403922,0,0.121569]},{"ColorSpace":"Lab","Name":"erdc_divHi_purpleGreen","RGBPoints":[-1,0.297553,0,0.489074,-0.87451,0.40259,0.151146,0.567754,-0.74902,0.516038,0.284843,0.658231,-0.623529,0.629783,0.423646,0.750938,-0.498039,0.735198,0.563697,0.835956,-0.372549,0.82408,0.695541,0.903582,-0.247059,0.889091,0.807454,0.944862,-0.121569,0.92334,0.886917,0.951839,0.00392157,0.921045,0.921084,0.921003,0.129412,0.877324,0.907455,0.845381,0.254902,0.797649,0.849713,0.734695,0.380392,0.691646,0.75964,0.600532,0.505882,0.568981,0.649159,0.453807,0.631373,0.438945,0.529756,0.304259,0.756863,0.30973,0.412001,0.158303,0.882353,0.187078,0.305111,0.00251458,1,0.101655,0.220836,0]},{"ColorSpace":"Lab","Name":"erdc_divHi_purpleGreen_dim","RGBPoints":[-1,0.404088,0.131038,0.592767,-0.87451,0.486469,0.230957,0.651243,-0.74902,0.575165,0.339335,0.717723,-0.623529,0.662741,0.454332,0.784263,-0.498039,0.742071,0.570213,0.842918,-0.372549,0.806935,0.678992,0.886227,-0.247059,0.852219,0.771315,0.90763,-0.121569,0.873345,0.837327,0.901572,0.00392157,0.866783,0.86682,0.866745,0.129412,0.82839,0.858225,0.796812,0.254902,0.762578,0.814287,0.700202,0.380392,0.676429,0.744229,0.585735,0.505882,0.577033,0.65732,0.461526,0.631373,0.47128,0.562476,0.33476,0.756863,0.365461,0.467957,0.21076,0.882353,0.264758,0.381138,0.0878313,1,0.182591,0.312249,0]},{"ColorSpace":"Lab","Name":"erdc_divLow_icePeach","RGBPoints":[-1,0.480048,0.817441,0.998056,-0.87451,0.425898,0.726921,0.883187,-0.74902,0.366682,0.629445,0.761936,-0.623529,0.308756,0.531002,0.640217,-0.498039,0.258021,0.43705,0.523433,-0.372549,0.219244,0.352381,0.416348,-0.247059,0.195127,0.281032,0.322979,-0.121569,0.186286,0.22627,0.246525,0.00392157,0.192352,0.19236,0.192364,0.129412,0.255927,0.214469,0.191756,0.254902,0.340459,0.254426,0.206666,0.380392,0.444655,0.309315,0.234029,0.505882,0.565353,0.376004,0.270969,0.631373,0.697917,0.450748,0.314293,0.756863,0.836657,0.529064,0.360227,0.882353,0.972695,0.614884,0.413123,1,1,0.705904,0.472699]},{"ColorSpace":"Lab","Name":"erdc_divLow_purpleGreen","RGBPoints":[-1,0.956034,0.666487,0.952663,-0.87451,0.874457,0.572698,0.936352,-0.74902,0.753465,0.488253,0.909063,-0.623529,0.63309,0.413507,0.763833,-0.498039,0.514491,0.345878,0.620015,-0.372549,0.405008,0.288141,0.484376,-0.247059,0.311388,0.241986,0.363556,-0.121569,0.238722,0.209044,0.263449,0.00392157,0.192352,0.192366,0.192362,0.129412,0.200379,0.233201,0.168618,0.254902,0.230151,0.291737,0.165227,0.380392,0.279481,0.366076,0.178607,0.505882,0.344927,0.453267,0.205703,0.631373,0.421554,0.549449,0.242643,0.756863,0.503334,0.649999,0.284377,0.882353,0.583497,0.749672,0.324969,1,0.650705,0.837228,0.356264]},{"ColorSpace":"Lab","Name":"Haze_green","RGBPoints":[-1,1,0.835294,0.886275,-0.87451,0.937255,0.756863,0.870443,-0.74902,0.875817,0.666376,0.857807,-0.623529,0.778359,0.583007,0.808134,-0.498039,0.676253,0.494118,0.745098,-0.372549,0.561365,0.390123,0.682353,-0.247059,0.438344,0.262745,0.621496,-0.121569,0.321133,0.141031,0.558751,0.00392157,0.203922,0.0217865,0.495861,0.129412,0.265505,0.129412,0.433261,0.254902,0.311692,0.255338,0.37008,0.380392,0.356282,0.377342,0.310821,0.505882,0.39971,0.488889,0.258243,0.631373,0.442556,0.604357,0.205519,0.756863,0.48671,0.71968,0.152941,0.882353,0.529847,0.830356,0.100944,1,0.572549,0.933333,0.054902]},{"ColorSpace":"Lab","Name":"Haze_lime","RGBPoints":[-1,0.704034,0.784196,1,-0.87451,0.633111,0.691418,0.956078,-0.74902,0.564021,0.600606,0.912157,-0.623529,0.496827,0.51189,0.868235,-0.498039,0.43157,0.425416,0.824314,-0.372549,0.368248,0.341347,0.780392,-0.247059,0.306767,0.259855,0.736471,-0.121569,0.246862,0.181069,0.692549,0.00392157,0.191619,0.109542,0.648627,0.129412,0.257404,0.194031,0.604706,0.254902,0.321794,0.278775,0.560784,0.380392,0.387909,0.364617,0.516863,0.505882,0.456569,0.451881,0.472941,0.631373,0.527424,0.540773,0.42902,0.756863,0.599759,0.631427,0.385098,0.882353,0.673065,0.723898,0.341176,1,0.742751,0.812252,0.3]},{"ColorSpace":"RGB","Name":"Haze","RGBPoints":[-1,1,0.835294,0.996078,-0.00392157,0.023529,0.141176,0.498039,0.00392157,0.015686,0.137255,0.494118,1,0.984314,0.764706,0]},{"ColorSpace":"Lab","Name":"Haze_cyan","RGBPoints":[-1,0.956863,1,0.835294,-0.87451,0.933188,0.921714,0.760784,-0.74902,0.870588,0.803486,0.671605,-0.623529,0.807843,0.684096,0.583297,-0.498039,0.745098,0.569208,0.494118,-0.372549,0.682353,0.437763,0.390123,-0.247059,0.621496,0.288163,0.262745,-0.121569,0.558751,0.144517,0.141031,0.00392157,0.495861,0.0217865,0.0413943,0.129412,0.433261,0.137255,0.129412,0.254902,0.37008,0.263181,0.255338,0.380392,0.306318,0.381845,0.372694,0.505882,0.243137,0.503994,0.494263,0.631373,0.180392,0.629484,0.619753,0.756863,0.117647,0.754975,0.747131,0.882353,0.054902,0.876398,0.866812,1,0,0.988235,0.976471]},{"ColorSpace":"Lab","Name":"nic_Edge","RGBPoints":[-1,0.191208,0.191208,0.191208,-0.87451,0.239484,0.00545035,0.614821,-0.74902,0.220593,0.0617459,0.863547,-0.623529,0.17509,0.278988,0.97794,-0.498039,0.143526,0.576069,0.998553,-0.372549,0.166456,0.871883,0.96594,-0.247059,0.376202,0.993555,0.981833,-0.121569,0.681996,0.991297,0.999239,0.00392157,0.954172,0.952734,0.94374,0.129412,0.999735,0.99301,0.662896,0.254902,0.979399,0.991466,0.357973,0.380392,0.968771,0.854967,0.162659,0.505882,0.999245,0.556697,0.144323,0.631373,0.973959,0.26223,0.177946,0.756863,0.852358,0.0526707,0.222974,0.882353,0.593889,0.00912724,0.238855,1,0.191208,0.191208,0.191208]},{"ColorSpace":"Lab","Name":"erdc_iceFire_H","RGBPoints":[-1,4.05432e-7,0,0.00000590122,-0.87451,0,0.120401,0.302675,-0.74902,0,0.216583,0.524574,-0.623529,0.0552475,0.345025,0.6595,-0.498039,0.128047,0.492588,0.720288,-0.372549,0.188955,0.641309,0.792092,-0.247059,0.327673,0.784935,0.873434,-0.121569,0.60824,0.892164,0.935547,0.00392157,0.881371,0.912178,0.818099,0.129412,0.951407,0.835621,0.449279,0.254902,0.904481,0.690489,0,0.380392,0.85407,0.510864,0,0.505882,0.777093,0.33018,0.00088199,0.631373,0.672862,0.139087,0.00269398,0.756863,0.508815,0,0,0.882353,0.299417,0.000366289,0.000547829,1,0.0157519,0.00332021,4.55569e-8]},{"ColorSpace":"Lab","Name":"erdc_iceFire_L","RGBPoints":[-1,0.870485,0.913768,0.832905,-0.87451,0.586919,0.887865,0.934003,-0.74902,0.31583,0.776442,0.867858,-0.623529,0.18302,0.632034,0.787722,-0.498039,0.117909,0.484134,0.713825,-0.372549,0.0507239,0.335979,0.654741,-0.247059,0,0.209874,0.511832,-0.121569,0,0.114689,0.28935,0.00392157,0.0157519,0.00332021,4.55569e-8,0.129412,0.312914,0,0,0.254902,0.520865,0,0,0.380392,0.680105,0.15255,0.0025996,0.505882,0.785109,0.339479,0.000797922,0.631373,0.857354,0.522494,0,0.756863,0.910974,0.699774,0,0.882353,0.951921,0.842817,0.478545,1,0.881371,0.912178,0.818099]},{"ColorSpace":"RGB","Name":"hsv","RGBPoints":[-1,1,0,0,-0.666666,1,0,1,-0.333333,0,0,1,0,0,1,1,0.33333,0,1,0,0.66666,1,1,0,1,1,0,0]},{"ColorSpace":"Lab","Name":"hue_L60","RGBPoints":[-1,0.964784,0.400592,0.349549,-0.87451,0.964915,0.372498,0.53785,-0.74902,0.892353,0.401039,0.759569,-0.623529,0.79263,0.446956,0.903017,-0.498039,0.682208,0.49954,0.966673,-0.372549,0.56392,0.553082,0.968836,-0.247059,0.442031,0.606396,0.901601,-0.121569,0.305499,0.65701,0.765784,0.00392157,0.197251,0.687914,0.620914,0.129412,0.193882,0.701887,0.472654,0.254902,0.249866,0.706123,0.320005,0.380392,0.35132,0.697417,0.202919,0.505882,0.498097,0.669467,0.125232,0.631373,0.637477,0.626239,0.107431,0.756863,0.762115,0.56872,0.155812,0.882353,0.889434,0.481116,0.240445,1,0.964784,0.400592,0.349549]},{"IndexedColors":[0,0,0,0.8941176470588236,0.1019607843137255,0.1098039215686274,0.2156862745098039,0.4941176470588236,0.7215686274509804,0.3019607843137255,0.6862745098039216,0.2901960784313726,0.596078431372549,0.3058823529411765,0.6392156862745098,1,0.4980392156862745,0,0.6509803921568628,0.3372549019607843,0.1568627450980392],"Name":"Spectrum","NanColor":[0.6509803921568628,0.3372549019607843,0.1568627450980392]},{"IndexedColors":[0.4745098039215686,0.09019607843137255,0.09019607843137255,0.7098039215686275,0.00392156862745098,0.00392156862745098,0.9372549019607843,0.2784313725490196,0.09803921568627451,0.9764705882352941,0.5137254901960784,0.1411764705882353,1,0.7058823529411765,0,1,0.8980392156862745,0.02352941176470588],"Name":"Warm","NanColor":[1,0.8980392156862745,0.02352941176470588]},{"IndexedColors":[0.4588235294117647,0.6941176470588235,0.00392156862745098,0.3450980392156863,0.5019607843137255,0.1607843137254902,0.3137254901960784,0.8431372549019608,0.7490196078431373,0.1098039215686274,0.5843137254901961,0.803921568627451,0.2313725490196079,0.407843137254902,0.6705882352941176,0.6039215686274509,0.407843137254902,1,0.3725490196078431,0.2,0.5019607843137255],"Name":"Cool","NanColor":[0.3725490196078431,0.2,0.5019607843137255]},{"IndexedColors":[0.2313725490196079,0.407843137254902,0.6705882352941176,0.1098039215686274,0.5843137254901961,0.803921568627451,0.3058823529411765,0.8509803921568627,0.9176470588235294,0.4509803921568628,0.6039215686274509,0.8352941176470589,0.2588235294117647,0.2392156862745098,0.6627450980392157,0.3137254901960784,0.3294117647058823,0.5294117647058824,0.06274509803921569,0.1647058823529412,0.3215686274509804],"Name":"Blues","NanColor":[0.06274509803921569,0.1647058823529412,0.3215686274509804]},{"IndexedColors":[0.1098039215686274,0.5843137254901961,0.803921568627451,0.2313725490196079,0.407843137254902,0.6705882352941176,0.4,0.2431372549019608,0.7176470588235294,0.6352941176470588,0.3294117647058823,0.8117647058823529,0.8705882352941177,0.3803921568627451,0.807843137254902,0.8627450980392157,0.3803921568627451,0.5843137254901961,0.2392156862745098,0.06274509803921569,0.3215686274509804],"Name":"Wild Flower","NanColor":[0.2392156862745098,0.06274509803921569,0.3215686274509804]},{"IndexedColors":[0.396078431372549,0.4862745098039216,0.2156862745098039,0.4588235294117647,0.6941176470588235,0.00392156862745098,0.6980392156862745,0.7294117647058823,0.1882352941176471,1,0.8980392156862745,0.02352941176470588,1,0.7058823529411765,0,0.9764705882352941,0.5137254901960784,0.1411764705882353],"Name":"Citrus","NanColor":[0.9764705882352941,0.5137254901960784,0.1411764705882353]},{"IndexedColors":[0.4980392156862745,0.2313725490196079,0.03137254901960784,0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333,0.1764705882352941,0,0.2941176470588235],"Name":"Brewer Diverging Purple-Orange (11)","NanColor":[0.1764705882352941,0,0.2941176470588235]},{"IndexedColors":[0.4980392156862745,0.2313725490196079,0.03137254901960784,0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333,0.1764705882352941,0,0.2941176470588235],"Name":"Brewer Diverging Purple-Orange (10)","NanColor":[0.1764705882352941,0,0.2941176470588235]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (9)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (8)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.9450980392156862,0.6392156862745098,0.2509803921568627,0.996078431372549,0.8784313725490196,0.7137254901960784,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6,0.5568627450980392,0.7647058823529411,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (7)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.9450980392156862,0.6392156862745098,0.2509803921568627,0.996078431372549,0.8784313725490196,0.7137254901960784,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6,0.5568627450980392,0.7647058823529411,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (6)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.9019607843137255,0.3803921568627451,0.00392156862745098,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.3686274509803922,0.2352941176470588,0.6],"Name":"Brewer Diverging Purple-Orange (5)","NanColor":[0.3686274509803922,0.2352941176470588,0.6]},{"IndexedColors":[0.9019607843137255,0.3803921568627451,0.00392156862745098,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.3686274509803922,0.2352941176470588,0.6],"Name":"Brewer Diverging Purple-Orange (4)","NanColor":[0.3686274509803922,0.2352941176470588,0.6]},{"IndexedColors":[0.9450980392156862,0.6392156862745098,0.2509803921568627,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.6,0.5568627450980392,0.7647058823529411],"Name":"Brewer Diverging Purple-Orange (3)","NanColor":[0.6,0.5568627450980392,0.7647058823529411]},{"IndexedColors":[0.6196078431372549,0.00392156862745098,0.2588235294117647,0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,1,1,0.7490196078431373,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353,0.3686274509803922,0.3098039215686275,0.6352941176470588],"Name":"Brewer Diverging Spectral (11)","NanColor":[0.3686274509803922,0.3098039215686275,0.6352941176470588]},{"IndexedColors":[0.6196078431372549,0.00392156862745098,0.2588235294117647,0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353,0.3686274509803922,0.3098039215686275,0.6352941176470588],"Name":"Brewer Diverging Spectral (10)","NanColor":[0.3686274509803922,0.3098039215686275,0.6352941176470588]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,1,1,0.7490196078431373,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (9)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (8)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9882352941176471,0.5529411764705883,0.3490196078431372,0.996078431372549,0.8784313725490196,0.5450980392156862,1,1,0.7490196078431373,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6,0.8352941176470589,0.5803921568627451,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (7)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9882352941176471,0.5529411764705883,0.3490196078431372,0.996078431372549,0.8784313725490196,0.5450980392156862,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6,0.8352941176470589,0.5803921568627451,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (6)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8431372549019608,0.09803921568627451,0.1098039215686274,0.9921568627450981,0.6823529411764706,0.3803921568627451,1,1,0.7490196078431373,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.1686274509803922,0.5137254901960784,0.7294117647058823],"Name":"Brewer Diverging Spectral (5)","NanColor":[0.1686274509803922,0.5137254901960784,0.7294117647058823]},{"IndexedColors":[0.8431372549019608,0.09803921568627451,0.1098039215686274,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.1686274509803922,0.5137254901960784,0.7294117647058823],"Name":"Brewer Diverging Spectral (4)","NanColor":[0.1686274509803922,0.5137254901960784,0.7294117647058823]},{"IndexedColors":[0.9882352941176471,0.5529411764705883,0.3490196078431372,1,1,0.7490196078431373,0.6,0.8352941176470589,0.5803921568627451],"Name":"Brewer Diverging Spectral (3)","NanColor":[0.6,0.8352941176470589,0.5803921568627451]},{"IndexedColors":[0.3294117647058823,0.1882352941176471,0.0196078431372549,0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922,0,0.2352941176470588,0.1882352941176471],"Name":"Brewer Diverging Brown-Blue-Green (11)","NanColor":[0,0.2352941176470588,0.1882352941176471]},{"IndexedColors":[0.3294117647058823,0.1882352941176471,0.0196078431372549,0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922,0,0.2352941176470588,0.1882352941176471],"Name":"Brewer Diverging Brown-Blue-Green (10)","NanColor":[0,0.2352941176470588,0.1882352941176471]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (9)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (8)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.8470588235294118,0.7019607843137254,0.396078431372549,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.3529411764705883,0.7058823529411765,0.6745098039215687,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (7)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.8470588235294118,0.7019607843137254,0.396078431372549,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.3529411764705883,0.7058823529411765,0.6745098039215687,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (6)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.6509803921568628,0.3803921568627451,0.1019607843137255,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.5019607843137255,0.803921568627451,0.7568627450980392,0.00392156862745098,0.5215686274509804,0.4431372549019608],"Name":"Brewer Diverging Brown-Blue-Green (5)","NanColor":[0.00392156862745098,0.5215686274509804,0.4431372549019608]},{"IndexedColors":[0.6509803921568628,0.3803921568627451,0.1019607843137255,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.5019607843137255,0.803921568627451,0.7568627450980392,0.00392156862745098,0.5215686274509804,0.4431372549019608],"Name":"Brewer Diverging Brown-Blue-Green (4)","NanColor":[0.00392156862745098,0.5215686274509804,0.4431372549019608]},{"IndexedColors":[0.8470588235294118,0.7019607843137254,0.396078431372549,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.3529411764705883,0.7058823529411765,0.6745098039215687],"Name":"Brewer Diverging Brown-Blue-Green (3)","NanColor":[0.3529411764705883,0.7058823529411765,0.6745098039215687]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8980392156862745,0.9607843137254902,0.9764705882352941,0.8,0.9254901960784314,0.9019607843137255,0.6,0.8470588235294118,0.788235294117647,0.4,0.7607843137254902,0.6431372549019608,0.2549019607843137,0.6823529411764706,0.4627450980392157,0.1372549019607843,0.5450980392156862,0.2705882352941176,0,0.4274509803921568,0.1725490196078431,0,0.2666666666666667,0.1058823529411765],"Name":"Brewer Sequential Blue-Green (9)","NanColor":[0,0.2666666666666667,0.1058823529411765]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8980392156862745,0.9607843137254902,0.9764705882352941,0.8,0.9254901960784314,0.9019607843137255,0.6,0.8470588235294118,0.788235294117647,0.4,0.7607843137254902,0.6431372549019608,0.2549019607843137,0.6823529411764706,0.4627450980392157,0.1372549019607843,0.5450980392156862,0.2705882352941176,0,0.3450980392156863,0.1411764705882353],"Name":"Brewer Sequential Blue-Green (8)","NanColor":[0,0.3450980392156863,0.1411764705882353]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.8,0.9254901960784314,0.9019607843137255,0.8,0.9254901960784314,0.9019607843137255,0.4,0.7607843137254902,0.6431372549019608,0.2549019607843137,0.6823529411764706,0.4627450980392157,0.1372549019607843,0.5450980392156862,0.2705882352941176,0,0.3450980392156863,0.1411764705882353],"Name":"Brewer Sequential Blue-Green (7)","NanColor":[0,0.3450980392156863,0.1411764705882353]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.8,0.9254901960784314,0.9019607843137255,0.6,0.8470588235294118,0.788235294117647,0.4,0.7607843137254902,0.6431372549019608,0.1725490196078431,0.6352941176470588,0.3725490196078431,0,0.4274509803921568,0.1725490196078431],"Name":"Brewer Sequential Blue-Green (6)","NanColor":[0,0.4274509803921568,0.1725490196078431]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.6980392156862745,0.8862745098039215,0.8862745098039215,0.4,0.7607843137254902,0.6431372549019608,0.1725490196078431,0.6352941176470588,0.3725490196078431,0,0.4274509803921568,0.1725490196078431],"Name":"Brewer Sequential Blue-Green (5)","NanColor":[0,0.4274509803921568,0.1725490196078431]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.6980392156862745,0.8862745098039215,0.8862745098039215,0.4,0.7607843137254902,0.6431372549019608,0.1372549019607843,0.5450980392156862,0.2705882352941176],"Name":"Brewer Sequential Blue-Green (4)","NanColor":[0.1372549019607843,0.5450980392156862,0.2705882352941176]},{"IndexedColors":[0.8980392156862745,0.9607843137254902,0.9764705882352941,0.6,0.8470588235294118,0.788235294117647,0.1725490196078431,0.6352941176470588,0.3725490196078431],"Name":"Brewer Sequential Blue-Green (3)","NanColor":[0.1725490196078431,0.6352941176470588,0.3725490196078431]},{"IndexedColors":[1,1,0.8980392156862745,1,0.9686274509803922,0.7372549019607844,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.9254901960784314,0.4392156862745098,0.0784313725490196,0.8,0.2980392156862745,0.00784313725490196,0.6,0.203921568627451,0.01568627450980392,0.4,0.1450980392156863,0.02352941176470588],"Name":"Brewer Sequential Yellow-Orange-Brown (9)","NanColor":[0.4,0.1450980392156863,0.02352941176470588]},{"IndexedColors":[1,1,0.8980392156862745,1,0.9686274509803922,0.7372549019607844,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.9254901960784314,0.4392156862745098,0.0784313725490196,0.8,0.2980392156862745,0.00784313725490196,0.5490196078431373,0.1764705882352941,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (8)","NanColor":[0.5490196078431373,0.1764705882352941,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.9254901960784314,0.4392156862745098,0.0784313725490196,0.8,0.2980392156862745,0.00784313725490196,0.5490196078431373,0.1764705882352941,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (7)","NanColor":[0.5490196078431373,0.1764705882352941,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.8509803921568627,0.3725490196078431,0.05490196078431372,0.6,0.203921568627451,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (6)","NanColor":[0.6,0.203921568627451,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8509803921568627,0.5568627450980392,0.996078431372549,0.6,0.1607843137254902,0.8509803921568627,0.3725490196078431,0.05490196078431372,0.6,0.203921568627451,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (5)","NanColor":[0.6,0.203921568627451,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8509803921568627,0.5568627450980392,0.996078431372549,0.6,0.1607843137254902,0.8,0.2980392156862745,0.00784313725490196],"Name":"Brewer Sequential Yellow-Orange-Brown (4)","NanColor":[0.8,0.2980392156862745,0.00784313725490196]},{"IndexedColors":[1,0.9686274509803922,0.7372549019607844,0.996078431372549,0.7686274509803922,0.3098039215686275,0.8509803921568627,0.3725490196078431,0.05490196078431372],"Name":"Brewer Sequential Yellow-Orange-Brown (3)","NanColor":[0.8509803921568627,0.3725490196078431,0.05490196078431372]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8784313725490196,0.9254901960784314,0.9568627450980393,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5490196078431373,0.4196078431372549,0.6941176470588235,0.5333333333333333,0.2549019607843137,0.615686274509804,0.5058823529411764,0.05882352941176471,0.4862745098039216,0.3019607843137255,0,0.2941176470588235],"Name":"Brewer Sequential Blue-Purple (9)","NanColor":[0.3019607843137255,0,0.2941176470588235]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8784313725490196,0.9254901960784314,0.9568627450980393,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5490196078431373,0.4196078431372549,0.6941176470588235,0.5333333333333333,0.2549019607843137,0.615686274509804,0.4313725490196079,0.00392156862745098,0.4196078431372549],"Name":"Brewer Sequential Blue-Purple (8)","NanColor":[0.4313725490196079,0.00392156862745098,0.4196078431372549]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5490196078431373,0.4196078431372549,0.6941176470588235,0.5333333333333333,0.2549019607843137,0.615686274509804,0.4313725490196079,0.00392156862745098,0.4196078431372549],"Name":"Brewer Sequential Blue-Purple (7)","NanColor":[0.4313725490196079,0.00392156862745098,0.4196078431372549]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5333333333333333,0.3372549019607843,0.6549019607843137,0.5058823529411764,0.05882352941176471,0.4862745098039216],"Name":"Brewer Sequential Blue-Purple (6)","NanColor":[0.5058823529411764,0.05882352941176471,0.4862745098039216]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7019607843137254,0.803921568627451,0.8901960784313725,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5333333333333333,0.3372549019607843,0.6549019607843137,0.5058823529411764,0.05882352941176471,0.4862745098039216],"Name":"Brewer Sequential Blue-Purple (5)","NanColor":[0.5058823529411764,0.05882352941176471,0.4862745098039216]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7019607843137254,0.803921568627451,0.8901960784313725,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5333333333333333,0.2549019607843137,0.615686274509804],"Name":"Brewer Sequential Blue-Purple (4)","NanColor":[0.5333333333333333,0.2549019607843137,0.615686274509804]},{"IndexedColors":[0.8784313725490196,0.9254901960784314,0.9568627450980393,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5333333333333333,0.3372549019607843,0.6549019607843137],"Name":"Brewer Sequential Blue-Purple (3)","NanColor":[0.5333333333333333,0.3372549019607843,0.6549019607843137]},{"IndexedColors":[0.4980392156862745,0.788235294117647,0.4980392156862745,0.7450980392156863,0.6823529411764706,0.8313725490196079,0.9921568627450981,0.7529411764705882,0.5254901960784314,1,1,0.6,0.2196078431372549,0.4235294117647059,0.6901960784313725,0.9411764705882353,0.00784313725490196,0.4980392156862745,0.7490196078431373,0.3568627450980392,0.09019607843137255,0.4,0.4,0.4],"Name":"Brewer Qualitative Accent","NanColor":[0.4,0.4,0.4]},{"IndexedColors":[0.1058823529411765,0.6196078431372549,0.4666666666666667,0.8509803921568627,0.3725490196078431,0.00784313725490196,0.4588235294117647,0.4392156862745098,0.7019607843137254,0.9058823529411765,0.1607843137254902,0.5411764705882353,0.4,0.6509803921568628,0.1176470588235294,0.9019607843137255,0.6705882352941176,0.00784313725490196,0.6509803921568628,0.4627450980392157,0.1137254901960784,0.4,0.4,0.4],"Name":"Brewer Qualitative Dark2","NanColor":[0.4,0.4,0.4]},{"IndexedColors":[0.4,0.7607843137254902,0.6470588235294118,0.9882352941176471,0.5529411764705883,0.3843137254901961,0.5529411764705883,0.6274509803921569,0.796078431372549,0.9058823529411765,0.5411764705882353,0.7647058823529411,0.6509803921568628,0.8470588235294118,0.3294117647058823,1,0.8509803921568627,0.1843137254901961,0.8980392156862745,0.7686274509803922,0.5803921568627451,0.7019607843137254,0.7019607843137254,0.7019607843137254],"Name":"Brewer Qualitative Set2","NanColor":[0.7019607843137254,0.7019607843137254,0.7019607843137254]},{"IndexedColors":[0.7019607843137254,0.8862745098039215,0.803921568627451,0.9921568627450981,0.803921568627451,0.6745098039215687,0.796078431372549,0.8352941176470589,0.9098039215686274,0.9568627450980393,0.792156862745098,0.8941176470588236,0.9019607843137255,0.9607843137254902,0.788235294117647,1,0.9490196078431372,0.6823529411764706,0.9450980392156862,0.8862745098039215,0.8,0.8,0.8,0.8],"Name":"Brewer Qualitative Pastel2","NanColor":[0.8,0.8,0.8]},{"IndexedColors":[0.984313725490196,0.7058823529411765,0.6823529411764706,0.7019607843137254,0.803921568627451,0.8901960784313725,0.8,0.9215686274509803,0.7725490196078432,0.8705882352941177,0.796078431372549,0.8941176470588236,0.996078431372549,0.8509803921568627,0.6509803921568628,1,1,0.8,0.8980392156862745,0.8470588235294118,0.7411764705882353,0.9921568627450981,0.8549019607843137,0.9254901960784314,0.9490196078431372,0.9490196078431372,0.9490196078431372],"Name":"Brewer Qualitative Pastel1","NanColor":[0.9490196078431372,0.9490196078431372,0.9490196078431372]},{"IndexedColors":[0.8941176470588236,0.1019607843137255,0.1098039215686274,0.2156862745098039,0.4941176470588236,0.7215686274509804,0.3019607843137255,0.6862745098039216,0.2901960784313726,0.596078431372549,0.3058823529411765,0.6392156862745098,1,0.4980392156862745,0,1,1,0.2,0.6509803921568628,0.3372549019607843,0.1568627450980392,0.9686274509803922,0.5058823529411764,0.7490196078431373,0.6,0.6,0.6],"Name":"Brewer Qualitative Set1","NanColor":[0.6,0.6,0.6]},{"IndexedColors":[0.6509803921568628,0.807843137254902,0.8901960784313725,0.1215686274509804,0.4705882352941176,0.7058823529411765,0.6980392156862745,0.8745098039215686,0.5411764705882353,0.2,0.6274509803921569,0.1725490196078431,0.984313725490196,0.6039215686274509,0.6,0.8901960784313725,0.1019607843137255,0.1098039215686274,0.9921568627450981,0.7490196078431373,0.4352941176470588,1,0.4980392156862745,0,0.792156862745098,0.6980392156862745,0.8392156862745098,0.4156862745098039,0.2392156862745098,0.6039215686274509,1,1,0.6],"Name":"Brewer Qualitative Paired","NanColor":[1,1,0.6]},{"IndexedColors":[0.5529411764705883,0.8274509803921568,0.7803921568627451,1,1,0.7019607843137254,0.7450980392156863,0.7294117647058823,0.8549019607843137,0.984313725490196,0.5019607843137255,0.4470588235294118,0.5019607843137255,0.6941176470588235,0.8274509803921568,0.9921568627450981,0.7058823529411765,0.3843137254901961,0.7019607843137254,0.8705882352941177,0.4117647058823529,0.9882352941176471,0.803921568627451,0.8980392156862745,0.8509803921568627,0.8509803921568627,0.8509803921568627,0.7372549019607844,0.5019607843137255,0.7411764705882353,0.8,0.9215686274509803,0.7725490196078432,1,0.9294117647058824,0.4352941176470588],"Name":"Brewer Qualitative Set3","NanColor":[1,0.9294117647058824,0.4352941176470588]},{"IndexedColors":[1,0,0,1,0.862745,0,0,0.695201,0],"Name":"Traffic Lights","NanColor":[0.803922,0,0.803922]},{"IndexedColors":[0.908659,0.604013,0.581857,1,0.862745,0,0,0.695201,0],"Name":"Traffic Lights For Deuteranopes","NanColor":[0.803922,0,0.803922]},{"IndexedColors":[0.4196078431372549,0,0.07058823529411765,0.9019607843137255,0.9411764705882353,0.0196078431372549,0.01568627450980392,0.6196078431372549,0.00784313725490196],"Name":"Traffic Lights For Deuteranopes 2","NanColor":[0.803922,0,0.803922]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Muted Blue-Green","NanColor":[0.25,0,0],"RGBPoints":[0,0.109804,0.27451,0.301961,0.02,0.129412,0.309804,0.341176,0.05,0.14902,0.341176,0.380392,0.1,0.188235,0.403922,0.458824,0.15,0.227451,0.447059,0.521569,0.2,0.290196,0.494118,0.588235,0.25,0.368627,0.552941,0.670588,0.3,0.458824,0.619608,0.74902,0.35,0.588235,0.713725,0.85098,0.4,0.72549,0.815686,0.941176,0.45,0.831373,0.882353,0.980392,0.475,0.909804,0.933333,1,0.5,0.980392,0.984314,1,0.5,0.996078,1,0.94902,0.5,1,1,0.980392,0.5,0.980392,0.984314,1,0.525,0.972549,0.988235,0.890196,0.55,0.917647,0.960784,0.835294,0.6,0.835294,0.921569,0.772549,0.65,0.768627,0.901961,0.737255,0.7,0.670588,0.831373,0.654902,0.75,0.576471,0.760784,0.584314,0.8,0.498039,0.678431,0.521569,0.85,0.392157,0.560784,0.427451,0.9,0.294118,0.45098,0.333333,0.95,0.211765,0.34902,0.254902,1,0.152941,0.278431,0.196078]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Green-Blue Asymmetric Divergent (62Blbc)","NanColor":[0.25,0,0],"RGBPoints":[0,0.121569,0.2,0.145098,0.05,0.196078,0.301961,0.223529,0.1,0.258824,0.4,0.278431,0.2,0.341176,0.54902,0.341176,0.25,0.419608,0.619608,0.376471,0.3,0.545098,0.701961,0.392157,0.35,0.643137,0.780392,0.403922,0.4,0.729412,0.819608,0.45098,0.45,0.811765,0.870588,0.521569,0.5,0.898039,0.909804,0.564706,0.55,0.941176,0.92549,0.686275,0.6,0.960784,0.94902,0.776471,0.64,1,1,1,0.65,0.890196,0.988235,0.972549,0.7,0.721569,0.894118,0.901961,0.75,0.631373,0.823529,0.839216,0.8,0.517647,0.662745,0.701961,0.85,0.384314,0.494118,0.54902,0.9,0.298039,0.360784,0.45098,0.95,0.223529,0.25098,0.34902,0.99,0.156863,0.172549,0.25098,1,0.137255,0.137255,0.188235]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Asymmtrical Earth Tones (6_21b)","NanColor":[0.25,0,0],"RGBPoints":[0,0.141176,0.14902,0.2,0.05,0.215686,0.258824,0.321569,0.1,0.243137,0.368627,0.380392,0.15,0.27451,0.439216,0.4,0.2,0.32549,0.501961,0.384314,0.25,0.403922,0.6,0.419608,0.3,0.486275,0.701961,0.454902,0.35,0.556863,0.74902,0.494118,0.4,0.670588,0.8,0.545098,0.5,0.854902,0.901961,0.631373,0.55,0.92549,0.941176,0.694118,0.6,0.960784,0.94902,0.776471,0.65,0.988235,0.968627,0.909804,0.7,0.839216,0.815686,0.772549,0.75,0.701961,0.662745,0.615686,0.8,0.6,0.529412,0.478431,0.85,0.501961,0.403922,0.360784,0.9,0.439216,0.313725,0.290196,1,0.301961,0.164706,0.176471]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Yellow 15","NanColor":[0.25,0,0],"RGBPoints":[0,1,1,0.988235,0.002,1,1,0.988235,0.05,0.984314,0.988235,0.843137,0.1,0.988235,0.988235,0.741176,0.15,0.980392,0.968627,0.654902,0.2,0.980392,0.945098,0.576471,0.25,0.968627,0.905882,0.486275,0.3,0.968627,0.862745,0.388235,0.35,0.960784,0.803922,0.286275,0.4,0.94902,0.741176,0.219608,0.45,0.941176,0.678431,0.14902,0.5,0.929412,0.607843,0.094118,0.55,0.921569,0.545098,0.054902,0.6,0.909804,0.486275,0.035294,0.65,0.890196,0.411765,0.019608,0.7,0.8,0.305882,0,0.75,0.760784,0.239216,0,0.8,0.678431,0.180392,0.011765,0.85,0.6,0.121569,0.023529,0.9,0.501961,0.054902,0.031373,0.95,0.4,0.039216,0.058824,1,0.301961,0.047059,0.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,0.001462,0.000466,0.013866,0.003922,0.002258,0.001295,0.018331,0.007843,0.003279,0.002305,0.023708,0.011765,0.004512,0.00349,0.029965,0.015686,0.00595,0.004843,0.03713,0.019608,0.007588,0.006356,0.044973,0.023529,0.009426,0.008022,0.052844,0.027451,0.011465,0.009828,0.06075,0.031373,0.013708,0.011771,0.068667,0.035294,0.016156,0.01384,0.076603,0.039216,0.018815,0.016026,0.084584,0.043137,0.021692,0.01832,0.09261,0.047059,0.024792,0.020715,0.100676,0.05098,0.028123,0.023201,0.108787,0.054902,0.031696,0.025765,0.116965,0.058824,0.03552,0.028397,0.125209,0.062745,0.039608,0.03109,0.133515,0.066667,0.04383,0.03383,0.141886,0.070588,0.048062,0.036607,0.150327,0.07451,0.05232,0.039407,0.158841,0.078431,0.056615,0.04216,0.167446,0.082353,0.060949,0.044794,0.176129,0.086275,0.06533,0.047318,0.184892,0.090196,0.069764,0.049726,0.193735,0.094118,0.074257,0.052017,0.20266,0.098039,0.078815,0.054184,0.211667,0.101961,0.083446,0.056225,0.220755,0.105882,0.088155,0.058133,0.229922,0.109804,0.092949,0.059904,0.239164,0.113725,0.097833,0.061531,0.248477,0.117647,0.102815,0.06301,0.257854,0.121569,0.107899,0.064335,0.267289,0.12549,0.113094,0.065492,0.276784,0.129412,0.118405,0.066479,0.286321,0.133333,0.123833,0.067295,0.295879,0.137255,0.12938,0.067935,0.305443,0.141176,0.135053,0.068391,0.315,0.145098,0.140858,0.068654,0.324538,0.14902,0.146785,0.068738,0.334011,0.152941,0.152839,0.068637,0.343404,0.156863,0.159018,0.068354,0.352688,0.160784,0.165308,0.067911,0.361816,0.164706,0.171713,0.067305,0.370771,0.168627,0.178212,0.066576,0.379497,0.172549,0.184801,0.065732,0.387973,0.176471,0.19146,0.064818,0.396152,0.180392,0.198177,0.063862,0.404009,0.184314,0.204935,0.062907,0.411514,0.188235,0.211718,0.061992,0.418647,0.192157,0.218512,0.061158,0.425392,0.196078,0.225302,0.060445,0.431742,0.2,0.232077,0.059889,0.437695,0.203922,0.238826,0.059517,0.443256,0.207843,0.245543,0.059352,0.448436,0.211765,0.25222,0.059415,0.453248,0.215686,0.258857,0.059706,0.45771,0.219608,0.265447,0.060237,0.46184,0.223529,0.271994,0.060994,0.46566,0.227451,0.278493,0.061978,0.46919,0.231373,0.284951,0.063168,0.472451,0.235294,0.291366,0.064553,0.475462,0.239216,0.29774,0.066117,0.478243,0.243137,0.304081,0.067835,0.480812,0.247059,0.310382,0.069702,0.483186,0.25098,0.316654,0.07169,0.48538,0.254902,0.322899,0.073782,0.487408,0.258824,0.329114,0.075972,0.489287,0.262745,0.335308,0.078236,0.491024,0.266667,0.341482,0.080564,0.492631,0.270588,0.347636,0.082946,0.494121,0.27451,0.353773,0.085373,0.495501,0.278431,0.359898,0.087831,0.496778,0.282353,0.366012,0.090314,0.49796,0.286275,0.372116,0.092816,0.499053,0.290196,0.378211,0.095332,0.500067,0.294118,0.384299,0.097855,0.501002,0.298039,0.390384,0.100379,0.501864,0.301961,0.396467,0.102902,0.502658,0.305882,0.402548,0.10542,0.503386,0.309804,0.408629,0.10793,0.504052,0.313725,0.414709,0.110431,0.504662,0.317647,0.420791,0.11292,0.505215,0.321569,0.426877,0.115395,0.505714,0.32549,0.432967,0.117855,0.50616,0.329412,0.439062,0.120298,0.506555,0.333333,0.445163,0.122724,0.506901,0.337255,0.451271,0.125132,0.507198,0.341176,0.457386,0.127522,0.507448,0.345098,0.463508,0.129893,0.507652,0.34902,0.46964,0.132245,0.507809,0.352941,0.47578,0.134577,0.507921,0.356863,0.481929,0.136891,0.507989,0.360784,0.488088,0.139186,0.508011,0.364706,0.494258,0.141462,0.507988,0.368627,0.500438,0.143719,0.50792,0.372549,0.506629,0.145958,0.507806,0.376471,0.512831,0.148179,0.507648,0.380392,0.519045,0.150383,0.507443,0.384314,0.52527,0.152569,0.507192,0.388235,0.531507,0.154739,0.506895,0.392157,0.537755,0.156894,0.506551,0.396078,0.544015,0.159033,0.506159,0.4,0.550287,0.161158,0.505719,0.403922,0.556571,0.163269,0.50523,0.407843,0.562866,0.165368,0.504692,0.411765,0.569172,0.167454,0.504105,0.415686,0.57549,0.16953,0.503466,0.419608,0.581819,0.171596,0.502777,0.423529,0.588158,0.173652,0.502035,0.427451,0.594508,0.175701,0.501241,0.431373,0.600868,0.177743,0.500394,0.435294,0.607238,0.179779,0.499492,0.439216,0.613617,0.181811,0.498536,0.443137,0.620005,0.18384,0.497524,0.447059,0.626401,0.185867,0.496456,0.45098,0.632805,0.187893,0.495332,0.454902,0.639216,0.189921,0.49415,0.458824,0.645633,0.191952,0.49291,0.462745,0.652056,0.193986,0.491611,0.466667,0.658483,0.196027,0.490253,0.470588,0.664915,0.198075,0.488836,0.47451,0.671349,0.200133,0.487358,0.478431,0.677786,0.202203,0.485819,0.482353,0.684224,0.204286,0.484219,0.486275,0.690661,0.206384,0.482558,0.490196,0.697098,0.208501,0.480835,0.494118,0.703532,0.210638,0.479049,0.498039,0.709962,0.212797,0.477201,0.501961,0.716387,0.214982,0.47529,0.505882,0.722805,0.217194,0.473316,0.509804,0.729216,0.219437,0.471279,0.513725,0.735616,0.221713,0.46918,0.517647,0.742004,0.224025,0.467018,0.521569,0.748378,0.226377,0.464794,0.52549,0.754737,0.228772,0.462509,0.529412,0.761077,0.231214,0.460162,0.533333,0.767398,0.233705,0.457755,0.537255,0.773695,0.236249,0.455289,0.541176,0.779968,0.238851,0.452765,0.545098,0.786212,0.241514,0.450184,0.54902,0.792427,0.244242,0.447543,0.552941,0.798608,0.24704,0.444848,0.556863,0.804752,0.249911,0.442102,0.560784,0.810855,0.252861,0.439305,0.564706,0.816914,0.255895,0.436461,0.568627,0.822926,0.259016,0.433573,0.572549,0.828886,0.262229,0.430644,0.576471,0.834791,0.26554,0.427671,0.580392,0.840636,0.268953,0.424666,0.584314,0.846416,0.272473,0.421631,0.588235,0.852126,0.276106,0.418573,0.592157,0.857763,0.279857,0.415496,0.596078,0.86332,0.283729,0.412403,0.6,0.868793,0.287728,0.409303,0.603922,0.874176,0.291859,0.406205,0.607843,0.879464,0.296125,0.403118,0.611765,0.884651,0.30053,0.400047,0.615686,0.889731,0.305079,0.397002,0.619608,0.8947,0.309773,0.393995,0.623529,0.899552,0.314616,0.391037,0.627451,0.904281,0.31961,0.388137,0.631373,0.908884,0.324755,0.385308,0.635294,0.913354,0.330052,0.382563,0.639216,0.917689,0.3355,0.379915,0.643137,0.921884,0.341098,0.377376,0.647059,0.925937,0.346844,0.374959,0.65098,0.929845,0.352734,0.372677,0.654902,0.933606,0.358764,0.370541,0.658824,0.937221,0.364929,0.368567,0.662745,0.940687,0.371224,0.366762,0.666667,0.944006,0.377643,0.365136,0.670588,0.94718,0.384178,0.363701,0.67451,0.95021,0.39082,0.362468,0.678431,0.953099,0.397563,0.361438,0.682353,0.955849,0.4044,0.360619,0.686275,0.958464,0.411324,0.360014,0.690196,0.960949,0.418323,0.35963,0.694118,0.96331,0.42539,0.359469,0.698039,0.965549,0.432519,0.359529,0.701961,0.967671,0.439703,0.35981,0.705882,0.96968,0.446936,0.360311,0.709804,0.971582,0.45421,0.36103,0.713725,0.973381,0.46152,0.361965,0.717647,0.975082,0.468861,0.363111,0.721569,0.97669,0.476226,0.364466,0.72549,0.97821,0.483612,0.366025,0.729412,0.979645,0.491014,0.367783,0.733333,0.981,0.498428,0.369734,0.737255,0.982279,0.505851,0.371874,0.741176,0.983485,0.51328,0.374198,0.745098,0.984622,0.520713,0.376698,0.74902,0.985693,0.528148,0.379371,0.752941,0.9867,0.535582,0.38221,0.756863,0.987646,0.543015,0.38521,0.760784,0.988533,0.550446,0.388365,0.764706,0.989363,0.557873,0.391671,0.768627,0.990138,0.565296,0.395122,0.772549,0.990871,0.572706,0.398714,0.776471,0.991558,0.580107,0.402441,0.780392,0.992196,0.587502,0.406299,0.784314,0.992785,0.594891,0.410283,0.788235,0.993326,0.602275,0.41439,0.792157,0.993834,0.609644,0.418613,0.796078,0.994309,0.616999,0.42295,0.8,0.994738,0.62435,0.427397,0.803922,0.995122,0.631696,0.431951,0.807843,0.99548,0.639027,0.436607,0.811765,0.99581,0.646344,0.441361,0.815686,0.996096,0.653659,0.446213,0.819608,0.996341,0.660969,0.45116,0.823529,0.99658,0.668256,0.456192,0.827451,0.996775,0.675541,0.461314,0.831373,0.996925,0.682828,0.466526,0.835294,0.997077,0.690088,0.471811,0.839216,0.997186,0.697349,0.477182,0.843137,0.997254,0.704611,0.482635,0.847059,0.997325,0.711848,0.488154,0.85098,0.997351,0.719089,0.493755,0.854902,0.997351,0.726324,0.499428,0.858824,0.997341,0.733545,0.505167,0.862745,0.997285,0.740772,0.510983,0.866667,0.997228,0.747981,0.516859,0.870588,0.997138,0.75519,0.522806,0.87451,0.997019,0.762398,0.528821,0.878431,0.996898,0.769591,0.534892,0.882353,0.996727,0.776795,0.541039,0.886275,0.996571,0.783977,0.547233,0.890196,0.996369,0.791167,0.553499,0.894118,0.996162,0.798348,0.55982,0.898039,0.995932,0.805527,0.566202,0.901961,0.99568,0.812706,0.572645,0.905882,0.995424,0.819875,0.57914,0.909804,0.995131,0.827052,0.585701,0.913725,0.994851,0.834213,0.592307,0.917647,0.994524,0.841387,0.598983,0.921569,0.994222,0.84854,0.605696,0.92549,0.993866,0.855711,0.612482,0.929412,0.993545,0.862859,0.619299,0.933333,0.99317,0.870024,0.626189,0.937255,0.992831,0.877168,0.633109,0.941176,0.99244,0.88433,0.640099,0.945098,0.992089,0.89147,0.647116,0.94902,0.991688,0.898627,0.654202,0.952941,0.991332,0.905763,0.661309,0.956863,0.99093,0.912915,0.668481,0.960784,0.99057,0.920049,0.675675,0.964706,0.990175,0.927196,0.682926,0.968627,0.989815,0.934329,0.690198,0.972549,0.989434,0.94147,0.697519,0.976471,0.989077,0.948604,0.704863,0.980392,0.988717,0.955742,0.712242,0.984314,0.988367,0.962878,0.719649,0.988235,0.988033,0.970012,0.727077,0.992157,0.987691,0.977154,0.734536,0.996078,0.987387,0.984288,0.742002,1,0.987053,0.991438,0.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,0.001462,0.000466,0.013866,0.003922,0.002267,0.00127,0.01857,0.007843,0.003299,0.002249,0.024239,0.011765,0.004547,0.003392,0.030909,0.015686,0.006006,0.004692,0.038558,0.019608,0.007676,0.006136,0.046836,0.023529,0.009561,0.007713,0.055143,0.027451,0.011663,0.009417,0.06346,0.031373,0.013995,0.011225,0.071862,0.035294,0.016561,0.013136,0.080282,0.039216,0.019373,0.015133,0.088767,0.043137,0.022447,0.017199,0.097327,0.047059,0.025793,0.019331,0.10593,0.05098,0.029432,0.021503,0.114621,0.054902,0.033385,0.023702,0.123397,0.058824,0.037668,0.025921,0.132232,0.062745,0.042253,0.028139,0.141141,0.066667,0.046915,0.030324,0.150164,0.070588,0.051644,0.032474,0.159254,0.07451,0.056449,0.034569,0.168414,0.078431,0.06134,0.03659,0.177642,0.082353,0.066331,0.038504,0.186962,0.086275,0.071429,0.040294,0.196354,0.090196,0.076637,0.041905,0.205799,0.094118,0.081962,0.043328,0.215289,0.098039,0.087411,0.044556,0.224813,0.101961,0.09299,0.045583,0.234358,0.105882,0.098702,0.046402,0.243904,0.109804,0.104551,0.047008,0.25343,0.113725,0.110536,0.047399,0.262912,0.117647,0.116656,0.047574,0.272321,0.121569,0.122908,0.047536,0.281624,0.12549,0.129285,0.047293,0.290788,0.129412,0.135778,0.046856,0.299776,0.133333,0.142378,0.046242,0.308553,0.137255,0.149073,0.045468,0.317085,0.141176,0.15585,0.044559,0.325338,0.145098,0.162689,0.043554,0.333277,0.14902,0.169575,0.042489,0.340874,0.152941,0.176493,0.041402,0.348111,0.156863,0.183429,0.040329,0.354971,0.160784,0.190367,0.039309,0.361447,0.164706,0.197297,0.0384,0.367535,0.168627,0.204209,0.037632,0.373238,0.172549,0.211095,0.03703,0.378563,0.176471,0.217949,0.036615,0.383522,0.180392,0.224763,0.036405,0.388129,0.184314,0.231538,0.036405,0.3924,0.188235,0.238273,0.036621,0.396353,0.192157,0.244967,0.037055,0.400007,0.196078,0.25162,0.037705,0.403378,0.2,0.258234,0.038571,0.406485,0.203922,0.26481,0.039647,0.409345,0.207843,0.271347,0.040922,0.411976,0.211765,0.27785,0.042353,0.414392,0.215686,0.284321,0.043933,0.416608,0.219608,0.290763,0.045644,0.418637,0.223529,0.297178,0.04747,0.420491,0.227451,0.303568,0.049396,0.422182,0.231373,0.309935,0.051407,0.423721,0.235294,0.316282,0.05349,0.425116,0.239216,0.32261,0.055634,0.426377,0.243137,0.328921,0.057827,0.427511,0.247059,0.335217,0.06006,0.428524,0.25098,0.3415,0.062325,0.429425,0.254902,0.347771,0.064616,0.430217,0.258824,0.354032,0.066925,0.430906,0.262745,0.360284,0.069247,0.431497,0.266667,0.366529,0.071579,0.431994,0.270588,0.372768,0.073915,0.4324,0.27451,0.379001,0.076253,0.432719,0.278431,0.385228,0.078591,0.432955,0.282353,0.391453,0.080927,0.433109,0.286275,0.397674,0.083257,0.433183,0.290196,0.403894,0.08558,0.433179,0.294118,0.410113,0.087896,0.433098,0.298039,0.416331,0.090203,0.432943,0.301961,0.422549,0.092501,0.432714,0.305882,0.428768,0.09479,0.432412,0.309804,0.434987,0.097069,0.432039,0.313725,0.441207,0.099338,0.431594,0.317647,0.447428,0.101597,0.43108,0.321569,0.453651,0.103848,0.430498,0.32549,0.459875,0.106089,0.429846,0.329412,0.4661,0.108322,0.429125,0.333333,0.472328,0.110547,0.428334,0.337255,0.478558,0.112764,0.427475,0.341176,0.484789,0.114974,0.426548,0.345098,0.491022,0.117179,0.425552,0.34902,0.497257,0.119379,0.424488,0.352941,0.503493,0.121575,0.423356,0.356863,0.50973,0.123769,0.422156,0.360784,0.515967,0.12596,0.420887,0.364706,0.522206,0.12815,0.419549,0.368627,0.528444,0.130341,0.418142,0.372549,0.534683,0.132534,0.416667,0.376471,0.54092,0.134729,0.415123,0.380392,0.547157,0.136929,0.413511,0.384314,0.553392,0.139134,0.411829,0.388235,0.559624,0.141346,0.410078,0.392157,0.565854,0.143567,0.408258,0.396078,0.572081,0.145797,0.406369,0.4,0.578304,0.148039,0.404411,0.403922,0.584521,0.150294,0.402385,0.407843,0.590734,0.152563,0.40029,0.411765,0.59694,0.154848,0.398125,0.415686,0.603139,0.157151,0.395891,0.419608,0.60933,0.159474,0.393589,0.423529,0.615513,0.161817,0.391219,0.427451,0.621685,0.164184,0.388781,0.431373,0.627847,0.166575,0.386276,0.435294,0.633998,0.168992,0.383704,0.439216,0.640135,0.171438,0.381065,0.443137,0.64626,0.173914,0.378359,0.447059,0.652369,0.176421,0.375586,0.45098,0.658463,0.178962,0.372748,0.454902,0.66454,0.181539,0.369846,0.458824,0.670599,0.184153,0.366879,0.462745,0.676638,0.186807,0.363849,0.466667,0.682656,0.189501,0.360757,0.470588,0.688653,0.192239,0.357603,0.47451,0.694627,0.195021,0.354388,0.478431,0.700576,0.197851,0.351113,0.482353,0.7065,0.200728,0.347777,0.486275,0.712396,0.203656,0.344383,0.490196,0.718264,0.206636,0.340931,0.494118,0.724103,0.20967,0.337424,0.498039,0.729909,0.212759,0.333861,0.501961,0.735683,0.215906,0.330245,0.505882,0.741423,0.219112,0.326576,0.509804,0.747127,0.222378,0.322856,0.513725,0.752794,0.225706,0.319085,0.517647,0.758422,0.229097,0.315266,0.521569,0.76401,0.232554,0.311399,0.52549,0.769556,0.236077,0.307485,0.529412,0.775059,0.239667,0.303526,0.533333,0.780517,0.243327,0.299523,0.537255,0.785929,0.247056,0.295477,0.541176,0.791293,0.250856,0.29139,0.545098,0.796607,0.254728,0.287264,0.54902,0.801871,0.258674,0.283099,0.552941,0.807082,0.262692,0.278898,0.556863,0.812239,0.266786,0.274661,0.560784,0.817341,0.270954,0.27039,0.564706,0.822386,0.275197,0.266085,0.568627,0.827372,0.279517,0.26175,0.572549,0.832299,0.283913,0.257383,0.576471,0.837165,0.288385,0.252988,0.580392,0.841969,0.292933,0.248564,0.584314,0.846709,0.297559,0.244113,0.588235,0.851384,0.30226,0.239636,0.592157,0.855992,0.307038,0.235133,0.596078,0.860533,0.311892,0.230606,0.6,0.865006,0.316822,0.226055,0.603922,0.869409,0.321827,0.221482,0.607843,0.873741,0.326906,0.216886,0.611765,0.878001,0.33206,0.212268,0.615686,0.882188,0.337287,0.207628,0.619608,0.886302,0.342586,0.202968,0.623529,0.890341,0.347957,0.198286,0.627451,0.894305,0.353399,0.193584,0.631373,0.898192,0.358911,0.18886,0.635294,0.902003,0.364492,0.184116,0.639216,0.905735,0.37014,0.17935,0.643137,0.90939,0.375856,0.174563,0.647059,0.912966,0.381636,0.169755,0.65098,0.916462,0.387481,0.164924,0.654902,0.919879,0.393389,0.16007,0.658824,0.923215,0.399359,0.155193,0.662745,0.92647,0.405389,0.150292,0.666667,0.929644,0.411479,0.145367,0.670588,0.932737,0.417627,0.140417,0.67451,0.935747,0.423831,0.13544,0.678431,0.938675,0.430091,0.130438,0.682353,0.941521,0.436405,0.125409,0.686275,0.944285,0.442772,0.120354,0.690196,0.946965,0.449191,0.115272,0.694118,0.949562,0.45566,0.110164,0.698039,0.952075,0.462178,0.105031,0.701961,0.954506,0.468744,0.099874,0.705882,0.956852,0.475356,0.094695,0.709804,0.959114,0.482014,0.089499,0.713725,0.961293,0.488716,0.084289,0.717647,0.963387,0.495462,0.079073,0.721569,0.965397,0.502249,0.073859,0.72549,0.967322,0.509078,0.068659,0.729412,0.969163,0.515946,0.063488,0.733333,0.970919,0.522853,0.058367,0.737255,0.97259,0.529798,0.053324,0.741176,0.974176,0.53678,0.048392,0.745098,0.975677,0.543798,0.043618,0.74902,0.977092,0.55085,0.03905,0.752941,0.978422,0.557937,0.034931,0.756863,0.979666,0.565057,0.031409,0.760784,0.980824,0.572209,0.028508,0.764706,0.981895,0.579392,0.02625,0.768627,0.982881,0.586606,0.024661,0.772549,0.983779,0.593849,0.02377,0.776471,0.984591,0.601122,0.023606,0.780392,0.985315,0.608422,0.024202,0.784314,0.985952,0.61575,0.025592,0.788235,0.986502,0.623105,0.027814,0.792157,0.986964,0.630485,0.030908,0.796078,0.987337,0.63789,0.034916,0.8,0.987622,0.64532,0.039886,0.803922,0.987819,0.652773,0.045581,0.807843,0.987926,0.66025,0.05175,0.811765,0.987945,0.667748,0.058329,0.815686,0.987874,0.675267,0.065257,0.819608,0.987714,0.682807,0.072489,0.823529,0.987464,0.690366,0.07999,0.827451,0.987124,0.697944,0.087731,0.831373,0.986694,0.70554,0.095694,0.835294,0.986175,0.713153,0.103863,0.839216,0.985566,0.720782,0.112229,0.843137,0.984865,0.728427,0.120785,0.847059,0.984075,0.736087,0.129527,0.85098,0.983196,0.743758,0.138453,0.854902,0.982228,0.751442,0.147565,0.858824,0.981173,0.759135,0.156863,0.862745,0.980032,0.766837,0.166353,0.866667,0.978806,0.774545,0.176037,0.870588,0.977497,0.782258,0.185923,0.87451,0.976108,0.789974,0.196018,0.878431,0.974638,0.797692,0.206332,0.882353,0.973088,0.805409,0.216877,0.886275,0.971468,0.813122,0.227658,0.890196,0.969783,0.820825,0.238686,0.894118,0.968041,0.828515,0.249972,0.898039,0.966243,0.836191,0.261534,0.901961,0.964394,0.843848,0.273391,0.905882,0.962517,0.851476,0.285546,0.909804,0.960626,0.859069,0.29801,0.913725,0.95872,0.866624,0.31082,0.917647,0.956834,0.874129,0.323974,0.921569,0.954997,0.881569,0.337475,0.92549,0.953215,0.888942,0.351369,0.929412,0.951546,0.896226,0.365627,0.933333,0.950018,0.903409,0.380271,0.937255,0.948683,0.910473,0.395289,0.941176,0.947594,0.917399,0.410665,0.945098,0.946809,0.924168,0.426373,0.94902,0.946392,0.930761,0.442367,0.952941,0.946403,0.937159,0.458592,0.956863,0.946903,0.943348,0.47497,0.960784,0.947937,0.949318,0.491426,0.964706,0.949545,0.955063,0.50786,0.968627,0.95174,0.960587,0.524203,0.972549,0.954529,0.965896,0.540361,0.976471,0.957896,0.971003,0.556275,0.980392,0.961812,0.975924,0.571925,0.984314,0.966249,0.980678,0.587206,0.988235,0.971162,0.985282,0.602154,0.992157,0.976511,0.989753,0.61676,0.996078,0.982257,0.994109,0.631017,1,0.988362,0.998364,0.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,0.050383,0.029803,0.527975,0.003922,0.063536,0.028426,0.533124,0.007843,0.075353,0.027206,0.538007,0.011765,0.086222,0.026125,0.542658,0.015686,0.096379,0.025165,0.547103,0.019608,0.10598,0.024309,0.551368,0.023529,0.115124,0.023556,0.555468,0.027451,0.123903,0.022878,0.559423,0.031373,0.132381,0.022258,0.56325,0.035294,0.140603,0.021687,0.566959,0.039216,0.148607,0.021154,0.570562,0.043137,0.156421,0.020651,0.574065,0.047059,0.16407,0.020171,0.577478,0.05098,0.171574,0.019706,0.580806,0.054902,0.17895,0.019252,0.584054,0.058824,0.186213,0.018803,0.587228,0.062745,0.193374,0.018354,0.59033,0.066667,0.200445,0.017902,0.593364,0.070588,0.207435,0.017442,0.596333,0.07451,0.21435,0.016973,0.599239,0.078431,0.221197,0.016497,0.602083,0.082353,0.227983,0.016007,0.604867,0.086275,0.234715,0.015502,0.607592,0.090196,0.241396,0.014979,0.610259,0.094118,0.248032,0.014439,0.612868,0.098039,0.254627,0.013882,0.615419,0.101961,0.261183,0.013308,0.617911,0.105882,0.267703,0.012716,0.620346,0.109804,0.274191,0.012109,0.622722,0.113725,0.280648,0.011488,0.625038,0.117647,0.287076,0.010855,0.627295,0.121569,0.293478,0.010213,0.62949,0.12549,0.299855,0.009561,0.631624,0.129412,0.30621,0.008902,0.633694,0.133333,0.312543,0.008239,0.6357,0.137255,0.318856,0.007576,0.63764,0.141176,0.32515,0.006915,0.639512,0.145098,0.331426,0.006261,0.641316,0.14902,0.337683,0.005618,0.643049,0.152941,0.343925,0.004991,0.64471,0.156863,0.35015,0.004382,0.646298,0.160784,0.356359,0.003798,0.64781,0.164706,0.362553,0.003243,0.649245,0.168627,0.368733,0.002724,0.650601,0.172549,0.374897,0.002245,0.651876,0.176471,0.381047,0.001814,0.653068,0.180392,0.387183,0.001434,0.654177,0.184314,0.393304,0.001114,0.655199,0.188235,0.399411,0.000859,0.656133,0.192157,0.405503,0.000678,0.656977,0.196078,0.41158,0.000577,0.65773,0.2,0.417642,0.000564,0.65839,0.203922,0.423689,0.000646,0.658956,0.207843,0.429719,0.000831,0.659425,0.211765,0.435734,0.001127,0.659797,0.215686,0.441732,0.00154,0.660069,0.219608,0.447714,0.00208,0.66024,0.223529,0.453677,0.002755,0.66031,0.227451,0.459623,0.003574,0.660277,0.231373,0.46555,0.004545,0.660139,0.235294,0.471457,0.005678,0.659897,0.239216,0.477344,0.00698,0.659549,0.243137,0.48321,0.00846,0.659095,0.247059,0.489055,0.010127,0.658534,0.25098,0.494877,0.01199,0.657865,0.254902,0.500678,0.014055,0.657088,0.258824,0.506454,0.016333,0.656202,0.262745,0.512206,0.018833,0.655209,0.266667,0.517933,0.021563,0.654109,0.270588,0.523633,0.024532,0.652901,0.27451,0.529306,0.027747,0.651586,0.278431,0.534952,0.031217,0.650165,0.282353,0.54057,0.03495,0.64864,0.286275,0.546157,0.038954,0.64701,0.290196,0.551715,0.043136,0.645277,0.294118,0.557243,0.047331,0.643443,0.298039,0.562738,0.051545,0.641509,0.301961,0.568201,0.055778,0.639477,0.305882,0.573632,0.060028,0.637349,0.309804,0.579029,0.064296,0.635126,0.313725,0.584391,0.068579,0.632812,0.317647,0.589719,0.072878,0.630408,0.321569,0.595011,0.07719,0.627917,0.32549,0.600266,0.081516,0.625342,0.329412,0.605485,0.085854,0.622686,0.333333,0.610667,0.090204,0.619951,0.337255,0.615812,0.094564,0.61714,0.341176,0.620919,0.098934,0.614257,0.345098,0.625987,0.103312,0.611305,0.34902,0.631017,0.107699,0.608287,0.352941,0.636008,0.112092,0.605205,0.356863,0.640959,0.116492,0.602065,0.360784,0.645872,0.120898,0.598867,0.364706,0.650746,0.125309,0.595617,0.368627,0.65558,0.129725,0.592317,0.372549,0.660374,0.134144,0.588971,0.376471,0.665129,0.138566,0.585582,0.380392,0.669845,0.142992,0.582154,0.384314,0.674522,0.147419,0.578688,0.388235,0.67916,0.151848,0.575189,0.392157,0.683758,0.156278,0.57166,0.396078,0.688318,0.160709,0.568103,0.4,0.69284,0.165141,0.564522,0.403922,0.697324,0.169573,0.560919,0.407843,0.701769,0.174005,0.557296,0.411765,0.706178,0.178437,0.553657,0.415686,0.710549,0.182868,0.550004,0.419608,0.714883,0.187299,0.546338,0.423529,0.719181,0.191729,0.542663,0.427451,0.723444,0.196158,0.538981,0.431373,0.72767,0.200586,0.535293,0.435294,0.731862,0.205013,0.531601,0.439216,0.736019,0.209439,0.527908,0.443137,0.740143,0.213864,0.524216,0.447059,0.744232,0.218288,0.520524,0.45098,0.748289,0.222711,0.516834,0.454902,0.752312,0.227133,0.513149,0.458824,0.756304,0.231555,0.509468,0.462745,0.760264,0.235976,0.505794,0.466667,0.764193,0.240396,0.502126,0.470588,0.76809,0.244817,0.498465,0.47451,0.771958,0.249237,0.494813,0.478431,0.775796,0.253658,0.491171,0.482353,0.779604,0.258078,0.487539,0.486275,0.783383,0.2625,0.483918,0.490196,0.787133,0.266922,0.480307,0.494118,0.790855,0.271345,0.476706,0.498039,0.794549,0.27577,0.473117,0.501961,0.798216,0.280197,0.469538,0.505882,0.801855,0.284626,0.465971,0.509804,0.805467,0.289057,0.462415,0.513725,0.809052,0.293491,0.45887,0.517647,0.812612,0.297928,0.455338,0.521569,0.816144,0.302368,0.451816,0.52549,0.819651,0.306812,0.448306,0.529412,0.823132,0.311261,0.444806,0.533333,0.826588,0.315714,0.441316,0.537255,0.830018,0.320172,0.437836,0.541176,0.833422,0.324635,0.434366,0.545098,0.836801,0.329105,0.430905,0.54902,0.840155,0.33358,0.427455,0.552941,0.843484,0.338062,0.424013,0.556863,0.846788,0.342551,0.420579,0.560784,0.850066,0.347048,0.417153,0.564706,0.853319,0.351553,0.413734,0.568627,0.856547,0.356066,0.410322,0.572549,0.85975,0.360588,0.406917,0.576471,0.862927,0.365119,0.403519,0.580392,0.866078,0.36966,0.400126,0.584314,0.869203,0.374212,0.396738,0.588235,0.872303,0.378774,0.393355,0.592157,0.875376,0.383347,0.389976,0.596078,0.878423,0.387932,0.3866,0.6,0.881443,0.392529,0.383229,0.603922,0.884436,0.397139,0.37986,0.607843,0.887402,0.401762,0.376494,0.611765,0.89034,0.406398,0.37313,0.615686,0.89325,0.411048,0.369768,0.619608,0.896131,0.415712,0.366407,0.623529,0.898984,0.420392,0.363047,0.627451,0.901807,0.425087,0.359688,0.631373,0.904601,0.429797,0.356329,0.635294,0.907365,0.434524,0.35297,0.639216,0.910098,0.439268,0.34961,0.643137,0.9128,0.444029,0.346251,0.647059,0.915471,0.448807,0.34289,0.65098,0.918109,0.453603,0.339529,0.654902,0.920714,0.458417,0.336166,0.658824,0.923287,0.463251,0.332801,0.662745,0.925825,0.468103,0.329435,0.666667,0.928329,0.472975,0.326067,0.670588,0.930798,0.477867,0.322697,0.67451,0.933232,0.48278,0.319325,0.678431,0.93563,0.487712,0.315952,0.682353,0.93799,0.492667,0.312575,0.686275,0.940313,0.497642,0.309197,0.690196,0.942598,0.502639,0.305816,0.694118,0.944844,0.507658,0.302433,0.698039,0.947051,0.512699,0.299049,0.701961,0.949217,0.517763,0.295662,0.705882,0.951344,0.52285,0.292275,0.709804,0.953428,0.52796,0.288883,0.713725,0.95547,0.533093,0.28549,0.717647,0.957469,0.53825,0.282096,0.721569,0.959424,0.543431,0.278701,0.72549,0.961336,0.548636,0.275305,0.729412,0.963203,0.553865,0.271909,0.733333,0.965024,0.559118,0.268513,0.737255,0.966798,0.564396,0.265118,0.741176,0.968526,0.5697,0.261721,0.745098,0.970205,0.575028,0.258325,0.74902,0.971835,0.580382,0.254931,0.752941,0.973416,0.585761,0.25154,0.756863,0.974947,0.591165,0.248151,0.760784,0.976428,0.596595,0.244767,0.764706,0.977856,0.602051,0.241387,0.768627,0.979233,0.607532,0.238013,0.772549,0.980556,0.613039,0.234646,0.776471,0.981826,0.618572,0.231287,0.780392,0.983041,0.624131,0.227937,0.784314,0.984199,0.629718,0.224595,0.788235,0.985301,0.63533,0.221265,0.792157,0.986345,0.640969,0.217948,0.796078,0.987332,0.646633,0.214648,0.8,0.98826,0.652325,0.211364,0.803922,0.989128,0.658043,0.2081,0.807843,0.989935,0.663787,0.204859,0.811765,0.990681,0.669558,0.201642,0.815686,0.991365,0.675355,0.198453,0.819608,0.991985,0.681179,0.195295,0.823529,0.992541,0.68703,0.19217,0.827451,0.993032,0.692907,0.189084,0.831373,0.993456,0.69881,0.186041,0.835294,0.993814,0.704741,0.183043,0.839216,0.994103,0.710698,0.180097,0.843137,0.994324,0.716681,0.177208,0.847059,0.994474,0.722691,0.174381,0.85098,0.994553,0.728728,0.171622,0.854902,0.994561,0.734791,0.168938,0.858824,0.994495,0.74088,0.166335,0.862745,0.994355,0.746995,0.163821,0.866667,0.994141,0.753137,0.161404,0.870588,0.993851,0.759304,0.159092,0.87451,0.993482,0.765499,0.156891,0.878431,0.993033,0.77172,0.154808,0.882353,0.992505,0.777967,0.152855,0.886275,0.991897,0.784239,0.151042,0.890196,0.991209,0.790537,0.149377,0.894118,0.990439,0.796859,0.14787,0.898039,0.989587,0.803205,0.146529,0.901961,0.988648,0.809579,0.145357,0.905882,0.987621,0.815978,0.144363,0.909804,0.986509,0.822401,0.143557,0.913725,0.985314,0.828846,0.142945,0.917647,0.984031,0.835315,0.142528,0.921569,0.982653,0.841812,0.142303,0.92549,0.98119,0.848329,0.142279,0.929412,0.979644,0.854866,0.142453,0.933333,0.977995,0.861432,0.142808,0.937255,0.976265,0.868016,0.143351,0.941176,0.974443,0.874622,0.144061,0.945098,0.97253,0.88125,0.144923,0.94902,0.970533,0.887896,0.145919,0.952941,0.968443,0.894564,0.147014,0.956863,0.966271,0.901249,0.14818,0.960784,0.964021,0.90795,0.14937,0.964706,0.961681,0.914672,0.15052,0.968627,0.959276,0.921407,0.151566,0.972549,0.956808,0.928152,0.152409,0.976471,0.954287,0.934908,0.152921,0.980392,0.951726,0.941671,0.152925,0.984314,0.949151,0.948435,0.152178,0.988235,0.946602,0.95519,0.150328,0.992157,0.944152,0.961916,0.146861,0.996078,0.941896,0.96859,0.140956,1,0.940015,0.975158,0.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,0.267004,0.004874,0.329415,0.003922,0.26851,0.009605,0.335427,0.007843,0.269944,0.014625,0.341379,0.011765,0.271305,0.019942,0.347269,0.015686,0.272594,0.025563,0.353093,0.019608,0.273809,0.031497,0.358853,0.023529,0.274952,0.037752,0.364543,0.027451,0.276022,0.044167,0.370164,0.031373,0.277018,0.050344,0.375715,0.035294,0.277941,0.056324,0.381191,0.039216,0.278791,0.062145,0.386592,0.043137,0.279566,0.067836,0.391917,0.047059,0.280267,0.073417,0.397163,0.05098,0.280894,0.078907,0.402329,0.054902,0.281446,0.08432,0.407414,0.058824,0.281924,0.089666,0.412415,0.062745,0.282327,0.094955,0.417331,0.066667,0.282656,0.100196,0.42216,0.070588,0.28291,0.105393,0.426902,0.07451,0.283091,0.110553,0.431554,0.078431,0.283197,0.11568,0.436115,0.082353,0.283229,0.120777,0.440584,0.086275,0.283187,0.125848,0.44496,0.090196,0.283072,0.130895,0.449241,0.094118,0.282884,0.13592,0.453427,0.098039,0.282623,0.140926,0.457517,0.101961,0.28229,0.145912,0.46151,0.105882,0.281887,0.150881,0.465405,0.109804,0.281412,0.155834,0.469201,0.113725,0.280868,0.160771,0.472899,0.117647,0.280255,0.165693,0.476498,0.121569,0.279574,0.170599,0.479997,0.12549,0.278826,0.17549,0.483397,0.129412,0.278012,0.180367,0.486697,0.133333,0.277134,0.185228,0.489898,0.137255,0.276194,0.190074,0.493001,0.141176,0.275191,0.194905,0.496005,0.145098,0.274128,0.199721,0.498911,0.14902,0.273006,0.20452,0.501721,0.152941,0.271828,0.209303,0.504434,0.156863,0.270595,0.214069,0.507052,0.160784,0.269308,0.218818,0.509577,0.164706,0.267968,0.223549,0.512008,0.168627,0.26658,0.228262,0.514349,0.172549,0.265145,0.232956,0.516599,0.176471,0.263663,0.237631,0.518762,0.180392,0.262138,0.242286,0.520837,0.184314,0.260571,0.246922,0.522828,0.188235,0.258965,0.251537,0.524736,0.192157,0.257322,0.25613,0.526563,0.196078,0.255645,0.260703,0.528312,0.2,0.253935,0.265254,0.529983,0.203922,0.252194,0.269783,0.531579,0.207843,0.250425,0.27429,0.533103,0.211765,0.248629,0.278775,0.534556,0.215686,0.246811,0.283237,0.535941,0.219608,0.244972,0.287675,0.53726,0.223529,0.243113,0.292092,0.538516,0.227451,0.241237,0.296485,0.539709,0.231373,0.239346,0.300855,0.540844,0.235294,0.237441,0.305202,0.541921,0.239216,0.235526,0.309527,0.542944,0.243137,0.233603,0.313828,0.543914,0.247059,0.231674,0.318106,0.544834,0.25098,0.229739,0.322361,0.545706,0.254902,0.227802,0.326594,0.546532,0.258824,0.225863,0.330805,0.547314,0.262745,0.223925,0.334994,0.548053,0.266667,0.221989,0.339161,0.548752,0.270588,0.220057,0.343307,0.549413,0.27451,0.21813,0.347432,0.550038,0.278431,0.21621,0.351535,0.550627,0.282353,0.214298,0.355619,0.551184,0.286275,0.212395,0.359683,0.55171,0.290196,0.210503,0.363727,0.552206,0.294118,0.208623,0.367752,0.552675,0.298039,0.206756,0.371758,0.553117,0.301961,0.204903,0.375746,0.553533,0.305882,0.203063,0.379716,0.553925,0.309804,0.201239,0.38367,0.554294,0.313725,0.19943,0.387607,0.554642,0.317647,0.197636,0.391528,0.554969,0.321569,0.19586,0.395433,0.555276,0.32549,0.1941,0.399323,0.555565,0.329412,0.192357,0.403199,0.555836,0.333333,0.190631,0.407061,0.556089,0.337255,0.188923,0.41091,0.556326,0.341176,0.187231,0.414746,0.556547,0.345098,0.185556,0.41857,0.556753,0.34902,0.183898,0.422383,0.556944,0.352941,0.182256,0.426184,0.55712,0.356863,0.180629,0.429975,0.557282,0.360784,0.179019,0.433756,0.55743,0.364706,0.177423,0.437527,0.557565,0.368627,0.175841,0.44129,0.557685,0.372549,0.174274,0.445044,0.557792,0.376471,0.172719,0.448791,0.557885,0.380392,0.171176,0.45253,0.557965,0.384314,0.169646,0.456262,0.55803,0.388235,0.168126,0.459988,0.558082,0.392157,0.166617,0.463708,0.558119,0.396078,0.165117,0.467423,0.558141,0.4,0.163625,0.471133,0.558148,0.403922,0.162142,0.474838,0.55814,0.407843,0.160665,0.47854,0.558115,0.411765,0.159194,0.482237,0.558073,0.415686,0.157729,0.485932,0.558013,0.419608,0.15627,0.489624,0.557936,0.423529,0.154815,0.493313,0.55784,0.427451,0.153364,0.497,0.557724,0.431373,0.151918,0.500685,0.557587,0.435294,0.150476,0.504369,0.55743,0.439216,0.149039,0.508051,0.55725,0.443137,0.147607,0.511733,0.557049,0.447059,0.14618,0.515413,0.556823,0.45098,0.144759,0.519093,0.556572,0.454902,0.143343,0.522773,0.556295,0.458824,0.141935,0.526453,0.555991,0.462745,0.140536,0.530132,0.555659,0.466667,0.139147,0.533812,0.555298,0.470588,0.13777,0.537492,0.554906,0.47451,0.136408,0.541173,0.554483,0.478431,0.135066,0.544853,0.554029,0.482353,0.133743,0.548535,0.553541,0.486275,0.132444,0.552216,0.553018,0.490196,0.131172,0.555899,0.552459,0.494118,0.129933,0.559582,0.551864,0.498039,0.128729,0.563265,0.551229,0.501961,0.127568,0.566949,0.550556,0.505882,0.126453,0.570633,0.549841,0.509804,0.125394,0.574318,0.549086,0.513725,0.124395,0.578002,0.548287,0.517647,0.123463,0.581687,0.547445,0.521569,0.122606,0.585371,0.546557,0.52549,0.121831,0.589055,0.545623,0.529412,0.121148,0.592739,0.544641,0.533333,0.120565,0.596422,0.543611,0.537255,0.120092,0.600104,0.54253,0.541176,0.119738,0.603785,0.5414,0.545098,0.119512,0.607464,0.540218,0.54902,0.119423,0.611141,0.538982,0.552941,0.119483,0.614817,0.537692,0.556863,0.119699,0.61849,0.536347,0.560784,0.120081,0.622161,0.534946,0.564706,0.120638,0.625828,0.533488,0.568627,0.12138,0.629492,0.531973,0.572549,0.122312,0.633153,0.530398,0.576471,0.123444,0.636809,0.528763,0.580392,0.12478,0.640461,0.527068,0.584314,0.126326,0.644107,0.525311,0.588235,0.128087,0.647749,0.523491,0.592157,0.130067,0.651384,0.521608,0.596078,0.132268,0.655014,0.519661,0.6,0.134692,0.658636,0.517649,0.603922,0.137339,0.662252,0.515571,0.607843,0.14021,0.665859,0.513427,0.611765,0.143303,0.669459,0.511215,0.615686,0.146616,0.67305,0.508936,0.619608,0.150148,0.676631,0.506589,0.623529,0.153894,0.680203,0.504172,0.627451,0.157851,0.683765,0.501686,0.631373,0.162016,0.687316,0.499129,0.635294,0.166383,0.690856,0.496502,0.639216,0.170948,0.694384,0.493803,0.643137,0.175707,0.6979,0.491033,0.647059,0.180653,0.701402,0.488189,0.65098,0.185783,0.704891,0.485273,0.654902,0.19109,0.708366,0.482284,0.658824,0.196571,0.711827,0.479221,0.662745,0.202219,0.715272,0.476084,0.666667,0.20803,0.718701,0.472873,0.670588,0.214,0.722114,0.469588,0.67451,0.220124,0.725509,0.466226,0.678431,0.226397,0.728888,0.462789,0.682353,0.232815,0.732247,0.459277,0.686275,0.239374,0.735588,0.455688,0.690196,0.24607,0.73891,0.452024,0.694118,0.252899,0.742211,0.448284,0.698039,0.259857,0.745492,0.444467,0.701961,0.266941,0.748751,0.440573,0.705882,0.274149,0.751988,0.436601,0.709804,0.281477,0.755203,0.432552,0.713725,0.288921,0.758394,0.428426,0.717647,0.296479,0.761561,0.424223,0.721569,0.304148,0.764704,0.419943,0.72549,0.311925,0.767822,0.415586,0.729412,0.319809,0.770914,0.411152,0.733333,0.327796,0.77398,0.40664,0.737255,0.335885,0.777018,0.402049,0.741176,0.344074,0.780029,0.397381,0.745098,0.35236,0.783011,0.392636,0.74902,0.360741,0.785964,0.387814,0.752941,0.369214,0.788888,0.382914,0.756863,0.377779,0.791781,0.377939,0.760784,0.386433,0.794644,0.372886,0.764706,0.395174,0.797475,0.367757,0.768627,0.404001,0.800275,0.362552,0.772549,0.412913,0.803041,0.357269,0.776471,0.421908,0.805774,0.35191,0.780392,0.430983,0.808473,0.346476,0.784314,0.440137,0.811138,0.340967,0.788235,0.449368,0.813768,0.335384,0.792157,0.458674,0.816363,0.329727,0.796078,0.468053,0.818921,0.323998,0.8,0.477504,0.821444,0.318195,0.803922,0.487026,0.823929,0.312321,0.807843,0.496615,0.826376,0.306377,0.811765,0.506271,0.828786,0.300362,0.815686,0.515992,0.831158,0.294279,0.819608,0.525776,0.833491,0.288127,0.823529,0.535621,0.835785,0.281908,0.827451,0.545524,0.838039,0.275626,0.831373,0.555484,0.840254,0.269281,0.835294,0.565498,0.84243,0.262877,0.839216,0.575563,0.844566,0.256415,0.843137,0.585678,0.846661,0.249897,0.847059,0.595839,0.848717,0.243329,0.85098,0.606045,0.850733,0.236712,0.854902,0.616293,0.852709,0.230052,0.858824,0.626579,0.854645,0.223353,0.862745,0.636902,0.856542,0.21662,0.866667,0.647257,0.8584,0.209861,0.870588,0.657642,0.860219,0.203082,0.87451,0.668054,0.861999,0.196293,0.878431,0.678489,0.863742,0.189503,0.882353,0.688944,0.865448,0.182725,0.886275,0.699415,0.867117,0.175971,0.890196,0.709898,0.868751,0.169257,0.894118,0.720391,0.87035,0.162603,0.898039,0.730889,0.871916,0.156029,0.901961,0.741388,0.873449,0.149561,0.905882,0.751884,0.874951,0.143228,0.909804,0.762373,0.876424,0.137064,0.913725,0.772852,0.877868,0.131109,0.917647,0.783315,0.879285,0.125405,0.921569,0.79376,0.880678,0.120005,0.92549,0.804182,0.882046,0.114965,0.929412,0.814576,0.883393,0.110347,0.933333,0.82494,0.88472,0.106217,0.937255,0.83527,0.886029,0.102646,0.941176,0.845561,0.887322,0.099702,0.945098,0.85581,0.888601,0.097452,0.94902,0.866013,0.889868,0.095953,0.952941,0.876168,0.891125,0.09525,0.956863,0.886271,0.892374,0.095374,0.960784,0.89632,0.893616,0.096335,0.964706,0.906311,0.894855,0.098125,0.968627,0.916242,0.896091,0.100717,0.972549,0.926106,0.89733,0.104071,0.976471,0.935904,0.89857,0.108131,0.980392,0.945636,0.899815,0.112838,0.984314,0.9553,0.901065,0.118128,0.988235,0.964894,0.902323,0.123941,0.992157,0.974417,0.90359,0.130215,0.996078,0.983868,0.904867,0.136897,1,0.993248,0.906157,0.143936]},{"ShowIndexedColorActiveValues":1,"IndexedColors":[0.07,0.5,0.7,1,1,1,0.85,1,1,0.8,0.5,1,0.76,1,0,1,0.71,0.71,0.5,0.5,0.5,0.05,0.05,1,1,0.05,0.05,0.7,1,1,0.7,0.89,0.96,0.67,0.36,0.95,0.54,1,0,0.75,0.65,0.65,0.5,0.6,0.6,1,0.5,0,1,1,0.19,0.12,0.94,0.12,0.5,0.82,0.89,0.56,0.25,0.83,0.24,1,0,0.9,0.9,0.9,0.75,0.76,0.78,0.65,0.65,0.67,0.54,0.6,0.78,0.61,0.48,0.78,0.5,0.48,0.78,0.44,0.48,0.78,0.36,0.48,0.76,1,0.48,0.38,0.49,0.5,0.69,0.76,0.56,0.56,0.4,0.56,0.56,0.74,0.5,0.89,1,0.63,0,0.65,0.16,0.16,0.36,0.72,0.82,0.44,0.18,0.69,0,1,0,0.58,1,1,0.58,0.88,0.88,0.45,0.76,0.79,0.33,0.71,0.71,0.23,0.62,0.62,0.14,0.56,0.56,0.04,0.49,0.55,0,0.41,0.52,0.88,0.88,1,1,0.85,0.56,0.65,0.46,0.45,0.4,0.5,0.5,0.62,0.39,0.71,0.83,0.48,0,0.58,0,0.58,0.26,0.62,0.69,0.34,0.09,0.56,0,0.79,0,0.44,0.83,1,1,1,0.78,0.85,1,0.78,0.78,1,0.78,0.64,1,0.78,0.56,1,0.78,0.38,1,0.78,0.27,1,0.78,0.19,1,0.78,0.12,1,0.78,0,1,0.61,0,0.9,0.46,0,0.83,0.32,0,0.75,0.22,0,0.67,0.14,0.3,0.76,1,0.3,0.65,1,0.13,0.58,0.84,0.15,0.49,0.67,0.15,0.4,0.59,0.09,0.33,0.53,0.96,0.93,0.82,0.8,0.82,0.12,0.71,0.71,0.76,0.65,0.33,0.3,0.34,0.35,0.38,0.62,0.31,0.71,0.67,0.36,0,0.46,0.31,0.27,0.26,0.51,0.59,0.26,0,0.4,0,0.49,0,0.44,0.67,0.98,0,0.73,1,0,0.63,1,0,0.56,1,0,0.5,1,0,0.42,1,0.33,0.36,0.95,0.47,0.36,0.89,0.54,0.31,0.89,0.63,0.21,0.83,0.7,0.12,0.83,0.7,0.12,0.73,0.7,0.05,0.65,0.74,0.05,0.53,0.78,0,0.4,0.8,0,0.35,0.82,0,0.31,0.85,0,0.27,0.88,0,0.22,0.9,0,0.18,0.91,0,0.15,0.92,0,0.14,0.93,0,0.13,0.94,0,0.12,0.95,0,0.11,0.96,0,0.1,0.97,0,0.09,0.98,0,0.08,0.99,0,0.07,1,0,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"}]'),pM=Object.create(null);dM.filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){pM[e.Name]=e}));var fM=Object.keys(pM);fM.sort();var hM={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(pM[e.Name]||(fM.push(e.Name),fM.sort()),pM[e.Name]=e)},removePresetByName:function(e){var t=fM.indexOf(e);t>-1&&fM.splice(t,1),delete pM[e]},getPresetByName:function(e){return pM[e]},rgbPresetNames:fM};function mM(e,t){t.classHierarchy.push("vtkProperty2D")}var gM={color:[1,1,1],opacity:1,pointSize:1,lineWidth:1,displayLocation:"Foreground"};function vM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gM,n),de.obj(e,t),de.setGet(e,t,["opacity","lineWidth","pointSize","displayLocation"]),de.setGetArray(e,t,["color"],3),mM(0,t)}var yM={newInstance:de.newInstance(vM,"vtkProperty2D"),extend:vM};function bM(e,t){t.classHierarchy.push("vtkActor2D"),e.getActors2D=function(){return e},e.getIsOpaque=function(){t.property||e.getProperty();var n=t.property.getOpacity()>=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=yM.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.setDisplayPosition=function(e,n){t.positionCoordinate.setCoordinateSystem($w.DISPLAY),t.positionCoordinate.setValue(e,n,0)},e.setWidth=function(e){var n=t.position2Coordinate.getValue();t.position2Coordinate.setCoordinateSystemToNormalizedViewport(),t.position2Coordinate.setValue(e,n[1])},e.setHeight=function(e){var n=t.position2Coordinate.getValue();t.position2Coordinate.setCoordinateSystemToNormalizedViewport(),t.position2Coordinate.setValue(n[0],e)},e.getWidth=function(){return t.position2Coordinate.getValue()[0]},e.getHeight=function(){return t.position2Coordinate.getValue()[1]},e.getMTime=function(){var e=t.mtime;if(null!==t.property){var n=t.property.getMTime();e=n>e?n:e}return e=t.positionCoordinate.getMTime()>e?t.positionCoordinate.getMTime():e,t.positionCoordinate2.getMTime()>e?t.positionCoordinate2.getMTime():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.getBounds=function(){return"function"==typeof e.getMapper().getBounds?(t.useBounds=!0,e.getMapper().getBounds()):(t.useBounds=!1,[])},e.getActualPositionCoordinate=function(){return t.positionCoordinate},e.getActualPositionCoordinate2=function(){return t.positionCoordinate2}}var wM={mapper:null,property:null,layerNumber:0,positionCoordinate:null,positionCoordinate2:null};function xM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wM,n),Hg.extend(e,t,n),t.positionCoordinate=sx.newInstance(),t.positionCoordinate.setCoordinateSystemToViewport(),t.positionCoordinate2=sx.newInstance(),t.positionCoordinate2.setCoordinateSystemToNormalizedViewport(),t.positionCoordinate2.setValue(.5,.5),t.positionCoordinate2.setReferenceCoordinate(t.positionCoordinate),de.set(e,t,["property"]),de.setGet(e,t,["mapper"]),bM(e,t)}var SM={newInstance:de.newInstance(xM,"vtkActor2D"),extend:xM},CM={default:{defaultStyle:{fontStyle:"bold",fontFamily:"Arial",fontColor:"black",fontSizeScale:function(e){return e/2},faceColor:"white",edgeThickness:.1,edgeColor:"black",resolution:400},xMinusFaceProperty:{text:"X-",faceColor:"yellow"},xPlusFaceProperty:{text:"X+",faceColor:"yellow"},yMinusFaceProperty:{text:"Y-",faceColor:"red"},yPlusFaceProperty:{text:"Y+",faceColor:"red"},zMinusFaceProperty:{text:"Z-",faceColor:"#008000"},zPlusFaceProperty:{text:"Z+",faceColor:"#008000"}},lps:{xMinusFaceProperty:{text:"R",faceRotation:-90},xPlusFaceProperty:{text:"L",faceRotation:90},yMinusFaceProperty:{text:"A",faceRotation:0},yPlusFaceProperty:{text:"P",faceRotation:180},zMinusFaceProperty:{text:"I",faceRotation:180},zPlusFaceProperty:{text:"S",faceRotation:0}}};function AM(e,t){t.set(e)}var PM={applyDefinitions:AM,applyPreset:function(e,t){return AM(CM[e],t)},registerStylePreset:function(e,t){CM[e]=t}};function _M(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 OM(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;i&&Object.assign(t["".concat(n,"FaceProperty")],i);var a=OM(OM({},t.defaultStyle),t["".concat(n,"FaceProperty")]);r.width=a.resolution,r.height=a.resolution;var s=r.getContext("2d");s.fillStyle=a.faceColor,s.fillRect(0,0,r.width,r.height),a.edgeThickness>0&&(s.strokeStyle=a.edgeColor,s.lineWidth=a.edgeThickness*r.width,s.strokeRect(0,0,r.width,r.height)),s.save(),s.translate(0,r.height),s.scale(1,-1),s.translate(r.width/2,r.height/2),s.rotate(-Math.PI*(a.faceRotation/180));var l=a.fontSizeScale(a.resolution);s.fillStyle=a.fontColor,s.textAlign="center",s.textBaseline="middle",s.font="".concat(a.fontStyle," ").concat(l,'px "').concat(a.fontFamily,'"'),s.fillText(a.text,0,0),s.restore();var u=ns.canvasToImageData(r);o.setInputData(u,EM[n]),e.modified()}function s(){n=vf.newInstance({generate3DTextureCoordinates:!0}),i.setInputConnection(n.getOutputPort()),a("xPlus"),a("xMinus"),a("yPlus"),a("yMinus"),a("zPlus"),a("zMinus")}o.setInterpolate(!0),e.setDefaultStyle=function(e){t.defaultStyle=OM(OM({},t.defaultStyle),e),s()},e.setXPlusFaceProperty=function(e){return a("xPlus",e)},e.setXMinusFaceProperty=function(e){return a("xMinus",e)},e.setYPlusFaceProperty=function(e){return a("yPlus",e)},e.setYMinusFaceProperty=function(e){return a("yMinus",e)},e.setZPlusFaceProperty=function(e){return a("zPlus",e)},e.setZMinusFaceProperty=function(e){return a("zMinus",e)},s(),i.setInputConnection(n.getOutputPort()),e.setMapper(i),e.addTexture(o)}var DM={defaultStyle:{text:"",faceColor:"white",faceRotation:0,fontFamily:"Arial",fontColor:"black",fontStyle:"normal",fontSizeScale:function(e){return e/1.8},edgeThickness:.1,edgeColor:"black",resolution:200}};function IM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DM,n),pv.extend(e,t,n),de.get(e,t,["defaultStyle","xPlusFaceProperty","xMinusFaceProperty","yPlusFaceProperty","yMinusFaceProperty","zPlusFaceProperty","zMinusFaceProperty"]),TM(e,t)}var kM={newInstance:de.newInstance(IM,"vtkAnnotatedCubeActor"),extend:IM,Presets:PM};function MM(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 NM(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,LM,n),pv.extend(e,t,n),de.setGet(e,t,["config"]),de.setGetArray(e,t,["xAxisColor","yAxisColor","zAxisColor"],3,255),BM(e,t)}var jM={newInstance:de.newInstance(VM,"vtkAxesActor"),extend:VM},UM=Math.sqrt(50),GM=Math.sqrt(10),zM=Math.sqrt(2);function WM(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=UM?10:o>=GM?5:o>=zM?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=UM?10:o>=GM?5:o>=zM?2:1)}function HM(e,t){return et?1:e>=t?0:NaN}function KM(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>HM(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}const qM=KM(HM),XM=qM.right;qM.left,KM((function(e){return null===e?NaN:+e})).center;var YM=XM;function ZM(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JM(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function QM(){}var $M=.7,eN=1/$M,tN="\\s*([+-]?\\d+)\\s*",nN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",rN="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",iN=/^#([0-9a-f]{3,8})$/,oN=new RegExp("^rgb\\("+[tN,tN,tN]+"\\)$"),aN=new RegExp("^rgb\\("+[rN,rN,rN]+"\\)$"),sN=new RegExp("^rgba\\("+[tN,tN,tN,nN]+"\\)$"),lN=new RegExp("^rgba\\("+[rN,rN,rN,nN]+"\\)$"),uN=new RegExp("^hsl\\("+[nN,rN,rN]+"\\)$"),cN=new RegExp("^hsla\\("+[nN,rN,rN,nN]+"\\)$"),dN={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 pN(){return this.rgb().formatHex()}function fN(){return this.rgb().formatRgb()}function hN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=iN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?mN(t):3===n?new bN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?gN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?gN(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=oN.exec(e))?new bN(t[1],t[2],t[3],1):(t=aN.exec(e))?new bN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=sN.exec(e))?gN(t[1],t[2],t[3],t[4]):(t=lN.exec(e))?gN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=uN.exec(e))?CN(t[1],t[2]/100,t[3]/100,1):(t=cN.exec(e))?CN(t[1],t[2]/100,t[3]/100,t[4]):dN.hasOwnProperty(e)?mN(dN[e]):"transparent"===e?new bN(NaN,NaN,NaN,0):null}function mN(e){return new bN(e>>16&255,e>>8&255,255&e,1)}function gN(e,t,n,r){return r<=0&&(e=t=n=NaN),new bN(e,t,n,r)}function vN(e){return e instanceof QM||(e=hN(e)),e?new bN((e=e.rgb()).r,e.g,e.b,e.opacity):new bN}function yN(e,t,n,r){return 1===arguments.length?vN(e):new bN(e,t,n,null==r?1:r)}function bN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function wN(){return"#"+SN(this.r)+SN(this.g)+SN(this.b)}function xN(){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 SN(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function CN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new PN(e,t,n,r)}function AN(e){if(e instanceof PN)return new PN(e.h,e.s,e.l,e.opacity);if(e instanceof QM||(e=hN(e)),!e)return new PN;if(e instanceof PN)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new PN(a,s,l,e.opacity)}function PN(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _N(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function ON(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}ZM(QM,hN,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:pN,formatHex:pN,formatHsl:function(){return AN(this).formatHsl()},formatRgb:fN,toString:fN}),ZM(bN,yN,JM(QM,{brighter:function(e){return e=null==e?eN:Math.pow(eN,e),new bN(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?$M:Math.pow($M,e),new bN(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:wN,formatHex:wN,formatRgb:xN,toString:xN})),ZM(PN,(function(e,t,n,r){return 1===arguments.length?AN(e):new PN(e,t,n,null==r?1:r)}),JM(QM,{brighter:function(e){return e=null==e?eN:Math.pow(eN,e),new PN(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?$M:Math.pow($M,e),new PN(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,i=2*n-r;return new bN(_N(e>=240?e-240:e+120,i,r),_N(e,i,r),_N(e<120?e+240:e-120,i,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 EN=e=>()=>e;function TN(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):EN(isNaN(e)?t:e)}var DN=function e(t){var n=function(e){return 1==(e=+e)?TN: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):EN(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=yN(e)).r,(t=yN(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=TN(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function IN(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=ro&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:NN(n,r)})),o=BN.lastIndex;return ot&&(n=e,e=t,t=n),u=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?qN:KN,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),NN)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,GN),c()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=UN,c()},d.clamp=function(e){return arguments.length?(u=!!e||WN,c()):u!==WN},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(WN,WN)}function ZN(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var JN,QN=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $N(e){if(!(t=QN.exec(e)))throw new Error("invalid format: "+e);var t;return new eR({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 eR(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 tR(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 nR(e){return(e=tR(Math.abs(e)))?e[1]:NaN}function rR(e,t){var n=tR(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}$N.prototype=eR.prototype,eR.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 iR={"%":(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)=>rR(100*e,t),r:rR,s:function(e,t){var n=tR(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(JN=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+tR(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function oR(e){return e}var aR,sR,lR,uR=Array.prototype.map,cR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function dR(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0){let n=Math.round(e/a),r=Math.round(t/a);for(n*at&&--r,o=new Array(i=r-n+1);++st&&--r,o=new Array(i=r-n+1);++s=UM?i*=10:o>=GM?i*=5:o>=zM&&(i*=2),t0;){if((i=WM(l,u,n))===r)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return e},e}function pR(){var e=YN();return e.copy=function(){return XN(e,pR())},ZN.apply(e,arguments),dR(e)}function fR(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 hR(e){for(var t=1;t0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?oR:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(uR.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=$N(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):iR[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===p?i:"#"===p&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===p?o:/[%p]/.test(y)?l:"",x=iR[y],S=/[defgprs%]/.test(y);function C(e){var i,o,l,p=b,C=w;if("c"===y)C=x(e)+C,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),A&&0==+e&&"+"!==d&&(A=!1),p=(A?"("===d?d:u:"-"===d||"("===d?"":d)+p,C=("s"===y?cR[8+JN/3]:"")+C+(A&&"("===d?")":""),S)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){C=(46===l?a+e.slice(i+1):e.slice(i))+C,e=e.slice(0,i);break}}m&&!f&&(e=r(e,1/0));var P=p.length+e.length+C.length,_=P>1)+p+e+C+_.slice(P);break;default:e=_+p+e+C}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=$N(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(nR(t)/3))),i=Math.pow(10,-r),o=cR[8+r/3];return function(e){return n(i*e)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),sR=aR.format,lR=aR.formatPrefix;var mR=[[-1,0,0],[1,0,0],[0,-1,0],[0,1,0],[0,0,-1],[0,0,1]],gR=[[8,7,11,3],[9,1,10,5],[4,9,0,8],[2,11,6,10],[0,3,2,1],[4,5,6,7]],vR=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[3,7],[2,6]],yR=[0,1,0,1,0,1,0,1,2,2,2,2],bR=[[1,2],[1,2],[0,2],[0,2],[0,1],[0,1]],wR=new Float64Array(3),xR=new Float64Array(3),SR=new Float64Array(3),CR=new Float64Array(3),AR=new Float64Array(3),PR=new Float64Array(3),_R=new Float64Array(16);function OR(e,t){e.strokeStyle=t.strokeColor,e.lineWidth=t.strokeSize,e.fillStyle=t.fontColor,e.font="".concat(t.fontStyle," ").concat(t.fontSize,"px ").concat(t.fontFamily)}function ER(e,t){t.classHierarchy.push("vtkCubeAxesActor"),e.setCamera=function(n){t.camera!==n&&(t.cameraModifiedSub&&(t.cameraModifiedSub.unsubscribe(),t.cameraModifiedSub=null),t.camera=n,n&&(t.cameraModifiedSub=n.onModified(e.update)),e.update(),e.modified())},e.computeFacesToDraw=function(){var e=t.camera.getViewMatrix();Io(e,e);for(var n=!1,r=Xr.getDiagonalLength(t.dataBounds),i=Math.sin(t.faceVisibilityAngle*Math.PI/180),o=0;o<6;o++){var a=!1,s=Math.floor(o/2),l=(s+1)%3,u=(s+2)%3;t.dataBounds[2*l]!==t.dataBounds[2*l+1]&&t.dataBounds[2*u]!==t.dataBounds[2*u+1]&&(wR[s]=t.dataBounds[o]-.1*r*mR[o][s],wR[l]=.5*(t.dataBounds[2*l]+t.dataBounds[2*l+1]),wR[u]=.5*(t.dataBounds[2*u]+t.dataBounds[2*u+1]),io(SR,wR,e),wR[s]=t.dataBounds[o],io(CR,wR,e),Fi(SR,CR,SR),Ji(SR,SR),a=SR[2]>i,t.camera.getParallelProjection()||(Ji(CR,CR),a=Qi(CR,SR)>i)),a!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=a,n=!0)}return n},e.updatePolyData=function(e,n,r){var i=0,o=0;i+=8;for(var a=0,s=0;s<12;s++)n[s]>0&&a++;if(o+=a,t.gridLines)for(var l=0;l<6;l++)e[l]&&(i+=2*r[bR[l][0]].length+2*r[bR[l][1]].length,o+=r[bR[l][0]].length+r[bR[l][1]].length);for(var u=new Float64Array(3*i),c=new Uint32Array(3*o),d=0,p=0,f=0;f<2;f++)for(var h=0;h<2;h++)for(var m=0;m<2;m++)u[3*d]=t.dataBounds[m],u[3*d+1]=t.dataBounds[2+h],u[3*d+2]=t.dataBounds[4+f],d++;for(var g=0;g<12;g++)n[g]>0&&(c[3*p]=2,c[3*p+1]=vR[g][0],c[3*p+2]=vR[g][1],p++);if(t.gridLines)for(var v=0;v<6;v++)if(e[v]){for(var y=Math.floor(v/2),b=r[bR[v][0]],w=0;w.5?Wi(SR,AR,o[0]*a):Wi(SR,AR,o[0]*a-l.width/2),Ri(wR,wR,SR),Wi(SR,PR,o[1]*a-l.height/2),Ri(wR,wR,SR),s.points[3*p]=wR[0],s.points[3*p+1]=wR[1],s.points[3*p+2]=wR[2],s.tcoords[2*p]=l.tcoords[0],s.tcoords[2*p+1]=l.tcoords[1],p++,Wi(SR,AR,l.width),Ri(wR,wR,SR),s.points[3*p]=wR[0],s.points[3*p+1]=wR[1],s.points[3*p+2]=wR[2],s.tcoords[2*p]=l.tcoords[2],s.tcoords[2*p+1]=l.tcoords[3],p++,Wi(SR,PR,l.height),Ri(wR,wR,SR),s.points[3*p]=wR[0],s.points[3*p+1]=wR[1],s.points[3*p+2]=wR[2],s.tcoords[2*p]=l.tcoords[4],s.tcoords[2*p+1]=l.tcoords[5],p++,Wi(SR,AR,l.width),Fi(wR,wR,SR),s.points[3*p]=wR[0],s.points[3*p+1]=wR[1],s.points[3*p+2]=wR[2],s.tcoords[2*p]=l.tcoords[6],s.tcoords[2*p+1]=l.tcoords[7],p++,s.polys[4*f]=3,s.polys[4*f+1]=p-4,s.polys[4*f+2]=p-3,s.polys[4*f+3]=p-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=p-4,s.polys[4*f+2]=p-2,s.polys[4*f+3]=p-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Io(n,n);var r=t.textValues.length,i=4*r,o=2*r,a=new Float64Array(3*i),s=new Uint16Array(4*o),l=new Float32Array(2*i);ko(_R,n);for(var u={ptIdx:0,cellIdx:0,polys:s,points:a,tcoords:l},c=0,d=0,p=0,f=t.textPolyData.getPoints().getData();c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,TR(n)),pv.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._tmAtlas=new Map,t.mapper=Uv.newInstance(),t.polyData=ju.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=ju.newInstance(),t.tmPolyData=ju.newInstance(),t.tmMapper=Uv.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=MT.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=pv.newInstance(),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=Zw.newInstance(),t.pixelMapperPolyData=ju.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,i,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=pv.newInstance(),t.pixelActor.setMapper(t.pixelMapper),de.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),de.setGetArray(e,t,["dataBounds"],6),de.setGetArray(e,t,["axisLabels"],3),de.get(e,t,["axisTextStyle","tickTextStyle","camera"]),ER(e,t)}var IR={newInstance:de.newInstance(DR,"vtkCubeAxesActor"),extend:DR};function kR(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 MR(e,t){t.classHierarchy.push("vtkFollower");var n=function(e){for(var t=1;te?r:e}return e},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){if(Do(t.matrix),t.userMatrix&&Ro(t.matrix,t.matrix,t.userMatrix),Fo(t.matrix,t.matrix,t.origin),Fo(t.matrix,t.matrix,t.position),Ro(t.matrix,t.matrix,t.rotation),Bo(t.matrix,t.matrix,t.scale),t.camera){var n=new Float64Array(t.viewUp);t.useViewUp||Ni.apply(i,[n].concat(y(t.camera.getViewUp())));var r=new Float64Array(3);t.camera.getParallelProjection()?Ni(r,t.camera.getViewPlaneNormal()):(Ni.apply(i,[r].concat(y(t.position))),Fi(r,t.camera.getPosition(),r),Ji(r,r));var o=new Float64Array(3);$i(o,n,r),Ji(o,o),$i(r,o,n),Ji(r,r),t.followerMatrix[0]=o[0],t.followerMatrix[1]=o[1],t.followerMatrix[2]=o[2],t.followerMatrix[4]=n[0],t.followerMatrix[5]=n[1],t.followerMatrix[6]=n[2],t.followerMatrix[8]=r[0],t.followerMatrix[9]=r[1],t.followerMatrix[10]=r[2],Ro(t.matrix,t.followerMatrix,t.matrix)}Fo(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Io(t.matrix,t.matrix),t.isIdentity=!1,t.matrixMTime.modified()}}}var NR={viewUp:[0,1,0],useViewUp:!1,camera:null};function RR(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,NR,n),pv.extend(e,t,n),t.followerMatrix=Do(new Float64Array(16)),de.setGet(e,t,["useViewUp","camera"]),de.setGetArray(e,t,["viewUp"],3),MR(e,t)}var FR={newInstance:de.newInstance(RR,"vtkFollower"),extend:RR},BR={OrientationModes:{DIRECTION:0,ROTATION:1,MATRIX:2},ScaleModes:{SCALE_BY_CONSTANT:0,SCALE_BY_MAGNITUDE:1,SCALE_BY_COMPONENTS:2}};function LR(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 VR=BR.OrientationModes,jR=BR.ScaleModes,UR=de.vtkErrorMacro;function GR(e,t){t.classHierarchy.push("vtkGlyph3DMapper"),e.getOrientationModeAsString=function(){return de.enumToString(VR,t.orientationMode)},e.setOrientationModeToDirection=function(){return e.setOrientationMode(VR.DIRECTION)},e.setOrientationModeToRotation=function(){return e.setOrientationMode(VR.ROTATION)},e.setOrientationModeToMatrix=function(){return e.setOrientationMode(VR.MATRIX)},e.getOrientationArrayData=function(){var n=e.getInputData(0);return n&&n.getPointData()?t.orientationArray?n.getPointData().getArray(t.orientationArray):n.getPointData().getVectors():null},e.getScaleModeAsString=function(){return de.enumToString(jR,t.scaleMode)},e.setScaleModeToScaleByMagnitude=function(){return e.setScaleMode(jR.SCALE_BY_MAGNITUDE)},e.setScaleModeToScaleByComponents=function(){return e.setScaleMode(jR.SCALE_BY_COMPONENTS)},e.setScaleModeToScaleByConstant=function(){return e.setScaleMode(jR.SCALE_BY_CONSTANT)},e.getScaleArrayData=function(){var n=e.getInputData(0);return n&&n.getPointData()?t.scaleArray?n.getPointData().getArray(t.scaleArray):n.getPointData().getScalars():null},e.getBounds=function(){var n=e.getInputData(0),r=e.getInputData(1);return n&&r?(e.buildArrays(),t.bounds):bn()},e.buildArrays=function(){var n=e.getInputData(0),r=e.getInputData(1);if(t.buildTime.getMTime()t.bounds[1]&&(t.bounds[1]=c[0]),c[1]>t.bounds[3]&&(t.bounds[3]=c[1]),c[2]>t.bounds[5]&&(t.bounds[5]=c[2]);var E=new Float32Array(v,36*w,9);ba(E,x),_a(E,E),Pa(E,E)}var T=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 D=e.getLookupTable();D&&T&&(D.build(),t.colorArray=D.mapScalars(T,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 zR={orient:!0,orientationMode:VR.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:jR.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function WR(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zR,n),Uv.extend(e,t,n),de.algo(e,t,2,0),t.buildTime={},de.obj(t.buildTime,{mtime:0}),t.boundsTime={},de.obj(t.boundsTime,{mtime:0}),de.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),de.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),GR(e,t)}var HR=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,JR,n),de.obj(e,t),de.setGet(e,t,["fieldAssociation","captureZValues"]),ZR(e,t)}var $R={newInstance:de.newInstance(QR,"vtkHardwareSelector"),extend:QR},eF=navigator.gpu?"WebGPU":"WebGL",tF=Object.create(null);function nF(e,t){tF[e]=t}function rF(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return tF[e]&&tF[e](t)}function iF(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 rF(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",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return de.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n,r):void 0})).filter((function(e){return!!e}))}}var oF={defaultViewAPI:eF,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function aF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oF,n),de.obj(e,t),de.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),de.get(e,t,["neverRendered"]),de.getArray(e,t,["renderers"]),de.event(e,t,"completion"),iF(e,t)}var sF={newInstance:de.newInstance(aF,"vtkRenderWindow"),extend:aF,registerViewConstructor:nF,listViewAPIs:function(){return Object.keys(tF)},newAPISpecificView:rF};function lF(e,t){t.classHierarchy.push("vtkSkybox"),e.getIsOpaque=function(){return!0},e.hasTranslucentPolygonalGeometry=function(){return!1},e.getSupportsSelection=function(){return!1}}var uF={format:"box"};function cF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uF,n),pv.extend(e,t,n),de.setGet(e,t,["format"]),lF(e,t)}var dF={newInstance:de.newInstance(cF,"vtkSkybox"),extend:cF};function pF(e,t){t.classHierarchy.push("vtkSphereMapper")}var fF={scaleArray:null,radius:.05};function hF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fF,n),Uv.extend(e,t,n),de.setGet(e,t,["radius","scaleArray"]),pF(0,t)}var mF={newInstance:de.newInstance(hF,"vtkSphereMapper"),extend:hF};function gF(e,t){t.classHierarchy.push("vtkStickMapper")}var vF={scaleArray:null,orientationArray:null,radius:.025,length:.1};function yF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vF,n),Uv.extend(e,t,n),de.setGet(e,t,["scaleArray","orientationArray","radius","length"]),gF(0,t)}var bF={newInstance:de.newInstance(yF,"vtkStickMapper"),extend:yF};function wF(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 xF={vtkAbstractMapper:mv,vtkAbstractMapper3D:yv,vtkAbstractPicker:Hv,vtkActor:pv,vtkActor2D:SM,vtkAnnotatedCubeActor:kM,vtkAxesActor:jM,vtkCamera:oC,vtkCellPicker:zx,vtkColorTransferFunction:function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AF,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",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",de.obj(e,t,n),de.get(e,t,["useBackgroundImage","renderable"]),de.setGet(e,t,["canvas","cursor","useOffScreen","interactor"]),de.setGetArray(e,t,["size"],2),de.getArray(e,t,["renderers"]),CF(e,t)}var _F={newInstance:de.newInstance(PF,"vtkCanvasView"),extend:PF},OF={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},EF={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},TF={Wrap:OF,Filter:EF},DF=de.vtkErrorMacro;function IF(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),i=e[r];if(i)i(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kF,n),de.obj(e,t),de.event(e,t,"event"),t._renderableChildMap=new Map,de.get(e,t,["visited"]),de.setGet(e,t,["parent","renderable","myFactory"]),de.getArray(e,t,["children"]),IF(e,t)}var NF={newInstance:de.newInstance(MF,"vtkViewNode"),extend:MF,PASS_TYPES:["Build","Render"]};function RF(e,t){t.overrides||(t.overrides={}),t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,i=n.getClassName(r++),o=!1,a=Object.keys(t.overrides);i&&!o;)-1!==a.indexOf(i)?o=!0:i=n.getClassName(r++);if(!o)return null;var s=t.overrides[i]();return s.setMyFactory(e),s},e.registerOverride=function(e,n){t.overrides[e]=n}}var FF={};function BF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FF,n),de.obj(e,t),RF(e,t)}var LF={newInstance:de.newInstance(BF,"vtkViewNodeFactory"),extend:BF},VF=Object.create(null);function jF(e,t){VF[e]=t}function UF(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var GF={};function zF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,GF,n),t.overrides=VF,LF.extend(e,t,n),UF(0,t)}var WF={newInstance:de.newInstance(zF,"vtkOpenGLViewNodeFactory"),extend:zF};function HF(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 KF=TF.Wrap,qF=TF.Filter,XF=Ln.VtkDataTypes,YF=k,ZF=M,JF=N;function QF(e,t){var n=this;function r(e,n){var r=[];if(e!==XF.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var i=t.width*t.height*t.components,o=0;o=i&&(v=i-1);var y=m-g,b=1-y;g=g*r*o,v=v*r*o;for(var w=0;w=r&&(A=r-1);var P=S-C;C*=o,A*=o;for(var _=0;_i[l]&&(i[l]=n[a]),a++;for(var u=[],c=[],d=0;d0&&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(qF.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(qF.LINEAR),e.setMagnificationFilter(qF.LINEAR)):(e.setMinificationFilter(qF.NEAREST),e.setMagnificationFilter(qF.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(KF.REPEAT),e.setWrapS(KF.REPEAT),e.setWrapT(KF.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(qF.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 i=r.getExtent(),o=r.getPointData().getScalars(),a=[],s=0;st.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:JF("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||YF("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var i=0;return(i=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(i=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(YF("Unsupported internal texture type!"),YF("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),i},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 XF.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case XF.FLOAT:case XF.VOID:default:return t.context.FLOAT}switch(e){case XF.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case XF.FLOAT:case XF.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 qF.NEAREST:return t.context.NEAREST;case qF.LINEAR:return t.context.LINEAR;case qF.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case qF.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case qF.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case qF.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case KF.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case KF.REPEAT:return t.context.REPEAT;case KF.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,a,s,l){if(e.getOpenGLDataType(s),e.getInternalFormat(s,a),e.getFormat(s,a),!t.internalFormat||!t.format||!t.openGLDataType)return ZF("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=a,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var u=i(r(s,[l]));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,u[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,a,s,l){if(e.getOpenGLDataType(s),e.getInternalFormat(s,a),e.getFormat(s,a),!t.internalFormat||!t.format||!t.openGLDataType)return ZF("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=a,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=l.length/6-1,e.createTexture(),e.bind();for(var u=i(r(s,l)),c=[],d=t.width,p=t.height,f=0;f=1&&w>=1;){var x=null;y<=t.maxLevel&&(x=c[6*y+v]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+v,y,t.internalFormat,b,w,0,t.format,t.openGLDataType,x),y++,b/=2,w/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,i,o){return e.getOpenGLDataType(i),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?i===XF.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):(ZF("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType(XF.UNSIGNED_CHAR),e.getInternalFormat(XF.UNSIGNED_CHAR,4),e.getFormat(XF.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return ZF("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=!Le(n.width)||!Le(n.height),i=document.createElement("canvas");i.width=r?Be(n.width):n.width,i.height=r?Be(n.height):n.height;var o=i.getContext("2d");o.translate(0,i.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,i.width,i.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var a=i;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,a),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,r,i,o,a,s){return e.getOpenGLDataType(a),e.getInternalFormat(a,o),e.getFormat(a,o),t.internalFormat&&t.format&&t.openGLDataType?(t.target=t.context.TEXTURE_3D,t.components=o,t.width=n,t.height=r,t.depth=i,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,s),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0):(ZF("Failed to determine texture parameters."),!1)},e.create3DFilterableFromRaw=function(n,r,i,a,s,l){for(var u=n*r*i,c=[],d=[],p=0;p4096&&(A===XF.FLOAT||a>=3)&&(_=4096);var O=1,E=1;u>_*_&&(E=O=Math.ceil(Math.sqrt(u/(_*_))));var T=Math.sqrt(u)/O;T=Be(T);var D,I=Math.floor(T*O/n),k=Math.ceil(i/I),M=Be(r*k/E);t.width=T,t.height=M,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=I,t.volumeInfo.yreps=k,t.volumeInfo.xstride=O,t.volumeInfo.ystride=E,t.volumeInfo.offset=S.offset,t.volumeInfo.scale=S.scale;var N=T*M*a;D=A===XF.FLOAT?new Float32Array(N):new Uint8Array(N);for(var R=0,F=Math.floor(n/O),B=Math.floor(r/E),L=0;L2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$F,n),NF.extend(e,t,n),t.sendParametersTime={},W(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},W(t.textureBuildTime,{mtime:0}),X(e,t,["format","openGLDataType"]),Y(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),H(e,t,["width","height","volumeInfo","components","handle","target"]),QF(e,t)}var tB=ne(eB,"vtkOpenGLTexture"),nB=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,i=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void M("Using multiple framebuffer attachments requires WebGL 2");i+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,i,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 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 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 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=nB.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(EF.LINEAR),r.setMagnificationFilter(EF.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,fe.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)}}jF("vtkTexture",tB);var iB={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function oB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iB,n),W(e,t),Y(e,t,["colorTexture"]),rB(e,t)}var aB={newInstance:ne(oB,"vtkFramebuffer"),extend:oB};function sB(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(de.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 lB={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function uB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lB,n),de.obj(e,t),de.get(e,t,["currentOperation"]),de.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),sB(e,t)}var cB={newInstance:de.newInstance(uB,"vtkRenderPass"),extend:uB};function dB(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 i=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),a=0;a0&&t.volumeCount>0||t.depthRequested){var c=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=aB.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var d=t.framebuffer.getSize();null!==d&&d[0]===c[0]&&d[1]===c[1]||(t.framebuffer.create(c[0],c[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),l.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),l.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),l.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),l.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),l.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 pB={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function fB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pB,n),cB.extend(e,t,n),de.get(e,t,["framebuffer"]),dB(e,t)}var hB={newInstance:de.newInstance(fB,"vtkForwardPass"),extend:fB},mB=n(9560),gB=n.n(mB),vB=de.vtkErrorMacro;function yB(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 vB("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 bB={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function wB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bB,n),de.obj(e,t),de.setGet(e,t,["shaderType","source","error","handle","context"]),yB(e,t)}var xB={newInstance:de.newInstance(wB,"vtkShader"),extend:wB},SB=de.vtkErrorMacro;function CB(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):(SB("Links failed: ".concat(t.error)),0):(SB(t.error),0):(SB(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),SB(t.fragmentShader.getError()),0):(SB(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),SB(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 SB("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(i,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(i,!1,o),!0},e.setUniformf=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(i,r),!0)},e.setUniformfv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(i,r),!0)},e.setUniformi=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(i,r),!0)},e.setUniformiv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(i,r),!0)},e.setUniform2f=function(n,r,i){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===i)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,i),!0},e.setUniform2fv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(i,r),!0)},e.setUniform2i=function(n,r,i){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===i)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,i),!0},e.setUniform2iv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(i,r),!0)},e.setUniform3f=function(n,r,i,o){var a=e.findUniform(n);if(-1===a)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(a,r,i,o),!0},e.setUniform3fArray=function(n,r){var i=e.findUniform(n);if(-1===i)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(i,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(i,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 i=arguments.length,o=new Array(i>1?i-1:0),a=1;a1?i-1:0),a=1;a1?i-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AB,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=xB.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=xB.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=xB.newInstance(),t.geometryShader.setShaderType("Geometry"),de.obj(e,t),de.get(e,t,["lastCameraMTime"]),de.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),CB(e,t)}var _B={newInstance:de.newInstance(PB,"vtkShaderProgram"),extend:PB,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var a="";r&&(a="g");var s=new RegExp(t,a),l=e.replace(s,i);return{replace:o,result:l}}},OB=["lastShaderBound","context","openGLRenderWindow"];function EB(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var i=n;r.length>0&&(i=_B.substitute(i,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),a="\n",s="#version 100\n";o?s="#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")&&(a="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(a+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),i=_B.substitute(i,"//VTK::System::Dec",["".concat(s,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",a,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var l=_B.substitute(e,"//VTK::System::Dec",["".concat(s,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(l=_B.substitute(l,"varying","out").result,i=_B.substitute(i,"varying","in").result,i=_B.substitute(i,"gl_FragData\\[0\\]","fragOutput0").result,i=_B.substitute(i,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:l,FSSource:i,GSSource:_B.substitute(r,"//VTK::System::Dec",s).result}},e.readyShaderProgramArray=function(t,n,r){var i=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(i.VSSource,i.FSSource,i.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 i="".concat(e).concat(n).concat(r),o=gB()(i);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var a=_B.newInstance();return a.setContext(t.context),a.getVertexShader().setSource(e),a.getFragmentShader().setSource(n),r&&a.getGeometryShader().setSource(r),a.setMd5Hash(o),t.shaderPrograms[o]=a,a}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 TB={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function DB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,TB,n),t.shaderPrograms={},de.obj(e,t),de.setGet(e,t,OB),EB(e,t)}var IB={newInstance:de.newInstance(DB,"vtkShaderCache"),extend:DB};function kB(e,t){t.classHierarchy.push("vtkRenderWindowViewNode"),e.getViewNodeFactory=function(){return null},e.getAspectRatio=function(){return t.size[0]/t.size[1]},e.getAspectRatioForRenderer=function(e){var n=e.getViewportByReference();return t.size[0]*(n[2]-n[0])/((n[3]-n[1])*t.size[1])},e.isInViewport=function(t,n,r){var i=r.getViewportByReference(),o=e.getFramebufferSize();return i[0]*o[0]<=t&&i[2]*o[0]>=t&&i[1]*o[1]<=n&&i[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 i=e.getFramebufferSize();return[t/i[0],n/i[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var i=e.getFramebufferSize();return[t*i[0],n*i[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,i){var o=i.worldToView(t,n,r),a=e.getViewportSize(i),s=i.viewToProjection(o[0],o[1],o[2],a[0]/a[1]),l=i.projectionToNormalizedDisplay(s[0],s[1],s[2]);return e.normalizedDisplayToDisplay(l[0],l[1],l[2])},e.displayToWorld=function(t,n,r,i){var o=e.displayToNormalizedDisplay(t,n,r),a=i.normalizedDisplayToProjection(o[0],o[1],o[2]),s=e.getViewportSize(i),l=i.projectionToView(a[0],a[1],a[2],s[0]/s[1]);return i.viewToWorld(l[0],l[1],l[2])},e.normalizedDisplayToViewport=function(t,n,r,i){var o=i.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var a=e.normalizedDisplayToDisplay(t,n,r);return[a[0]-o[0]-.5,a[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,i){var o=e.getViewportSize(i);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 i=e.getFramebufferSize();return[t*(i[0]-1),n*(i[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,i){var o=i.getViewportByReference(),a=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,s=n+o[1]+.5;return e.displayToNormalizedDisplay(a,s,r)},e.getPixelData=function(e,t,n,r){de.vtkErrorMacro("not implemented")}}var MB={size:void 0,selector:void 0};function NB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MB,n),t.size||(t.size=[300,300]),de.getArray(e,t,["size"],2),de.get(e,t,["selector"]),NF.extend(e,t,n),kB(e,t)}var RB={newInstance:de.newInstance(NB,"vtkRenderWindowViewNode"),extend:NB},FB=de.vtkErrorMacro;function BB(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,LB,n),de.obj(e,t),t.textureUnits=[],de.get(e,t,["numberOfTextureUnits"]),de.setGet(e,t,["context"]),BB(e,t)}var jB={newInstance:de.newInstance(VB,"vtkOpenGLTextureUnitManager"),extend:VB},UB={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}};function GB(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 zB=UB.PassTypes,WB=Hu.SelectionContent,HB=Hu.SelectionField,KB=yi.FieldAssociations,qB=de.vtkErrorMacro;function XB(e){return"".concat(e.propID," ").concat(e.compositeID)}function YB(e,t,n,r){if(!n)return 0;var i=4*(t*(r[2]-r[0]+1)+e),o=[];o[0]=n[i],o[1]=n[i+1],o[2]=n[i+2];var a=o[2];return a*=256,a+=o[1],(a*=256)+o[0]}function ZB(e,t,n,r){var i=n<0?0:n;if(0===i){if(r[0]=t[0],r[1]=t[1],t[0]e.area[2]||t[1]e.area[3])return null;var o=[t[0]-e.area[0],t[1]-e.area[1]],a=YB(o[0],o[1],e.pixBuffer[zB.ACTOR_PASS],e.area);if(a<=0)return null;var s={valid:!0};s.propID=a-1,s.prop=e.props[s.propID];var l=YB(o[0],o[1],e.pixBuffer[zB.COMPOSITE_INDEX_PASS],e.area);if((l<0||l>16777215)&&(l=0),s.compositeID=l-1,e.captureZValues){var u=4*(o[1]*(e.area[2]-e.area[0]+1)+o[0]);s.zValue=(256*e.zBuffer[u]+e.zBuffer[u+1])/65535,s.displayPosition=t}return s}var c=[t[0],t[1]],d=[0,0],p=ZB(e,t,0,r);if(p&&p.valid)return p;for(var f=1;ff?c[1]-f:0;h<=c[1]+f;++h){if(d[1]=h,c[0]>=f&&(d[0]=c[0]-f,(p=ZB(e,d,0,r))&&p.valid))return p;if(d[0]=c[0]+f,(p=ZB(e,d,0,r))&&p.valid)return p}for(var m=c[0]>=f?c[0]-(f-1):0;m<=c[0]+(f-1);++m){if(d[0]=m,c[1]>=f&&(d[1]=c[1]-f,(p=ZB(e,d,0,r))&&p.valid))return p;if(d[1]=c[1]+f,(p=ZB(e,d,0,r))&&p.valid)return p}}return r[0]=t[0],r[1]=t[1],null}function JB(e,t,n,r,i){var o=[],a=0;return t.forEach((function(t,s){var l=Hu.newInstance();switch(l.setContentType(WB.INDICES),e){case KB.FIELD_ASSOCIATION_CELLS:l.setFieldType(HB.CELL);break;case KB.FIELD_ASSOCIATION_POINTS:l.setFieldType(HB.POINT);break;default:qB("Unknown field association")}l.getProperties().propID=t.info.propID,l.getProperties().prop=t.info.prop,l.getProperties().compositeID=t.info.compositeID,l.getProperties().pixelCount=t.pixelCount,n&&(l.getProperties().displayPosition=[t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue],l.getProperties().worldPosition=i.displayToWorld(t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue,r)),l.setSelectionList(t.attributeIDs),o[a]=l,a++})),o}function QB(e,t,n,r,i){for(var o=Math.floor(t),a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=new Map,c=[0,0],d=a;d<=l;d++)for(var p=o;p<=s;p++){var f=ZB(e,[p,d],0,c);if(f&&f.valid){var h=XB(f);if(u.has(h)){var m=u.get(h);m.pixelCount++,e.captureZValues&&f.zValue0&&(--i in t.hitProps||(t.hitProps[i]=!0))}},e.renderProp=function(n){t.currentPass===zB.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+1),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===zB.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+1)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.passTypeToString=function(e){return de.enumToString(zB,e)},e.isPropHit=function(e){return Boolean(t.hitProps[e])},e.setPropColorValueFromInt=function(e){t.propColorValue[0]=e%256/255,t.propColorValue[1]=Math.floor(e/256)%256/255,t.propColorValue[2]=Math.floor(e/65536)%256/255},e.getPixelInformation=function(n,r,i){var o=r<0?0:r;if(0===o){if(i[0]=n[0],i[1]=n[1],n[0]t.area[2]||n[1]t.area[3])return null;var a=[n[0]-t.area[0],n[1]-t.area[1]],s=YB(a[0],a[1],t.pixBuffer[zB.ACTOR_PASS],t.area);if(s<=0)return null;var l={valid:!0};l.propID=s-1,l.prop=t.props[l.propID];var u=YB(a[0],a[1],t.pixBuffer[zB.COMPOSITE_INDEX_PASS],t.area);if((u<0||u>16777215)&&(u=0),l.compositeID=u-1,t.captureZValues){var c=4*(a[1]*(t.area[2]-t.area[0]+1)+a[0]);l.zValue=(256*t.zBuffer[c]+t.zBuffer[c+1])/65535,l.displayPosition=n}return l}var d=[n[0],n[1]],p=[0,0],f=e.getPixelInformation(n,0,i);if(f&&f.valid)return f;for(var h=1;hh?d[1]-h:0;m<=d[1]+h;++m){if(p[1]=m,d[0]>=h&&(p[0]=d[0]-h,(f=e.getPixelInformation(p,0,i))&&f.valid))return f;if(p[0]=d[0]+h,(f=e.getPixelInformation(p,0,i))&&f.valid)return f}for(var g=d[0]>=h?d[0]-(h-1):0;g<=d[0]+(h-1);++g){if(p[0]=g,d[1]>=h&&(p[1]=d[1]-h,(f=e.getPixelInformation(p,0,i))&&f.valid))return f;if(p[1]=d[1]+h,(f=e.getPixelInformation(p,0,i))&&f.valid)return f}}return i[0]=n[0],i[1]=n[1],null},e.generateSelection=function(n,r,i,o){for(var a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=Math.floor(o),c=new Map,d=[0,0],p=s;p<=u;p++)for(var f=a;f<=l;f++){var h=[f,p],m=e.getPixelInformation(h,0,d);if(m&&m.valid){var g=XB(m);if(c.has(g)){var v=c.get(g);v.pixelCount++,t.captureZValues&&m.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eL,n),$R.extend(e,t,n),t.propColorValue=[0,0,0],t.props=[],t.area||(t.area=[0,0,0,0]),de.setGetArray(e,t,["area"],4),de.setGet(e,t,["renderer","currentPass","openGLRenderWindow"]),de.setGetArray(e,t,["propColorValue"],3),de.event(e,t,"event"),$B(e,t)}var nL=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,i="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&i&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,rL("using webgl2")),r||(rL("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"),i=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(i,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),oL&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):iL("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,y(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=cB.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t._textureResourceIds.get(n);if(void 0===r){var i=e.getTextureUnitManager().allocate();i<0?iL("Hardware does not support the number of textures defined."):(t._textureResourceIds.set(n,i),t.context.activeTexture(t.context.TEXTURE0+i))}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 fe.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 fe.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",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.resetCamera,o=void 0!==i&&i,a=r.size,s=void 0===a?null:a,l=r.scale,u=void 0===l?1:l;if(t.deleted)return null;t.imageFormat=n;var c=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:s||1!==u?s||t.size.map((function(e){return e*u})):null},new Promise((function(n,r){var i=e.onImageReady((function(r){if(null===t._screenshot.size)t.notifyStartCaptureImage=c,i.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach((function(e){return(0,e.restoreParamsFn)(e.arg)})),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),n(r);else{var a=document.createElement("img");a.style=aL,a.src=r,t._screenshot.placeHolder=t.el.appendChild(a),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),o&&(t._screenshot.cameras=t.renderable.getRenderers().map((function(e){var t=e.getActiveCamera(),n=t.get("focalPoint","position","parallelScale");return{resetCameraFn:e.resetCamera,restoreParamsFn:t.set,arg:JSON.parse(JSON.stringify(n))}})),t._screenshot.cameras.forEach((function(e){return(0,e.resetCameraFn)()}))),e.traverseAllPasses()}}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),i=n.getExtension("OES_texture_half_float"),o=n.getExtension("WEBGL_debug_renderer_info"),a=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),l=[["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&&sL(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&sL(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&sL(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&sL(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&sL(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[i&&sL(n,n.RGBA,i.HALF_FLOAT_OES)?"RGBA":"",i&&sL(n,n.RGB,i.HALF_FLOAT_OES)?"RGB":"",i&&sL(n,n.LUMINANCE,i.HALF_FLOAT_OES)?"LUMINANCE":"",i&&sL(n,n.ALPHA,i.HALF_FLOAT_OES)?"ALPHA":"",i&&sL(n,n.LUMINANCE_ALPHA,i.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&sL(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&sL(n,n.RGB,n.FLOAT)?"RGB":"",r&&sL(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&sL(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&sL(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",a?n.getParameter(a.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",o&&n.getParameter(o.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",o&&n.getParameter(o.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],u={};l.length;){var c=g(l.pop(),3),d=c[0],p=c[1],f=c[2];p&&(u[p]={label:d,value:f})}return u},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),i=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,i.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,fL,n),RB.extend(e,t,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",cL(),t.selector||(t.selector=nL.newInstance(),t.selector.setOpenGLRenderWindow(e)),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,t.myFactory=WF.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",mL),t.shaderCache=IB.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=hB.newInstance(),de.event(e,t,"imageReady"),de.event(e,t,"haveVRDisplay"),de.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),de.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),de.setGetArray(e,t,["size","vrResolution"],2),pL(e,t)}var mL=de.newInstance(hL,"vtkOpenGLRenderWindow");nF("WebGL",mL);var gL={newInstance:mL,extend:hL,pushMonitorGLContextCount:function(e){uL.push(e)},popMonitorGLContextCount:function(e){return uL.pop()}};function vL(e,t){t.classHierarchy.push("vtkWebGPUShaderModule"),e.initialize=function(e,n){t.device=e,t.handle=t.device.getHandle().createShaderModule({code:n.getCode()})}}var yL={device:null,handle:null};function bL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yL,n),de.obj(e,t),de.get(e,t,["lastCameraMTime"]),de.setGet(e,t,["device","handle"]),vL(e,t)}var wL={newInstance:de.newInstance(bL,"vtkWebGPUShaderModule"),extend:bL};function xL(e,t){t.classHierarchy.push("vtkWebGPUShaderCache"),e.getShaderModule=function(e){for(var n=e.getType(),r=e.getHash(),i=t._shaderModules.keys(),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SL,n),t._shaderModules=new Map,de.obj(e,t),de.setGet(e,t,["device","window"]),xL(e,t)}var AL={newInstance:de.newInstance(CL,"vtkWebGPUShaderCache"),extend:CL,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var a="";r&&(a="g");var s=new RegExp(t,a),l=e.replace(s,i);return{replace:o,result:l}}},PL=["setBindGroup","setVertexBuffer","draw"];function _L(e,t){t.classHierarchy.push("vtkWebGPURenderEncoder"),e.begin=function(e){t.handle=e.beginRenderPass(t.description)},e.end=function(){t.handle.endPass()},e.setPipeline=function(e){t.handle.setPipeline(e.getHandle());var n=e.getPipelineDescription();if(t.colorTextureViews.length!==n.fragment.targets.length)console.log("mismatched attachment counts on pipeline ".concat(n.fragment.targets.length," while encoder has ").concat(t.colorTextureViews.length)),console.trace();else for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OL,n),W(e,t),t.description={colorAttachments:[{view:void 0,loadValue:"load",storeOp:"store"}],depthStencilAttachment:{view:void 0,depthLoadValue:1,depthStoreOp:"store",stencilLoadValue:0,stencilStoreOp:"store"}},t.replaceShaderCodeFunction=function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");var n=t.getCode();n=AL.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = computedColor;"]).result,t.setCode(n)},t.pipelineSettings={primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"less-equal",format:"depth32float"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}},t.colorTextureViews=[],H(e,t,["boundPipeline","colorTextureViews"]),Y(e,t,["depthTextureView","description","handle","pipelineHash","pipelineSettings","replaceShaderCodeFunction"]),_L(e,t)}var TL={newInstance:ne(EL,"vtkWebGPURenderEncoder"),extend:EL},DL={BufferUsage:{Verts:0,Lines:1,Triangles:2,Strips:3,LinesFromStrips:4,LinesFromTriangles:5,Points:6,UniformArray:7,PointArray:8,NormalsFromPoints:9,Texture:10,RawVertex:11,Storage:12},PrimitiveTypes:{Start:0,Points:0,Lines:1,Triangles:2,TriangleStrips:3,TriangleEdges:4,TriangleStripEdges:5,End:6}};function IL(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 kL=["getMappedRange","mapAsync","unmap"];function ML(e,t){t.classHierarchy.push("vtkWebGPUBuffer"),e.create=function(e,n){t.handle=t.device.getHandle().createBuffer({size:e,usage:n}),t.sizeInBytes=e,t.usage=n},e.write=function(e){!function(e,t,n,r){var i=r.byteLength,o=e.createBuffer({size:i,usage:GPUBufferUsage.COPY_SRC,mappedAtCreation:!0}),a=o.getMappedRange(0,i);new Uint8Array(a).set(new Uint8Array(r)),o.unmap();var s=e.createCommandEncoder();s.copyBufferToBuffer(o,0,t,0,i);var l=s.finish();e.queue.submit([l]),o.destroy()}(t.device.getHandle(),t.handle,0,e.buffer)},e.createAndWrite=function(e,n){t.handle=t.device.getHandle().createBuffer({size:e.byteLength,usage:n,mappedAtCreation:!0}),t.sizeInBytes=e.byteLength,t.usage=n,new Uint8Array(t.handle.getMappedRange()).set(new Uint8Array(e.buffer)),t.handle.unmap()};for(var n=function(n){e[kL[n]]=function(){var e;return(e=t.handle)[kL[n]].apply(e,arguments)}},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,NL,n),de.obj(e,t),de.get(e,t,["handle","sizeInBytes","usage"]),de.setGet(e,t,["strideInBytes","device","arrayInformation","sourceTime"]),ML(e,t)}var FL=function(e){for(var t=1;t"):3===n?"vec3<".concat(t,">"):2===n?"vec2<".concat(t,">"):t},GL=function(e){if(!e)return 0;var t=1;return"vec"===e.substring(0,3)?t=e[3]:"mat"===e.substring(0,3)&&(t=e[3]*e[5]),4*t},zL=function(e){if(e)return e.includes("f32")?"Float32Array":e.includes("i32")?"Int32Array":e.includes("u32")?"Uint32Array":void M("unknown format ".concat(e))};function WL(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 HL(e){for(var t=1;t1?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 numPoints>2?3*(e-2):0}};function QL(e){switch(e){case qL.Points:return"points";case qL.Lines:return"lines";case qL.Triangles:return"polys";case qL.TriangleStrips:return"strips";default:return""}}function $L(e,t,n){var r=null;r=t===XL.POINTS||"points"===n?JL.anythingToPoints:t===XL.WIREFRAME||"lines"===n?JL["".concat(n,"ToWireframe")]:JL["".concat(n,"ToSurface")];for(var i=e.getData(),o=i.length,a=0,s=0;s2)for(var i=0;i2){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nV,n),W(e,t),t.buffers=new WeakMap,Y(e,t,["device"]),tV(e,t)}var iV=HL(HL({newInstance:ne(rV),extend:rV},{}),DL);function oV(e,t){t.classHierarchy.push("vtkWebGPUSampler"),e.create=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.device=e,t.handle=t.device.getHandle().createSampler({magFilter:n.magFilter?n.magFilter:"nearest",minFilter:n.minFilter?n.minFilter:"nearest"}),t.bindGroupTime.modified()},e.getShaderCode=function(e,n){return"[[binding(".concat(e,"), group(").concat(n,")]] var ").concat(t.name,": sampler;")},e.getBindGroupEntry=function(){return{resource:t.handle}}}var aV={device:null,handle:null,name:null};function sV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,aV,n),de.obj(e,t),t.bindGroupLayoutEntry={visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,sampler:{}},t.bindGroupTime={},de.obj(t.bindGroupTime,{mtime:0}),de.get(e,t,["bindGroupTime","handle"]),de.setGet(e,t,["bindGroupLayoutEntry","device","name"]),oV(e,t)}var lV={newInstance:de.newInstance(sV),extend:sV};function uV(e,t){t.classHierarchy.push("vtkWebGPUTextureView"),e.create=function(e,n){t.texture=e,t.options=n,t.options.dimension=t.options.dimension||"2d",t.textureHandle=e.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupLayoutEntry.texture.viewDimension=t.options.dimension},e.getBindGroupEntry=function(){return{resource:e.getHandle()}},e.getShaderCode=function(e,n){return"[[binding(".concat(e,"), group(").concat(n,")]] var ").concat(t.name,": texture_").concat(t.options.dimension,";")},e.addSampler=function(n,r){var i=lV.newInstance();i.create(n,r),e.setSampler(i),t.sampler.setName("".concat(t.name,"Sampler"))},e.setName=function(n){t.sampler&&t.sampler.setName("".concat(n,"Sampler")),t.name!==n&&(t.name=n,e.modified())},e.getBindGroupTime=function(){return t.texture.getHandle()!==t.textureHandle&&(t.textureHandle=t.texture.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupTime.modified()),t.bindGroupTime},e.getHandle=function(){return t.texture.getHandle()!==t.textureHandle&&(t.textureHandle=t.texture.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupTime.modified()),t.handle}}var cV={texture:null,handle:null,name:null,sampler:null};function dV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cV,n),de.obj(e,t),t.bindGroupLayoutEntry={visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,texture:{viewDimension:"2d"}},t.bindGroupTime={},de.obj(t.bindGroupTime,{mtime:0}),de.get(e,t,["bindGroupTime","name","texture"]),de.setGet(e,t,["bindGroupLayoutEntry","sampler"]),uV(e,t)}var pV={newInstance:de.newInstance(dV),extend:dV},fV=iV.BufferUsage;function hV(e,t){t.classHierarchy.push("vtkWebGPUTexture"),e.create=function(e,n){t.device=e,t.width=n.width,t.height=n.height,t.depth=n.depth?n.depth:1;var r=1===t.depth?"2d":"3d";t.format=n.format?n.format:"rgbaunorm",t.usage=n.usage?n.usage:GPUTextureUsage.SAMPLED|GPUTextureUsage.COPY_DST,t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage,dimension:r})},e.assignFromHandle=function(e,n,r){t.device=e,t.handle=n,t.width=r.width,t.height=r.height,t.depth=r.depth?r.depth:1,t.format=r.format?r.format:"rgbaunorm",t.usage=r.usage?r.usage:GPUTextureUsage.SAMPLED|GPUTextureUsage.COPY_DST},e.writeImageData=function(e){var n=LL(t.format),r=t.width*n.stride;if(e.nativeArray){var i={usage:fV.Texture};e.dataArray&&(i.dataArray=e.dataArray,i.time=e.dataArray.getMTime()),i.nativeArray=e.nativeArray;var o=t.width*n.stride;if(o%256){for(var a=e.dataArray.getData(),s=256*Math.floor((o+255)/256),l=s/a.BYTES_PER_ELEMENT,u=o/a.BYTES_PER_ELEMENT,c=de.newTypedArray(a.name,l*t.height*t.depth),d=0;d2&&void 0!==arguments[2]?arguments[2]:1;e===t.width&&n===t.height&&r===t.depth||(t.width=e,t.height=n,t.depth=r,t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage}))},e.createView=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.dimension||(n.dimension=1===t.depth?"2d":"3d");var r=pV.newInstance();return r.create(e,n),r}}var mV={device:null,handle:null,buffer:null,ready:!1};function gV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mV,n),de.obj(e,t),de.get(e,t,["handle","ready","width","height","depth","format","usage"]),de.setGet(e,t,["device"]),hV(e,t)}var vV={newInstance:de.newInstance(gV),extend:gV};function yV(e,t){t.classHierarchy.push("vtkWebGPUOpaquePass"),e.traverse=function(n,r){if(!t.deleted){t.currentParent=r;var i=r.getDevice();if(t.renderEncoder)t.colorTexture.resize(r.getCanvas().width,r.getCanvas().height),t.depthTexture.resize(r.getCanvas().width,r.getCanvas().height);else{e.createRenderEncoder(),t.colorTexture=vV.newInstance(),t.colorTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"bgra8unorm",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.SAMPLED|GPUTextureUsage.COPY_SRC});var o=t.colorTexture.createView();o.setName("opaquePassColorTexture"),t.renderEncoder.setColorTextureView(0,o),t.depthFormat="depth32float",t.depthTexture=vV.newInstance(),t.depthTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:t.depthFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.SAMPLED|GPUTextureUsage.COPY_SRC});var a=t.depthTexture.createView();a.setName("opaquePassDepthTexture"),t.renderEncoder.setDepthTextureView(a)}t.renderEncoder.attachTextureViews(),e.setCurrentOperation("opaquePass"),n.setRenderEncoder(t.renderEncoder),n.traverse(e)}},e.getColorTextureView=function(){return t.renderEncoder.getColorTextureViews()[0]},e.getDepthTextureView=function(){return t.renderEncoder.getDepthTextureView()},e.createRenderEncoder=function(){t.renderEncoder=TL.newInstance(),t.renderEncoder.setPipelineHash("op")}}var bV={renderEncoder:null,colorTexture:null,depthTexture:null};function wV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bV,n),cB.extend(e,t,n),de.get(e,t,["colorTexture","depthTexture"]),yV(e,t)}var xV={newInstance:de.newInstance(wV,"vtkWebGPUOpaquePass"),extend:wV};function SV(e,t){t.classHierarchy.push("vtkWebGPUBindGroup"),e.setBindables=function(n){if(t.bindables.length===n.length){for(var r=!0,i=0;ir?o:r}if(r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,CV,n),de.obj(e,t),t.bindables=[],t.bindGroupTime={},de.obj(t.bindGroupTime,{mtime:0}),de.get(e,t,["bindGroupTime","handle","sizeInBytes","usage"]),de.setGet(e,t,["name","device","arrayInformation","sourceTime"]),SV(e,t)}var PV={newInstance:de.newInstance(AV),extend:AV};function _V(e,t){t.classHierarchy.push("vtkWebGPUPipeline"),e.getShaderDescriptions=function(){return t.shaderDescriptions},e.initialize=function(e){t.pipelineDescription=t.renderEncoder.getPipelineSettings(),t.pipelineDescription.primitive.topology=t.topology,t.pipelineDescription.vertex=t.vertexState;for(var n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OV,n),W(e,t),t.layouts=[],t.shaderDescriptions=[],H(e,t,["handle","pipelineDescription"]),Y(e,t,["device","renderEncoder","topology","vertexState"]),_V(e,t)}var TV={newInstance:ne(EV,"vtkWebGPUPipeline"),extend:EV};function DV(e,t){t.classHierarchy.push("vtkWebGPUShaderDescription"),e.hasOutput=function(e){return t.outputNames.includes(e)},e.addOutput=function(e,n){t.outputTypes.push(e),t.outputNames.push(n)},e.addBuiltinOutput=function(e,n){t.builtinOutputTypes.push(e),t.builtinOutputNames.push(n)},e.addBuiltinInput=function(e,n){t.builtinInputTypes.push(e),t.builtinInputNames.push(n)},e.replaceShaderCode=function(e,n){var r=[],i=[];if(n&&r.push(n.getShaderCode()),e||t.builtinInputNames.length){var o=[];if(o.push("struct ".concat(t.type,"Input\n{")),e)for(var a=e.getOutputNamesByReference(),s=e.getOutputTypesByReference(),l=0;l1&&(o.push("};"),i=o,r[r.length-1]+=",",r.push("input: ".concat(t.type,"Input")))}if(r.length&&(t.code=AL.substitute(t.code,"//VTK::IOStructs::Input",r).result),t.outputNames.length+t.builtinOutputNames.length){for(var c=["struct ".concat(t.type,"Output\n{")],d=0;d ".concat(t.type,"Output")]).result}t.code=AL.substitute(t.code,"//VTK::IOStructs::Dec",i).result}}var IV={type:null,hash:null,code:null,outputNames:null,outputTypes:null};function kV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,IV,n),t.outputNames=[],t.outputTypes=[],t.builtinOutputNames=[],t.builtinOutputTypes=[],t.builtinInputNames=[],t.builtinInputTypes=[],de.obj(e,t),de.setGet(e,t,["type","hash","code"]),de.getArray(e,t,["outputTypes","outputNames"]),DV(e,t)}var MV={newInstance:de.newInstance(kV,"vtkWebGPUShaderDescription"),extend:kV};function NV(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"vertex",i=n;Array.isArray(i)||(i=[i]);for(var o=0;ot.names[0]?1:0}))},e.removeBufferIfPresent=function(e){for(var n=0;n0&&(e+=",\n"),e="".concat(e," [[location(").concat(n,")]] ").concat(t.inputs[r].names[i]," : ").concat(a),n++}return e},e.getVertexInputInformation=function(){var e={};if(t.inputs.length){for(var n=[],r=0,i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FV,n),W(e,t),t.bindingDescriptions=[],t.attributeDescriptions=[],t.inputs=[],Y(e,t,["created","device","handle"]),RV(e,t)}var LV={newInstance:ne(BV,"vtkWebGPUVertexInput"),extend:BV},VV="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(vertex)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : vertexOutput;\n\n // var vertex: vec4 = vertexBC;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n //VTK::Position::Impl\n\n return output;\n}\n",jV="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n // var computedColor:vec4 = vec4(1.0,0.5,0.5,1.0);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n";function UV(e,t){t.classHierarchy.push("vtkWebGPUMapperHelper"),e.generateShaderDescriptions=function(n,r,i){var o=MV.newInstance({type:"vertex",hash:n,code:t.vertexShaderTemplate}),a=MV.newInstance({type:"fragment",hash:n,code:t.fragmentShaderTemplate}),s=r.getShaderDescriptions();s.push(o),s.push(a);for(var l=t.vertexShaderTemplate+t.fragmentShaderTemplate,u=new RegExp("//VTK::[^:]*::","g"),c=l.match(u).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return"replaceShader".concat(e.substring(7,e.length-2))})),d=0;d","[[builtin(position)]] Position");var i=r.getCode();i=AL.substitute(i,"//VTK::Position::Impl",[" output.Position = rendererUBO.SCPCMatrix*vertexBC;"]).result,r.setCode(i)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderTCoord=function(e,t,n){t.getShaderDescription("vertex").addOutput("vec2","tcoordVS")},t.shaderReplacements.set("replaceShaderTCoord",e.replaceShaderTCoord),e.addTextureView=function(e){t.textureViews.includes(e)||t.textureViews.push(e)},e.renderForPipeline=function(e){var n=e.getBoundPipeline();e.activateBindGroup(t.bindGroup),n.bindVertexInput(e,t.vertexInput),e.draw(t.numberOfVertices,t.numberOfInstances,0,0)},e.registerToDraw=function(){t.pipeline&&t.WebGPURenderer.registerPipelineCallback(t.pipeline,e.renderForPipeline)},e.render=function(n,r){e.build(n,r),n.setPipeline(t.pipeline),t.WebGPURenderer&&t.WebGPURenderer.bindUBO(n),e.renderForPipeline(n)},e.getBindables=function(){var e=[];t.UBO&&e.push(t.UBO),t.SSBO&&e.push(t.SSBO);for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,GV,n),de.obj(e,t),t.textureViews=[],t.vertexInput=LV.newInstance(),t.bindGroup=PV.newInstance(),t.bindGroup.setName("mapperBG"),t.fragmentShaderTemplate=t.fragmentShaderTemplate||jV,t.vertexShaderTemplate=t.vertexShaderTemplate||VV,t.shaderReplacements=new Map,de.get(e,t,["vertexInput"]),de.setGet(e,t,["device","fragmentShaderTemplate","interpolate","numberOfInstances","numberOfVertices","pipelineHash","shaderReplacements","SSBO","textureViews","topology","UBO","vertexShaderTemplate","WebGPURenderer"]),UV(e,t)}var WV={newInstance:de.newInstance(zV,"vtkWebGPUMapperHelper"),extend:zV};function HV(e,t){t.classHierarchy.push("vtkWebGPUFullScreenQuad"),e.replaceShaderPosition=function(e,t,n){var r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","[[builtin(position)]] Position");var i=r.getCode();i=AL.substitute(i,"//VTK::Position::Impl",["output.tcoordVS = vec2(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4(vertexBC, 1.0);"]).result,r.setCode(i)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition);var n=e.build;e.build=function(e,r){var i=r.getBufferManager().getFullScreenQuadBuffer();t.vertexInput.addBuffer(i,["vertexBC"]),t.numberOfVertices=6,n(e,r)}}var KV={};function qV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,KV,n),WV.extend(e,t,n),HV(e,t)}var XV={newInstance:de.newInstance(qV,"vtkWebGPUFullScreenQuad"),extend:qV};function YV(e,t){t.classHierarchy.push("vtkWebGPUOrderIndependentTranslucentPass"),e.traverse=function(n,r){if(!t.deleted){t.currentParent=r;var i=r.getDevice();if(t.translucentRenderEncoder)t.translucentColorTexture.resizeToMatch(t.colorTextureView.getTexture()),t.translucentAccumulateTexture.resizeToMatch(t.colorTextureView.getTexture());else{e.createRenderEncoder(),e.createFinalEncoder(),t.translucentColorTexture=vV.newInstance(),t.translucentColorTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"rgba16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.SAMPLED});var o=t.translucentColorTexture.createView();o.setName("oitpColorTexture"),t.translucentRenderEncoder.setColorTextureView(0,o),t.translucentAccumulateTexture=vV.newInstance(),t.translucentAccumulateTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.SAMPLED});var a=t.translucentAccumulateTexture.createView();a.setName("oitpAccumTexture"),t.translucentRenderEncoder.setColorTextureView(1,a),t.fullScreenQuad=XV.newInstance(),t.fullScreenQuad.setDevice(r.getDevice()),t.fullScreenQuad.setPipelineHash("oitpfsq"),t.fullScreenQuad.setTextureViews(t.translucentRenderEncoder.getColorTextureViews()),t.fullScreenQuad.setFragmentShaderTemplate("\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var tcoord: vec2 = vec2(i32(input.fragPos.x), i32(input.fragPos.y));\n var reveal: f32 = textureLoad(oitpAccumTexture, tcoord, 0).r;\n if (reveal == 1.0) { discard; }\n var tcolor: vec4 = textureLoad(oitpColorTexture, tcoord, 0);\n var total: f32 = max(tcolor.a, 0.01);\n var computedColor: vec4 = vec4(tcolor.r/total, tcolor.g/total, tcolor.b/total, 1.0 - reveal);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n")}t.translucentRenderEncoder.setDepthTextureView(t.depthTextureView),t.translucentRenderEncoder.attachTextureViews(),e.setCurrentOperation("translucentPass"),n.setRenderEncoder(t.translucentRenderEncoder),n.traverse(e),e.finalPass(r,n)}},e.finalPass=function(e,n){t.translucentFinalEncoder.setColorTextureView(0,t.colorTextureView),t.translucentFinalEncoder.attachTextureViews(),n.setRenderEncoder(t.translucentFinalEncoder),t.translucentFinalEncoder.begin(e.getCommandEncoder()),n.scissorAndViewport(t.translucentFinalEncoder),t.fullScreenQuad.render(t.translucentFinalEncoder,e.getDevice()),t.translucentFinalEncoder.end()},e.getTextures=function(){return[t.translucentColorTexture,t.translucentAccumulateTexture]},e.createRenderEncoder=function(){t.translucentRenderEncoder=TL.newInstance();var e=t.translucentRenderEncoder.getDescription();e.colorAttachments=[{view:void 0,loadValue:[0,0,0,0],storeOp:"store"},{view:void 0,loadValue:[1,0,0,0],storeOp:"store"}],e.depthStencilAttachment={view:void 0,depthLoadValue:"load",depthStoreOp:"store",stencilLoadValue:"load",stencilStoreOp:"store"},t.translucentRenderEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor"),t.addOutput("f32","outAccum"),t.addBuiltinInput("vec4","[[builtin(position)]] fragPos");var n=t.getCode();n=AL.substitute(n,"//VTK::RenderEncoder::Impl",["var w: f32 = 1.0 - input.fragPos.z * 0.9;","output.outColor = vec4(computedColor.rgb*computedColor.a, computedColor.a) * w;","output.outAccum = computedColor.a;"]).result,t.setCode(n)})),t.translucentRenderEncoder.setPipelineHash("oitpr"),t.translucentRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!1,depthCompare:"less",format:"depth32float"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"one",dstFactor:"one"},alpha:{srcfactor:"one",dstFactor:"one"}}},{format:"r16float",blend:{color:{srcFactor:"zero",dstFactor:"one-minus-src"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createFinalEncoder=function(){t.translucentFinalEncoder=TL.newInstance(),t.translucentFinalEncoder.setDescription({colorAttachments:[{view:null,loadValue:"load",storeOp:"store"}]}),t.translucentFinalEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor"),t.addBuiltinInput("vec4","[[builtin(position)]] fragPos");var n=t.getCode();n=AL.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(computedColor.rgb*computedColor.a, computedColor.a);"]).result,t.setCode(n)})),t.translucentFinalEncoder.setPipelineHash("oitpf"),t.translucentFinalEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})}}var ZV={colorTextureView:null,depthTextureView:null};function JV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZV,n),cB.extend(e,t,n),de.setGet(e,t,["colorTextureView","depthTextureView"]),YV(e,t)}var QV={newInstance:de.newInstance(JV,"vtkWebGPUOrderIndependentTranslucentPass"),extend:JV},$V=iV.BufferUsage,ej=de.vtkErrorMacro;function tj(e,t){t.classHierarchy.push("vtkWebGPUUniformBuffer"),e.addEntry=function(e,n){t._bufferEntryNames.has(e)?ej("entry named ".concat(e," already exists")):(t.sortDirty=!0,t._bufferEntryNames.set(e,t.bufferEntries.length),t.bufferEntries.push({name:e,type:n,sizeInBytes:GL(n),offset:-1,nativeType:zL(n),packed:!1}))},e.sortBufferEntries=function(){if(t.sortDirty){for(var e=0,n=[],r=0;r4&&(x.packed=!0,x.offset=e,n.push(x),e+=x.sizeInBytes)}for(var S=0;S ").concat(t.name,": ").concat(t.name,"Struct;")),i.join("\n")}}var nj={bufferEntries:null,bufferEntryNames:null,sizeInBytes:0,name:null,bindGroupLayoutEntry:null,bindGroupEntry:null};function rj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nj,n),de.obj(e,t),t._bufferEntryNames=new Map,t.bufferEntries=[],t.bindGroupLayoutEntry=t.bindGroupLayoutEntry||{buffer:{type:"uniform"}},t.sendTime={},de.obj(t.sendTime,{mtime:0}),t.bindGroupTime={},de.obj(t.bindGroupTime,{mtime:0}),t.sendDirty=!0,t.sortDirty=!0,de.get(e,t,["binding","bindGroupTime"]),de.setGet(e,t,["bindGroupLayoutEntry","device","name","sizeInBytes"]),tj(e,t)}var ij={newInstance:de.newInstance(rj,"vtkWebGPUUniformBuffer"),extend:rj},oj=iV.BufferUsage,aj=de.vtkErrorMacro;function sj(e,t){t.classHierarchy.push("vtkWebGPUStorageBuffer"),e.addEntry=function(e,n){if(t._bufferEntryNames.has(e))aj("entry named ".concat(e," already exists"));else{t._bufferEntryNames.set(e,t.bufferEntries.length);var r=GL(n);t.bufferEntries.push({name:e,type:n,sizeInBytes:r,offset:t.sizeInBytes,nativeType:zL(n)}),t.sizeInBytes+=r}},e.send=function(e){if(!t._buffer){var n={nativeArray:t.Float32Array,time:0,usage:oj.Storage};return t._buffer=e.getBufferManager().getBuffer(n),t.bindGroupTime.modified(),void t._sendTime.modified()}e.getHandle().queue.writeBuffer(t._buffer.getHandle(),0,t.arrayBuffer,0,t.sizeInBytes*t.numberOfInstances),t._sendTime.modified()},e.createView=function(e){e in t==0&&(t.arrayBuffer||(t.arrayBuffer=new ArrayBuffer(t.sizeInBytes*t.numberOfInstances)),t[e]=de.newTypedArray(e,t.arrayBuffer))},e.setValue=function(n,r,i){var o=t._bufferEntryNames.get(n);if(void 0!==o){var a=t.bufferEntries[o];e.createView(a.nativeType);var s=t[a.nativeType];s[(a.offset+r*t.sizeInBytes)/s.BYTES_PER_ELEMENT]=i}else aj("entry named ".concat(n," not found in UBO"))},e.setArray=function(n,r,i){var o=t._bufferEntryNames.get(n);if(void 0!==o){var a=t.bufferEntries[o];e.createView(a.nativeType);for(var s=t[a.nativeType],l=(a.offset+r*t.sizeInBytes)/s.BYTES_PER_ELEMENT,u=0;u;\n};\n[[binding(").concat(e,"), group(").concat(n,")]] var ").concat(t.name,": [[access(read)]] ").concat(t.name,"Struct;\n")),r.join("\n")},e.getBindGroupEntry=function(){return{resource:{buffer:t._buffer.getHandle()}}},e.clearData=function(){t.numberOfInstances=0,t.sizeInBytes=0,t.bufferEntries=[],t._bufferEntryNames=new Map,t._buffer=null,delete t.arrayBuffer,delete t.Float32Array}}var lj={bufferEntries:null,bufferEntryNames:null,sizeInBytes:0,name:null,numberOfInstances:1};function uj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lj,n),de.obj(e,t),t._bufferEntryNames=new Map,t.bufferEntries=[],t._sendTime={},de.obj(t._sendTime,{mtime:0}),t.bindGroupTime={},de.obj(t.bindGroupTime,{mtime:0}),t.bindGroupLayoutEntry=t.bindGroupLayoutEntry||{buffer:{type:"read-only-storage"}},de.get(e,t,["bindGroupTime"]),de.setGet(e,t,["device","bindGroupLayoutEntry","name","numberOfInstances","sizeInBytes"]),sj(e,t)}var cj={newInstance:de.newInstance(uj,"vtkWebGPUStorageBuffer"),extend:uj},dj="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n// dummy for now till they support 3d textures\nfn getTextureValue(vTex: texture_3d, tpos: vec4, vNum: i32) -> f32\n{\n return textureSampleLevel(vTex, clampSampler, tpos.xyz, 0.0).a;\n // 512.0 * f32(vNum) + 20.0 * trunc(10.0 * tpos.z);\n}\n\nfn getGradient(vTex: texture_3d, tpos: vec4, vNum: i32, scalar: f32) -> vec4\n{\n var result: vec4;\n\n var tstep: vec4 = volumeSSBO.values[vNum].tstep;\n result.x = getTextureValue(vTex, tpos + vec4(tstep.x, 0.0, 0.0, 1.0), vNum) - scalar;\n result.y = getTextureValue(vTex, tpos + vec4(0.0, tstep.y, 0.0, 1.0), vNum) - scalar;\n result.z = getTextureValue(vTex, tpos + vec4(0.0, 0.0, tstep.z, 1.0), vNum) - scalar;\n\n // divide by spacing\n result = result / volumeSSBO.values[vNum].spacing;\n\n var grad: f32 = 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 (grad > 0.0)\n {\n result = result * (1.0 / grad);\n }\n\n result.w = grad;\n\n return result;\n}\n\nfn processVolume(vTex: texture_3d, vNum: i32, cNum: i32, posSC: vec4, tfunRows: f32) -> vec4\n{\n var outColor: vec4 = vec4(0.0, 0.0, 0.0, 0.0);\n\n // convert to tcoords and reject if outside the volume\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*posSC;\n // var tpos: vec4 = posSC*0.003;\n if (tpos.x < 0.0 || tpos.y < 0.0 || tpos.z < 0.0 ||\n tpos.x > 1.0 || tpos.y > 1.0 || tpos.z > 1.0) { return outColor; }\n\n var scalar: f32 = getTextureValue(vTex, tpos, vNum);\n\n var coord: vec2 =\n vec2(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,\n (0.5 + 2.0 * f32(vNum)) / tfunRows);\n var color: vec4 = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);\n coord.x = scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift;\n\n var gofactor: f32 = 1.0;\n if (componentSSBO.values[cNum].gomin < 1.0)\n {\n var normal: vec4 = getGradient(vTex, tpos, vNum, scalar);\n gofactor = clamp(normal.a*componentSSBO.values[cNum].goScale + componentSSBO.values[cNum].goShift,\n componentSSBO.values[cNum].gomin, componentSSBO.values[cNum].gomax);\n }\n var opacity: f32 = gofactor*textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;\n outColor = vec4(color.rgb, opacity);\n\n //VTK::Volume::Process\n\n return outColor;\n}\n\nfn composite(rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4) -> vec4\n{\n // initial ray position is at the beginning\n var rayPosSC: vec4 = minPosSC;\n\n // how many rows (tfuns) do we have in our tfunTexture\n var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);\n\n var curDist: f32 = 0.0;\n var computedColor: vec4 = vec4(0.0, 0.0, 0.0, 0.0);\n var sampleColor: vec4;\n loop\n {\n // for each volume, sample and accumulate color\n\n//VTK::Volume::Calls\n\n // increment position\n curDist = curDist + mapperUBO.SampleDistance;\n rayPosSC = rayPosSC + rayStepSC;\n\n // check if we have reached a terminating condition\n if (curDist > rayLengthSC) { break; }\n if (computedColor.a > 0.98) { break; }\n }\n return computedColor;\n}\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var rayMax: f32 = textureSampleLevel(maxTexture, clampSampler, input.tcoordVS, 0.0).r;\n var rayMin: f32 = textureSampleLevel(minTexture, clampSampler, input.tcoordVS, 0.0).r;\n\n // discard empty rays\n if (rayMax <= rayMin) { discard; }\n else\n {\n var winDimsI32: vec2 = textureDimensions(minTexture);\n var winDims: vec2 = vec2(f32(winDimsI32.x), f32(winDimsI32.y));\n\n // compute start and end ray positions in view coordinates\n var minPosSC: vec4 = rendererUBO.PCSCMatrix*vec4(2.0*input.fragPos.x/winDims.x - 1.0, 1.0 - 2.0 * input.fragPos.y/winDims.y, rayMin, 1.0);\n minPosSC = minPosSC * (1.0 / minPosSC.w);\n var maxPosSC: vec4 = rendererUBO.PCSCMatrix*vec4(2.0*input.fragPos.x/winDims.x - 1.0, 1.0 - 2.0 * input.fragPos.y/winDims.y, rayMax, 1.0);\n maxPosSC = maxPosSC * (1.0 / maxPosSC.w);\n\n var rayLengthSC: f32 = distance(minPosSC.xyz, maxPosSC.xyz);\n var rayStepSC: vec4 = (maxPosSC - minPosSC)*(mapperUBO.SampleDistance/rayLengthSC);\n rayStepSC.w = 0.0;\n\n //VTK::Volume::Loop\n\n // var computedColor: vec4 = vec4(rayMin, rayMax, 0.0, min(100.0*(rayMax - rayMin), 1.0));\n // computedColor = vec4(rayLengthSC / 500.0, 1.0, 0.0, 1.0);\n // computedColor = vec4(maxPosSC.xyz*0.01, 1.0);\n\n //VTK::RenderEncoder::Impl\n }\n\n return output;\n}\n",pj=new Float64Array(16),fj=new Float64Array(16);function hj(e,t){t.classHierarchy.push("vtkWebGPUVolumePassFSQ"),e.replaceShaderPosition=function(e,t,n){var r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","[[builtin(position)]] Position");var i=r.getCode();i=AL.substitute(i,"//VTK::Position::Impl",["output.tcoordVS = vec2(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4(vertexBC, 1.0);"]).result,r.setCode(i),t.getShaderDescription("fragment").addBuiltinInput("vec4","[[builtin(position)]] fragPos")},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderVolume=function(e,n,r){for(var i=n.getShaderDescription("fragment"),o=i.getCode(),a=[],s=0;s(\n sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,\n (1.0 - computedColor.a)*sampleColor.a + computedColor.a);");o=AL.substitute(o,"//VTK::Volume::Calls",a).result,t.blendMode===WT.COMPOSITE_BLEND&&(o=AL.substitute(o,"//VTK::Volume::Loop",["var computedColor: vec4 = composite(rayLengthSC, minPosSC, rayStepSC);"]).result),i.setCode(o)},t.shaderReplacements.set("replaceShaderVolume",e.replaceShaderVolume),e.updateLUTImage=function(n){for(var r=e.getMTime(),i=0;i"),t.SSBO.addEntry("tstep","vec4"),t.SSBO.addEntry("spacing","vec4"),t.SSBO.setAllInstancesFromArray("SCTCMatrix",l),t.SSBO.setAllInstancesFromArray("tstep",u),t.SSBO.setAllInstancesFromArray("spacing",c),t.SSBO.send(n),t.componentSSBO.clearData(),t.componentSSBO.setNumberOfInstances(t.numRows);for(var y=new Float64Array(t.numRows),b=new Float64Array(t.numRows),w=new Float64Array(t.numRows),x=new Float64Array(t.numRows),S=new Float64Array(t.numRows),C=new Float64Array(t.numRows),A=new Float64Array(t.numRows),P=new Float64Array(t.numRows),_=0,O=0;O2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mj,n),XV.extend(e,t,n),t.fragmentShaderTemplate=dj,t.UBO=ij.newInstance(),t.UBO.setName("mapperUBO"),t.UBO.addEntry("SampleDistance","f32"),t.SSBO=cj.newInstance(),t.SSBO.setName("volumeSSBO"),t.componentSSBO=cj.newInstance(),t.componentSSBO.setName("componentSSBO"),t.lutBuildTime={},de.obj(t.lutBuildTime,{mtime:0}),hj(e,t)}var vj={newInstance:de.newInstance(gj,"vtkWebGPUVolumePassFSQ"),extend:gj},yj=av.Representation,bj=iV.BufferUsage,wj=iV.PrimitiveTypes,xj=[[0,4,6],[0,6,2],[1,3,7],[1,7,5],[0,5,4],[0,1,5],[2,6,7],[2,7,3],[0,3,1],[0,2,3],[4,5,7],[4,7,6]],Sj="\n//VTK::Renderer::Dec\n\n//VTK::Select::Dec\n\n//VTK::VolumePass::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n //VTK::Select::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::VolumePass::Impl\n\n // use the minimum (closest) of the current value and the zbuffer\n // the blend func will then take the max to find the farthest stop value\n var stopval: f32 = min(input.fragPos.z, textureLoad(opaquePassDepthTexture, vec2(i32(input.fragPos.x), i32(input.fragPos.y)), 0).r);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n";function Cj(e,t){t.classHierarchy.push("vtkWebGPUVolumePass"),e.traverse=function(n,r){t.deleted||(t.currentParent=r,e.renderDepthBounds(n,r),t.finalEncoder||e.createFinalEncoder(r),e.finalPass(r,n))},e.finalPass=function(e,n){t.finalEncoder.setColorTextureView(0,t.colorTextureView),t.finalEncoder.attachTextureViews(),n.setRenderEncoder(t.finalEncoder),t.finalEncoder.begin(e.getCommandEncoder()),n.scissorAndViewport(t.finalEncoder),t.fullScreenQuad.setWebGPURenderer(n),t.fullScreenQuad.setVolumes(t.volumes),t.fullScreenQuad.render(t.finalEncoder,e.getDevice()),t.finalEncoder.end()},e.renderDepthBounds=function(n,r){e.updateDepthPolyData(n);var i=t._boundsPoly,o=i.getPolys(),a=o.getMTime(),s=i.getPoints(),l={hash:a+s.getMTime(),dataArray:s,source:s,cells:o,primitiveType:wj.Triangles,representation:yj.SURFACE,time:Math.max(s.getMTime(),o.getMTime()),usage:bj.PointArray,format:"float32x4",packExtra:!0},u=r.getDevice().getBufferManager().getBuffer(l);t._mapper.getVertexInput().addBuffer(u,["vertexBC"]),t._mapper.setNumberOfVertices(u.getSizeInBytes()/u.getStrideInBytes()),e.drawDepthRange(n,r)},e.updateDepthPolyData=function(e){for(var n=!1,r=0;r","outColor1"),t.addOutput("vec4","outColor2");var n=t.getCode();n=AL.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor1 = vec4(stopval, 0.0, 0.0, 0.0);","output.outColor2 = vec4(input.fragPos.z, 0.0, 0.0, 0.0);"]).result,t.setCode(n)})),t.depthRangeEncoder.setDescription({colorAttachments:[{view:null,loadValue:[0,0,0,0],storeOp:"store"},{view:null,loadValue:[1,1,1,1],storeOp:"store"}]}),t.depthRangeEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"max"},alpha:{srcfactor:"one",dstFactor:"one",operation:"max"}}},{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"min"},alpha:{srcfactor:"one",dstFactor:"one",operation:"min"}}}]}})},e.createFinalEncoder=function(e){t.fullScreenQuad=vj.newInstance(),t.fullScreenQuad.setDevice(e.getDevice()),t.fullScreenQuad.setTextureViews(y(t.depthRangeEncoder.getColorTextureViews())),t.finalEncoder=TL.newInstance(),t.finalEncoder.setDescription({colorAttachments:[{view:null,loadValue:"load",storeOp:"store"}]}),t.finalEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");var n=t.getCode();n=AL.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(computedColor.rgb*computedColor.a, computedColor.a);"]).result,t.setCode(n)})),t.finalEncoder.setPipelineHash("volpf"),t.finalEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.setVolumes=function(n){if(!t.volumes||t.volumes.length!==n.length)return t.volumes=y(n),void e.modified();for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Aj,n),cB.extend(e,t,n),t._mapper=WV.newInstance(),t._mapper.setFragmentShaderTemplate(Sj),t._mapper.getShaderReplacements().set("replaceShaderVolumePass",(function(e,t,n){t.getShaderDescription("fragment").addBuiltinInput("vec4","[[builtin(position)]] fragPos")})),t._boundsPoly=ju.newInstance(),t._lastMTimes=[],de.setGet(e,t,["colorTextureView","depthTextureView"]),Cj(e,t)}var _j={newInstance:de.newInstance(Pj,"vtkWebGPUVolumePass"),extend:Pj};function Oj(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),t.opaquePass||(t.opaquePass=xV.newInstance());for(var i=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),a=0;a0&&(t.translucentPass||(t.translucentPass=QV.newInstance()),t.translucentPass.setColorTextureView(t.opaquePass.getColorTextureView()),t.translucentPass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.translucentPass.traverse(l,n)),t.volumes.length>0&&(t.volumePass||(t.volumePass=_j.newInstance()),t.volumePass.setColorTextureView(t.opaquePass.getColorTextureView()),t.volumePass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.volumePass.setVolumes(t.volumes),t.volumePass.traverse(l,n)))}var c=n.getSwapChain(),d=c.getCurrentTexture(),p=t.opaquePass.getColorTexture(),f=n.getCommandEncoder();f.copyTextureToTexture({texture:p.getHandle()},{texture:d},{width:p.getWidth(),height:p.getHeight(),depthOrArrayLayers:1})}},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.addVolume=function(e){t.volumes.push(e)}}var Ej={opaqueActorCount:0,translucentActorCount:0,volumes:null,opaqueRenderEncoder:null,translucentPass:null,volumePass:null};function Tj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ej,n),cB.extend(e,t,n),de.setGet(e,t,["opaquePass","translucentPass","volumePass"]),Oj(e,t)}var Dj={newInstance:de.newInstance(Tj,"vtkForwardPass"),extend:Tj};function Ij(e,t){t.classHierarchy.push("vtkWebGPUTextureManager"),e.getTexture=function(e){if(e.imageData){e.dataArray=e.imageData.getPointData().getScalars(),e.time=e.dataArray.getMTime(),e.nativeArray=e.dataArray.getData();var n=e.imageData.getDimensions();switch(e.width=n[0],e.height=n[1],e.depth=n[2],e.dataArray.getNumberOfComponents()){case 1:e.format="r8unorm";break;case 2:e.format="rg8unorm";break;default:case 3:case 4:e.format="rgba8unorm"}}if(e.image&&(e.time=0,e.width=e.image.width,e.height=e.image.height,e.depth=1,e.format="rgba8unorm"),e.source&&t.textures.has(e.source))for(var r=t.textures.get(e.source),i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kj,n),de.obj(e,t),t.textures=new WeakMap,de.setGet(e,t,["device"]),Ij(e,t)}var Nj={newInstance:de.newInstance(Mj),extend:Mj};function Rj(e,t){t.classHierarchy.push("vtkWebGPUDevice"),e.initialize=function(e){t.handle=e},e.createCommandEncoder=function(){return t.handle.createCommandEncoder()},e.submitCommandEncoder=function(e){t.handle.queue.submit([e.finish()])},e.getShaderModule=function(e){return t.shaderCache.getShaderModule(e)},e.getBindGroupLayout=function(e){if(!e.entries)return null;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fj,n),W(e,t),Y(e,t,["handle"]),H(e,t,["bufferManager","shaderCache","textureManager"]),t.shaderCache=AL.newInstance(),t.shaderCache.setDevice(e),t.bindGroupLayouts=[],t.bufferManager=iV.newInstance(),t.bufferManager.setDevice(e),t.textureManager=Nj.newInstance(),t.textureManager.setDevice(e),t.pipelines={},Rj(e,t)}var Lj={newInstance:ne(Bj,"vtkWebGPUDevice"),extend:Bj};function Vj(e,t){t.classHierarchy.push("vtkWebGPUHardwareSelectionPass"),e.traverse=function(n,r){if(!t.deleted){t.currentParent=null,e.setCurrentOperation("buildPass"),n.traverse(e);var i=n.getDevice();if(t.selectionRenderEncoder)t.colorTexture.resize(n.getCanvas().width,n.getCanvas().height),t.depthTexture.resizeToMatch(t.colorTexture);else{e.createRenderEncoder(),t.colorTexture=vV.newInstance(),t.colorTexture.create(i,{width:n.getCanvas().width,height:n.getCanvas().height,format:"rgba32uint",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});var o=t.colorTexture.createView();o.setName("hardwareSelectColorTexture"),t.selectionRenderEncoder.setColorTextureView(0,o),t.depthTexture=vV.newInstance(),t.depthTexture.create(i,{width:n.getCanvas().width,height:n.getCanvas().height,format:"depth32float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});var a=t.depthTexture.createView();a.setName("hardwareSelectDepthTexture"),t.selectionRenderEncoder.setDepthTextureView(a)}t.selectionRenderEncoder.attachTextureViews(),r.setRenderEncoder(t.selectionRenderEncoder),e.setCurrentOperation("cameraPass"),r.traverse(e),e.setCurrentOperation("opaquePass"),r.traverse(e)}},e.createRenderEncoder=function(){t.selectionRenderEncoder=TL.newInstance(),t.selectionRenderEncoder.setPipelineHash("sel"),t.selectionRenderEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");var n=t.getCode();n=AL.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(mapperUBO.PropID, compositeID, 0u, 0u);"]).result,t.setCode(n)}));var e=t.selectionRenderEncoder.getDescription();e.colorAttachments[0].loadValue=[0,0,0,0],e.depthStencilAttachment.stencilLoadValue="load",t.selectionRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"less",format:"depth32float"},fragment:{targets:[{format:"rgba32uint",blend:void 0}]}})}}var jj={selectionRenderEncoder:null,colorTexture:null,depthTexture:null};function Uj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jj,n),cB.extend(e,t,n),de.get(e,t,["colorTexture","depthTexture"]),Vj(e,t)}var Gj={newInstance:de.newInstance(Uj,"vtkWebGPUHardwareSelectionPass"),extend:Uj},zj=Hu.SelectionContent,Wj=Hu.SelectionField,Hj=yi.FieldAssociations,Kj=de.vtkErrorMacro;function qj(e){return"".concat(e.propID," ").concat(e.compositeID)}function Xj(e,t,n,r){var i=4*((n.height-t-1)*n.colorBufferWidth+e)+r;return n.colorValues[i]}function Yj(e,t,n,r){var i=n<0?0:n;if(0===i){if(r[0]=t[0],r[1]=t[1],t[0]<0||t[0]>=e.width||t[1]<0||t[1]>=e.height)return null;var o=Xj(t[0],t[1],e,0);if(o<=0)return null;var a={};a.propID=o;var s=Xj(t[0],t[1],e,1);if((s<0||s>16777215)&&(s=0),a.compositeID=s,e.captureZValues){var l=(e.height-t[1]-1)*e.zbufferBufferWidth+t[0];a.zValue=e.depthValues[l],a.displayPosition=t}return a}var u=[t[0],t[1]],c=[0,0],d=Yj(e,t,0,r);if(d)return d;for(var p=1;pp?u[1]-p:0;f<=u[1]+p;++f){if(c[1]=f,u[0]>=p&&(c[0]=u[0]-p,d=Yj(e,c,0,r)))return d;if(c[0]=u[0]+p,d=Yj(e,c,0,r))return d}for(var h=u[0]>=p?u[0]-(p-1):0;h<=u[0]+(p-1);++h){if(c[0]=h,u[1]>=p&&(c[1]=u[1]-p,d=Yj(e,c,0,r)))return d;if(c[1]=u[1]+p,d=Yj(e,c,0,r))return d}}return r[0]=t[0],r[1]=t[1],null}function Zj(e,t,n,r,i){for(var o=Math.floor(t),a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=new Map,c=[0,0],d=a;d<=l;d++)for(var p=o;p<=s;p++){var f=Yj(e,[p,d],0,c);if(f){var h=qj(f);if(u.has(h)){var m=u.get(h);m.pixelCount++,e.captureZValues&&f.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qj,n),$R.extend(e,t,n),t._selectionPass=Gj.newInstance(),de.setGet(e,t,["WebGPURenderWindow"]),Jj(e,t)}var eU={newInstance:de.newInstance($j,"vtkWebGPUHardwareSelector"),extend:$j};function tU(e,t){t.classHierarchy.push("vtkWebGPUSwapChain"),e.create=function(e,n){t.device=e,t.window=n,n.getContext()&&(t.colorFormat="bgra8unorm",t.handle=n.getContext().configureSwapChain({device:e.getHandle(),format:t.colorFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_DST}),t.created=!0)},e.getCurrentTexture=function(){return t.handle.getCurrentTexture()},e.releaseGraphicsResources=function(){t.created&&(t.handle=null,t.created=!1,t.depthTexture=null)}}var nU={device:null,created:!1,handle:null,colorFormat:null};function rU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nU,n),W(e,t),H(e,t,["colorFormat"]),Y(e,t,["created","device","handle"]),tU(e,t)}var iU={newInstance:ne(rU,"vtkWebGPUSwapChain"),extend:rU},oU=Object.create(null);function aU(e,t){t.classHierarchy.push("vtkWebGPUViewNodeFactory")}var sU={};function lU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sU,n),t.overrides=oU,LF.extend(e,t,n),aU(0,t)}var uU={newInstance:de.newInstance(lU,"vtkWebGPUViewNodeFactory"),extend:lU},cU=de.vtkErrorMacro,dU={position:"absolute",top:0,left:0,width:"100%",height:"100%"};function pU(e,t){t.classHierarchy.push("vtkWebGPURenderWindow"),e.getViewNodeFactory=function(){return t.myFactory};var n=[0,0];function r(){return(r=qR(YR().mark((function n(){var r,i,o,a,s,l,u,c=arguments;return YR().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=c.length>0&&void 0!==c[0]?c[0]:t.imageFormat,i=document.createElement("canvas"),o=i.getContext("2d"),i.width=t.canvas.width,i.height=t.canvas.height,n.next=7,e.getPixelsAsync();case 7:a=n.sent,s=new ImageData(a.colorValues,a.width,a.height),o.putImageData(s,0,0),l=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;n0&&void 0!==arguments[0]?arguments[0]:"image/png",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.resetCamera,o=void 0!==i&&i,a=r.size,s=void 0===a?null:a,l=r.scale,u=void 0===l?1:l;if(t.deleted)return null;t.imageFormat=n;var c=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:s||1!==u?s||t.size.map((function(e){return e*u})):null},new Promise((function(n,r){var i=e.onImageReady((function(r){if(null===t._screenshot.size)t.notifyStartCaptureImage=c,i.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach((function(e){return(0,e.restoreParamsFn)(e.arg)})),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),n(r);else{var a=document.createElement("img");a.style=dU,a.src=r,t._screenshot.placeHolder=t.el.appendChild(a),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),o&&(t._screenshot.cameras=t.renderable.getRenderers().map((function(e){var t=e.getActiveCamera(),n=t.get("focalPoint","position","parallelScale");return{resetCameraFn:e.resetCamera,restoreParamsFn:t.set,arg:JSON.parse(JSON.stringify(n))}})),t._screenshot.cameras.forEach((function(e){return(0,e.resetCameraFn)()}))),e.traverseAllPasses()}}))}))},e.traverseAllPasses=function(){if(t.initialized){if(t.renderPasses)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fU,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",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.swapChain=iU.newInstance(),RB.extend(e,t,n),t.myFactory=uU.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",mU),t.renderPasses[0]=Dj.newInstance(),t.selector||(t.selector=eU.newInstance(),t.selector.setWebGPURenderWindow(e)),de.event(e,t,"imageReady"),de.event(e,t,"initialized"),de.get(e,t,["swapChain","commandEncoder","device","useBackgroundImage"]),de.setGet(e,t,["initialized","context","canvas","device","renderPasses","notifyStartCaptureImage","cursor","useOffScreen"]),de.setGetArray(e,t,["size"],2),pU(e,t)}var mU=de.newInstance(hU,"vtkWebGPURenderWindow");nF("WebGPU",mU);var gU={newInstance:mU,extend:hU},vU=qs.extractURLParameters(),yU={margin:"0",padding:"0",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden"},bU={position:"absolute",left:"25px",top:"25px",backgroundColor:"white",borderRadius:"5px",listStyle:"none",padding:"5px 10px",margin:"0",display:"block",border:"solid 1px black",maxWidth:"calc(100% - 70px)",maxHeight:"calc(100% - 60px)",overflow:"auto"};function wU(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function xU(e,t){t.classHierarchy.push("vtkFullScreenRenderWindow");var n=document.querySelector("body");t.rootContainer||(t.rootContainer=n),t.container||(t.container=document.createElement("div"),wU(t.container,t.containerStyle||yU),t.rootContainer.appendChild(t.container)),t.rootContainer===n&&(document.documentElement.style.height="100%",n.style.height="100%",n.style.padding="0",n.style.margin="0"),t.renderWindow=sF.newInstance(),t.renderer=SC.newInstance(),t.renderWindow.addRenderer(t.renderer),t.apiSpecificRenderWindow=t.renderWindow.newAPISpecificView(vU.viewAPI),t.apiSpecificRenderWindow.setContainer(t.container),t.renderWindow.addView(t.apiSpecificRenderWindow),t.interactor=Rm.newInstance(),t.interactor.setInteractorStyle(lb.newInstance()),t.interactor.setView(t.apiSpecificRenderWindow),t.interactor.initialize(),t.interactor.bindEvents(t.container),e.setBackground=t.renderer.setBackground,e.removeController=function(){var e=t.controlContainer;e&&e.parentNode.removeChild(e)},e.setControllerVisibility=function(e){t.controllerVisibility=e,t.controlContainer&&(t.controlContainer.style.display=e?"block":"none")},e.toggleControllerVisibility=function(){e.setControllerVisibility(!t.controllerVisibility)},e.addController=function(n){t.controlContainer=document.createElement("div"),wU(t.controlContainer,t.controlPanelStyle||bU),t.rootContainer.appendChild(t.controlContainer),t.controlContainer.innerHTML=n,e.setControllerVisibility(t.controllerVisibility),t.rootContainer.addEventListener("keypress",(function(t){"c"===String.fromCharCode(t.charCode)&&e.toggleControllerVisibility()}))},e.setBackground.apply(e,y(t.background)),e.addRepresentation=function(e){e.getActors().forEach((function(e){t.renderer.addActor(e)}))},e.removeRepresentation=function(e){e.getActors().forEach((function(e){return t.renderer.removeActor(e)}))},e.delete=de.chain(e.setContainer,t.apiSpecificRenderWindow.delete,e.delete),e.resize=function(){var e=t.container.getBoundingClientRect(),n=window.devicePixelRatio||1;t.apiSpecificRenderWindow.setSize(Math.floor(e.width*n),Math.floor(e.height*n)),t.resizeCallback&&t.resizeCallback(e),t.renderWindow.render()},e.setResizeCallback=function(n){t.resizeCallback=n,e.resize()},t.listenWindowResize&&window.addEventListener("resize",e.resize),e.resize()}var SU={background:[.32,.34,.43],containerStyle:null,controlPanelStyle:null,listenWindowResize:!0,resizeCallback:null,controllerVisibility:!0};function CU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SU,n),de.obj(e,t),de.get(e,t,["renderWindow","renderer","apiSpecificRenderWindow","interactor","rootContainer","container","controlContainer"]),xU(e,t)}var AU={newInstance:de.newInstance(CU),extend:CU};function PU(e,t){var n=e.invokeResize;delete e.invokeResize,t.renderWindow=sF.newInstance(),t.renderer=SC.newInstance(),t.renderWindow.addRenderer(t.renderer),t.openGLRenderWindow=gL.newInstance(),t.renderWindow.addView(t.openGLRenderWindow),t.interactor=Rm.newInstance(),t.interactor.setInteractorStyle(lb.newInstance()),t.interactor.setView(t.openGLRenderWindow),t.interactor.initialize(),e.setBackground=t.renderer.setBackground,e.setBackground.apply(e,y(t.background)),e.resize=function(){if(t.container){var e=t.container.getBoundingClientRect(),r=window.devicePixelRatio||1;t.openGLRenderWindow.setSize(Math.floor(e.width*r),Math.floor(e.height*r)),n(),t.renderWindow.render()}},e.setContainer=function(e){t.container&&t.interactor.unbindEvents(t.container),t.container=e,t.openGLRenderWindow.setContainer(t.container),t.container&&t.interactor.bindEvents(t.container)},e.delete=de.chain(e.setContainer,t.openGLRenderWindow.delete,e.delete),t.listenWindowResize&&window.addEventListener("resize",e.resize),e.resize()}var _U={background:[.32,.34,.43],listenWindowResize:!0,container:null};function OU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_U,n),de.obj(e,t),de.get(e,t,["renderWindow","renderer","openGLRenderWindow","interactor","container"]),de.event(e,t,"resize"),PU(e,t)}var EU={newInstance:de.newInstance(OU),extend:OU},TU=PD.newInstance(),DU=TU.connect,IU=TU.disconnect;function kU(e,t){t.classHierarchy.push("vtkRemoteView"),t.canvasView=_F.newInstance(),t.interactorStyle=_b.newInstance(),t.interactor=Rm.newInstance(),t.interactor.setView(t.canvasView),t.interactor.initialize(),t.interactor.setInteractorStyle(t.interactorStyle),t.interactorStyle.onRemoteMouseEvent((function(e){t.session&&t.rpcMouseEvent&&t.session.call(t.rpcMouseEvent,[e])})),t.interactorStyle.onRemoteWheelEvent((function(e){t.session&&t.rpcWheelEvent&&t.session.call(t.rpcWheelEvent,[e])})),t.interactorStyle.onRemoteGestureEvent((function(e){t.session&&t.rpcGestureEvent&&t.session.call(t.rpcGestureEvent,[e])})),e.delete=de.chain((function(){t.session=null,t.canvasView&&(t.canvasView.setViewStream(null),t.canvasView.delete()),t.interactor&&t.interactor.delete(),t.viewStream&&t.viewStream.delete()}),e.delete),e.setViewStream=function(n){t.viewStream=n,t.canvasView.setViewStream(t.viewStream),t.viewStream.setStillQuality(t.stillQuality),t.viewStream.setStillRatio(t.stillRatio),t.viewStream.setInteractiveQuality(t.interactiveQuality),t.viewStream.setInteractiveRatio(t.interactiveRatio),t.interactor.onStartAnimation(t.viewStream.startInteraction),t.interactor.onEndAnimation(t.viewStream.endInteraction),e.setViewId(n.getViewId())},e.setViewId=function(n){t.viewStream||e.setViewStream(TU.createViewStream(n)),t.viewStream.setViewId(n),t.interactorStyle.setRemoteEventAddOn({view:n}),e.modified()},e.setContainer=function(n){t.container&&t.interactor.unbindEvents(n),t.container=n,t.canvasView.setContainer(t.container),n&&(t.interactor.bindEvents(n),e.resize())},e.resize=function(){if(t.container&&t.canvasView){var n=t.container.getBoundingClientRect(),r=n.width,i=n.height;t.canvasView.setSize(r,i),e.render()}},e.render=function(){t.viewStream&&t.viewStream.render()},e.resetCamera=function(){t.viewStream&&t.viewStream.resetCamera()};var n={modified:e.modified};de.set(n,t,["interactiveQuality","interactiveRatio","stillQuality","stillRatio"]),e.setInteractiveQuality=function(e){var r=n.setInteractiveQuality(e);return t.viewStream&&r&&t.viewStream.setInteractiveQuality(t.interactiveQuality),r},e.setInteractiveRatio=function(e){var r=n.setInteractiveRatio(e);return t.viewStream&&r&&t.viewStream.setInteractiveRatio(t.interactiveRatio),r},e.setStillQuality=function(e){var r=n.setStillQuality(e);return t.viewStream&&r&&t.viewStream.setStillQuality(t.stillQuality),r},e.setStillRatio=function(e){var r=n.setStillRatio(e);return t.viewStream&&r&&t.viewStream.setStillRatio(t.stillRatio),r},t.viewStream&&e.setViewStream(t.viewStream)}var MU={viewId:"-1",interactiveQuality:60,interactiveRatio:1/window.devicePixelRatio,stillQuality:100,stillRatio:1,rpcMouseEvent:"viewport.mouse.interaction",rpcGestureEvent:null,rpcWheelEvent:null};function NU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MU,n),de.obj(e,t,n),de.get(e,t,["container","viewStream","canvasView","interactor","interactorStyle","interactiveQuality","interactiveRatio","stillQuality","stillRatio"]),de.setGet(e,t,["session","rpcMouseEvent","rpcGestureEvent","rpcWheelEvent"]),kU(e,t)}var RU={newInstance:de.newInstance(NU,"vtkRemoteView"),extend:NU,SHARED_IMAGE_STREAM:TU,connectImageStream:DU,disconnectImageStream:IU},FU=n(1406),BU=(Tb()(FU.Z,{insert:"head",singleton:!1}),FU.Z.locals||{});function LU(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 VU={left:function(e){return{top:"0",left:"0",bottom:"0",right:"unset",height:"unset",width:"".concat(e,"px")}},right:function(e){return{top:"0",right:"0",bottom:"0",left:"unset",height:"unset",width:"".concat(e,"px")}},top:function(e){return{top:"0",left:"0",right:"0",bottom:"unset",width:"unset",height:"".concat(e,"px")}},bottom:function(e){return{bottom:"0",left:"0",right:"0",top:"unset",width:"unset",height:"".concat(e,"px")}}};function jU(e,t){var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,UU,n),EU.extend(e,t),de.get(e,t,["rootContainer","controlContainer","renderWindowContainer"]),jU(e,t)}var zU={newInstance:de.newInstance(GU,"vtkRenderWindowWithControlBar"),extend:GU};function WU(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 HU(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[];return e.dependencies&&e.dependencies.forEach((function(e){t.push(e.id),$U(e,t)})),t}function eG(e,t,n,r){if(t){var i=KU[e];i&&i.update?i.update(t,n,r):console.log("no updater for",e)}}function tG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=KU[e];return n&&n.build?n.build(t):(console.log("No builder for",e),null)}function nG(){Object.keys(KU).forEach((function(e){delete KU[e]}))}function rG(){Object.keys(XU).forEach((function(e){delete XU[e]}))}function iG(e){if(1===e[1].length)return-1===YU.indexOf(e[1][0]);for(var t=!1,n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return function(t,n,r){var i;r.start(),n.arrays||(n.arrays=[]),e.forEach((function(e){if(n.properties[e]){var t=n.properties[e];t.registration="set".concat(V(e)),n.arrays.push(t),delete n.properties[e]}}));var o=n.properties.fields||[];(i=n.arrays).push.apply(i,y(o)),delete n.properties.fields,t.getPointData().removeAllArrays(),t.getCellData().removeAllArrays(),oG(t,n,r),r.end()}}var lG=sG(["points","polys","verts","lines","strips"]),uG=sG([]);function cG(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:oG;tG||eG?KU[e]={build:t,update:n}:delete KU[e]}var dG={vtkMapper:["vtkOpenGLPolyDataMapper","vtkCompositePolyDataMapper2","vtkDataSetMapper"],vtkProperty:["vtkOpenGLProperty"],vtkRenderer:["vtkOpenGLRenderer"],vtkCamera:["vtkOpenGLCamera"],vtkColorTransferFunction:["vtkPVDiscretizableColorTransferFunction"],vtkActor:["vtkOpenGLActor","vtkPVLODActor"],vtkLight:["vtkOpenGLLight","vtkPVLight"],vtkTexture:["vtkOpenGLTexture"],vtkImageMapper:["vtkOpenGLImageSliceMapper"],vtkVolumeMapper:["vtkFixedPointVolumeRayCastMapper"]},pG={vtkRenderWindow:{build:sF.newInstance,update:function(e,t,n){t.calls&&t.calls.filter(iG).filter((function(e){return"removeRenderer"===e[0]})).forEach((function(e){QU(e[1]).forEach((function(e){var t=n.getInstance(e);t.getViewProps().forEach((function(e){var t=e.get("flattenedDepIds").flattenedDepIds;t&&t.forEach((function(e){return n.unregisterInstance(e)})),n.unregisterInstance(n.getInstanceId(e))})),t.removeAllViewProps()}))})),e.render(),oG(e,t,n)}},vtkRenderer:{build:SC.newInstance,update:function(e,t,n){oG(e,t,n);var r=new Set;t.dependencies&&t.dependencies.forEach((function(e){var t=n.getInstance(e.id);if(t){var i=$U(e);t.set({flattenedDepIds:i},!0),i.forEach((function(e){return r.add(e)}))}}));var i=new Set;t.calls&&t.calls.filter(iG).filter((function(e){return"removeViewProp"===e[0]})).forEach((function(e){QU(e[1]).forEach((function(e){var t=n.getInstance(e).get("flattenedDepIds").flattenedDepIds;t&&t.forEach((function(e){return i.add(e)})),i.add(e)}))})),y(i).filter((function(e){return!r.has(e)})).forEach((function(e){return n.unregisterInstance(e)}))}},vtkLookupTable:{build:Cs.newInstance,update:oG},vtkCamera:{build:oC.newInstance,update:aG},vtkPolyData:{build:ju.newInstance,update:lG},vtkImageData:{build:es.newInstance,update:uG},vtkMapper:{build:Uv.newInstance,update:oG},vtkGlyph3DMapper:{build:HR.newInstance,update:oG},vtkProperty:{build:av.newInstance,update:oG},vtkActor:{build:pv.newInstance,update:oG},vtkLight:{build:uC.newInstance,update:oG},vtkColorTransferFunction:{build:sT.newInstance,update:function(e,t,n){n.start();var r=t.properties.nodes.map((function(e){var t=g(e,6);return{x:t[0],r:t[1],g:t[2],b:t[3],midpoint:t[4],sharpness:t[5]}}));e.set(HU(HU({},t.properties),{},{nodes:r}),!0),e.sortAndUpdateRange(),e.modified(),n.end()}},vtkTexture:{build:MT.newInstance,update:oG},vtkVolume:{build:CT.newInstance,update:oG},vtkVolumeMapper:{build:YT.newInstance,update:oG},vtkVolumeProperty:{build:yT.newInstance,update:oG},vtkImageSlice:{build:xA.newInstance,update:oG},vtkImageMapper:{build:uA.newInstance,update:oG},vtkImageProperty:{build:gA.newInstance,update:oG},vtkPiecewiseFunction:{build:Jl.newInstance,update:function(e,t,n){n.start();var r=t.properties.nodes.map((function(e){var t=g(e,4);return{x:t[0],y:t[1],midpoint:t[2],sharpness:t[3]}}));e.set(HU(HU({},t.properties),{},{nodes:r}),!0),e.sortAndUpdateRange(),e.modified(),n.end()}}};function fG(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&nG(),Object.keys(pG).forEach((function(e){var t=pG[e];cG(e,t.build,t.update)}))}function hG(){Object.keys(dG).forEach((function(e){dG[e].forEach((function(t){KU[t]=KU[e]}))}))}fG(),hG(),ZU.vtkOpenGLLight={},ZU.vtkPVLight={},ZU.vtkLight={};var mG={build:tG,update:eG,genericUpdater:oG,oneTimeGenericUpdater:aG,setTypeMapping:cG,clearTypeMapping:nG,getSupportedTypes:function(){return Object.keys(KU)},clearOneTimeUpdaters:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:"default",t=yG[e];return t||(t=vG(vG(vG(vG({},bG()),wG()),xG()),SG()),yG[e]=t),t}function AG(e,t){var n=-1,r=100,i=function(e){return e.get("managedInstanceId").managedInstanceId},o=function(){return oe(e,i)};function a(t){e.set({synchronizedViewId:t},!0,!0)}function s(){return e.get("synchronizedViewId").synchronizedViewId}return{synchronize:function(i){s()||a(i.id);var o=i.mtime||0;return s()===i.id&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_G,n),sF.extend(e,t),H(e,t,["synchronizerContext"]),PG(e,t)}var EG=ne(OG,"vtkSynchronizableRenderWindow"),TG={vtkCanvasView:_F,vtkFullScreenRenderWindow:AU,vtkGenericRenderWindow:EU,vtkRemoteView:RU,vtkRenderWindowWithControlBar:zU,vtkSynchronizableRenderWindow:{newInstance:EG,extend:OG,getSynchronizerContext:CG,setSynchronizerContext:function(e,t){yG[e]=t},decorate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=AG(e,CG(t));return vG(vG(vG({},n),e),{},{delete:re(e.delete,n.delete)})},createInstanceMap:wG,createArrayHandler:bG,createProgressHandler:xG,createSceneMtimeHandler:SG,vtkObjectManager:mG},vtkTextureLODsDownloader:LT};function DG(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(),Oo(t.keyMatrices.mcwc,t.renderable.getMatrix()),Io(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?Aa(t.keyMatrices.normalMatrix):(ba(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),_a(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Pa(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var IG={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function kG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,IG,n),NF.extend(e,t,n),t.keyMatrixTime={},W(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:Aa(new Float64Array(9)),mcwc:Do(new Float64Array(16))},Y(e,t,["context"]),H(e,t,["activeTextures"]),DG(e,t)}var MG=ne(kG),NG={newInstance:MG,extend:kG};function RG(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))}}jF("vtkActor",MG);var FG={context:null,activeTextures:[]};function BG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FG,n),NF.extend(e,t,n),Y(e,t,["context"]),H(e,t,["activeTextures"]),RG(e,t)}var LG=ne(BG),VG={newInstance:LG,extend:BG};jF("vtkActor2D",LG);var jG={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},UG={ObjectType:jG};function GG(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 zG(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,KG,n),de.obj(e,t),de.get(e,t,["openGLRenderWindow"]),HG(e,t)}var XG=zG(zG({newInstance:de.newInstance(qG),extend:qG},{}),UG);function YG(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()){Oo(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),ba(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),_a(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Io(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();Oo(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Io(t.keyMatrices.vcpc,t.keyMatrices.vcpc),Ro(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var ZG={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function JG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZG,n),NF.extend(e,t,n),t.keyMatrixTime={},W(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},Y(e,t,["context","keyMatrixTime"]),YG(e,t)}var QG=ne(JG),$G={newInstance:QG,extend:JG};jF("vtkCamera",QG);var ez=de.vtkErrorMacro;function tz(e,t){t.classHierarchy.push("vtkOpenGLCellArrayBufferObject"),e.setType(jG.ARRAY_BUFFER),e.createVBO=function(n,r,i,o){if(!n.getData()||!n.getData().length)return t.elementCount=0,0;t.blockSize=3,t.vertexOffset=0,t.normalOffset=0,t.tCoordOffset=0,t.tCoordComponents=0,t.colorComponents=0,t.colorOffset=0,t.customData=[];var a=o.points.getData(),s=null,l=null,u=null,c=o.colors?o.colors.getNumberOfComponents():0,d=o.tcoords?o.tcoords.getNumberOfComponents():0;o.normals&&(t.normalOffset=4*t.blockSize,t.blockSize+=3,s=o.normals.getData()),o.customAttributes&&o.customAttributes.forEach((function(e){e&&(t.customData.push({data:e.getData(),offset:4*t.blockSize,components:e.getNumberOfComponents(),name:e.getName()}),t.blockSize+=e.getNumberOfComponents())})),o.tcoords&&(t.tCoordOffset=4*t.blockSize,t.tCoordComponents=d,t.blockSize+=d,l=o.tcoords.getData()),o.colors?(t.colorComponents=o.colors.getNumberOfComponents(),t.colorOffset=0,u=o.colors.getData(),t.colorBO||(t.colorBO=XG.newInstance()),t.colorBO.setOpenGLRenderWindow(t.openGLRenderWindow)):t.colorBO=null,t.stride=4*t.blockSize;var p,f=0,h=0,m=0,g=0,v=0,y=0,b={anythingToPoints:function(e,t,n){for(var r=0;r2)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}},x=null,S=null;i===Jg.POINTS||"verts"===r?(x=b.anythingToPoints,S=w.anythingToPoints):i===Jg.WIREFRAME||"lines"===r?(x=b["".concat(r,"ToWireframe")],S=w["".concat(r,"ToWireframe")]):(x=b["".concat(r,"ToSurface")],S=w["".concat(r,"ToSurface")]);for(var C=n.getData(),A=C.length,P=0,_=0;_0&&(Math.abs(k)/I>1e6||Math.abs(Math.log10(I))>3||0===I&&k>1e6)){for(var B=new Float64Array(3),L=new Float64Array(3),V=0;V<3;++V){var j=o.points.getRange(V),U=j[1]-j[0];B[V]=.5*(j[1]+j[0]),L[V]=U>0?1/U:1}e.setCoordShiftAndScale(B,L)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);p=function(e){if(f=3*e,t.coordShiftAndScaleEnabled?(E[T++]=(a[f++]-t.coordShift[0])*t.coordScale[0],E[T++]=(a[f++]-t.coordShift[1])*t.coordScale[1],E[T++]=(a[f++]-t.coordShift[2])*t.coordScale[2]):(E[T++]=a[f++],E[T++]=a[f++],E[T++]=a[f++]),null!==s&&(h=o.haveCellNormals?3*(y+o.cellOffset):3*e,E[T++]=s[h++],E[T++]=s[h++],E[T++]=s[h++]),t.customData.forEach((function(t){v=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nz,n),XG.extend(e,t,n),de.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),de.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),tz(e,t)}var iz={newInstance:de.newInstance(rz),extend:rz};function oz(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(a.index+l,1):n.vertexAttribDivisor(a.index+l,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(a.index+l,0):n.vertexAttribDivisor(a.index+l,0)),n.disableVertexAttribArray(a.index+l)}},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,i,o,a,s,l){return e.addAttributeArrayWithDivisor(t,n,r,i,o,a,s,l,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,i,o,a,s,l,u,c,d){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==jG.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 p=t.context,f={};if(f.name=i,f.index=p.getAttribLocation(t.handleProgram,i),f.offset=o,f.stride=a,f.type=s,f.size=l,f.normalize=u,f.isMatrix=d,f.divisor=c,-1===f.Index)return!1;if(r.bind(),p.enableVertexAttribArray(f.index),p.vertexAttribPointer(f.index,f.size,f.type,f.normalize,f.stride,f.offset),c>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(f.index,1):p.vertexAttribDivisor(f.index,1)),f.buffer=r.getHandle(),!t.supported){for(var h=!1,m=0;m0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(f+h,1):p.vertexAttribDivisor(f+h,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,az,n),t.buffers=[],de.obj(e,t),de.get(e,t,["supported"]),de.setGet(e,t,["forceEmulation"]),oz(e,t)}var lz={newInstance:de.newInstance(sz,"vtkOpenGLVertexArrayObject"),extend:sz};function uz(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 cz={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function dz(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cz,n),de.obj(e,t),t.shaderSourceTime={},de.obj(t.shaderSourceTime),t.attributeUpdateTime={},de.obj(t.attributeUpdateTime),de.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=_B.newInstance(),t.VAO=lz.newInstance(),t.CABO=iz.newInstance(),uz(e,t)}var pz={newInstance:de.newInstance(dz),extend:dz},fz=de.vtkErrorMacro;function hz(e,t){t.classHierarchy.push("vtkConvolution2DPass"),e.computeKernelWeight=function(e){var t=e.reduce((function(e,t){return e+t}));return t<=0?1:t},e.traverse=function(n){if(!t.deleted)if(t.kernelDimension%2==1){null===t.kernel&&(t.kernel=new Float32Array(t.kernelDimension),t.kernel[Math.floor(t.kernelDimension/2)]=1);var r=t.kernelDimension*t.kernelDimension;if(t.kernel.length===r){null===t.framebuffer&&(t.framebuffer=aB.newInstance());var i=n.getSize(),o=n.getContext();if(null!==o){t.VBOBuildTime.getMTime()2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mz,n),cB.extend(e,t,n),t.VBOBuildTime={},de.obj(t.VBOBuildTime,{mtime:0}),t.tris=pz.newInstance(),de.setGet(e,t,["kernel","kernelDimension"]),de.get(e,t,["framebuffer"]),hz(e,t)}var vz={newInstance:de.newInstance(gz,"vtkConvolution2DPass"),extend:gz},yz=n(516),bz=n.n(yz),wz=n(1158),xz=n.n(wz),Sz=function(e,t){e.replaceShaderCoincidentOffset=function(n,r,i){var o=e.getCoincidentParameters(r,i);if(o&&(0!==o.factor||0!==o.offset)){var a=n.Fragment;a=_B.substitute(a,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(a=_B.substitute(a,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,a=_B.substitute(a,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):a=_B.substitute(a,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(a=_B.substitute(a,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,a=_B.substitute(a,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):a=_B.substitute(a,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=a}}},Cz={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},Az=av.Representation,Pz=av.Shading,_z=Uv.ScalarMode,Oz=nB.Filter,Ez=nB.Wrap,Tz=M,Dz={type:"StartEvent"},Iz={type:"EndEvent"};function kz(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=Cz.Start;r= cos(radians(lightConeAngle".concat(d,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(d,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(d,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(d,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(d,");")," }"]);s=s.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),i=_B.substitute(i,"//VTK::Light::Impl",s,!1).result;break;default:Tz("bad light complexity")}e.Fragment=i},e.replaceShaderNormal=function(n,r,i){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,a=n.Geometry,s=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=_B.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=_B.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,a=_B.substitute(a,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,a=_B.substitute(a,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,s=_B.substitute(s,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,s=_B.substitute(s,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(s=_B.substitute(s,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,s=_B.substitute(s,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(i.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(s=_B.substitute(s,"//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,s=_B.substitute(s,"//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):(s=_B.substitute(s,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,s=_B.substitute(s,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,s=_B.substitute(s,"//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=a,n.Fragment=s}},e.replaceShaderPositionVC=function(e,n,r){var i=e.Vertex,o=e.Geometry,a=e.Fragment;r.getProperty().getRepresentation()!==Az.POINTS&&t.lastBoundBO.getPrimitiveType()!==Cz.Points||(i=_B.substitute(i,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(i=_B.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=_B.substitute(i,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,i=_B.substitute(i,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=_B.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=_B.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,a=_B.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=_B.substitute(a,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(i=_B.substitute(i,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,i=_B.substitute(i,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=i,e.Geometry=o,e.Fragment=a},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var i=e.Vertex,o=e.Geometry,a=e.Fragment;if(t.drawingEdges)return;i=_B.substitute(i,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var s=t.openGLActor.getActiveTextures(),l=2,u=2;if(s&&s.length>0&&(l=s[0].getComponents(),s[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(u=3)),t.renderable.getColorTextureMap()&&(l=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),u=2),2===u){if(i=_B.substitute(i,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=_B.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=_B.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,a=_B.substitute(a,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,s&&s.length>=1)switch(l){case 1:a=_B.substitute(a,"//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:a=_B.substitute(a,"//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:a=_B.substitute(a,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*texture2D(texture1, tcoordVCVSOutput.st);").result}}else switch(i=_B.substitute(i,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=_B.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=_B.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,a=_B.substitute(a,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,l){case 1:a=_B.substitute(a,"//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:a=_B.substitute(a,"//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:a=_B.substitute(a,"//VTK::TCoord::Impl","gl_FragData[0] = clamp(gl_FragData[0],0.0,1.0)*textureCube(texture1, tcoordVCVSOutput);").result}e.Vertex=i,e.Geometry=o,e.Fragment=a}},e.replaceShaderClip=function(e,n,r){var i=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var a=t.renderable.getNumberOfClippingPlanes();a>6&&(M("OpenGL has a limit of 6 clipping planes"),a=6),i=_B.substitute(i,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,i=_B.substitute(i,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=_B.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=_B.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=i,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,i=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||i.getEdgeVisibility()&&i.getRepresentation()===Az.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===Cz.Points||i.getRepresentation()===Az.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===Cz.Lines||i.getRepresentation()===Az.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==Cz.Tris&&o!==Cz.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==Cz.TrisEdges&&o!==Cz.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=_B.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=_B.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,i){if(e.replaceShaderColor(n,r,i),e.replaceShaderNormal(n,r,i),e.replaceShaderLight(n,r,i),e.replaceShaderTCoord(n,r,i),e.replaceShaderPicking(n,r,i),e.replaceShaderClip(n,r,i),e.replaceShaderCoincidentOffset(n,r,i),e.replaceShaderPositionVC(n,r,i),t.haveSeenDepthRequest){var o=n.Fragment;o=_B.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=_B.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,i){var o=0,a=0,s=n.getPrimitiveType(),l=t.currentInput,u=!1,c=l.getPointData().getNormals(),d=l.getCellData().getNormals(),p=i.getProperty().getInterpolation()===Pz.FLAT,f=i.getProperty().getRepresentation(),h=e.getOpenGLMode(f,s);if(h===t.context.TRIANGLES||d&&!c||!p&&c?u=!0:p||h!==t.context.LINES||(u=!0),i.getProperty().getLighting()&&u){o=0;for(var m=r.getLightsByReference(),g=0;g0&&(a++,0===o&&(o=1)),1===o&&(a>1||1!==v.getIntensity()||!v.lightTypeIsHeadLight())&&(o=2),o<3&&v.getPositional()&&(o=3)}}var y=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),w=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&w===a||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:a},!0),y=!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)||Tz("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)||Tz("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)||Tz("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)||Tz("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)||Tz("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var a=t.renderable.getNumberOfClippingPlanes();a>6&&(M("OpenGL has a limit of 6 clipping planes"),a=6);for(var s=[],l=0;l0){var c=u.getColorByReference(),d=u.getIntensity();t.lightColor[0]=c[0]*d,t.lightColor[1]=c[1]*d,t.lightColor[2]=c[2]*d;var p=u.getDirection(),f=n.getActiveCamera().getViewMatrix(),h=y(p);u.lightTypeIsSceneLight()&&(h[0]=f[0]*p[0]+f[1]*p[1]+f[2]*p[2],h[1]=f[4]*p[0]+f[5]*p[1]+f[6]*p[2],h[2]=f[8]*p[0]+f[9]*p[1]+f[10]*p[2],nt(h)),t.lightDirection[0]=h[0],t.lightDirection[1]=h[1],t.lightDirection[2]=h[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],nt(t.lightDirection),o.setUniform3fArray("lightColor".concat(a),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(a),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(a),t.lightHalfAngle),a++}}if(!(i<3)){var m=n.getActiveCamera().getViewMatrix();Io(m,m),a=0;for(var g=0;g0){var b=v.getTransformedPosition(),w=new Float64Array(3);io(w,b,m),o.setUniform3fArray("lightAttenuation".concat(a),v.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(a),v.getPositional()),o.setUniformf("lightExponent".concat(a),v.getExponent()),o.setUniformf("lightConeAngle".concat(a),v.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(a),[w[0],w[1],w[2]]),a++}}}}},e.setCameraShaderParameters=function(e,r,i){var s=e.getProgram(),l=t.openGLCamera.getKeyMatrices(r),u=r.getActiveCamera(),c=t.openGLCamera.getKeyMatrixTime().getMTime(),d=s.getLastCameraMTime(),p=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,f=i.getIsIdentity(),h=f?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();s.setUniformMatrix("MCPCMatrix",n([l.wcpc,h.mcwc,p],o,t.tmpMat4)),s.isUniformUsed("MCVCMatrix")&&s.setUniformMatrix("MCVCMatrix",n([l.wcvc,h.mcwc,p],o,t.tmpMat4)),s.isUniformUsed("normalMatrix")&&s.setUniformMatrix3x3("normalMatrix",n([l.normalMatrix,h.normalMatrix],a,t.tmpMat3)),d!==c&&(s.isUniformUsed("cameraParallel")&&s.setUniformi("cameraParallel",u.getParallelProjection()),s.setLastCameraMTime(c)),f||s.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var i=e.getProgram(),o=r.getProperty(),a=o.getOpacity(),s=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),l=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),u=t.drawingEdges?1:o.getAmbient(),c=t.drawingEdges?0:o.getDiffuse(),d=t.drawingEdges?0:o.getSpecular(),p=o.getSpecularPower();i.setUniformf("opacityUniform",a),i.setUniform3fArray("ambientColorUniform",s),i.setUniform3fArray("diffuseColorUniform",l),i.setUniformf("ambient",u),i.setUniformf("diffuse",c);var f=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(f<1)){var h=o.getSpecularColorByReference();if(i.setUniform3fArray("specularColorUniform",h),i.setUniformf("specularPowerUniform",p),i.setUniformf("specular",d),i.isUniformUsed("ambientIntensityBF")){if(a=(o=r.getBackfaceProperty()).getOpacity(),s=o.getAmbientColor(),u=o.getAmbient(),l=o.getDiffuseColor(),c=o.getDiffuse(),h=o.getSpecularColor(),d=o.getSpecular(),i.setUniformf("ambientIntensityBF",u),i.setUniformf("diffuseIntensityBF",c),i.setUniformf("opacityUniformBF",a),i.setUniform3fArray("ambientColorUniformBF",s),i.setUniform3fArray("diffuseColorUniformBF",l),f<1)return;i.setUniformf("specularIntensityBF",d),i.setUniform3fArray("specularColorUniformBF",h),i.setUniformf("specularPowerUniformBF",p)}}},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 i=r.getProperty().getRepresentation(),o=t.context,a=r.getProperty().getEdgeVisibility()&&i===Az.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var s=Cz.Start;s2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mz,n),NF.extend(e,t,n),Sz(e,t,n),t.primitives=[],t.primTypes=Cz,t.tmpMat3=Aa(new Float64Array(9)),t.tmpMat4=Do(new Float64Array(16));for(var r=Cz.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=_B.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=_B.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,i)},e.replaceShaderColor=function(e,r,i){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,a=e.Geometry,s=e.Fragment,l=t.lastBoundBO.getReferenceByName("lastLightComplexity"),u=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];l&&(u=u.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var c=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];l&&(c=c.concat([" vec3 specularColor;"," float specularPower;"])),c=c.concat([" opacity = opacityUniform;"]),l&&(c=c.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(u=u.concat(["varying vec4 vertexColorVSOutput;"]),o=_B.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=_B.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,a=_B.substitute(a,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,a=_B.substitute(a,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,c=c.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),s=_B.substitute(s,"//VTK::Color::Impl",c).result,s=_B.substitute(s,"//VTK::Color::Dec",u).result,e.Vertex=o,e.Geometry=a,e.Fragment=s}n.replaceShaderColor(e,r,i)},e.replaceShaderPositionVC=function(e,r,i){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=_B.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=_B.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=_B.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=_B.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,i)},e.replaceShaderPicking=function(e,r,i){if(t.hardwareSupport){var o=e.Fragment,a=e.Vertex;a=_B.substitute(a,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,a=_B.substitute(a,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=a,o=_B.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=_B.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,i)},e.updateGlyphShaderParameters=function(n,r,i,o,a,s,l,u){var c=i.getProgram();if(n){var d=t.normalMatrix,p=s,f=9*l,h=t.tmpMat3,m=d[0],g=d[1],v=d[2],y=d[3],b=d[4],w=d[5],x=d[6],S=d[7],C=d[8],A=p[f],P=p[f+1],_=p[f+2],O=p[f+3],E=p[f+4],T=p[f+5],D=p[f+6],I=p[f+7],k=p[f+8];h[0]=A*m+P*y+_*x,h[1]=A*g+P*b+_*S,h[2]=A*v+P*w+_*C,h[3]=O*m+E*y+T*x,h[4]=O*g+E*b+T*S,h[5]=O*v+E*w+T*C,h[6]=D*m+I*y+k*x,h[7]=D*g+I*b+k*S,h[8]=D*v+I*w+k*C,c.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,a,16*l),c.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,a,16*l),c.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var M=o.getData();t.tmpColor[0]=M[4*l]/255,t.tmpColor[1]=M[4*l+1]/255,t.tmpColor[2]=M[4*l+2]/255,c.setUniform3fArray("ambientColorUniform",t.tmpColor),c.setUniform3fArray("diffuseColorUniform",t.tmpColor)}u&&c.setUniform3fArray("mapperIndex",u.getPropColorValue())},e.renderPieceDraw=function(n,r){var i=r.getProperty().getRepresentation(),o=t.context,a=r.getProperty().getEdgeVisibility()&&i===Vz.SURFACE,s=t.openGLCamera.getKeyMatrices(n),l=t.openGLActor.getKeyMatrices();Ta(t.normalMatrix,s.normalMatrix,l.normalMatrix),Ro(t.mcpcMatrix,s.wcpc,l.mcwc),Ro(t.mcvcMatrix,s.wcvc,l.mcwc);var u=t.renderable.getMatrixArray(),c=t.renderable.getNormalArray(),d=t.renderable.getColorArray(),p=u.length/16,f=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===Uz.COMPOSITE_INDEX_PASS&&(f=!0);for(var h=t.primTypes.Start;he.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)||Lz("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)||Lz("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)||Lz("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)||Lz("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,i),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,i)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(i,jz.ARRAY_BUFFER),t.normalBuffer.upload(o,jz.ARRAY_BUFFER),a?t.colorBuffer.upload(a.getData(),jz.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var s=i.length/16,l=new Uint8Array(4*s),u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hz,n),Fz.extend(e,t,n),t.tmpMat3=Aa(new Float64Array(9)),t.normalMatrix=Aa(new Float64Array(9)),t.mcpcMatrix=Do(new Float64Array(16)),t.mcvcMatrix=Do(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},W(t.glyphBOBuildTime,{mtime:0}),Wz(e,t)}var qz=ne(Kz,"vtkOpenGLGlyph3DMapper"),Xz={newInstance:qz,extend:Kz};jF("vtkGlyph3DMapper",qz);var Yz=M,Zz=$C.SlicingMode;function Jz(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function Qz(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=bz(),e.Fragment=xz(),e.Geometry=""},e.replaceShaderValues=function(n,r,i){var o=n.Vertex,a=n.Fragment;o=_B.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=_B.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=_B.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=_B.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var s=t.openGLTexture.getComponents(),l=i.getProperty().getIndependentComponents(),u=["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(l){for(var c=1;cn.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)||Yz("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)||Yz("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var a=t.openGLTexture.getComponents(),s=i.getProperty().getIndependentComponents();if(s)for(var l=0;l1?1:0;var z=o.getData(),W=null;if(M===Zz.I){W=new z.constructor(L[2]*L[1]*l);for(var H=0,K=0;K2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$z,n),NF.extend(e,t,n),Sz(e,t,n),t.tris=pz.newInstance(),t.openGLTexture=nB.newInstance(),t.colorTexture=nB.newInstance(),t.pwfTexture=nB.newInstance(),t.imagemat=Do(new Float64Array(16)),Y(e,t,[]),t.VBOBuildTime={},W(t.VBOBuildTime),Qz(e,t)}var tW=ne(eW,"vtkOpenGLImageMapper"),nW={newInstance:tW,extend:eW};function rW(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()&&(Oo(t.keyMatrices.mcwc,t.renderable.getMatrix()),Io(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}jF("vtkImageMapper",tW);var iW={context:null,keyMatrixTime:null,keyMatrices:null};function oW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iW,n),NF.extend(e,t,n),t.keyMatrixTime={},W(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:Do(new Float64Array(16))},Y(e,t,["context"]),rW(e,t)}var aW=ne(oW,"vtkOpenGLImageSlice"),sW={newInstance:aW,extend:oW};jF("vtkImageSlice",aW);var lW=k;function uW(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var i=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,a=t.openGLRenderer.getTiledSizeAndOrigin(),s=null;if(t.renderable.getUseZValues()){var l=r.getZBufferTexture(),u=Math.floor(l.getWidth()),c=Math.floor(l.getHeight()),d=t.openGLRenderWindow.getContext();l.bind();var p=r.getFramebuffer();p?p.saveCurrentBindingsAndBuffers():lW("No framebuffer to save/restore");var f=d.createFramebuffer();d.bindFramebuffer(d.FRAMEBUFFER,f),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,l.getHandle(),0),d.checkFramebufferStatus(d.FRAMEBUFFER)===d.FRAMEBUFFER_COMPLETE&&(s=new Uint8Array(u*c*4),d.viewport(0,0,u,c),d.readPixels(0,0,u,c,d.RGBA,d.UNSIGNED_BYTE,s)),p&&p.restorePreviousBindingsAndBuffers(),d.deleteFramebuffer(f)}t.renderable.invokeCallback(t.renderable.getInputData(),o,i,a,s)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var cW={};function dW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cW,n),NF.extend(e,t,n),uW(e,t)}var pW=ne(dW,"vtkOpenGLPixelSpaceCallbackMapper"),fW={newInstance:pW,extend:dW};jF("vtkPixelSpaceCallbackMapper",pW);var hW=k;function mW(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||(hW("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,i=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=i.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(i.clearDepth(1),r|=i.DEPTH_BUFFER_BIT,i.depthMask(!0));var o=e.getTiledSizeAndOrigin();i.enable(i.SCISSOR_TEST),i.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),i.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),i.colorMask(!0,!0,!0,!0),i.clear(r),i.enable(i.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=e[0]-n[0],i=e[1]-n[1],o=t.parent.normalizedDisplayToDisplay(r,i),a=Math.round(o[0]),s=Math.round(o[1]),l=e[2]-n[0],u=e[3]-n[1],c=t.parent.normalizedDisplayToDisplay(l,u),d=Math.round(c[0])-a,p=Math.round(c[1])-s;return d<0&&(d=0),p<0&&(p=0),{usize:d,vsize:p,lowerLeftU:a,lowerLeftV:s}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var i=t.renderable.getBackgroundByReference();t.context.clearColor(i[0],i[1],i[2],i[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 gW={context:null,openGLRenderWindow:null,selector:null};function vW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gW,n),NF.extend(e,t,n),H(e,t,["shaderCache"]),Y(e,t,["selector"]),mW(e,t)}var yW=ne(vW,"vtkOpenGLRenderer"),bW={newInstance:yW,extend:vW};jF("vtkRenderer",yW);var wW=M;function xW(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 i=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",i);var o=t.openGLRenderer.getRenderable(),a=t.openGLCamera.getKeyMatrices(o),s=new Float64Array(16);if(ko(s,a.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",s),"box"===t.lastFormat){var l=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",l[0],l[1],l[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=Ln.newInstance({numberOfComponents:3,values:e});r.setName("points");var i=new Uint16Array(8);i[0]=3,i[1]=0,i[2]=1,i[3]=3,i[4]=3,i[5]=0,i[6]=3,i[7]=2;var o=Ln.newInstance({numberOfComponents:1,values:i});t.tris.getCABO().createVBO(o,"polys",Jg.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)||wW("Error setting vertexMC in shader VAO."));var a=t.renderable.getTextures();a.length||wW("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==a[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(a[0]))}}var SW={context:null};function CW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SW,n),NF.extend(e,t,n),t.openGLTexture=nB.newInstance(),t.tris=pz.newInstance(),t.keyMatrixTime={},W(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:Aa(new Float64Array(9)),mcwc:Do(new Float64Array(16))},Y(e,t,["context"]),H(e,t,["activeTextures"]),xW(e,t)}var AW=ne(CW),PW={newInstance:AW,extend:CW};jF("vtkSkybox",AW);var _W=n(4714),OW=n.n(_W);function EW(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 TW=M;function DW(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",s]).result,a=_B.substitute(a,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(a=_B.substitute(a,"//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=a,n.replaceShaderValues(e,r,i)},e.setMapperShaderParameters=function(e,r,i){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)||TW("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,i)},e.setCameraShaderParameters=function(e,n,r){var i=e.getProgram(),o=n.getActiveCamera(),a=t.openGLCamera.getKeyMatrices(n);if(i.isUniformUsed("VCPCMatrix")&&i.setUniformMatrix("VCPCMatrix",a.vcpc),i.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())i.setUniformMatrix("MCVCMatrix",a.wcvc);else{var s=t.openGLActor.getKeyMatrices(),l=new Float64Array(16);Ro(l,a.wcvc,s.mcwc),i.setUniformMatrix("MCVCMatrix",l)}i.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 i=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),a=r.getPointData(),s=r.getPoints(),l=s.getNumberOfPoints(),u=s.getData(),c=null;null!=t.renderable.getScaleArray()&&a.hasArray(t.renderable.getScaleArray())&&(c=a.getArray(t.renderable.getScaleArray()).getData());var d=null,p=0,f=null;i?(p=i.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),d=i.getData(),f=new Uint8Array(3*l*4),o.getColorBO()||o.setColorBO(XG.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(p);var h=new Float32Array(5*l*3);o.setStride(20);for(var m=Math.cos(Pe(30)),g=0,v=0,y=0,b=0,w=0;w2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,IW,n),Fz.extend(e,t,n),DW(e,t)}var MW=ne(kW,"vtkOpenGLSphereMapper"),NW={newInstance:MW,extend:kW};jF("vtkSphereMapper",MW);var RW=n(5961),FW=n.n(RW);function BW(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 LW=M;function VW(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",s]).result,a=_B.substitute(a,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(a=_B.substitute(a,"//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=a,n.replaceShaderValues(e,r,i)},e.setMapperShaderParameters=function(e,r,i){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)||LW("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)||LW("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)||LW("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,i)},e.setCameraShaderParameters=function(e,n,r){var i=e.getProgram(),o=n.getActiveCamera(),a=t.openGLCamera.getKeyMatrices(n);if(i.isUniformUsed("VCPCMatrix")&&i.setUniformMatrix("VCPCMatrix",a.vcpc),r.getIsIdentity())i.isUniformUsed("MCVCMatrix")&&i.setUniformMatrix("MCVCMatrix",a.wcvc),i.isUniformUsed("normalMatrix")&&i.setUniformMatrix3x3("normalMatrix",a.normalMatrix);else{var s=t.openGLActor.getKeyMatrices();if(i.isUniformUsed("MCVCMatrix")){var l=new Float64Array(16);Ro(l,a.wcvc,s.mcwc),i.setUniformMatrix("MCVCMatrix",l)}if(i.isUniformUsed("normalMatrix")){var u=new Float64Array(9);Ta(u,a.normalMatrix,s.normalMatrix),i.setUniformMatrix3x3("normalMatrix",u)}}i.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 i=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),a=r.getPointData(),s=r.getPoints(),l=s.getNumberOfPoints(),u=s.getData(),c=null,d=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(XG.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),i&&(d=i.getNumberOfComponents(),o.setColorOffset(4),c=i.getData(),o.setColorBOStride(8)),o.setColorComponents(d),o.setStride(28);var p=new Float32Array(7*l*12),f=new Uint8Array(12*l*(c?8:4)),h=null,m=null;null!=t.renderable.getScaleArray()&&a.hasArray(t.renderable.getScaleArray())&&(h=a.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&a.hasArray(t.renderable.getOrientationArray())?m=a.getArray(t.renderable.getOrientationArray()).getData():LW(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var g=[0,1,3,0,3,2,2,3,5,2,5,4],v=0,y=0,b=0,w=0,x=0;x=4?255:0,f[w++]=g[A]>=2?255:0,f[w++]=255,y=x*d,c&&(f[w++]=c[y],f[w++]=c[y+1],f[w++]=c[y+2],f[w++]=c[y+3])}o.setElementCount(b/7),o.upload(p,jG.ARRAY_BUFFER),o.getColorBO().upload(f,jG.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var jW={};function UW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jW,n),Fz.extend(e,t,n),VW(e,t)}var GW=ne(UW,"vtkOpenGLStickMapper"),zW={newInstance:GW,extend:UW};function WW(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(),Oo(t.MCWCMatrix,t.renderable.getMatrix()),Io(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?Aa(t.normalMatrix):(ba(t.normalMatrix,t.MCWCMatrix),_a(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}jF("vtkStickMapper",GW);var HW={};function KW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,HW,n),NF.extend(e,t,n),t.keyMatrixTime={},W(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),Y(e,t,["context"]),WW(e,t)}var qW=ne(KW,"vtkOpenGLVolume"),XW={newInstance:qW,extend:KW};jF("vtkVolume",qW);var YW=n(3123),ZW=n.n(YW),JW=n(9115),QW=n.n(JW);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 eH=N,tH=M;function nH(e,t){if(e.length!==t.length)return!1;for(var n=0;n0&&(o=_B.substitute(o,"//VTK::vtkProportionalComponents",l.join("\n")).result)}var c=t.currentInput.getExtent(),d=t.currentInput.getSpacing(),p=new Float64Array(3);Ni(p,(c[1]-c[0])*d[0],(c[3]-c[2])*d[1],(c[5]-c[4])*d[2]);var f=Ii(p)/t.renderable.getSampleDistance();o=_B.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(f))).result,o=_B.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=i.getProperty().getUseGradientOpacity(0);for(var h=1;s&&!t.gopacity&&h0&&(i=_B.substitute(i,"//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,i=_B.substitute(i,"//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=i},e.replaceShaderClippingPlane=function(e,n,r){var i=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;i=_B.substitute(i,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,i=_B.substitute(i,"//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=i},e.getNeedToRebuildShaders=function(n,r,i){var o=0;i.getProperty().getShade()&&t.renderable.getBlendMode()===WT.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 a=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,a=!0);var s=t.scalarTexture.getComponents(),l=i.getProperty().getIndependentComponents(),u=!1,c=[];if(l){for(var d=0;d0&&(u=!0)}var p=t.currentInput.getExtent(),h=t.currentInput.getSpacing(),m=new Float64Array(3);Ni(m,(p[1]-p[0])*h[0],(p[3]-p[2])*h[1],(p[5]-p[4])*h[2]);var g=Ii(m)/t.renderable.getSampleDistance(),v={interpolationType:i.getProperty().getInterpolationType(),useLabelOutline:i.getProperty().getUseLabelOutline(),numComp:s,usesProportionalComponents:u,iComps:l,maxSamples:g,useGradientOpacity:i.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),ipScalarMode:t.renderable.getIpScalarRange(),proportionalComponents:c};return t.previousState&&t.previousState.interpolationType===v.interpolationType&&t.previousState.useLabelOutline===v.useLabelOutline&&t.previousState.numComp===v.numComp&&t.previousState.usesProportionalComponents===v.usesProportionalComponents&&t.previousState.iComps===v.iComps&&t.previousState.maxSamples===v.maxSamples&&t.previousState.useGradientOpacity===v.useGradientOpacity&&t.previousState.blendMode===v.blendMode&&nH(t.previousState.ipScalarMode,v.ipScalarMode)&&nH(t.previousState.proportionalComponents,v.proportionalComponents)?!!(0===n.getProgram()||a||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)||tH("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 a=e.getRenderTargetSize();o.setUniformf("vpWidth",a[0]),o.setUniformf("vpHeight",a[1])}},e.setCameraShaderParameters=function(n,r,i){var o=t.openGLCamera.getKeyMatrices(r),a=t.openGLVolume.getKeyMatrices();Ro(t.modelToView,o.wcvc,a.mcwc);var s=n.getProgram(),l=t.openGLCamera.getRenderable(),u=l.getClippingRange();s.setUniformf("camThick",u[1]-u[0]),s.setUniformf("camNear",u[0]),s.setUniformf("camFar",u[1]);for(var c=t.currentInput.getBounds(),d=t.currentInput.getDimensions(),p=new Float64Array(3),f=new Float64Array(3),h=1,m=-1,g=1,v=-1,y=0;y<8;++y)Ni(p,c[y%2],c[2+Math.floor(y/2)%2],c[4+Math.floor(y/4)]),io(p,p,t.modelToView),l.getParallelProjection()||(Ji(f,p),Wi(p,f,-u[0]/p[2])),io(p,p,o.vcpc),h=Math.min(p[0],h),m=Math.max(p[0],m),g=Math.min(p[1],g),v=Math.max(p[1],v);s.setUniformf("dcxmin",h),s.setUniformf("dcxmax",m),s.setUniformf("dcymin",g),s.setUniformf("dcymax",v),s.isUniformUsed("cameraParallel")&&s.setUniformi("cameraParallel",l.getParallelProjection());var b=t.currentInput.getExtent(),w=t.currentInput.getSpacing(),x=new Float64Array(3);Ni(x,(b[1]-b[0]+1)*w[0],(b[3]-b[2]+1)*w[1],(b[5]-b[4]+1)*w[2]),s.setUniform3f("vSpacing",w[0],w[1],w[2]),Ni(p,b[0],b[2],b[4]),t.currentInput.indexToWorldVec3(p,p),io(p,p,t.modelToView),s.setUniform3f("vOriginVC",p[0],p[1],p[2]);var S=t.currentInput.getIndexToWorld();Ro(t.idxToView,t.modelToView,S),Ta(t.idxNormalMatrix,o.normalMatrix,a.normalMatrix),Ta(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var C=Ii(x)/t.renderable.getSampleDistance();C>t.renderable.getMaximumSamplesPerRay()&&eH("The number of steps required ".concat(Math.ceil(C)," 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 A=new Float64Array(3);if(Ni(A,1,1,1),Li(A,A,x),s.setUniform3f("vVCToIJK",A[0],A[1],A[2]),s.setUniform3i("volumeDimensions",d[0],d[1],d[2]),!t.openGLRenderWindow.getWebgl2()){var P=t.scalarTexture.getVolumeInfo();s.setUniformf("texWidth",t.scalarTexture.getWidth()),s.setUniformf("texHeight",t.scalarTexture.getHeight()),s.setUniformi("xreps",P.xreps),s.setUniformi("xstride",P.xstride),s.setUniformi("ystride",P.ystride)}for(var _=new Float64Array(3),O=new Float64Array(3),E=0;E<6;++E){switch(E){default:case 0:Ni(_,1,0,0),Ni(O,b[1],b[3],b[5]);break;case 1:Ni(_,-1,0,0),Ni(O,b[0],b[2],b[4]);break;case 2:Ni(_,0,1,0),Ni(O,b[1],b[3],b[5]);break;case 3:Ni(_,0,-1,0),Ni(O,b[0],b[2],b[4]);break;case 4:Ni(_,0,0,1),Ni(O,b[1],b[3],b[5]);break;case 5:Ni(_,0,0,-1),Ni(O,b[0],b[2],b[4])}oo(_,_,t.idxNormalMatrix),io(O,O,t.idxToView);var T=-1*Qi(O,_);if(s.setUniform3f("vPlaneNormal".concat(E),_[0],_[1],_[2]),s.setUniformf("vPlaneDistance".concat(E),T),i.getProperty().getUseLabelOutline()){var D=t.currentInput.getWorldToIndex();s.setUniformMatrix("vWCtoIDX",D),ko(t.projectionToWorld,o.wcpc),s.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var I=e.getRenderTargetSize();s.setUniformf("vpWidth",I[0]),s.setUniformf("vpHeight",I[1])}}switch(ko(t.projectionToView,o.vcpc),s.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:case 0:break;case 1:case 2:case 3:var k=0,M=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();M[0]=t[0]*n,M[1]=t[1]*n,M[2]=t[2]*n,s.setUniform3fArray("lightColor".concat(k),M);var r=e.getDirection();Ni(_,r[0],r[1],r[2]),oo(_,_,o.normalMatrix),s.setUniform3f("lightDirectionVC".concat(k),_[0],_[1],_[2]);var i=[-.5*_[0],-.5*_[1],-.5*(_[2]-1)];s.setUniform3fArray("lightHalfAngleVC".concat(k),i),k++}}))}},e.setPropertyShaderParameters=function(e,n,r){var i=e.getProgram();i.setUniformi("ctexture",t.colorTexture.getTextureUnit()),i.setUniformi("otexture",t.opacityTexture.getTextureUnit()),i.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),a=r.getProperty(),s=t.scalarTexture.getComponents(),l=r.getProperty().getIndependentComponents();if(l&&s>=2)for(var u=0;u0&&(i.setUniformf("vAmbient",a.getAmbient()),i.setUniformf("vDiffuse",a.getDiffuse()),i.setUniformf("vSpecular",a.getSpecular()),i.setUniformf("vSpecularPower",a.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var i=t.openGLCamera.getKeyMatrices(n),o=[],a=[],s=t.renderable.getClippingPlanes(),l=s.length,u=0;u1.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 i=n.getVTKWindow().getInteractor(),o=i.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var a=Math.sqrt(t.avgFrameTime*i.getDesiredUpdateRate()/t.avgWindowArea);a>10&&(a=10),t.targetXYF=a}else t.targetXYF=Math.sqrt(t.avgFrameTime*i.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 s=t.lastXYF,l=t.openGLRenderWindow.getFramebufferSize();if(s>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*l[0]),Math.floor(.7*l[1])),t.framebuffer.populateFramebuffer();else{var u=t.framebuffer.getSize();u[0]===Math.floor(.7*l[0])&&u[1]===Math.floor(.7*l[1])||(t.framebuffer.create(Math.floor(.7*l[0]),Math.floor(.7*l[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var c=t.context;c.clearColor(0,0,0,0),c.colorMask(!0,!0,!0,!0),c.clear(c.COLOR_BUFFER_BIT),c.viewport(0,0,l[0]/s,l[1]/s),t.fvp=[Math.floor(l[0]/s)/Math.floor(.7*l[0]),Math.floor(l[1]/s)/Math.floor(.7*l[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===lT.NEAREST?(t.scalarTexture.setMinificationFilter(EF.NEAREST),t.scalarTexture.setMagnificationFilter(EF.NEAREST)):(t.scalarTexture.setMinificationFilter(EF.LINEAR),t.scalarTexture.setMagnificationFilter(EF.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var i=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),i.drawArrays(i.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=lz.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)||tH("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var i=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,i[0],i[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 a=t.context;a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.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)):tH("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():en(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,D[3*I+2]=-1;var k=new Uint16Array(8);k[0]=3,k[1]=0,k[2]=1,k[3]=3,k[4]=3,k[5]=0,k[6]=3,k[7]=2;var M=Ln.newInstance({numberOfComponents:3,values:D});M.setName("points");var N=Ln.newInstance({numberOfComponents:1,values:k});t.tris.getCABO().createVBO(N,"polys",Jg.SURFACE,{points:M,cellOffset:0})}t.VBOBuildTime.modified()}}}}var iH={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 oH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iH,n),NF.extend(e,t,n),t.VBOBuildTime={},W(t.VBOBuildTime,{mtime:0}),t.tris=pz.newInstance(),t.scalarTexture=nB.newInstance(),t.opacityTexture=nB.newInstance(),t.colorTexture=nB.newInstance(),t.jitterTexture=nB.newInstance(),t.jitterTexture.setWrapS(OF.REPEAT),t.jitterTexture.setWrapT(OF.REPEAT),t.framebuffer=aB.newInstance(),t.idxToView=Do(new Float64Array(16)),t.idxNormalMatrix=Aa(new Float64Array(9)),t.modelToView=Do(new Float64Array(16)),t.projectionToView=Do(new Float64Array(16)),t.projectionToWorld=Do(new Float64Array(16)),Y(e,t,["context"]),rH(e,t)}var aH=ne(oH,"vtkOpenGLVolumeMapper"),sH={newInstance:aH,extend:oH};jF("vtkVolumeMapper",aH);var lH={Core:xF,Misc:TG,OpenGL:{vtkActor:NG,vtkActor2D:VG,vtkBufferObject:XG,vtkCamera:$G,vtkCellArrayBufferObject:iz,vtkConvolution2DPass:vz,vtkFramebuffer:aB,vtkGlyph3DMapper:Xz,vtkHardwareSelector:nL,vtkHelper:pz,vtkImageMapper:nW,vtkImageSlice:sW,vtkPixelSpaceCallbackMapper:fW,vtkPolyDataMapper:Fz,vtkRenderer:bW,vtkRenderWindow:gL,vtkShader:xB,vtkShaderCache:IB,vtkShaderProgram:_B,vtkSkybox:PW,vtkSphereMapper:NW,vtkStickMapper:zW,vtkTexture:nB,vtkTextureUnitManager:jB,vtkVertexArrayObject:lz,vtkViewNodeFactory:WF,vtkVolume:XW,vtkVolumeMapper:sH},SceneGraph:{vtkRenderPass:cB,vtkRenderWindowViewNode:RB,vtkViewNode:NF,vtkViewNodeFactory:LF},WebGPU:{vtkRenderWindow:gU}};function uH(e,t){function n(){if(t.input)for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:-1,o=e.getDataArray(n,r),a=o.getRange(i);t.proxyManager.rescaleTransferFunctionToDataRange(n,a)},e.isVisible=function(){return t.actors.length?t.actors[0].getVisibility():!!t.volumes.length&&t.volumes[0].getVisibility()},e.setVisibility=function(n){for(var r=0,i=t.actors.length;i--;)r+=t.actors[i].setVisibility(n);for(i=t.volumes.length;i--;)r+=t.volumes[i].setVisibility(n);r&&e.modified()},e.setColorBy=function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=Uv.ColorMode.DEFAULT,a=Uv.ScalarMode.DEFAULT,s=n,l=e.getDataArray(n,r),u=!!l,c=n?e.getLookupTableProxy(n).getLookupTable():null;c&&(-1===i?c.setVectorModeToMagnitude():(c.setVectorModeToComponent(),c.setVectorComponent(i))),u&&(o=Uv.ColorMode.MAP_SCALARS,a="pointData"===r?Uv.ScalarMode.USE_POINT_FIELD_DATA:Uv.ScalarMode.USE_CELL_FIELD_DATA,t.mapper.setLookupTable&&t.mapper.setLookupTable(c),t.rescaleOnColorBy&&e.rescaleTransferFunctionToDataRange(n,r,i)),t.mapper.set({colorByArrayName:s,colorMode:o,scalarMode:a,scalarVisibility:u},!0)},e.getColorBy=function(){if(!t.mapper.getColorByArrayName){var n=e.getInputDataSet();return n.getPointData().getScalars()?[n.getPointData().getScalars().getName(),"pointData",-1]:n.getCellData().getScalars()?[n.getCellData().getScalars().getName(),"cellData",-1]:n.getPointData().getNumberOfArrays()?[n.getPointData().getArrayByIndex(0).getName(),"pointData",-1]:n.getCellData().getNumberOfArrays()?[n.getCellData().getArrayByIndex(0).getName(),"cellData",-1]:[]}var r=[],i=t.mapper.get("colorByArrayName","colorMode","scalarMode","scalarVisibility"),o=i.colorByArrayName,a=i.colorMode,s=i.scalarMode;if(i.scalarVisibility&&o&&(r.push(o),r.push(s===Uv.ScalarMode.USE_POINT_FIELD_DATA?"pointData":"cellData")),a===Uv.ColorMode.MAP_SCALARS&&o){var l=e.getLookupTableProxy(o).getLookupTable(),u=l.getVectorMode()===ys.VectorMode.MAGNITUDE?-1:l.getVectorComponent();r.push(u)}return r},e.listDataArrays=function(){var n=[];if(!t.input)return n;for(var r=e.getInputDataSet(),i=r.getPointData(),o=i.getNumberOfArrays(),a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cH,n),Hg.extend(e,t,n),Y(e,t,["rescaleOnColorBy"]),H(e,t,["input","mapper","actors","volumes"]),uH(e,t),ue(e,t)}},pH={Preset:0,RGBPoints:1,HSVPoints:2,Nodes:3},fH={Preset:"Cool to Warm",RGBPoints:[[0,0,0,0],[1,1,1,1]],HSVPoints:[[0,0,0,0],[1,0,0,1]],Nodes:[{x:0,r:0,g:0,b:0,midpoint:.5,sharpness:0},{x:1,r:1,g:1,b:1,midpoint:.5,sharpness:0}]};function hH(e,t){t.classHierarchy.push("vtkLookupTableProxy"),t.lookupTable=t.lookupTable||sT.newInstance(),t.lookupTable.setVectorModeToMagnitude(),e.setPresetName=function(n){t.presetName!==n&&(t.presetName=n,t.mode=pH.Preset,e.applyMode())},e.setRGBPoints=function(n){t.rgbPoints!==n&&(t.rgbPoints=(n||fH.RGBPoints).slice(),e.applyMode())},e.setHSVPoints=function(n){t.hsvPoints!==n&&(t.hsvPoints=(n||fH.HSVPoints).slice(),e.applyMode())},e.setNodes=function(n){t.nodes!==n&&(t.nodes=(n||fH.Nodes).slice(),e.applyMode())},e.setMode=function(n){t.mode!==n&&(t.mode=n,e.applyMode())},e.applyMode=function(){switch(t.mode){case pH.Preset:var n=hM.getPresetByName(t.presetName);n&&t.lookupTable.applyColorMap(n);break;case pH.RGBPoints:t.lookupTable.removeAllPoints(),t.rgbPoints.forEach((function(e){var n;return(n=t.lookupTable).addRGBPointLong.apply(n,y(e))}));break;case pH.HSVPoints:t.lookupTable.removeAllPoints(),t.hsvPoints.forEach((function(e){var n;return(n=t.lookupTable).addHSVPointLong.apply(n,y(e))}));break;case pH.Nodes:t.lookupTable.setNodes(t.nodes)}t.lookupTable.setMappingRange(t.dataRange[0],t.dataRange[1]),t.lookupTable.updateRange(),e.modified()},e.setDataRange=function(n,r){t.dataRange[0]===n&&t.dataRange[1]===r||(t.dataRange[0]=n,t.dataRange[1]=r,t.lookupTable.setMappingRange(t.dataRange[0],t.dataRange[1]),t.lookupTable.updateRange(),e.applyMode())},e.applyMode()}var mH={mode:pH.Preset,presetName:fH.Preset,rgbPoints:fH.RGBPoints,hsvPoints:fH.HSVPoints,nodes:fH.Nodes,arrayName:"No array associated",arrayLocation:"pointData",dataRange:[0,1]};function gH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mH,n),de.obj(e,t),de.setGet(e,t,["arrayName"]),de.get(e,t,["mode","lookupTable","presetName","rgbPoints","hsvPoints","nodes","dataRange"]),hH(e,t),de.proxy(e,t)}var vH={newInstance:de.newInstance(gH,"vtkLookupTableProxy"),extend:gH,Mode:pH,Defaults:fH};function yH(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 bH(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AH,n),de.obj(e,t),de.setGet(e,t,["arrayName"]),de.get(e,t,["piecewiseFunction","gaussians","nodes","points","mode","dataRange"]),CH(e,t),de.proxy(e,t)}var _H={newInstance:de.newInstance(PH,"vtkPiecewiseFunctionProxy"),extend:PH,Mode:wH,Defaults:xH};function OH(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 EH(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,i){var o={},a={},s={},l=n.datasetHandler||A,u=[];t.sources.forEach((function(t){var n=t.id,r=t.group,i=t.name,a=t.props;u.push(Promise.resolve(l(a.dataset)).then((function(t){if(t){var s=e.createProxy(r,i);return s.setName(a.name),s.setInputData(t,a.type),o[n]=s,s}return null})))})),Promise.all(u).then((function(){var n=e.getViews();function i(e){o[e]&&s[e]&&o[e].resetOrientation().then((function(){o[e].getCamera().set(s[e]),o[e].getRenderer().updateLightsGeometryToFollowCamera(),o[e].renderLater()}))}t.views.forEach((function(r){var i=r.id,a=r.group,l=r.name,u=r.props,c=r.camera,d=null;t.options.recycleViews&&(d=n.find((function(e){return e.getProxyGroup()===a&&e.getProxyName()===l&&e.getName()===u.name}))),d?d.setDisableAnimation(!0):d=e.createProxy(a,l,{disableAnimation:!0}),d.set(u,!0),o[i]=d,s[i]=c})),t.representations.forEach((function(t){var n=t.source,r=t.view,a=t.props;e.getRepresentation(o[n],o[r]).set(a,!0),i(r)})),Object.keys(t.fields).forEach((function(n){var r=t.fields[n],i=r.lookupTable,o=r.piecewiseFunction,a=e.getLookupTable(n,i);a.setPresetName(i.presetName),a.setDataRange.apply(a,y(i.dataRange));var s=e.getPiecewiseFunction(n,o);switch(o.mode){case _H.Mode.Gaussians:s.setGaussians(o.gaussians);break;case _H.Mode.Points:s.setPoints(o.points);break;case _H.Mode.Nodes:s.setNodes(o.nodes)}s.setMode(o.mode),s.setDataRange.apply(s,y(o.dataRange))})),Object.keys(s).forEach(i),Object.keys(o).forEach((function(e){var t=o[e].getProxyId();a[e]=t})),t.views.forEach((function(e){var t=e.id;o[t].setDisableAnimation(!1)})),r(kH(kH({},t.userData),{},{$oldToNewIdMapping:a}))})).catch(i)}))},e.saveState=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,i){var o=e.getSources(),a=e.getViews(),s=t.datasetHandler||function(e){return e.getState()};delete t.datasetHandler;var l=[],u=new Set,c={userData:n,options:t,sources:[],views:[],representations:[],fields:{}};o.forEach((function(e){var t=Promise.resolve(s(e.getDataset(),e));l.push(t),c.sources.push({id:e.getProxyId(),group:e.getProxyGroup(),name:e.getProxyName(),props:{name:e.getName(),type:e.getType(),dataset:t}})})),a.forEach((function(e){var t=e.getCamera().get("position","viewUp","focalPoint");c.views.push({id:e.getProxyId(),group:e.getProxyGroup(),name:e.getProxyName(),props:Object.assign(MH(e),e.get("axis","orientation","viewUp")),camera:t}),e.getRepresentations().forEach((function(t){c.representations.push({source:t.getInput().getProxyId(),view:e.getProxyId(),props:MH(t)}),u.add(t.getColorBy()[0])}))})),u.forEach((function(t){c.fields[t]={lookupTable:e.getLookupTable(t).get("mode","presetName","rgbPoints","hsvPoints","nodes","arrayName","arrayLocation","dataRange"),piecewiseFunction:e.getPiecewiseFunction(t).get("mode","gaussians","points","nodes","arrayName","arrayLocation","dataRange")}})),Promise.all(l).then((function(){for(var e=function(e){c.sources[e].props.dataset.then((function(t){c.sources[e].props.dataset=t}))},t=0;t0&&void 0!==arguments[0]&&arguments[0],n=e.getViews(),r=0;r0&&void 0!==arguments[0]&&arguments[0],n=e.getViews().filter((function(e){return!t||e.getContainer()})),r=0;r0&&void 0!==arguments[0]?arguments[0]:250;if(!t.animating){t.animating=!0;for(var i=e.getViews().filter((function(e){return e.getContainer()})),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,{proxyIdMapping:{},proxyByGroup:{},proxyConfiguration:{},sv2rMapping:{},r2svMapping:{},collapseState:{},lookupTables:{},piecewiseFunctions:{},animating:!1},n),de.obj(e,t),de.setGet(e,t,["proxyConfiguration","activeSource","activeView"]),de.event(e,t,"ActiveSourceChange"),de.event(e,t,"ActiveViewChange"),de.event(e,t,"ProxyRegistrationChange"),DH(e,t),NH(e),RH(e,t),LH(e,t),de.proxy(e,t),t.classHierarchy.push("vtkProxyManager")}var jH={newInstance:de.newInstance(VH,"vtkProxyManager"),extend:VH};function UH(e,t){t.classHierarchy.push("vtkSourceProxy"),e.setInputProxy=function(n){t.inputSubscription&&(t.inputSubscription(),t.inputSubscription=null),t.inputProxy=n,t.inputProxy&&(t.inputSubscription=n.onModified(e.update,-1).unsubscribe),e.update()},e.setInputData=function(n,r){t.dataset!==n&&(t.dataset=n,t.type=r||n.getClassName(),e.modified(),e.invokeDatasetChange())},e.setInputAlgorithm=function(n,r){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.type=r,t.algo!==n&&(t.algo=n,t.algoSubscription&&(t.algoSubscription(),t.algoSubscription=null),n&&i&&(t.algoSubscription=n.onModified((function(){e.update()}),-1).unsubscribe,e.update()))},e.update=function(){t.algo&&t.inputProxy&&t.algo.setInputData(t.inputProxy.getDataset()),t.updateDomain&&t.inputProxy&&t.updateDomain(e,t.inputProxy.getDataset()),t.algo&&e.setInputData(t.algo.getOutputData(),t.type)},e.getUpdate=function(){return t.algo.getMTime()>t.dataset.getMTime()},e.delete=de.chain((function(){t.algoSubscription&&(t.algoSubscription(),t.algoSubscription=null),t.inputSubscription&&(t.inputSubscription(),t.inputSubscription=null)}),e.delete),t.inputProxy&&(t.inputSubscription=t.inputProxy.onModified((function(){e.update()}),-1).unsubscribe),t.algoFactory&&e.setInputAlgorithm(t.algoFactory.newInstance(),null,t.autoUpdate),e.update()}var GH={name:"Default source"};function zH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,GH,n),de.obj(e,t),de.get(e,t,["name","type","dataset","algo","inputProxy"]),de.set(e,t,["name"]),de.event(e,t,"DatasetChange"),de.proxy(e,t),UH(e,t),t.proxyPropertyMapping&&de.proxyPropertyMapping(e,t,t.proxyPropertyMapping)}var WH={newInstance:de.newInstance(zH,"vtkSourceProxy"),extend:zH};function HH(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var KH={slice:Jy.vtkMouseCameraSliceManipulator,multiRotate:Jy.vtkMouseCameraTrackballMultiRotateManipulator,pan:Jy.vtkMouseCameraTrackballPanManipulator,roll:Jy.vtkMouseCameraTrackballRollManipulator,rotate:Jy.vtkMouseCameraTrackballRotateManipulator,axisRotate:Jy.vtkMouseCameraAxisRotateManipulator,zoom:Jy.vtkMouseCameraTrackballZoomManipulator,zoomToMouse:Jy.vtkMouseCameraTrackballZoomToMouseManipulator,range:Jy.vtkMouseRangeManipulator,vrPan:Jy.vtkVRButtonPanManipulator,gestureCamera:Jy.vtkGestureCameraManipulator,movement:Jy.vtkKeyboardCameraManipulator,freeLook:Jy.vtkMouseCameraTrackballFirstPersonManipulator,unicam:Jy.vtkMouseCameraUnicamManipulator,unicamRotate:Jy.vtkMouseCameraUnicamRotateManipulator},qH={"3D":[{type:"rotate"},{type:"pan",options:{shift:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}},{type:"roll",options:{shift:!0,control:!0}},{type:"roll",options:{shift:!0,alt:!0}},{type:"roll",options:{shift:!0,button:3}},{type:"vrPan"},{type:"gestureCamera"}],"2D":[{type:"pan",options:{shift:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{button:3}},{type:"roll",options:{shift:!0,alt:!0}},{type:"roll",options:{shift:!0,button:3}},{type:"roll",options:{shift:!0}},{type:"vrPan"},{type:"gestureCamera"}],FirstPerson:[{type:"movement"},{type:"freeLook"}],Unicam:[{type:"unicam"}],zRotateTop:[{type:"pan",options:{shift:!0}},{type:"axisRotate",options:{rotationAxis:[0,0,1],useHalfAxis:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}}],zRotateAll:[{type:"pan",options:{shift:!0}},{type:"axisRotate",options:{rotationAxis:[0,0,1],useHalfAxis:!1}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}}]};function XH(e,t){t.removeAllManipulators();for(var n=0;n1.5?"black":"white"}t.classHierarchy.push("vtkViewProxy"),t.renderWindow=sF.newInstance(),t.renderer=SC.newInstance({background:[0,0,0]}),t.renderWindow.addRenderer(t.renderer),t.openglRenderWindow=t.renderWindow.newAPISpecificView(),t.renderWindow.addView(t.openglRenderWindow),t.interactor=Rm.newInstance(),t.interactor.setView(t.openglRenderWindow),t.interactorStyle3D=cg.newInstance(),t.interactorStyle2D=cg.newInstance(),YH.applyPreset("3D",t.interactorStyle3D),YH.applyPreset("2D",t.interactorStyle2D),t.cornerAnnotation=Bb.newInstance(),t.interactor.setInteractorStyle(t.useParallelRendering?t.interactorStyle2D:t.interactorStyle3D),t.camera=t.renderer.getActiveCamera(),t.camera.setParallelProjection(!!t.useParallelRendering),t.orientationAxesArrow=jM.newInstance(),t.orientationAxesCube=kM.newInstance(),PM.applyPreset("default",t.orientationAxesCube),PM.applyPreset("lps",t.orientationAxesCube),t.orientationAxesMap={arrow:t.orientationAxesArrow,cube:t.orientationAxesCube},t.orientationWidget=IC.newInstance({actor:t.orientationAxesArrow,interactor:t.renderWindow.getInteractor()}),t.orientationWidget.setEnabled(!0),t.orientationWidget.setViewportCorner(IC.Corners.BOTTOM_LEFT),t.orientationWidget.setViewportSize(.1),e.setPresetToInteractor3D=function(e){return Array.isArray(e)?YH.applyDefinitions(e,t.interactorStyle3D):YH.applyPreset(e,t.interactorStyle3D)},e.setPresetToInteractor2D=function(e){return Array.isArray(e)?YH.applyDefinitions(e,t.interactorStyle2D):YH.applyPreset(e,t.interactorStyle2D)},e.setOrientationAxesType=function(n){var r=t.orientationAxesMap[n];r&&(t.orientationAxesType=n,t.orientationWidget.setActor(r),e.renderLater())},e.registerOrientationAxis=function(e,n){t.orientationAxesMap[e]=n},e.unregisterOrientationAxis=function(e){delete t.orientationAxesMap[e]},e.listOrientationAxis=function(){return Object.keys(t.orientationAxesMap)},e.setPresetToOrientationAxes=function(n){var r=!1;return"string"==typeof n?(t.presetToOrientationAxes!==n&&(t.presetToOrientationAxes=n,r=PM.applyPreset(n,t.orientationAxesCube),e.modified()),r):(t.presetToOrientationAxes="Custom",r=PM.applyDefinitions(n,t.orientationAxesCube),e.modified(),r)},e.setContainer=function(e){t.container&&(t.interactor.unbindEvents(t.container),t.openglRenderWindow.setContainer(null),t.cornerAnnotation.setContainer(null)),t.container=e,e&&(t.openglRenderWindow.setContainer(e),t.cornerAnnotation.setContainer(e),t.interactor.initialize(),t.interactor.bindEvents(e))},e.resize=function(){if(t.container){var n=t.container.getBoundingClientRect();if(n.width===n.height&&0===n.width)return;var r=window.devicePixelRatio||1,i=Math.max(10,Math.floor(r*n.width)),o=Math.max(10,Math.floor(r*n.height));t.openglRenderWindow.setSize(i,o),e.invokeResize({width:i,height:o}),e.renderLater()}},e.renderLater=function(){e.render(!1)},e.render=function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.representations.length>0&&t.resetCameraOnFirstRender&&(t.resetCameraOnFirstRender=!1,e.resetCamera()),t.orientationWidget.updateMarkerOrientation(),t.renderer.resetCameraClippingRange(),n?t.renderWindow.render():setTimeout(t.renderWindow.render,0)},e.addRepresentation=function(e){e&&-1===t.representations.indexOf(e)&&(t.representations.push(e),t.renderer.addViewProp(e))},e.removeRepresentation=function(e){e&&(-1!==t.representations.indexOf(e)&&(t.representations=t.representations.filter((function(t){return t!==e})),t.renderer.removeViewProp(e)),0===t.representations.length&&(t.resetCameraOnFirstRender=!0))},e.resetCamera=function(){t.renderer.resetCamera(),t.renderer.resetCameraClippingRange(),t.interactorStyle2D.setCenterOfRotation(t.camera.getFocalPoint()),t.interactorStyle3D.setCenterOfRotation(t.camera.getFocalPoint()),e.renderLater()},e.captureImage=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.format,r=void 0===n?"image/png":n,i=HH(e,["format"]);return t.renderWindow.captureImages(r,i)[0]},e.openCaptureImage=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"_blank",n=new Image;return e.captureImage().then((function(e){n.src=e;var r=window.open("",t);r.document.write(n.outerHTML),r.document.title="vtk.js Image Capture",window.focus()}))},e.setCornerAnnotation=function(e,n){t.cornerAnnotation.updateTemplates(f({},e,(function(e){return Bb.applyTemplate(n,e)})))},e.setCornerAnnotations=function(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r?Object.keys(n).forEach((function(t){e.setCornerAnnotation(t,n[t])})):t.cornerAnnotation.updateTemplates(n)},e.updateCornerAnnotation=function(e){return t.cornerAnnotation.updateMetadata(e)},e.setAnnotationOpacity=function(n){t.annotationOpacity!==Number(n)&&(t.annotationOpacity=Number(n),t.cornerAnnotation.getAnnotationContainer().style.opacity=n,e.modified())},e.setBackground=re(t.renderer.setBackground,n),e.getBackground=t.renderer.getBackground,e.setAnimation=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!t.disableAnimation||!n)if(n)t.renderWindow.getInteractor().requestAnimation(r);else{var i=r===e||0==="".concat(r).indexOf("ViewProxy.moveCamera.");t.renderWindow.getInteractor().cancelAnimation(r,i)}},e.updateOrientation=function(n,r,i){var o,a,s,l,u,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(void 0===n)return Promise.resolve();var d=t.camera.getPosition(),p=t.camera.getViewUp(),f=t.camera.getFocalPoint();t.axis=n,t.orientation=r,t.viewUp=i;var h=t.camera.getFocalPoint();h[t.axis]+=t.orientation,(o=t.camera).setPosition.apply(o,y(h)),(a=t.camera).setViewUp.apply(a,y(i)),t.renderer.resetCamera();var m=t.camera.getFocalPoint(),g=t.camera.getPosition(),v=t.camera.getViewUp();return(s=t.camera).setFocalPoint.apply(s,y(f)),(l=t.camera).setPosition.apply(l,y(d)),(u=t.camera).setViewUp.apply(u,y(p)),e.moveCamera(m,g,v,c)},e.moveCamera=function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=t.camera.getFocalPoint(),s=t.camera.getPosition(),l=t.camera.getViewUp(),u=[{focalPoint:n,position:r,viewUp:i}];if(o){var c=[(a[0]-n[0])/o,(a[1]-n[1])/o,(a[2]-n[2])/o],d=[(s[0]-r[0])/o,(s[1]-r[1])/o,(s[2]-r[2])/o],p=[(l[0]-i[0])/o,(l[1]-i[1])/o,(l[2]-i[2])/o],f=c[0]||c[1]||c[2]||d[0]||d[1]||d[2]||p[0]||p[1]||p[2],h=c.map((function(e){return Math.abs(e)0&&void 0!==arguments[0]?arguments[0]:0;return e.updateOrientation(t.axis,t.orientation,t.viewUp,n)},e.rotate=function(e){var n,r=t.camera.get("viewUp","focalPoint","position"),i=r.viewUp,o=r.focalPoint,a=r.position,s=[o[0]-a[0],o[1]-a[1],o[2]-a[2]];Es.buildFromDegree().rotate(Number.isNaN(e)?90:e,s).apply(i),(n=t.camera).setViewUp.apply(n,y(i)),t.camera.modified(),t.orientationWidget.updateMarkerOrientation(),t.renderWindow.render()},e.focusTo=re(t.camera.setFocalPoint,t.interactorStyle2D.setCenterOfRotation,t.interactorStyle3D.setCenterOfRotation),e.delete=re(e.setContainer,t.openglRenderWindow.delete,e.delete),e.resetOrientation(),n()}var QH={representations:[],sectionName:"view",annotationOpacity:1,resetCameraOnFirstRender:!0,presetToOrientationAxes:"lps",orientationAxesType:"arrow",disableAnimation:!1,axis:1,orientation:0,viewUp:[0,0,1]};function $H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QH,n),W(e,t),Y(e,t,["name","disableAnimation"]),H(e,t,["annotationOpacity","camera","container","cornerAnnotation","interactor","interactorStyle2D","interactorStyle3D","openglRenderWindow","orientationAxesType","presetToOrientationAxes","renderer","renderWindow","representations","useParallelRendering"]),te(e,t,"Resize"),JH(e,t),ue(e,t),ce(e,t,{orientationAxesVisibility:{modelKey:"orientationWidget",property:"enabled"},orientationAxesCorner:{modelKey:"orientationWidget",property:"viewportCorner"},orientationAxesSize:{modelKey:"orientationWidget",property:"viewportSize"},cameraViewUp:{modelKey:"camera",property:"viewUp",modified:!1},cameraPosition:{modelKey:"camera",property:"position",modified:!1},cameraFocalPoint:{modelKey:"camera",property:"focalPoint",modified:!1}})}var eK={newInstance:ne($H,"vtkViewProxy"),extend:$H};function tK(e){return Array.isArray(e)?e.map(tK).join(", "):Number.isInteger(e)?e:Number.isFinite(e)?Math.abs(e)<.01?"0":e.toFixed(2):e}function nK(e,t){t.classHierarchy.push("vtkView2DProxy"),e.updateWidthHeightAnnotation=function(){var n=t.cornerAnnotation.getMetadata(),r=n.ijkOrientation,i=n.dimensions;if(r&&i){var o=i;i.length>3&&(o=i.split(",").map(Number));var a=t.camera.getDirectionOfProjection(),s=t.camera.getViewUp(),l=[0,0,0];et(a,s,l);var u=wn(l),c=wn(s),d=o["IJK".indexOf(r[u])],p=o["IJK".indexOf(r[c])];e.updateCornerAnnotation({sliceWidth:d,sliceHeight:p})}};var n=e.updateOrientation;e.updateOrientation=function(r,i,o){for(var a=n(r,i,o),s=t.representations.length;s--;){var l=t.representations[s],u="XYZ"[r];l.setSlicingMode&&l.setSlicingMode(u)}return e.updateCornerAnnotation({axis:"XYZ"[r]}),a};var r=e.addRepresentation;e.addRepresentation=function(n){r(n),n.setSlicingMode&&(n.setSlicingMode("XYZ"[t.axis]),e.bindRepresentationToManipulator(n))};var i=e.removeRepresentation;function o(n){e.updateCornerAnnotation({windowWidth:n}),t.sliceRepresentation&&t.sliceRepresentation.setWindowWidth&&t.sliceRepresentation.setWindowWidth(n)}function a(n){e.updateCornerAnnotation({windowLevel:n}),t.sliceRepresentation&&t.sliceRepresentation.setWindowLevel&&t.sliceRepresentation.setWindowLevel(n)}function s(n){var r=Number(n),i={slice:Number.isInteger(r)?n:r.toFixed(2)};if(t.sliceRepresentation&&t.sliceRepresentation.setSlice&&t.sliceRepresentation.setSlice(r),t.sliceRepresentation&&t.sliceRepresentation.getAnnotations){var o=t.sliceRepresentation.getAnnotations();Object.keys(o).forEach((function(e){i[e]=tK(o[e])}))}e.updateCornerAnnotation(i)}e.removeRepresentation=function(n){if(i(n),n===t.sliceRepresentation){e.bindRepresentationToManipulator(null);for(var r=t.representations.length;r--;)e.bindRepresentationToManipulator(t.representations[r])&&(r=0)}},t.rangeManipulator=Ky.newInstance({button:1,scrollEnabled:!0}),t.interactorStyle2D.addMouseManipulator(t.rangeManipulator),e.bindRepresentationToManipulator=function(n){var r=0;for(t.rangeManipulator.removeAllListeners(),t.sliceRepresentation=n;t.sliceRepresentationSubscriptions.length;)t.sliceRepresentationSubscriptions.pop().unsubscribe();if(n){if(t.sliceRepresentationSubscriptions.push(t.camera.onModified(e.updateWidthHeightAnnotation)),n.getWindowWidth){var i=function(){return o(n.getWindowWidth())},l=n.getPropertyDomainByName("windowWidth"),u=l.min,c=l.max,d=l.step;d&&"any"!==d||(d=1/512),t.rangeManipulator.setVerticalListener(u,c,d,n.getWindowWidth,o),t.sliceRepresentationSubscriptions.push(n.onModified(i)),i(),r++}if(n.getWindowLevel){var p=function(){return a(n.getWindowLevel())},f=n.getPropertyDomainByName("windowLevel"),h=f.min,m=f.max,g=f.step;g&&"any"!==g||(g=1/512),t.rangeManipulator.setHorizontalListener(h,m,g,n.getWindowLevel,a),t.sliceRepresentationSubscriptions.push(n.onModified(p)),p(),r++}var v=n.getPropertyDomainByName("slice");if(n.getSlice&&v){var y=function(){return s(n.getSlice())};t.rangeManipulator.setScrollListener(v.min,v.max,v.step,n.getSlice,s),t.sliceRepresentationSubscriptions.push(n.onModified(y)),y(),r++}}return r}}var rK={axis:2,orientation:-1,viewUp:[0,1,0],useParallelRendering:!0,sliceRepresentationSubscriptions:[]};function iK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rK,n),eK.extend(e,t,n),de.get(e,t,["axis"]),nK(e,t)}var oK=de.newInstance(iK,"vtkView2DProxy"),aK={vtkAbstractRepresentationProxy:dH,vtkLookupTableProxy:vH,vtkPiecewiseFunctionProxy:_H,vtkProxyManager:jH,vtkSourceProxy:WH,vtkView2DProxy:{newInstance:oK,extend:iK},vtkViewProxy:eK},sK={representation:{"Surface with edges":{property:{edgeVisibility:!0,representation:2}},Surface:{property:{edgeVisibility:!1,representation:2}},Wireframe:{property:{edgeVisibility:!1,representation:1}},Points:{property:{edgeVisibility:!1,representation:0}}}},lK={representation:"Surface"};function uK(e,t){t.classHierarchy.push("vtkGeometryRepresentationProxy"),t.mapper=Uv.newInstance({interpolateScalarsBeforeMapping:!0,useLookupTableScalarRange:!0,scalarVisibility:!1}),t.actor=pv.newInstance(),t.property=t.actor.getProperty(),t.sourceDependencies.push(t.mapper),t.actor.setMapper(t.mapper),t.actors.push(t.actor)}var cK={representation:"Surface"};function dK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cK,n),dH.extend(e,t,n),uK(0,t),de.proxyPropertyState(e,t,sK,lK),de.proxyPropertyMapping(e,t,{opacity:{modelKey:"property",property:"opacity"},visibility:{modelKey:"actor",property:"visibility"},color:{modelKey:"property",property:"diffuseColor"},interpolateScalarsBeforeMapping:{modelKey:"mapper",property:"interpolateScalarsBeforeMapping"},pointSize:{modelKey:"property",property:"pointSize"},useShadow:{modelKey:"property",property:"lighting"},useBounds:{modelKey:"actor",property:"useBounds"}})}var pK={newInstance:de.newInstance(dK,"vtkGeometryRepresentationProxy"),extend:dK};function fK(e,t){t.classHierarchy.push("vtkGlyphRepresentationProxy"),t.property=av.newInstance(),t.sourceDependencies.push({setInputData:function(e){t.actors.length=0;var n=sT.newInstance();n.applyColorMap({RGBPoints:e.rgbPoints}),t.glyph={};for(var r=e.glyph.length;r--;){var i=e.glyph[r];t.glyph[i.id]=A(i)}for(r=e.mapping.length;r--;){var o=e.mapping[r],a=t.glyph[o.glyphId],s=ju.newInstance();s.getPoints().setData(Float32Array.from(o.coordinates),3),o.scale&&s.getPointData().addArray(Ln.newInstance({name:"scaling",values:Float32Array.from(o.scale),numberOfComponents:3}));var l=HR.newInstance({useLookupTableScalarRange:!0,lookupTable:n,orient:!1,scaling:!!o.scale,scaleArray:"scaling",scaleMode:HR.ScaleModes.SCALE_BY_COMPONENTS}),u=pv.newInstance();t.property&&u.setProperty(t.property),u.setMapper(l),l.setInputData(s,0),l.setInputConnection(a.getOutputPort(),1),t.actors.push(u)}}}),e.setColorBy=function(){},e.getColorBy=function(){return[]},e.listDataArrays=function(){return[]}}var hK={};function mK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hK,n),dH.extend(e,t,n),fK(e,t),de.proxyPropertyMapping(e,t,{edgeVisibility:{modelKey:"property",property:"edgeVisibility"}})}var gK={newInstance:de.newInstance(mK,"vtkGlyphRepresentationProxy"),extend:mK};function vK(e,t){t.classHierarchy.push("vtkMoleculeRepresentationProxy"),t.filter=Gd.newInstance(),t.sphereMapper=mF.newInstance(),t.stickMapper=bF.newInstance(),t.sphereActor=pv.newInstance(),t.stickActor=pv.newInstance(),t.sourceDependencies.push(t.filter),t.sphereMapper.setInputConnection(t.filter.getOutputPort(0)),t.sphereMapper.setScaleArray(t.filter.getSphereScaleArrayName()),t.sphereActor.setMapper(t.sphereMapper),t.stickMapper.setInputConnection(t.filter.getOutputPort(1)),t.stickMapper.setScaleArray("stickScales"),t.stickMapper.setOrientationArray("orientation"),t.stickActor.setMapper(t.stickMapper),t.actors.push(t.sphereActor),t.actors.push(t.stickActor),e.setColorBy=function(){},e.getColorBy=function(){return[]},e.listDataArrays=function(){return[]}}var yK={};function bK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yK,n),dH.extend(e,t,n),vK(e,t),de.proxyPropertyMapping(e,t,{tolerance:{modelKey:"filter",property:"tolerance"},atomicRadiusScaleFactor:{modelKey:"filter",property:"atomicRadiusScaleFactor"},bondRadius:{modelKey:"filter",property:"bondRadius"},deltaBondFactor:{modelKey:"filter",property:"deltaBondFactor"},radiusType:{modelKey:"filter",property:"radiusType"},hideElements:{modelKey:"filter",property:"hideElements"}})}var wK={newInstance:de.newInstance(bK,"vtkMoleculeRepresentationProxy"),extend:bK};function xK(e,t){t.classHierarchy.push("vtkSkyboxRepresentationProxy"),t.actor=dF.newInstance(),t.actors.push(t.actor),t.sourceDependencies.push({setInputData:function(n){t.actor.removeAllTextures(),t.actor.addTexture(n);var r=t.input.getAlgo().getPositions();e.updateProxyProperty("position",{values:r})}}),e.setColorBy=function(){},e.getColorBy=function(){return[]},e.listDataArrays=function(){return[]},e.setPosition=function(e){t.input.getAlgo().setPosition(e)},e.getPosition=function(){return t.input.getAlgo().getPosition()}}var SK={};function CK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SK,n),dH.extend(e,t,n),xK(e,t)}var AK={newInstance:de.newInstance(CK,"vtkSkyboxRepresentationProxy"),extend:CK};function PK(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 _K(e,t){return e+t}function OK(){for(var e=arguments.length,t=new Array(e),n=0;nNumber.EPSILON&&(c[0]="IJK"[d]),h[3]-h[2]>Number.EPSILON&&(c[1]="IJK"[d]),h[5]-h[4]>Number.EPSILON&&(c[2]="IJK"[d])}n.ijkOrientation=c.join("")}return function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:-1;if(null===n)t.property.setRGBTransferFunction(null),t.property.setPiecewiseFunction(null);else{r(n,i,o);var a=e.getLookupTableProxy(n),s=e.getPiecewiseFunctionProxy(n);t.property.setRGBTransferFunction(a.getLookupTable()),t.property.setPiecewiseFunction(s.getPiecewiseFunction())}},n(t.slicingMode||"X")}var DK={};function IK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DK,n),dH.extend(e,t,n),de.get(e,t,["slicingMode"]),TK(e,t),de.proxyPropertyMapping(e,t,{visibility:{modelKey:"actor",property:"visibility"},windowWidth:{modelKey:"property",property:"colorWindow"},windowLevel:{modelKey:"property",property:"colorLevel"},interpolationType:{modelKey:"property",property:"interpolationType"},slice:{modelKey:"mapper",property:"slice"}})}var kK={newInstance:de.newInstance(IK,"vtkSliceRepresentationProxy"),extend:IK};function MK(e,t){t.classHierarchy.push("vtkSlicedGeometryRepresentationProxy"),t.plane=pr.newInstance(),t.cutter=Tc.newInstance(),t.cutter.setCutFunction(t.plane),t.mapper=Uv.newInstance(),t.actor=pv.newInstance(),t.property=t.actor.getProperty(),t.property.setLighting(!1),t.mapper.setInputConnection(t.cutter.getOutputPort()),t.actor.setMapper(t.mapper),t.actors.push(t.actor),t.sourceDependencies.push(t.cutter),e.setSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=t.slice!==n;t.slice=n;var i=t.plane.getNormal(),o=t.plane.setOrigin(i[0]*n,i[1]*n,i[2]*n);return!(!o&&!r||(e.modified(),0))},e.setOffset=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=t.offset!==n;t.offset=n;var i=t.plane.getNormal(),o=t.actor.setPosition(n*i[0],n*i[1],n*i[2]);return!(!o&&!r||(e.modified(),0))},e.setSlicingMode=function(n){if(t.slicingMode!==n&&n){switch(t.slicingMode=n,uA.SlicingMode[n]){case uA.SlicingMode.X:t.plane.setNormal(1,0,0);break;case uA.SlicingMode.Y:t.plane.setNormal(0,1,0);break;case uA.SlicingMode.Z:t.plane.setNormal(0,0,1);break;default:return}var r=e.setSlice(t.slice);(r=e.setOffset(t.offset)||r)||e.modified()}else console.log("skip setSlicingMode",n)}}var NK={slicingMode:uA.SlicingMode.NONE,slice:0,offset:0};function RK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,NK,n),dH.extend(e,t,n),de.get(e,t,["slicingMode","slice","offset"]),MK(e,t),de.proxyPropertyState(e,t),de.proxyPropertyMapping(e,t,{opacity:{modelKey:"property",property:"opacity"},visibility:{modelKey:"actor",property:"visibility"},color:{modelKey:"property",property:"diffuseColor"},useShadow:{modelKey:"property",property:"lighting"},useBounds:{modelKey:"actor",property:"useBounds"}})}var FK=de.newInstance(RK,"vtkSlicedGeometryRepresentationProxy");function BK(e,t){return e+t}function LK(){for(var e=arguments.length,t=new Array(e),n=0;n1)&&e.setSampleDistance(),(t.edgeGradient<0||t.edgeGradient>1)&&e.setEdgeGradient();var l=function(e,t,n,r){var i=t.getRange(),o=e.getSpacing(),a=e.getBounds(),s=n.mapperX.getClosestIJKAxis().ijkMode,l=n.mapperY.getClosestIJKAxis().ijkMode,u=n.mapperZ.getClosestIJKAxis().ijkMode,c={xSlice:{domain:{min:a[0],max:a[1],step:o[s]}},ySlice:{domain:{min:a[2],max:a[3],step:o[l]}},zSlice:{domain:{min:a[4],max:a[5],step:o[u]}},windowWidth:{domain:{min:0,max:i[1]-i[0],step:"any"}},windowLevel:{domain:{min:i[0],max:i[1],step:"any"}}};return r("xSlice",c.xSlice),r("ySlice",c.ySlice),r("zSlice",c.zSlice),r("windowWidth",c.windowWidth),r("windowLevel",c.windowLevel),{xSlice:LK(c.xSlice.domain.min,c.xSlice.domain.max),ySlice:LK(c.ySlice.domain.min,c.ySlice.domain.max),zSlice:LK(c.zSlice.domain.min,c.zSlice.domain.max),windowWidth:c.windowWidth.domain.max,windowLevel:Math.floor(LK(c.windowLevel.domain.min,c.windowLevel.domain.max))}}(n,e.getDataArray(),t,e.updateProxyProperty);e.set(l),2===n.getDimensions().reduce((function(e,t){return e+(t>1?1:0)}),0)&&e.setIs2DVolume(!0)}}),e.setIs2DVolume=function(n){t.is2DVolume=n,n&&(e.getVisibility()&&e.setSliceVisibility(!0),t.volume.setVisibility(!1))},e.isVisible=function(){return t.volume.getVisibility()},e.setVisibility=function(n){n?t.is2DVolume?e.setSliceVisibility(!0):t.volume.setVisibility(!0):(t.volume.setVisibility(!1),e.setSliceVisibility(!1))},e.getVisibility=function(){return t.volume.getVisibility()||e.getSliceVisibility()},e.isVisible=e.getVisibility,e.setSliceVisibility=function(n){if(n&&t.is2DVolume){var r=e.getInputDataSet().getDimensions().indexOf(1);t.actors[r]&&t.actors[r].setVisibility(!0)}else t.actors.forEach((function(e){return e.setVisibility(n)}))},e.getSliceVisibility=function(){return t.actorX.getVisibility()||t.actorY.getVisibility()||t.actorZ.getVisibility()},e.setSampleDistance=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.4;if(t.sampleDistance!==n){t.sampleDistance=n;var r=e.getInputDataSet(),i=.7*Math.sqrt(r.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.mapper.setSampleDistance(i*Math.pow(2,3*n-1.5)),e.modified()}},e.setEdgeGradient=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.2;if(t.edgeGradient!==n){t.edgeGradient=n;var r=e.getDataArray(),i=r.getNumberOfComponents();if(0===n)for(var o=0;o0?t.volume.getProperty().setGradientOpacityMinimumValue(a,Math.exp(Math.log(.2*(s[1]-s[0]))*l*l)):t.volume.getProperty().setGradientOpacityMinimumValue(a,0),t.volume.getProperty().setGradientOpacityMaximumValue(a,Math.exp(Math.log(1*(s[1]-s[0]))*n*n))}e.modified()}};var n=e.setColorBy;e.setColorBy=function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n(r,i,o);var a=e.getLookupTableProxy(r),s=e.getPiecewiseFunctionProxy(r);t.property.setRGBTransferFunction(0,a.getLookupTable()),t.property.setScalarOpacity(0,s.getPiecewiseFunction())}}var UK={sampleDistance:-1,edgeGradient:-1,disableSolidColor:!0,is2DVolume:!1};function GK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,UK,n),dH.extend(e,t,n),de.get(e,t,["sampleDistance","edgeGradient","cropFilter","is2DVolume"]),jK(e,t),de.proxyPropertyMapping(e,t,{xSlice:{modelKey:"mapperX",property:"slice"},ySlice:{modelKey:"mapperY",property:"slice"},zSlice:{modelKey:"mapperZ",property:"slice"},volumeVisibility:{modelKey:"volume",property:"visibility"},xSliceVisibility:{modelKey:"actorX",property:"visibility"},ySliceVisibility:{modelKey:"actorY",property:"visibility"},zSliceVisibility:{modelKey:"actorZ",property:"visibility"},windowWidth:{modelKey:"propertySlices",property:"colorWindow"},windowLevel:{modelKey:"propertySlices",property:"colorLevel"},useShadow:{modelKey:"property",property:"shade"},croppingPlanes:{modelKey:"cropFilter",property:"croppingPlanes"}})}var zK={Core:aK,Representations:{vtkGeometryRepresentationProxy:pK,vtkGlyphRepresentationProxy:gK,vtkMoleculeRepresentationProxy:wK,vtkSkyboxRepresentationProxy:AK,vtkSliceRepresentationProxy:kK,vtkSlicedGeometryRepresentationProxy:{newInstance:FK,extend:RK},vtkVolumeRepresentationProxy:{newInstance:de.newInstance(GK,"vtkVolumeRepresentationProxy"),extend:GK,updateConfiguration:VK}}},WK={JSZip:CE(),pako:oE};function HK(e,t){t.classHierarchy.push("vtkAbstractWidget"),t.actorToRepresentationMap=new WeakMap,e.getBounds=t.widgetState.getBounds,e.getNestedProps=function(){return t.representations},e.activateHandle=function(n){var r=n.selectedState,i=n.representation;t.widgetState.activateOnly(r),t.activeState=r,r&&r.updateManipulator&&r.updateManipulator(),e.invokeActivateHandle({selectedState:r,representation:i}),e.updateCursor&&e.updateCursor()},e.deactivateAllHandles=function(){t.widgetState.deactivate()},e.hasActor=function(e){return t.actorToRepresentationMap.has(e)},e.grabFocus=function(){t.hasFocus=!0},e.loseFocus=function(){t.hasFocus=!1},e.hasFocus=function(){return t.hasFocus},e.placeWidget=function(e){return t.widgetState.placeWidget(e)},e.getPlaceFactor=function(){return t.widgetState.getPlaceFactor()},e.setPlaceFactor=function(e){return t.widgetState.setPlaceFactor(e)},e.getRepresentationFromActor=function(e){return t.actorToRepresentationMap.get(e)},e.updateRepresentationForRender=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:CA.FRONT_BUFFER,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,KK,n),Hg.extend(e,t,n),zm.extend(e,t,n),de.setGet(e,t,["contextVisibility","handleVisibility","widgetManager"]),de.get(e,t,["representations","widgetState"]),de.event(e,t,"ActivateHandle"),HK(e,t)}var XK={newInstance:de.newInstance(qK,"vtkAbstractWidget"),extend:qK},YK=0,ZK=1,JK=de.vtkErrorMacro,QK=de.vtkWarningMacro,$K=["active","inactive","static"];function eq(e,t){t.classHierarchy.push("vtkWidgetRepresentation");var n={mtimes:{},states:[]};function r(e,t){e&&e.setResolveCoincidentTopologyToPolygonOffset&&(e.setResolveCoincidentTopologyToPolygonOffset(),Pv.forEach((function(n){if(t[n]){var r="setRelativeCoincidentTopology".concat(n,"OffsetParameters");if(e[r]){var i=t[n],o=i.factor,a=i.offset;e[r](o,a)}}})))}e.getActors=function(){return t.actors},e.getNestedProps=e.getActors,e.setLabels=function(){for(var n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:t.inputData[0];return n.mtimes.representation===e.getMTime()&&n.mtimes.input===r.getMTime()||(n.mtimes.representation=e.getMTime(),n.mtimes.input=r.getMTime(),n.states=[],t.labels.forEach((function(e){n.states=n.states.concat(r.getStatesWithLabel(e)||[])}))),n.states},e.getSelectedState=function(t,n){var r=e.getRepresentationStates();return n0&&void 0!==arguments[0]?arguments[0]:CA.FRONT_BUFFER,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!0;switch(t.behavior){case YK:o=e===CA.PICKING_BUFFER||i;break;case ZK:o=e===CA.FRONT_BUFFER&&r;break;default:o=!0}for(var a=n&&o,s=0;s2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tq,n),Hg.extend(e,t,n),de.algo(e,t,1,1),de.get(e,t,["labels","coincidentTopologyParameters"]),de.set(e,t,["displayScaleParams"]),de.setGet(e,t,["scaleInPixels"]),eq(e,t)},mergeStyles:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t.behavior===ZK?e.setVisibility(n&&r):t.behavior===YK&&e.setVisibility(n&&i)},e.render=function(){throw new Error("Not implemented")}}var oq={visibility:!0},aq=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oq,n),nq.extend(e,t,n),de.setGet(e,t,["visibility","hover"]),iq(e,t)},sq=rq,lq=function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)};function uq(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg",e.name),n=Object.keys(e.attrs),r=0;r=a;p--)d(p)}return n}var dq=AA.ViewTypes,pq=AA.RenderingTypes,fq=AA.CaptureOn,hq=de.vtkErrorMacro,mq=sq,gq=lq,vq=1;function yq(e){var t=e.getActiveCamera(),n=e.getRenderWindow(),r=n.getInteractor(),i=r.getView();return{renderer:e,renderWindow:n,interactor:r,apiSpecificRenderWindow:i,camera:t}}function bq(e,t){t.viewId||(t.viewId="view-".concat(vq++)),t.classHierarchy.push("vtkWidgetManager");var n,r=new WeakMap,i=new WeakMap,o=new WeakMap,a=[];function s(e){return e&&(e.isA("vtkAbstractWidget")?e:e.getWidgetForView({viewId:t.viewId}))}t.svgRoot=(t.viewId,(n=gq("svg")).setAttribute("style","position: absolute; top: 0; left: 0; width: 100%; height: 100%;"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n);var l=new WeakMap;function u(){var e=t.apiSpecificRenderWindow.getReferenceByName("el"),n=t.apiSpecificRenderWindow.getCanvas();e.insertBefore(t.svgRoot,n.nextSibling),"static"===window.getComputedStyle(e).position&&(e.style.position="relative")}function c(){var e=g(t.apiSpecificRenderWindow.getSize(),2),n=e[0],r=e[1],i=window.devicePixelRatio||1,o=String(n/i),a=String(r/i),s="0 0 ".concat(n," ").concat(r),l=t.svgRoot.getAttribute("width"),u=t.svgRoot.getAttribute("height"),c=t.svgRoot.getAttribute("viewBox");l!==o&&t.svgRoot.setAttribute("width",o),u!==a&&t.svgRoot.setAttribute("height",a),c!==s&&t.svgRoot.setAttribute("viewBox",s)}function d(){if(t.useSvgLayer)for(var e=function(e){var n=t.widgets[e],r=n.getRepresentations().filter((function(e){return e.isA("vtkSVGRepresentation")})),a=[];n.getVisibility()&&(a=r.filter((function(e){return e.getVisibility()})).map((function(e){return e.render()})));var s=Promise.all(a),u=l.get(n)||[];u.push(s),l.set(n,u),s.then((function(e){var r=l.get(n)||[],a=r.indexOf(s);if(!t.deleted&&!n.isDeleted()&&-1!==a){r=r.slice(a+1),l.set(n,r);for(var u=o.get(n),c=mq("g"),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wq,n),de.obj(e,t),de.setGet(e,t,["captureOn",{type:"enum",name:"viewType",enum:dq}]),de.get(e,t,["selections","widgets","viewId","pickingEnabled","useSvgLayer"]),bq(e,t)}var Sq={newInstance:de.newInstance(xq,"vtkWidgetManager"),extend:xq,Constants:AA};function Cq(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 Aq(e){for(var t=1;t1&&(h[e]=de.chain.apply(de,y(t)))}))})),h.delete=de.chain((function(){delete n[i]}),h.delete),h.setInteractor(u);var g=Object.freeze(h);return n[i]=g,g}return n[i]},e.getViewIds=function(){return Object.keys(n)},e.setVisibility=function(e){for(var t=Object.keys(n),r=0;r1&&void 0!==arguments[1]?arguments[1]:[Eq];if(t.nestedStates.push(r),n.push(r.onModified(e.modified)),Array.isArray(i)&&i.length)for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Iq,n),de.obj(e,t),de.setGet(e,t,["active"]),Dq(e,t)}};function Mq(e,t){var n=[],r=y(Xr.INIT_BOUNDS);e.containsPoint=function(e,t,n){return Array.isArray(e)?Xr.containsPoint(r,e[0],e[1],e[2]):Xr.containsPoint(r,e,t,n)},e.placeWidget=function(i){t.bounds=[];for(var o=[(i[0]+i[1])/2,(i[2]+i[3])/2,(i[4]+i[5])/2],a=0;a<6;a++){var s=o[Math.floor(a/2)];n[a]=i[a],t.bounds[a]=(i[a]-s)*t.placeFactor+s}Xr.setBounds(r,t.bounds),e.invokeBoundsChange(t.bounds),e.modified()},e.setPlaceFactor=function(i){if(t.placeFactor!==i){t.placeFactor=i,t.bounds=[];for(var o=[(n[0]+n[1])/2,(n[2]+n[3])/2,(n[4]+n[5])/2],a=0;a<6;a++){var s=o[Math.floor(a/2)];t.bounds[a]=(n[a]-s)*t.placeFactor+s}Xr.setBounds(r,t.bounds),e.invokeBoundsChange(t.bounds),e.modified()}}}var Nq={bounds:[-1,1,-1,1,-1,1],placeFactor:1},Rq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nq,n),de.setGetArray(e,t,["bounds"],6),de.get(e,t,["placeFactor"]),de.event(e,t,"BoundsChange"),t.bounds=t.bounds.slice(),Mq(e,t)}},Fq={color:.5},Bq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Fq,n),de.setGet(e,t,["color"])}};function Lq(e,t){e.translate=function(t,n,r){var i=g(e.getCornerByReference(),3),o=i[0],a=i[1],s=i[2];e.setCorner(o+t,a+n,s+r)}}var Vq={corner:[0,0,0]},jq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vq,n),de.setGetArray(e,t,["corner"],3),Lq(e)}};function Uq(e,t){var n="degree"===t.angleUnit?Es.buildFromDegree():Es.buildFromRadian();e.rotateFromDirections=function(r,i){n.identity().rotateFromDirections(r,i).apply(t.direction),e.modified()},e.rotate=function(e,r){n.identity().rotate(e,r).apply(t.direction)},e.rotateX=function(e){n.identity().rotateX(e).apply(t.direction)},e.rotateY=function(e){n.identity().rotateY(e).apply(t.direction)},e.rotateZ=function(e){n.identity().rotateZ(e).apply(t.direction)}}var Gq={direction:[1,0,0]},zq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gq,n),de.setGetArray(e,t,["direction"],3),Uq(e,t)}};function Wq(e,t){e.updateManipulator=function(){if(t.manipulator){var e=t.origin,n=t.normal,r=t.direction,i=t.manipulator,o=i.setOrigin,a=i.setCenter,s=i.setNormal,l=i.setDirection;e&&o?o(e):e&&a&&a(e),r&&l?l(r):r&&!n&&s?s(r):n&&l&&l(n)}}}var Hq={manipulator:null},Kq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hq,n),de.setGet(e,t,["manipulator"]),Wq(e,t)}},qq={name:""},Xq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qq,n),de.setGet(e,t,["name"])}};function Yq(e,t){return 3===e.length&&3===t.length&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Zq(e,t){var n={o:[],p1:[],p2:[]};e.normalize=function(){nt(t.up),nt(t.right),nt(t.direction),e.modified()},e.updateFromOriginRightUp=function(r,i,o){(function(e,t,n,r){return Yq(e,r.o)&&Yq(t,r.p1)&&Yq(n,r.p2)})(r,i,o,n)||(n.o=r.slice(),n.p1=i.slice(),n.p2=o.slice(),t.up=[o[0]-r[0],o[1]-r[1],o[2]-r[2]],t.right=[i[0]-r[0],i[1]-r[1],i[2]-r[2]],et(t.up,t.right,t.direction),et(t.direction,t.up,t.right),e.normalize(),e.modified())}}var Jq={up:[0,1,0],right:[1,0,0],direction:[0,0,1]},Qq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jq,n),de.setGetArray(e,t,["up","right","direction"],3),Zq(e,t)}};function $q(e,t){e.translate=function(t,n,r){var i=g(e.getOriginByReference(),3),o=i[0],a=i[1],s=i[2];e.setOrigin(o+t,a+n,s+r)}}var eX={origin:[0,0,0]},tX={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eX,n),de.setGetArray(e,t,["origin"],3),$q(e)}},nX={scale1:.5},rX={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nX,n),de.setGet(e,t,["scale1"])}},iX={scale3:[1,1,1]},oX={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iX,n),de.setGetArray(e,t,["scale3"],3)}},aX={text:"DefaultText"},sX={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,aX,n),de.setGet(e,t,["text"])}},lX={visible:!0},uX={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lX,n),de.setGet(e,t,["visible"]),e.isVisible=e.getVisible}},cX={shape:""},dX={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cX,n),de.setGet(e,t,["shape"])}},pX=de.vtkErrorMacro,fX={bounds:Rq,color:Bq,corner:jq,direction:zq,manipulator:Kq,name:Xq,orientation:Qq,origin:tX,scale1:rX,scale3:oX,text:sX,visible:uX,shape:dX};function hX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];i||kq.extend(n,r,t);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wX,n),de.obj(e,t),de.setGetArray(e,t,["origin","normal"],3),bX(e,t)}var SX={projectDisplayToLine:yX,extend:xX,newInstance:de.newInstance(xX,"vtkLineManipulator")};function CX(e,t,n,r,i,o){var a=o.displayToWorld(e,t,0,i),s=o.displayToWorld(e,t,1,i);return pr.intersectWithLine(a,s,n,r).x}function AX(e,t){t.classHierarchy.push("vtkPlaneManipulator"),e.handleEvent=function(e,n){return CX(e.position.x,e.position.y,t.origin,t.normal,e.pokedRenderer,n)}}var PX={normal:[0,0,1],origin:[0,0,0]};function _X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PX,n),de.obj(e,t),de.setGetArray(e,t,["normal","origin"],3),AX(e,t)}var OX={intersectDisplayWithPlane:CX,extend:_X,newInstance:de.newInstance(_X,"vtkPlaneManipulator")};function EX(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a.getActiveCamera(),d=c.getViewUp(),p=c.getDirectionOfProjection(),f=a.getRenderWindow().getInteractor().getView().getSize(),h=360*l/f[0],m=360*u/f[1],g=new Float64Array([o[0],o[1],o[2]]),v=d,y=[0,0,0];et(p,d,y);var b=Do(new Float64Array(16));return Lo(b,b,Pe(h),v),Lo(b,b,Pe(-m),y),io(g,g,b),g}function TX(e,t){t.classHierarchy.push("vtkTrackballManipulator");var n=0,r=0;e.handleEvent=function(e,i){var o=EX(n,r,e.position.x,e.position.y,t.origin,t.normal,e.pokedRenderer);return n=e.position.x,r=e.position.y,o},e.reset=function(e){n=e.position.x,r=e.position.y}}var DX={normal:[0,0,1]};function IX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DX,n),de.obj(e,t),de.setGetArray(e,t,["normal"],3),TX(e,t)}var kX={trackballRotate:EX,extend:IX,newInstance:de.newInstance(IX,"vtkTrackballManipulator")},MX={vtkLineManipulator:SX,vtkPlaneManipulator:OX,vtkTrackballManipulator:kX};function NX(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 RX(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=RX(RX({},BX),n);nq.extend(e,t,r),de.setGet(e,t,["activeScaleFactor","activeColor","useActiveColor"]),FX(0,t)}};function VX(e,t){t.classHierarchy.push("vtkCircleContextRepresentation"),t.internalPolyData=ju.newInstance({mtime:0}),t.internalArrays={points:t.internalPolyData.getPoints(),scale:Ln.newInstance({name:"scale",numberOfComponents:3,empty:!0}),color:Ln.newInstance({name:"color",numberOfComponents:1,empty:!0}),direction:Ln.newInstance({name:"direction",numberOfComponents:9,empty:!0})},t.internalPolyData.getPointData().addArray(t.internalArrays.scale),t.internalPolyData.getPointData().addArray(t.internalArrays.color),t.internalPolyData.getPointData().addArray(t.internalArrays.direction),t.pipelines={circle:{source:e,glyph:uf.newInstance({resolution:t.glyphResolution,radius:1,lines:t.drawBorder,face:t.drawFace}),mapper:HR.newInstance({orientationArray:"direction",scaleArray:"scale",scaleMode:HR.ScaleModes.SCALE_BY_COMPONENTS,colorByArrayName:"color",scalarMode:os.USE_POINT_FIELD_DATA}),actor:pv.newInstance({pickable:!1})}},t.pipelines.circle.actor.getProperty().setOpacity(.2),t.pipelines.circle.mapper.setOrientationModeToMatrix(),t.pipelines.circle.mapper.setResolveCoincidentTopology(!0),t.pipelines.circle.mapper.setResolveCoincidentTopologyPolygonOffsetParameters(-1,-1),nq.connectPipeline(t.pipelines.circle),e.addActor(t.pipelines.circle.actor),t.transform=Es.buildFromDegree(),e.setGlyphResolution=de.chain(e.setGlyphResolution,(function(e){return t.glyph.setResolution(e)})),e.setDrawBorder=function(e){t.pipelines.circle.glyph.setLines(e)},e.setDrawFace=function(e){t.pipelines.circle.glyph.setFace(e)},e.setOpacity=function(e){t.pipelines.circle.actor.getProperty().setOpacity(e)},e.requestData=function(n,r){var i=t.internalArrays,o=i.points,a=i.scale,s=i.color,l=i.direction,u=e.getRepresentationStates(n[0]),c=u.length;s.getNumberOfValues()!==c&&(o.setData(new Float32Array(3*c)),a.setData(new Float32Array(3*c)),l.setData(new Float32Array(9*c)),s.setData(new Float32Array(c)));for(var d={points:o.getData(),scale:a.getData(),color:s.getData(),direction:l.getData()},p=0;p2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jX,n),LX.extend(e,t,n),de.setGet(e,t,["glyphResolution","defaultScale"]),de.get(e,t,["glyph","mapper","actor"]),VX(e,t)}var GX={newInstance:de.newInstance(UX,"vtkCircleContextRepresentation"),extend:UX};function zX(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 WX(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=WX(WX({},KX),n);nq.extend(e,t,r),HX(0,t)}};function XX(e,t){t.classHierarchy.push("vtkConvexFaceContextRepresentation"),t.internalPolyData=ju.newInstance({mtime:0}),t.points=new Float32Array(12),t.cells=new Uint8Array([4,0,1,2,3]),t.internalPolyData.getPoints().setData(t.points,3),t.internalPolyData.getPolys().setData(t.cells),t.mapper=Uv.newInstance({scalarVisibility:!1}),t.actor=pv.newInstance(),t.actor.getProperty().setOpacity(t.opacity),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){for(var i=e.getRepresentationStates(n[0]),o=function(e){if(t.cells.length-1!==e){t.points=new Float32Array(3*e),t.cells=new Uint8Array(e+1),t.cells[0]=e;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:CA.FRONT_BUFFER,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];switch(t.behavior){case YK:e===CA.PICKING_BUFFER?t.actor.getProperty().setOpacity(1):t.actor.getProperty().setOpacity(t.opacity);break;case ZK:default:t.actor.getProperty().setOpacity(t.opacity)}n(e,r,i,o)}}var YX={defaultColor:[1,0,.5],opacity:.2};function ZX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,YX,n),qX.extend(e,t,n),de.setGetArray(e,t,["defaultColor"],3),de.get(e,t,["mapper","actor"]),de.setGet(e,t,["opacity"]),XX(e,t)}var JX={newInstance:de.newInstance(ZX,"vtkConvexFaceContextRepresentation"),extend:ZX};function QX(e,t){t.classHierarchy.push("vtkCubeHandleRepresentation"),t.internalPolyData=ju.newInstance({mtime:0}),t.internalArrays={points:t.internalPolyData.getPoints(),scale:Ln.newInstance({name:"scale",numberOfComponents:3,empty:!0}),color:Ln.newInstance({name:"color",numberOfComponents:1,empty:!0})},t.internalPolyData.getPointData().addArray(t.internalArrays.scale),t.internalPolyData.getPointData().addArray(t.internalArrays.color),t.mapper=HR.newInstance({scaleArray:"scale",colorByArrayName:"color",scalarMode:os.USE_POINT_FIELD_DATA}),t.actor=pv.newInstance(),t.glyph=vf.newInstance(),t.mapper.setInputConnection(e.getOutputPort(),0),t.mapper.setInputConnection(t.glyph.getOutputPort(),1),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){var i=t.internalArrays,o=i.points,a=i.scale,s=i.color,l=e.getRepresentationStates(n[0]),u=l.length;s.getNumberOfValues()!==u&&(o.setData(new Float32Array(3*u)),a.setData(new Float32Array(3*u)),s.setData(new Float32Array(u)));for(var c={points:o.getData(),scale:a.getData(),color:s.getData()},d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$X,n),LX.extend(e,t,n),de.get(e,t,["glyph","mapper","actor","defaultScale"]),QX(e,t)}var tY={newInstance:de.newInstance(eY,"vtkCubeHandleRepresentation"),extend:eY},nY=AA.RenderingTypes,rY=Qg.Interpolation,iY=Qg.Representation,oY=["plane","outline","normal","origin","display2D"],aY={active:{plane:{opacity:1,color:[0,.9,0]},normal:{opacity:1,color:[0,.9,0]},origin:{opacity:1,color:[0,.9,0]}},inactive:{plane:{opacity:.6,color:[1,1,1]},normal:{opacity:1,color:[.9,0,0]},origin:{opacity:1,color:[1,0,0]}},static:{display2D:{representation:iY.POINT},outline:{color:[1,1,1],opacity:1,representation:iY.WIREFRAME,interpolation:rY.FLAT}}};function sY(e,t){t.classHierarchy.push("vtkImplicitPlaneRepresentation"),t.plane=pr.newInstance(),t.matrix=Es.buildFromDegree(),t.pipelines={},t.pipelines.outline={source:vf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!1})},t.pipelines.plane={source:Xc.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},t.pipelines.origin={source:Jf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},t.pipelines.normal={source:$p.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},t.pipelines.display2D={source:e,mapper:Zw.newInstance(),actor:pv.newInstance({pickable:!1})};var n=Tc.newInstance({cutFunction:t.plane});n.setInputConnection(t.pipelines.outline.source.getOutputPort()),t.pipelines.plane.source.setInputConnection(n.getOutputPort()),nq.connectPipeline(t.pipelines.outline),nq.connectPipeline(t.pipelines.plane),nq.connectPipeline(t.pipelines.origin),nq.connectPipeline(t.pipelines.normal),nq.connectPipeline(t.pipelines.display2D),e.addActor(t.pipelines.outline.actor),e.addActor(t.pipelines.plane.actor),e.addActor(t.pipelines.origin.actor),e.addActor(t.pipelines.normal.actor),e.addActor(t.pipelines.display2D.actor),e.requestData=function(e,n){var r=e[0],i=r.getOrigin(),o=r.getNormal(),a=r.getBounds();t.plane.setOrigin(i),t.plane.setNormal(o),t.pipelines.outline.source.setCenter(.5*(a[0]+a[1]),.5*(a[2]+a[3]),.5*(a[4]+a[5]));var s=a[1]-a[0],l=a[3]-a[2],u=a[5]-a[4];t.pipelines.outline.source.setXLength(s),t.pipelines.outline.source.setYLength(l),t.pipelines.outline.source.setZLength(u),t.pipelines.normal.source.set({height:Math.max(s,l,u),radius:t.handleSizeRatio*Math.min(s,l,u)*t.axisScale,resolution:t.sphereResolution});var c=t.pipelines.normal.source.getOutputData(),d=ju.newInstance();d.shallowCopy(c),d.getPoints().setData(Float32Array.from(c.getPoints().getData()),3),d.getPointData().removeAllArrays(),t.matrix.identity().translate(i[0],i[1],i[2]).rotateFromDirections([0,1,0],o).apply(d.getPoints().getData()),t.pipelines.normal.mapper.setInputData(d),t.pipelines.origin.actor.setPosition(i);var p=t.handleSizeRatio*Math.min(s,l,u);t.pipelines.origin.actor.setScale(p,p,p),nq.applyStyles(t.pipelines,t.representationStyle,r.getActive()&&r.getActiveHandle());var f=ju.newInstance();f.shallowCopy(t.pipelines.plane.source.getOutputData()),n[0]=f},e.setSphereResolution=function(e){return t.sphereResolution=e,t.pipelines.origin.source.setPhiResolution(e)&&t.pipelines.origin.source.setThetaResolution(e)},e.setRepresentationStyle=function(n){t.representationStyle=nq.mergeStyles(oY,t.representationStyle,n),nq.applyStyles(t.pipelines,t.representationStyle),e.modified()},e.updateActorVisibility=function(e,n,r,i){var o=t.planeVisible,a=t.originVisible,s=t.normalVisible,l=t.outlineVisible;if(e===nY.PICKING_BUFFER)t.pipelines.plane.actor.setVisibility(o&&n),t.pipelines.origin.actor.setVisibility(a&&n),t.pipelines.normal.actor.setVisibility(s&&n),t.pipelines.plane.actor.getProperty().setOpacity(1);else{t.pipelines.outline.actor.setVisibility(l&&n&&r),t.pipelines.plane.actor.setVisibility(o&&n&&i),t.pipelines.origin.actor.setVisibility(a&&n&&i),t.pipelines.normal.actor.setVisibility(s&&n&&i);var u=t.inputData[0];u&&nq.applyStyles(t.pipelines,t.representationStyle,u.getActive()&&u.getActiveHandle())}},e.getSelectedState=function(e,n){var r=t.inputData[0];switch(r.setActiveHandle(e),e){case t.pipelines.plane.actor:r.setUpdateMethodName("updateFromPlane");break;case t.pipelines.origin.actor:r.setUpdateMethodName("updateFromOrigin");break;case t.pipelines.normal.actor:r.setUpdateMethodName("updateFromNormal");break;default:r.setUpdateMethodName("updateFromPlane")}return r},e.setRepresentationStyle(aY),e.setSphereResolution(t.sphereResolution)}var lY={sphereResolution:24,handleSizeRatio:.05,axisScale:.1,normalVisible:!0,originVisible:!0,planeVisible:!0,outlineVisible:!0};function uY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lY,n),nq.extend(e,t,n),de.get(e,t,["sphereResolution","representationStyle"]),de.setGet(e,t,["handleSizeRatio","axisScale","normalVisible","originVisible","planeVisible","outlineVisible"]),sY(e,t)}var cY={newInstance:de.newInstance(uY,"vtkImplicitPlaneRepresentation"),extend:uY,generateState:function(){return gX.createBuilder().addField({name:"origin",initialValue:[0,0,0]}).addField({name:"normal",initialValue:[0,0,1]}).addField({name:"activeHandle",initialValue:null}).addField({name:"updateMethodName"}).build()}};function dY(e,t){var n;t.classHierarchy.push("vtkOutlineContextRepresentation"),t.bbox=y(Xr.INIT_BOUNDS),t.internalPolyData=ju.newInstance({mtime:0}),t.points=new Float32Array(24),t.internalPolyData.getPoints().setData(t.points,3),t.internalPolyData.getLines().setData(Uint16Array.from(Hd)),t.mapper=Uv.newInstance({scalarVisibility:!1}),t.actor=pv.newInstance(),(n=t.actor.getProperty()).setEdgeColor.apply(n,y(t.edgeColor)),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){var i=e.getRepresentationStates(n[0]);Xr.reset(t.bbox);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pY,n),qX.extend(e,t,n),de.setGetArray(e,t,["edgeColor"],3),de.get(e,t,["mapper","actor"]),dY(e,t)}var hY={newInstance:de.newInstance(fY,"vtkOutlineContextRepresentation"),extend:fY};function mY(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 gY(e){for(var t=1;t1){var l=a[a.length-1],u=st(l.getOrigin(),a[a.length-2].getOrigin())>t.threshold?0:1;u||!l.isVisible||l.isVisible()||u++,s-=u}var c=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e<2)t.internalPolyData.getPoints().setData(new Float32Array([0,0,0])),t.internalPolyData.getLines().setData(new Uint8Array(0));else if(!t.points||t.points.length!==3*e){t.points=new Float32Array(3*e),t.cells=new Uint8Array(e+1+(n?1:0)),t.cells[0]=t.cells.length-1;for(var r=1;r2);if(c)for(var d=0;d3;return n.updateActorVisibility(e,i&&u,o&&u,a&&u)}}var yY={threshold:Number.EPSILON,closePolyLine:!1,lineThickness:2,scaleInPixels:!0};function bY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=gY(gY({},yY),n);nq.extend(e,t,r),de.setGet(e,t,["threshold","closePolyLine","lineThickness"]),vY(e,t)}var wY={newInstance:de.newInstance(bY,"vtkPolyLineRepresentation"),extend:bY};function xY(e,t){function n(n){if(t.displayCallback){for(var r=[],i=e.getRepresentationStates(),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SY,n),LX.extend(e,t,n),de.get(e,t,["glyph","mapper","actor"]),xY(e,t)}var AY={newInstance:de.newInstance(CY,"vtkSphereHandleRepresentation"),extend:CY},PY={vtkCircleContextRepresentation:GX,vtkContextRepresentation:qX,vtkConvexFaceContextRepresentation:JX,vtkCubeHandleRepresentation:tY,vtkHandleRepresentation:LX,vtkImplicitPlaneRepresentation:cY,vtkOutlineContextRepresentation:hY,vtkPolyLineRepresentation:wY,vtkSphereHandleRepresentation:AY,vtkWidgetRepresentation:nq};function _Y(e,t){t.classHierarchy.push("vtkAngleWidgetProp");var n=null,r=ry.newInstance();function i(e){return e.altKey||e.controlKey||e.shiftKey}r.setPickFromList(1),e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleLeftButtonPress=function(o){if(!t.activeState||!t.activeState.getActive()||!t.pickable||i(o))return de.VOID;if(r.initializePickList(),r.setPickList(e.getNestedProps()),t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<3){var a=t.widgetState.getMoveHandle(),s=t.widgetState.addHandle();s.setOrigin.apply(s,y(a.getOrigin())),s.setColor(a.getColor()),s.setScale1(a.getScale1())}else n=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),de.EVENT_ABORT},e.handleMouseMove=function(r){if(t.pickable&&t.dragable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!i(r)){t.manipulator.setOrigin(t.activeState.getOrigin()),t.manipulator.setNormal(t.camera.getDirectionOfProjection());var o=t.manipulator.handleEvent(r,t.apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||n))return t.activeState.setOrigin(o),e.invokeInteractionEvent(),de.EVENT_ABORT}return t.hasFocus&&t.widgetManager.disablePicking(),de.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable?(t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(e.invokeEndInteractionEvent(),t.widgetManager.enablePicking(),t.interactor.render()),3===t.widgetState.getHandleList().length&&e.loseFocus(),n=!1},e.grabFocus=function(){!t.hasFocus&&t.widgetState.getHandleList().length<3&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t.widgetManager.enablePicking(),t.interactor.render()}}function OY(e,t){t.classHierarchy.push("vtkAngleWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","glyphResolution","defaultScale"],t.behavior=_Y,t.widgetState=gX.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:.1,origin:[-1,-1,-1],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1"],name:"handle",initialValues:{scale1:.1,origin:[-1,-1,-1]}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:AY,labels:["handles"]},{builder:AY,labels:["moveHandle"]},{builder:wY,labels:["handles","moveHandle"]}]}},e.getAngle=function(){var e=t.widgetState.getHandleList();if(3!==e.length)return 0;var n=[0,0,0],r=[0,0,0];return qe(e[0].getOrigin(),e[1].getOrigin(),n),qe(e[2].getOrigin(),e[1].getOrigin(),r),lt(n,r)},t.widgetState.onBoundsChange((function(e){var n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),t.manipulator=OX.newInstance()}var EY={};function TY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,EY,n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator"]),OY(e,t)}var DY={newInstance:de.newInstance(TY,"vtkAngleWidget"),extend:TY};function IY(e,t){t.classHierarchy.push("vtkDistanceWidgetProp");var n=null;function r(e){return e.altKey||e.controlKey||e.shiftKey}e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleLeftButtonPress=function(i){if(!t.activeState||!t.activeState.getActive()||!t.pickable||r(i))return de.VOID;if(t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<2){var o=t.widgetState.getMoveHandle(),a=t.widgetState.addHandle();a.setOrigin.apply(a,y(o.getOrigin())),a.setColor(o.getColor()),a.setScale1(o.getScale1())}else n=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),de.EVENT_ABORT},e.handleMouseMove=function(i){if(t.hasFocus&&2===t.widgetState.getHandleList().length)return e.loseFocus(),de.VOID;if(t.pickable&&t.dragable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!r(i)){var o=t.manipulator.handleEvent(i,t.apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||n))return t.activeState.setOrigin(o),e.invokeInteractionEvent(),de.EVENT_ABORT}return de.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable?(t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(e.invokeEndInteractionEvent(),t.widgetManager.enablePicking(),t.interactor.render()),n=!1},e.grabFocus=function(){!t.hasFocus&&t.widgetState.getHandleList().length<2&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t.widgetManager.enablePicking(),t.interactor.render()}}function kY(e,t){t.classHierarchy.push("vtkDistanceWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","glyphResolution","defaultScale"],t.behavior=IY,t.widgetState=gX.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:.1,origin:[-1,-1,-1],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1"],name:"handle",initialValues:{scale1:.1,origin:[-1,-1,-1]}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:AY,labels:["handles"]},{builder:AY,labels:["moveHandle"]},{builder:wY,labels:["handles","moveHandle"]}]}},e.getDistance=function(){var e=t.widgetState.getHandleList();return 2!==e.length?0:Math.sqrt(st(e[0].getOrigin(),e[1].getOrigin()))},t.widgetState.onBoundsChange((function(e){var n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),t.manipulator=OX.newInstance()}var MY={};function NY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MY,n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator"]),kY(e,t)}var RY,FY={newInstance:de.newInstance(NY,"vtkDistanceWidget"),extend:NY},BY="POINTS",LY="PLACEMENT",VY="RATIO",jY=(f(RY={},BY,{CORNER_TO_CORNER:0,CENTER_TO_CORNER:1,RADIUS:2,DIAMETER:3}),f(RY,LY,{CLICK:0,DRAG:1,CLICK_AND_DRAG:2}),f(RY,VY,{FIXED:0,FREE:1}),RY);function UY(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 GY,zY=de.vtkErrorMacro,WY=1e-6;function HY(e,t){t.classHierarchy.push("vtkShapeWidgetProp");var n=function(e){for(var t=1;td?u=u/d*c:l=l/c*d,[e[0]+l*o[0]+u*a[0]+s*i[0],e[1]+l*o[1]+u*a[1]+s*i[1],e[2]+l*o[2]+u*a[2]+s*i[2]]};var r=function(e,n){var r=Ki(e,n),i=t.shapeHandle.getUp(),o=t.shapeHandle.getRight();return{point1:[e[0]+(i[0]-o[0])*r,e[1]+(i[1]-o[1])*r,e[2]+(i[2]-o[2])*r],point2:[e[0]+(o[0]-i[0])*r,e[1]+(o[1]-i[1])*r,e[2]+(o[2]-i[2])*r]}};e.setCorners=function(e,n){if(t.label&&t.labelTextCallback){var r,i,o=function(e,t){return[Math.min(e[0],t[0]),Math.max(e[0],t[0]),Math.min(e[1],t[1]),Math.max(e[1],t[1]),Math.min(e[2],t[2]),Math.max(e[2],t[2])]}(e,n),a=(r=t.apiSpecificRenderWindow).worldToDisplay.apply(r,y(e).concat([t.renderer])),s=(i=t.apiSpecificRenderWindow).worldToDisplay.apply(i,y(n).concat([t.renderer])),l=[Math.min(a[0],s[0]),Math.max(a[0],s[0]),Math.min(a[1],s[1]),Math.max(a[1],s[1]),Math.min(a[2],s[2]),Math.max(a[2],s[2])];t.labelTextCallback(o,l,t.label)}},e.updateShapeBounds=function(){if(t.point1&&t.point2){var n=y(t.point1),i=y(t.point2);switch(e.isRatioFixed()&&(i=e.makeSquareFromPoints(n,i)),e.getActiveBehaviorFromCategory(BY)){case jY.POINTS.CORNER_TO_CORNER:e.setCorners(n,i);break;case jY.POINTS.CENTER_TO_CORNER:var o=[0,0,0];Fi(o,n,i),Ri(n,n,o),e.setCorners(n,i);break;case jY.POINTS.RADIUS:var a=r(n,i);e.setCorners(a.point1,a.point2);break;case jY.POINTS.DIAMETER:var s=function(e,t){var n=[.5*(e[0]+t[0]),.5*(e[1]+t[1]),.5*(e[2]+t[2])];return r(n,e)}(n,i);e.setCorners(s.point1,s.point2);break;default:zY("vtk internal error")}}},e.reset=function(){t.hasFocus||t.point1Handle.setVisible(!1),t.shapeHandle.setVisible(!1),t.point1=null,t.point2=null,t.label&&t.label.setLabelText(""),t.point1Handle.setOrigin(t.point2Handle.getOrigin()),t.point2Handle.setVisible(!1),t.point2Handle.deactivate(),t.hasFocus?(t.point1Handle.activate(),t.activeState=t.point1Handle):(t.point1Handle.deactivate(),t.activeState=null),e.updateShapeBounds()},e.handleMouseMove=function(n){if(!(t.activeState&&t.activeState.getActive()&&t.pickable&&t.dragable&&t.manipulator))return de.VOID;if(!t.point2){var r=t.camera.getDirectionOfProjection(),i=t.camera.getViewUp(),o=[];$i(o,i,r),t.shapeHandle.setUp(i),t.shapeHandle.setRight(o),t.shapeHandle.setDirection(r),t.manipulator.setNormal(r)}var a=t.manipulator.handleEvent(n,t.apiSpecificRenderWindow);return a.length?(t.hasFocus?t.point1?(t.point2Handle.setOrigin(a),t.point2=a,e.updateShapeBounds()):t.point1Handle.setOrigin(a):t.useHandles&&t.isDragging&&(t.activeState===t.point1Handle?(t.point1Handle.setOrigin(a),t.point1=a):(t.point2Handle.setOrigin(a),t.point2=a),e.updateShapeBounds(),e.invokeInteractionEvent()),t.hasFocus?de.EVENT_ABORT:de.VOID):de.VOID},e.handleLeftButtonPress=function(n){return t.activeState&&t.activeState.getActive()&&t.pickable?t.hasFocus?(t.point1?(e.placePoint2(t.point2Handle.getOrigin()),e.invokeInteractionEvent(),e.invokeEndInteractionEvent()):(e.placePoint1(t.point1Handle.getOrigin()),e.invokeStartInteractionEvent()),de.EVENT_ABORT):!t.point1||t.activeState!==t.point1Handle&&t.activeState!==t.point2Handle?de.VOID:(t.isDragging=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent(),de.EVENT_ABORT):de.VOID},e.handleLeftButtonRelease=function(n){if(t.isDragging)return t.isDragging=!1,t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent(),de.EVENT_ABORT;if(!t.hasFocus||!t.pickable)return de.VOID;var r=t.apiSpecificRenderWindow.getSize();return n.position.x<0||n.position.x>r[0]-1||n.position.y<0||n.position.y>r[1]-1?de.VOID:(t.point1&&(t.point2=t.point2Handle.getOrigin(),e.updateShapeBounds(),e.isDraggingEnabled())&&(qi(t.point1,t.point2)>100||e.isDraggingForced())&&(e.invokeInteractionEvent(),e.invokeEndInteractionEvent(),t.resetAfterPointPlacement?e.reset():e.loseFocus()),de.EVENT_ABORT)},e.handleKeyDown=function(n){var r=n.key;"Escape"===r?t.hasFocus&&(e.invokeEndInteractionEvent(),e.reset(),e.loseFocus()):t.keysDown[r]=!0,t.hasFocus&&t.point1&&(t.point2=t.point2Handle.getOrigin(),e.updateShapeBounds())},e.handleKeyUp=function(n){var r=n.key;t.keysDown[r]=!1,t.hasFocus&&t.point1&&(t.point2=t.point2Handle.getOrigin(),e.updateShapeBounds())},e.grabFocus=function(){t.hasFocus||(e.reset(),t.label||(t.label=Mx.newInstance()),t.label.setRenderer(t.renderer),t.label.buildRepresentation(),t.renderer.addViewProp(t.label),t.label.setContainer(t.interactor.getContainer()),t.point1Handle.activate(),t.activeState=t.point1Handle,t.useHandles&&t.point1Handle.setVisible(!0),t.shapeHandle.setVisible(!1),t.interactor.requestAnimation(e)),e.updateHandlesSize(),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.visibleOnFocus&&!t.useHandles&&t.shapeHandle.setVisible(!1),t.interactor.cancelAnimation(e)),t.label&&!t.useHandles&&t.label.setContainer(null),t.useHandles&&t.point1||(t.point1Handle.setVisible(!1),t.point2Handle.setVisible(!1)),t.widgetState.deactivate(),t.point1Handle.deactivate(),t.point2Handle.deactivate(),t.activeState=null,t.interactor.render(),t.widgetManager.enablePicking(),t.hasFocus=!1}}function KY(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 qY(e,t){HY(e,t);var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,JY(JY({},YY.DEFAULT_VALUES),$Y),n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator","widgetState"]),QY(e,t)}var tZ={newInstance:de.newInstance(eZ,"vtkEllipseWidget"),extend:eZ},nZ=de.vtkErrorMacro,rZ=[2,0,1,2,0,2,2,0,4,2,1,3,2,1,5,2,2,3,2,2,6,2,3,7,2,4,5,2,4,6,2,5,7,2,6,7];function iZ(e,t){var n;t.classHierarchy.push("vtkCroppingOutlineRepresentation"),t.internalPolyData=ju.newInstance({mtime:0}),t.points=new Float32Array(24),t.internalPolyData.getPoints().setData(t.points,3),t.internalPolyData.getLines().setData(Uint16Array.from(rZ)),t.mapper=Uv.newInstance({scalarVisibility:!1}),t.actor=pv.newInstance(),(n=t.actor.getProperty()).setEdgeColor.apply(n,y(t.edgeColor)),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){var i=e.getRepresentationStates(n[0]);if(8===i.length){for(var o=0,a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oZ,n),qX.extend(e,t,n),de.setGetArray(e,t,["edgeColor"],3),de.get(e,t,["mapper","actor"]),iZ(e,t)}var sZ={newInstance:de.newInstance(aZ,"vtkCroppingOutlineRepresentation"),extend:aZ},lZ=["-","=","+"];function uZ(e,t){var n=new Float64Array(3);return io(n,e,t),n}function cZ(e){var t=g(e.split("").map((function(e){return lZ.indexOf(e)-1})),3),n=t[0],r=t[1],i=t[2];return n*r*i!=0?"corners":n*r!=0||r*i!=0||i*n!=0?"edges":"faces"}function dZ(e,t){var n=null;e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleLeftButtonPress=function(){return t.activeState&&t.activeState.getActive()&&t.pickable?(n=!0,t.interactor.requestAnimation(e),de.EVENT_ABORT):de.VOID},e.handleMouseMove=function(r){return n&&t.pickable&&t.dragable?e.handleEvent(r):de.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable&&(n=!1,t.interactor.cancelAnimation(e),t.widgetState.deactivate())},e.handleEvent=function(e){if(t.pickable&&t.activeState&&t.activeState.getActive()){var n=t.activeState.getManipulator();if(n){var r=t.activeState.getName(),i=cZ(r),o=r.split("").map((function(e){return lZ.indexOf(e)})),a=t.widgetState.getCroppingPlanes().getPlanes(),s=t.widgetState.getIndexToWorldT(),l=[];if("corners"===i&&(n.setNormal(t.camera.getDirectionOfProjection()),l=n.handleEvent(e,t.apiSpecificRenderWindow)),"faces"===i){var u=[1-o[0],1-o[1],1-o[2]],c=[(a[0]+a[1])/2,(a[2]+a[3])/2,(a[4]+a[5])/2];n.setOrigin(uZ(c,s)),n.setNormal(uZ(u,s)),l=n.handleEvent(e,t.apiSpecificRenderWindow)}if("edges"===i){var d=o.map((function(e){return 1===e?e:0}));n.setNormal(uZ(d,s)),l=n.handleEvent(e,t.apiSpecificRenderWindow)}if(l.length){for(var p,f,h=uZ(l,t.widgetState.getWorldToIndexT()),m=0;m<3;m++)0===o[m]?a[2*m]=h[m]:2===o[m]&&(a[2*m+1]=h[m]);return(p=t.activeState).setOrigin.apply(p,y(l)),(f=t.widgetState.getCroppingPlanes()).setPlanes.apply(f,y(a)),de.EVENT_ABORT}}}return de.VOID},t.camera=t.renderer.getActiveCamera(),t.classHierarchy.push("vtkImageCroppingWidgetProp")}var pZ=gX.createBuilder();pZ.addField({name:"indexToWorldT",initialValue:Array(16).fill(0)}).addField({name:"worldToIndexT",initialValue:Array(16).fill(0)});var fZ=gX.createBuilder().addField({name:"planes",initialValue:[0,1,0,1,0,1]}).build();pZ.addStateFromInstance({labels:["croppingPlanes"],name:"croppingPlanes",instance:fZ});for(var hZ=-1;hZ<2;hZ++)for(var mZ=-1;mZ<2;mZ++)for(var gZ=-1;gZ<2;gZ++)if(0!==hZ||0!==mZ||0!==gZ){var vZ=lZ[hZ+1]+lZ[mZ+1]+lZ[gZ+1],yZ=cZ(vZ);pZ.addStateFromMixin({labels:["handles",vZ,yZ],mixins:["name","origin","color","scale1","visible","manipulator"],name:vZ,initialValues:{scale1:10,origin:[hZ,mZ,gZ],visible:!0,name:vZ}})}function bZ(e,t){t.classHierarchy.push("vtkImageCroppingWidget");var n=null;function r(e,n){t.widgetState.getStatesWithLabel(e).forEach((function(e){e.setVisible(n)}))}e.setFaceHandlesEnabled=function(e){return r("faces",e)},e.setEdgeHandlesEnabled=function(e){return r("edges",e)},e.setCornerHandlesEnabled=function(e){return r("corners",e)},e.copyImageDataDescription=function(n){var r,i;(r=t.widgetState).setIndexToWorldT.apply(r,y(n.getIndexToWorld())),(i=t.widgetState).setWorldToIndexT.apply(i,y(n.getWorldToIndex()));var o=n.getDimensions();t.widgetState.getCroppingPlanes().setPlanes([0,o[0],0,o[1],0,o[2]]),e.modified()},e.updateHandles=function(){for(var e=t.widgetState.getCroppingPlanes().getPlanes(),n=[(e[0]+e[1])/2,(e[2]+e[3])/2,(e[4]+e[5])/2],r=[e[0],n[0],e[1]],i=[e[2],n[1],e[3]],o=[e[4],n[2],e[5]],a=t.widgetState.getIndexToWorldT(),s=function(e){return lZ[e]},l=0;l<3;l++)for(var u=0;u<3;u++)for(var c=0;c<3;c++)if(1!==l||1!==u||1!==c){var d=[l,u,c].map(s).join(""),p=uZ([r[l],i[u],o[c]],a),f=g(t.widgetState.getStatesWithLabel(d),1)[0];f.setOrigin.apply(f,y(p))}},e.delete=de.chain(e.delete,(function(){n&&n.unsubscribe()})),t.behavior=dZ,t.widgetState=pZ.build(),e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:AY,labels:["handles"]},{builder:sZ,labels:["corners"]}]}},n=t.widgetState.getCroppingPlanes().onModified(e.updateHandles);var i=OX.newInstance(),o=SX.newInstance();t.widgetState.getStatesWithLabel("corners").forEach((function(e){return e.setManipulator(i)})),t.widgetState.getStatesWithLabel("edges").forEach((function(e){return e.setManipulator(i)})),t.widgetState.getStatesWithLabel("faces").forEach((function(e){return e.setManipulator(o)}))}var wZ={};function xZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wZ,n),Oq.extend(e,t,n),bZ(e,t)}var SZ={newInstance:de.newInstance(xZ,"vtkImageCroppingWidget"),extend:xZ};function CZ(e,t){t.classHierarchy.push("vtkPlaneWidget");var n=null;e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.updateCursor=function(){switch(t.activeState.getUpdateMethodName()){case"updateFromOrigin":t.apiSpecificRenderWindow.setCursor("crosshair");break;case"updateFromPlane":t.apiSpecificRenderWindow.setCursor("move");break;case"updateFromNormal":t.apiSpecificRenderWindow.setCursor("alias");break;default:t.apiSpecificRenderWindow.setCursor("grabbing")}},e.handleLeftButtonPress=function(r){return t.activeState&&t.activeState.getActive()&&t.pickable?(n=!0,t.lineManipulator.setOrigin(t.widgetState.getOrigin()),t.planeManipulator.setOrigin(t.widgetState.getOrigin()),t.trackballManipulator.reset(r),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent(),de.EVENT_ABORT):de.VOID},e.handleMouseMove=function(r){return n&&t.pickable?e.handleEvent(r):de.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable&&(e.invokeEndInteractionEvent(),t.interactor.cancelAnimation(e)),n=!1,t.widgetState.deactivate()},e.handleEvent=function(n){return t.pickable&&t.activeState&&t.activeState.getActive()?(e[t.activeState.getUpdateMethodName()](n),e.invokeInteractionEvent(),de.EVENT_ABORT):de.VOID},e.updateFromOrigin=function(e){t.planeManipulator.setNormal(t.widgetState.getNormal());var n=t.planeManipulator.handleEvent(e,t.apiSpecificRenderWindow);t.widgetState.containsPoint(n)&&t.activeState.setOrigin(n)},e.updateFromPlane=function(e){var n;t.lineManipulator.setNormal(t.activeState.getNormal());var r=t.lineManipulator.handleEvent(e,t.apiSpecificRenderWindow);(n=t.widgetState).containsPoint.apply(n,y(r))&&t.activeState.setOrigin(r)},e.updateFromNormal=function(e){t.trackballManipulator.setNormal(t.activeState.getNormal());var n=t.trackballManipulator.handleEvent(e,t.apiSpecificRenderWindow);t.activeState.setNormal(n)},t.lineManipulator=SX.newInstance(),t.planeManipulator=OX.newInstance(),t.trackballManipulator=kX.newInstance()}function AZ(e,t){t.classHierarchy.push("vtkPlaneWidget"),t.widgetState=cY.generateState(),t.behavior=CZ,t.methodsToLink=["representationStyle","sphereResolution","handleSizeRatio","axisScale","normalVisible","originVisible","planeVisible","outlineVisible"],e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:cY}]}}}var PZ={};function _Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PZ,n),Oq.extend(e,t,n),AZ(e,t)}var OZ={newInstance:de.newInstance(_Z,"vtkImplicitPlaneWidget"),extend:_Z};function EZ(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 TZ(e){for(var t=1;t0?e[1]:e[0],a=i[1]>0?e[3]:e[2],s=i[2]>0?e[5]:e[4];n[r].setOrigin(o,a,s)}},e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:JX,labels:["---","--+","-++","-+-"],initialValues:{behavior:YK,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 1"}},{builder:JX,labels:["---","+--","+-+","--+"],initialValues:{behavior:YK,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 2"}},{builder:JX,labels:["+--","++-","+++","+-+"],initialValues:{behavior:YK,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 3"}},{builder:JX,labels:["++-","-+-","-++","+++"],initialValues:{behavior:YK,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 4"}},{builder:JX,labels:["-++","--+","+-+","+++"],initialValues:{behavior:YK,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 5"}},{builder:JX,labels:["-+-","++-","+--","---"],initialValues:{behavior:YK,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 6"}}]}}}var MZ={};function NZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MZ,n),Oq.extend(e,t,n),kZ(e,t)}var RZ={newInstance:de.newInstance(NZ,"vtkInteractiveOrientationWidget"),extend:NZ},FZ=gX.createBuilder().addField({name:"posOnLine",initialValue:.5}).build();function BZ(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 LZ="triangle",VZ="star",jZ="arrow4points",UZ="arrow6points";function GZ(e,t){var n=ju.newInstance(),r=de.newTypedArray(t.pointType,30),i=new Uint32Array(11);i[0]=10;for(var o=0;o<10;o++){var a=o%2==1?t.height:.4*t.height;r[3*o+0]=a*Math.cos((2*o-1)*Math.PI/10),r[3*o+1]=a*Math.sin((2*o-1)*Math.PI/10),r[3*o+2]=0,i[1+o]=o}return n.getPoints().setData(r,3),n.getPolys().setData(i,1),n}function zZ(e,t){var n=ju.newInstance(),r=de.newTypedArray(t.pointType,18),i=.5*t.height*t.thickness,o=.5*t.height-i,a=(.9*t.height+i-o-(.5*t.height-i-o))*(1-t.base);r[0]=t.width/2*-1-i,r[1]=t.height/4-o-a,r[2]=0,r[3]=0,r[4]=.9*t.height+i-o-a,r[5]=0,r[6]=t.width/2+i,r[7]=t.height/4-o-a,r[8]=0,r[9]=t.width/3,r[10]=.1*t.height-i-o-a,r[11]=0,r[12]=0,r[13]=.5*t.height-i-o-a,r[14]=0,r[15]=t.width/3*-1,r[16]=.1*t.height-i-o-a,r[17]=0;var s=Uint8Array.from([3,0,1,5,3,1,4,5,3,1,4,3,3,1,2,3]);return n.getPoints().setData(r,3),n.getPolys().setData(s,1),n}function WZ(e,t){var n=ju.newInstance(),r=de.newTypedArray(t.pointType,12),i=t.height/3*t.thickness,o=t.height/3-i,a=(t.height-o-(t.height/3-i-o))*(1-t.base);r[0]=t.width/2*-1,r[1]=0-o-a,r[2]=0,r[3]=0,r[4]=t.height-o-a,r[5]=0,r[6]=t.width/2,r[7]=0-o-a,r[8]=0,r[9]=0,r[10]=t.height/3-i-o-a,r[11]=0;var s=Uint8Array.from([3,0,1,3,3,1,2,3]);return n.getPoints().setData(r,3),n.getPolys().setData(s,1),n}function HZ(e,t){var n=ju.newInstance(),r=de.newTypedArray(t.pointType,9),i=t.height*(1-t.base);r[0]=t.width/2*-1,r[1]=0-i,r[2]=0,r[3]=0,r[4]=t.height-i,r[5]=0,r[6]=t.width/2,r[7]=0-i,r[8]=0;var o=Uint8Array.from([3,0,1,2]);return n.getPoints().setData(r,3),n.getPolys().setData(o,1),n}function KZ(e,t){var n,r=(f(n={},LZ,HZ),f(n,VZ,GZ),f(n,jZ,WZ),f(n,UZ,zZ),n);e.requestData=function(n,i){var o;i[0]=r[t.shape](e,t),(o=Es.buildFromRadian()).translate.apply(o,y(t.center)).rotateFromDirections([1,0,0],t.direction).apply(i[0].getPoints().getData())}}function qZ(e){return function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qZ(n)),de.obj(e,t),de.setGet(e,t,["height","width","thickness","base"]),de.setGetArray(e,t,["center","direction"],3),de.algo(e,t,0,1),KZ(e,t)}var YZ={newInstance:de.newInstance(XZ,"vtkArrow2DSource"),extend:XZ};function ZZ(e,t){e.requestData=function(e,n){var r,i=ju.newInstance(),o=de.newTypedArray(t.pointType,48);o[0]=t.radius,o[1]=t.radius/t.width,o[2]=0,o[3]=t.radius+t.spacing,o[4]=t.radius/t.width,o[5]=0,o[6]=t.radius,o[7]=t.radius/t.width*-1,o[8]=0,o[9]=t.radius+t.spacing,o[10]=t.radius/t.width*-1,o[11]=0,o[12]=-1*t.radius,o[13]=t.radius/t.width,o[14]=0,o[15]=-1*(t.radius+t.spacing),o[16]=t.radius/t.width,o[17]=0,o[18]=-1*t.radius,o[19]=t.radius/t.width*-1,o[20]=0,o[21]=-1*(t.radius+t.spacing),o[22]=t.radius/t.width*-1,o[23]=0,o[24]=t.radius/t.width,o[25]=t.radius,o[26]=0,o[27]=t.radius/t.width,o[28]=t.radius+t.spacing,o[29]=0,o[30]=t.radius/t.width*-1,o[31]=t.radius,o[32]=0,o[33]=t.radius/t.width*-1,o[34]=t.radius+t.spacing,o[35]=0,o[36]=t.radius/t.width,o[37]=-1*t.radius,o[38]=0,o[39]=t.radius/t.width,o[40]=-1*(t.radius+t.spacing),o[41]=0,o[42]=t.radius/t.width*-1,o[43]=-1*t.radius,o[44]=0,o[45]=t.radius/t.width*-1,o[46]=-1*(t.radius+t.spacing),o[47]=0;var a=Uint8Array.from([3,0,1,2,3,2,1,3,3,4,6,5,3,6,5,7,3,8,11,9,3,8,10,11,3,12,13,15,3,12,15,14]);(r=Es.buildFromRadian()).translate.apply(r,y(t.center)).rotateFromDirections([1,0,0],t.orientation).apply(o),i.getPoints().setData(o,3),i.getPolys().setData(a,1),n[0]=i}}var JZ={radius:1,spacing:2,width:4,pointType:"Float32Array"};function QZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.center=[0,0,0],t.orientation=[1,0,0],Object.assign(t,JZ,n),de.obj(e,t),de.setGet(e,t,["radius","spacing","width"]),de.setGetArray(e,t,["center","orientation"],3),de.algo(e,t,0,1),ZZ(e,t)}var $Z={newInstance:de.newInstance(QZ,"vtkArrow2DSource"),extend:QZ},eJ={NONE:"voidSphere",SPHERE:"sphere",CUBE:"cube",CONE:"cone",ARROWHEAD3:"triangle",ARROWHEAD4:"4pointsArrowHead",ARROWHEAD6:"6pointsArrowHead",STAR:"star",DISK:"disk",CIRCLE:"circle",VIEWFINDER:"viewFinder"},tJ={ShapeType:eJ,Shapes2D:[eJ.ARROWHEAD3,eJ.ARROWHEAD4,eJ.ARROWHEAD6,eJ.STAR,eJ.DISK,eJ.CIRCLE,eJ.VIEWFINDER],Shapes3D:[eJ.SPHERE,eJ.CUBE,eJ.CONE],ShapesOrientable:[eJ.CONE,eJ.ARROWHEAD3,eJ.ARROWHEAD4,eJ.ARROWHEAD6]};function nJ(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 rJ(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:CA.FRONT_BUFFER,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=e.getRepresentationStates()[0];n.updateActorVisibility(t,r,i,o&&a.isVisible())}}function lJ(e){return rJ({defaultScale:1,faceCamera:null,orientation:[1,0,0],shape:iJ.SPHERE,viewMatrix:Do(new Float64Array(16))},e)}function uJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lJ(n)),LX.extend(e,t,n),de.get(e,t,["glyph","mapper","actor"]),de.setGetArray(e,t,["visibilityFlagArray"],2),de.setGetArray(e,t,["orientation"],3),de.setGetArray(e,t,["viewMatrix"],16),de.setGet(e,t,["faceCamera"]),sJ(e,t)}var cJ={newInstance:de.newInstance(uJ,"vtkArrowHandleRepresentation"),extend:uJ};function dJ(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 pJ=sq;function fJ(e,t){t.classHierarchy.push("vtkSVGLandmarkRepresentation"),e.render=function(){var n=e.getRepresentationStates(),r=n.map((function(e){return e.getOrigin()})),i=n.map((function(e,t){return e.getText?e.getText():"L".concat(t)}));return e.worldPointsToPixelSpace(r).then((function(n){for(var r=n.coords,o=n.windowSize[1],a=pJ("g"),s=function(n){var s=r[n];if(Number.isNaN(s[0])||Number.isNaN(s[1]))return"continue";var l=s[0],u=o-s[1];if(!0===t.showCircle){var c=e.createListenableSvgElement("circle",n);Object.keys(t.circleProps||{}).forEach((function(e){return c.setAttribute(e,t.circleProps[e])})),c.setAttribute("cx",l),c.setAttribute("cy",u),a.appendChild(c)}i[n]||(i[n]="");var d=i[n].split("\n"),p=null!=t.fontProperties&&t.fontProperties.fontSize?t.fontProperties.fontSize:15;d.forEach((function(r,i){var o=e.createListenableSvgElement("text",n);Object.keys(t.textProps||{}).forEach((function(e){var n=t.textProps[e];!0===t.offsetText&&"dy"===e&&(n=t.textProps.dy+p*i),o.setAttribute(e,n)})),o.setAttribute("x",l),o.setAttribute("y",u),null!=t.fontProperties&&(o.setAttribute("font-size",t.fontProperties.fontSize),o.setAttribute("font-family",t.fontProperties.fontFamily),o.setAttribute("font-weight",t.fontProperties.fontStyle),o.setAttribute("fill",t.fontProperties.fontColor)),o.textContent=r,a.appendChild(o)}))},l=0;l2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hJ(n)),aq(e,t,n),de.setGet(e,t,["circleProps","fontProperties","name","textProps"]),fJ(e,t)}var gJ={extend:mJ,newInstance:de.newInstance(mJ,"vtkSVGLandmarkRepresentation")};function vJ(e){var t=[0,0,0],n=e.widgetState.getHandle1().getOrigin(),r=e.widgetState.getHandle2().getOrigin(),i=e.widgetState.getPositionOnLine().getPosOnLine();return i=1-i,qe(n,r,t),Xe(t,i),Ke(t,r,t),t}function yJ(e){e.widgetState.getText().setOrigin(vJ(e))}function bJ(e,t){var n=t.getHandle1().getOrigin();if(0===e)return n.length>0;var r=t.getHandle2().getOrigin();return n.length>0&&r.length>0&&!Ot(n,r,0)}function wJ(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n&&!bJ(e,t)?t.getMoveHandle():t["getHandle".concat(e+1)](),i=r.getOrigin();return i.length?i:null}function xJ(e){var t=0;return bJ(0,e)&&(t=1+bJ(1,e)),t}function SJ(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 CJ=tJ.ShapeType,AJ=["getHandle1","getHandle2","getMoveHandle"];function PJ(e,t){function n(e){return e.altKey||e.controlKey||e.shiftKey}function r(e,t){var n=qe(e,t,[]);return nt(n),n}function i(n,r){var i=e.computeWorldToDisplay.apply(e,[t.renderer].concat(y(n)));return e.computeDisplayToWorld(t.renderer,r.position.x,r.position.y,i[2])}function o(e){var n=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=wJ(e,t.widgetState),a=n?i(o,n):wJ(1-e,t.widgetState);return r(o,a)}(Math.min(1,e));t.representations[e].setOrientation(n)}t.classHierarchy.push("vtkLineWidgetProp"),e.getHandle=function(e){return t.widgetState[AJ[e]]()},e.isPlaced=function(){return 2===xJ(t.widgetState)},e.placeText=function(){var n,r,i=(n=e.getHandle(0).getOrigin(),r=e.getHandle(1).getOrigin(),n[0]<=r[0]?n[1]<=r[1]?1:-1:n[1]<=r[1]?-1:1),o=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OJ,n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator","isDragging"]),_J(e,t)}var TJ={newInstance:de.newInstance(EJ,"vtkLineWidget"),extend:EJ};function DJ(e,t){e.handleLeftButtonPress=function(n){return t.activeState&&t.activeState.getActive()?(t.painting=!0,t.widgetState.addTrail().set(t.activeState.get("origin","up","right","direction","scale1")),e.invokeStartInteractionEvent(),de.EVENT_ABORT):de.VOID},e.handleMouseMove=function(t){return e.handleEvent(t)},e.handleLeftButtonRelease=function(){t.painting&&(e.invokeEndInteractionEvent(),t.widgetState.clearTrailList()),t.painting=!1},e.handleEvent=function(n){if(t.manipulator&&t.activeState&&t.activeState.getActive()){var r,i,o,a=t.camera.getDirectionOfProjection(),s=t.camera.getViewUp(),l=[];$i(l,s,a),(r=t.activeState).setUp.apply(r,y(s)),(i=t.activeState).setRight.apply(i,l),(o=t.activeState).setDirection.apply(o,y(a)),t.manipulator.setNormal(a);var u,c,d=t.manipulator.handleEvent(n,t.apiSpecificRenderWindow);return d.length&&((u=t.widgetState).setTrueOrigin.apply(u,y(d)),(c=t.activeState).setOrigin.apply(c,y(d)),t.painting&&t.widgetState.addTrail().set(t.activeState.get("origin","up","right","direction","scale1"))),e.invokeInteractionEvent(),de.EVENT_ABORT}return de.VOID},e.grabFocus=function(){if(!t.hasFocus){t.activeState=t.widgetState.getHandle(),t.activeState.activate(),t.interactor.requestAnimation(e);var n=t.apiSpecificRenderWindow.getCanvas();n.onmouseenter=function(){t.hasFocus&&t.activeState===t.widgetState.getHandle()&&t.activeState.setVisible(!0)},n.onmouseleave=function(){t.hasFocus&&t.activeState===t.widgetState.getHandle()&&t.activeState.setVisible(!1)}}t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&t.interactor.cancelAnimation(e),t.widgetState.deactivate(),t.widgetState.getHandle().deactivate(),t.activeState=null,t.hasFocus=!1},de.get(e,t,["painting"])}function IJ(e,t){t.classHierarchy.push("vtkPaintWidget"),t.behavior=DJ,e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:return[{builder:GX,labels:["handle","trail"]}];case SA.VOLUME:default:return[{builder:AY,labels:["handle"]}]}},t.widgetState=gX.createBuilder().addField({name:"trueOrigin",initialValue:[0,0,0]}).addStateFromMixin({labels:["handle"],mixins:["origin","color","scale1","orientation","manipulator","visible"],name:"handle",initialValues:{scale1:2*t.radius,origin:[0,0,0],orientation:[1,0,0,0,1,0,0,0,1],visible:!0}}).addDynamicMixinState({labels:["trail"],mixins:["origin","color","scale1","orientation"],name:"trail",initialValues:{scale1:2*t.radius,origin:[0,0,0],orientation:[1,0,0,0,1,0,0,0,1]}}).build();var n=t.widgetState.getHandle();t.manipulator=OX.newInstance(),n.setManipulator(t.manipulator);var r=e.setRadius;e.setRadius=function(e){r(e)&&n.setScale1(e)}}var kJ={manipulator:null,radius:1,painting:!1,color:[1]};function MJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kJ,n),Oq.extend(e,t,n),de.get(e,t,["painting"]),de.setGet(e,t,["manipulator","radius","color"]),IJ(e,t)}var NJ={newInstance:de.newInstance(MJ,"vtkPaintWidget"),extend:MJ};function RJ(e,t){t.classHierarchy.push("vtkPolyLineWidgetProp");var n=null;function r(e){return e.altKey||e.controlKey||e.shiftKey}e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleRightButtonPress=function(n){return t.activeState&&t.activeState.getActive()&&t.pickable&&!r(n)?(t.activeState!==t.widgetState.getMoveHandle()&&(t.interactor.requestAnimation(e),t.activeState.deactivate(),t.widgetState.removeHandle(t.activeState),t.activeState=null,t.interactor.cancelAnimation(e)),e.invokeStartInteractionEvent(),e.invokeInteractionEvent(),e.invokeEndInteractionEvent(),de.EVENT_ABORT):de.VOID},e.handleLeftButtonPress=function(i){if(!t.activeState||!t.activeState.getActive()||!t.pickable||r(i))return de.VOID;if(t.activeState===t.widgetState.getMoveHandle()){var o=t.widgetState.getMoveHandle(),a=t.widgetState.addHandle();a.setOrigin.apply(a,y(o.getOrigin())),a.setColor(o.getColor()),a.setScale1(o.getScale1())}else n=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),de.EVENT_ABORT},e.handleMouseMove=function(i){if(t.pickable&&t.dragable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!r(i)){t.manipulator.setOrigin(t.activeState.getOrigin()),t.manipulator.setNormal(t.camera.getDirectionOfProjection());var o=t.manipulator.handleEvent(i,t.apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||n))return t.activeState.setOrigin(o),e.invokeInteractionEvent(),de.EVENT_ABORT}return t.hasFocus&&t.widgetManager.disablePicking(),de.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable?(t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(e.invokeEndInteractionEvent(),t.widgetManager.enablePicking(),t.interactor.render()),n=!1},e.handleKeyDown=function(t){"Escape"===t.key&&e.loseFocus()},e.grabFocus=function(){t.hasFocus||(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t.widgetManager.enablePicking(),t.interactor.render()}}function FJ(e,t){t.classHierarchy.push("vtkPolyLineWidget"),t.methodsToLink=["activeColor","activeScaleFactor","closePolyLine","defaultScale","glyphResolution","lineThickness","useActiveColor"],t.behavior=RJ,t.widgetState=gX.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:30,origin:[-1,-1,-1],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1"],name:"handle",initialValues:{scale1:30,origin:[-1,-1,-1]}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:AY,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:AY,labels:["moveHandle"],initialValues:{scaleInPixels:!0}},{builder:gJ,labels:["handles"]},{builder:wY,labels:["handles","moveHandle"]}]}},t.widgetState.onBoundsChange((function(e){var n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),t.manipulator=OX.newInstance()}var BJ={};function LJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,BJ,n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator"]),FJ(e,t)}var VJ={newInstance:de.newInstance(LJ,"vtkPolyLineWidget"),extend:LJ};function jJ(e,t){t.classHierarchy.push("vtkRectangleContextRepresentation"),t.mapper=Uv.newInstance(),t.actor=pv.newInstance(),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),t.actor.getProperty().setOpacity(.2),t.actor.getProperty().setColor(0,1,0),e.addActor(t.actor),e.setDrawBorder=function(e){t.drawBorder=e},e.setDrawFace=function(e){t.drawFace=e},e.setOpacity=function(e){t.actor.getProperty().setOpacity(e)},e.requestData=function(n,r){if(!t.deleted){var i=e.getRepresentationStates(n[0])[0],o=ju.newInstance();if(i.getVisible()){var a=i.getOrigin(),s=i.getCorner(),l=[0,0,0];Fi(l,s,a);var u=i.getUp(),c=Qi(l,u),d=new Float32Array(12);if(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[0]+c*u[0],d[4]=a[1]+c*u[1],d[5]=a[2]+c*u[2],d[6]=s[0],d[7]=s[1],d[8]=s[2],d[9]=s[0]-c*u[0],d[10]=s[1]-c*u[1],d[11]=s[2]-c*u[2],o.getPoints().setData(d,3),t.drawFace){var p=new Uint32Array([4,0,1,2,3]);o.getPolys().setData(p,1)}if(t.drawBorder){var f=new Uint32Array([5,0,1,2,3,0]);o.getLines().setData(f,1)}}else o.getPoints().setData([],0),o.getPolys().setData([],0),o.getLines().setData([],0);r[0]=o}},e.getSelectedState=function(e,n){return t.state}}var UJ={drawBorder:!1,drawFace:!0};function GJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,UJ,n),LX.extend(e,t,n),de.setGetArray(e,t,["color"],1),de.get(e,t,["mapper","actor"]),jJ(e,t)}var zJ,WJ={newInstance:de.newInstance(GJ,"vtkRectangleContextRepresentation"),extend:GJ};function HJ(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 KJ(e,t){HY(e,t);var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,XJ(XJ({},YY.DEFAULT_VALUES),ZJ),n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator","widgetState"]),YJ(e,t)}var QJ,$J,eQ={newInstance:de.newInstance(JJ,"vtkRectangleWidget"),extend:JJ},tQ=0,nQ=1,rQ=2,iQ="translateAxis",oQ="rotateLine",aQ="translateCenter";function sQ(e,t){t.classHierarchy.push("vtkResliceCursorContextRepresentation"),t.mapper=Uv.newInstance(),t.actor=pv.newInstance(),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),t.pipelines={},t.pipelines.center={source:Jf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance()},t.pipelines.axes=[];var n={};n.line={source:$p.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},n.rotation1={source:Jf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},n.rotation2={source:Jf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})};var r={};function i(e,t){var n=e.getColor();t.line.actor.getProperty().setColor(n),t.rotation1.actor.getProperty().setColor(n),t.rotation2.actor.getProperty().setColor(n);var r=[0,0,0];qe(e.getPoint2(),e.getPoint1(),r);var i=[0,0,0];Ze(e.getPoint1(),r,.5,i),t.line.source.setCenter(i);var o=nt(r);t.line.source.setDirection(r),t.line.source.setHeight(o),t.rotation1.source.setCenter(e.getRotationPoint1()),t.rotation2.source.setCenter(e.getRotationPoint2())}r.line={source:$p.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},r.rotation1={source:Jf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},r.rotation2={source:Jf.newInstance(),mapper:Uv.newInstance(),actor:pv.newInstance({pickable:!0})},t.pipelines.axes.push(n),t.pipelines.axes.push(r),t.pipelines.center.actor.getProperty().setAmbient(1,1,1),t.pipelines.center.actor.getProperty().setDiffuse(0,0,0),t.pipelines.axes[0].line.source.setResolution(4),t.pipelines.axes[1].line.source.setResolution(4),t.pipelines.axes.forEach((function(t){Object.values(t).forEach((function(t){nq.connectPipeline(t);var n=t.actor;n.getProperty().setAmbient(1,1,1),n.getProperty().setDiffuse(0,0,0),e.addActor(n)}))})),nq.connectPipeline(t.pipelines.center),e.addActor(t.pipelines.center.actor),e.setLineThickness=function(n){var r=n;if(e.getScaleInPixels()){var i=t.pipelines.center.source.getCenter();r*=e.getPixelWorldHeightAtCoord(i)}t.pipelines.axes[0].line.source.setRadius(r),t.pipelines.axes[1].line.source.setRadius(r)},e.setSphereRadius=function(n){e.setSphereRadiusOnSphere(n,t.pipelines.center.source),e.setSphereRadiusOnSphere(n,t.pipelines.axes[0].rotation1.source),e.setSphereRadiusOnSphere(n,t.pipelines.axes[0].rotation2.source),e.setSphereRadiusOnSphere(n,t.pipelines.axes[1].rotation1.source),e.setSphereRadiusOnSphere(n,t.pipelines.axes[1].rotation2.source)},e.setSphereRadiusOnSphere=function(t,n){var r=t;if(e.getScaleInPixels()){var i=n.getCenter();r*=e.getPixelWorldHeightAtCoord(i)}n.setRadius(r)},e.setSphereRadius(7),e.getTranslationActors=function(){return[t.pipelines.axes[0].line.actor,t.pipelines.axes[1].line.actor]},e.getRotationActors=function(){return[t.pipelines.axes[0].rotation1.actor,t.pipelines.axes[0].rotation2.actor,t.pipelines.axes[1].rotation1.actor,t.pipelines.axes[1].rotation2.actor]},e.requestData=function(n,r){var o=n[0],a=o.getCenter();t.pipelines.center.source.setCenter(a);var s="get".concat(t.axis1Name),l="get".concat(t.axis2Name),u=o[s](),c=o[l]();i(u,t.pipelines.axes[0]),i(c,t.pipelines.axes[1]),e.setLineThickness(o.getLineThickness()),e.setSphereRadius(o.getSphereRadius()),r[0]=ju.newInstance()},e.updateActorVisibility=function(n,r,i,o){var a=t.inputData[0],s=n===CA.PICKING_BUFFER?r:r&&o;e.getActors().forEach((function(r){r.getProperty().setOpacity(a.getOpacity());var i=s;e.getRotationActors().includes(r)&&(i=i&&a.getEnableRotation()),a.getShowCenter()||r!==t.pipelines.center.actor||(i=i&&n===CA.PICKING_BUFFER),r.setVisibility(i),e.getTranslationActors().includes(r)&&r.setPickable(a.getEnableTranslation())}));var l=a.getLineThickness();n===CA.PICKING_BUFFER&&(l=Math.max(3,l)),e.setLineThickness(l);var u=a.getSphereRadius();n===CA.PICKING_BUFFER&&(u+=1),e.setSphereRadius(u)},e.getSelectedState=function(e,n){var r=t.inputData[0];r.setActiveViewType(t.viewType);var i="get".concat(t.axis1Name),o="get".concat(t.axis2Name),a=r[i](),s=r[o](),l=null,u="",c="";switch(e){case t.pipelines.axes[0].line.actor:l=a,c=iQ;break;case t.pipelines.axes[1].line.actor:l=s,c=iQ;break;case t.pipelines.axes[0].rotation1.actor:l=a,u="RotationPoint1",c=oQ;break;case t.pipelines.axes[0].rotation2.actor:l=a,u="RotationPoint2",c=oQ;break;case t.pipelines.axes[1].rotation1.actor:l=s,u="RotationPoint1",c=oQ;break;case t.pipelines.axes[1].rotation2.actor:l=s,u="RotationPoint2",c=oQ;break;default:c=aQ}return r.setActiveLineState(l),r.setActiveRotationPointName(u),r.setUpdateMethodName(c),r}}f(QJ={},SA.YZ_PLANE,[0,0,1]),f(QJ,SA.XZ_PLANE,[0,0,1]),f(QJ,SA.XY_PLANE,[0,-1,0]),SA.YZ_PLANE,SA.XZ_PLANE,SA.XY_PLANE,f($J={},SA.YZ_PLANE,0),f($J,SA.XZ_PLANE,1),f($J,SA.XY_PLANE,2);var lQ={axis1Name:"",axis2Name:"",coincidentTopologyParameters:{Point:{factor:-1,offset:-1},Line:{factor:-1.5,offset:-1.5},Polygon:{factor:-2,offset:-2}},rotationEnabled:!0,scaleInPixels:!0,viewType:null};function uQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};nq.extend(e,t,n),Object.assign(t,lQ,n),sQ(e,t)}var cQ={newInstance:de.newInstance(uQ,"vtkResliceCursorContextRepresentation"),extend:uQ};function dQ(e,t){var n=null,r=!1;e.resetUpdateMethod=function(){0!==t.representations.length&&t.representations[0].getSelectedState()},e.startScrolling=function(n){n&&(t.previousPosition=n),r=!0,e.resetUpdateMethod(),e.startInteraction()},e.endScrolling=function(){r=!1,e.endInteraction()},e.updateCursor=function(){switch(t.activeState.getUpdateMethodName()){case aQ:t.apiSpecificRenderWindow.setCursor("move");break;case oQ:t.apiSpecificRenderWindow.setCursor("alias");break;case iQ:t.apiSpecificRenderWindow.setCursor("pointer");break;default:t.apiSpecificRenderWindow.setCursor("default")}},e.handleLeftButtonPress=function(r){if(t.activeState&&t.activeState.getActive()){n=!0;var i=t.widgetState.getActiveViewType(),o=t.widgetState.getPlanes()[i].normal;t.planeManipulator.setOrigin(t.widgetState.getCenter()),t.planeManipulator.setNormal(o),e.startInteraction()}else{if(t.widgetState.getScrollingMethod()!==nQ)return de.VOID;e.startScrolling(r.position)}return de.EVENT_ABORT},e.handleMouseMove=function(i){if(n&&t.pickable&&t.dragable)return e.handleEvent(i);if(r&&t.previousPosition.y!==i.position.y){var o=t.previousPosition.y-i.position.y;e.translateCenterOnCurrentDirection(o,i.pokedRenderer),t.previousPosition=i.position,e.invokeInternalInteractionEvent()}return de.VOID},e.handleLeftButtonRelease=function(){(n||r)&&e.endScrolling(),n=!1,t.widgetState.deactivate()},e.handleRightButtonPress=function(n){t.widgetState.getScrollingMethod()===rQ&&e.startScrolling(n.position)},e.handleRightButtonRelease=function(n){t.widgetState.getScrollingMethod()===rQ&&e.endScrolling()},e.handleStartMouseWheel=function(t){e.resetUpdateMethod(),e.startInteraction()},e.handleMouseWheel=function(t){var n=t.spinY;return r=!0,e.translateCenterOnCurrentDirection(n,t.pokedRenderer),e.invokeInternalInteractionEvent(),r=!1,de.EVENT_ABORT},e.handleEndMouseWheel=function(t){e.endScrolling()},e.handleMiddleButtonPress=function(n){t.widgetState.getScrollingMethod()===tQ&&e.startScrolling(n.position)},e.handleMiddleButtonRelease=function(n){t.widgetState.getScrollingMethod()===tQ&&e.endScrolling()},e.handleEvent=function(n){return t.activeState.getActive()?(e[t.activeState.getUpdateMethodName()](n),e.invokeInternalInteractionEvent(),de.EVENT_ABORT):de.VOID},e.invokeInternalInteractionEvent=function(){var n=t.activeState?t.activeState.getUpdateMethodName():"",r=n!==oQ,i=n===oQ;e.invokeInteractionEvent({computeFocalPointOffset:r,canUpdateFocalPoint:i})},e.startInteraction=function(){e.invokeStartInteractionEvent(),e.getViewWidgets().forEach((function(t){t.getInteractor().requestAnimation(e)}))},e.endInteraction=function(){e.invokeEndInteractionEvent(),e.getViewWidgets().forEach((function(t){t.getInteractor().cancelAnimation(e)}))},e.translateCenterOnCurrentDirection=function(n,r){var i=r.getRenderWindow().getRenderers()[0].getActiveCamera().getDirectionOfProjection(),o=Xe(i,-1),a=t.widgetState.getCenter(),s=t.widgetState.getImage().getSpacing(),l=i.map((function(e){return Math.abs(e)})),u=l.indexOf(Math.max.apply(Math,y(l))),c=n*(s[u]/i[u]),d=[a[0]+c*o[0],a[1]+c*o[1],a[2]+c*o[2]];d=e.getBoundedCenter(d),t.widgetState.setCenter(d),EA(t.widgetState)},e[iQ]=function(n){var r=t.widgetState.getActiveLineState(),i=t.planeManipulator.handleEvent(n,t.apiSpecificRenderWindow),o=r.getPoint1(),a=r.getPoint2(),s=DA(r.getName()),l=t.widgetState["get".concat(s)](),u=qe(l.getPoint2(),l.getPoint1(),[]);nt(u);var c=u,d=qe(a,o,[0,0,0]);nt(d);var p=Qe(d,u);1!==p&&-1!==p||et(d,t.planeManipulator.getNormal(),c);var f=[];Ul.distanceToLine(i,o,a,f);var h=Qe(qe(i,f,[]),c),m=Ze(t.widgetState.getCenter(),c,h,[0,0,0]);m=e.getBoundedCenter(m),t.widgetState.setCenter(m),EA(t.widgetState)},e.getBoundedCenter=function(e){var n=t.widgetState.getCenter(),r=t.widgetState.getImage().getBounds();return Xr.containsPoint.apply(Xr,[r].concat(y(e)))?e:function(e,t,n){var r=[0,0,0];qe(t,e,r);var i=[0,0,0];return Xr.intersectBox(n,e,r,i,[0,0,0]),i}(e,n,r)},e[aQ]=function(n){var r=t.planeManipulator.handleEvent(n,t.apiSpecificRenderWindow);r=e.getBoundedCenter(r),t.activeState.setCenter(r),EA(t.widgetState)},e[oQ]=function(n){var r=t.widgetState.getActiveLineState(),i=t.planeManipulator.getNormal(),o=t.planeManipulator.handleEvent(n,t.apiSpecificRenderWindow),a=t.widgetState.getCenter(),s=[0,0,0];qe(r["get".concat(t.widgetState.getActiveRotationPointName())](),a,s),nt(s);var l=[0,0,0];qe(o,a,l),nt(l);var u=ut(s,l,i);e.rotateLineInView(r,u)},e.rotateLineInView=function(n,r){var i=n.getViewType(),o=n.getInViewType(),a=t.widgetState.getPlanes()[o].normal;if(e.rotatePlane(i,r,a),t.widgetState.getKeepOrthogonality()){var s=DA(n.getName()),l=t.widgetState["get".concat(s)]().getViewType();e.rotatePlane(l,r,a)}EA(t.widgetState)},e.rotatePlane=function(e,n,r){var i=t.widgetState.getPlanes()[e],o=i.normal,a=i.viewUp,s=_A(o,r,n),l=_A(a,r,n);t.widgetState.getPlanes()[e]={normal:s,viewUp:l}},t.planeManipulator=OX.newInstance()}var pQ=[1,0,0],fQ=[0,1,0],hQ=[0,0,1],mQ=de.vtkErrorMacro;function gQ(e,t){var n;t.classHierarchy.push("vtkResliceCursorWidget"),t.behavior=dQ,t.widgetState=gX.createBuilder().addStateFromInstance({labels:["AxisXinY"],name:"AxisXinY",instance:gX.createBuilder().addField({name:"point1",initialValue:[0,0,-1]}).addField({name:"point2",initialValue:[0,0,1]}).addField({name:"rotationPoint1",initialValue:[0,0,-1]}).addField({name:"rotationPoint2",initialValue:[0,0,1]}).addField({name:"color",initialValue:pQ}).addField({name:"name",initialValue:"AxisXinY"}).addField({name:"viewType",initialValue:SA.YZ_PLANE}).addField({name:"inViewType",initialValue:SA.XZ_PLANE}).build()}).addStateFromInstance({labels:["AxisXinZ"],name:"AxisXinZ",instance:gX.createBuilder().addField({name:"point1",initialValue:[0,-1,0]}).addField({name:"point2",initialValue:[0,1,0]}).addField({name:"rotationPoint1",initialValue:[0,-1,0]}).addField({name:"rotationPoint2",initialValue:[0,1,0]}).addField({name:"color",initialValue:pQ}).addField({name:"name",initialValue:"AxisXinZ"}).addField({name:"viewType",initialValue:SA.YZ_PLANE}).addField({name:"inViewType",initialValue:SA.XY_PLANE}).build()}).addStateFromInstance({labels:["AxisYinX"],name:"AxisYinX",instance:gX.createBuilder().addField({name:"point1",initialValue:[0,0,-1]}).addField({name:"point2",initialValue:[0,0,1]}).addField({name:"rotationPoint1",initialValue:[0,0,-1]}).addField({name:"rotationPoint2",initialValue:[0,0,1]}).addField({name:"color",initialValue:fQ}).addField({name:"name",initialValue:"AxisYinX"}).addField({name:"viewType",initialValue:SA.XZ_PLANE}).addField({name:"inViewType",initialValue:SA.YZ_PLANE}).build()}).addStateFromInstance({labels:["AxisYinZ"],name:"AxisYinZ",instance:gX.createBuilder().addField({name:"point1",initialValue:[-1,0,0]}).addField({name:"point2",initialValue:[1,0,0]}).addField({name:"rotationPoint1",initialValue:[-1,0,0]}).addField({name:"rotationPoint2",initialValue:[1,0,0]}).addField({name:"color",initialValue:fQ}).addField({name:"name",initialValue:"AxisYinZ"}).addField({name:"viewType",initialValue:SA.XZ_PLANE}).addField({name:"inViewType",initialValue:SA.XY_PLANE}).build()}).addStateFromInstance({labels:["AxisZinX"],name:"AxisZinX",instance:gX.createBuilder().addField({name:"point1",initialValue:[0,-1,0]}).addField({name:"point2",initialValue:[0,1,0]}).addField({name:"rotationPoint1",initialValue:[0,-1,0]}).addField({name:"rotationPoint2",initialValue:[0,1,0]}).addField({name:"color",initialValue:hQ}).addField({name:"name",initialValue:"AxisZinX"}).addField({name:"viewType",initialValue:SA.XY_PLANE}).addField({name:"inViewType",initialValue:SA.YZ_PLANE}).build()}).addStateFromInstance({labels:["AxisZinY"],name:"AxisZinY",instance:gX.createBuilder().addField({name:"point1",initialValue:[-1,0,0]}).addField({name:"point2",initialValue:[1,0,0]}).addField({name:"rotationPoint1",initialValue:[-1,0,0]}).addField({name:"rotationPoint2",initialValue:[1,0,0]}).addField({name:"color",initialValue:hQ}).addField({name:"name",initialValue:"AxisZinY"}).addField({name:"viewType",initialValue:SA.XY_PLANE}).addField({name:"inViewType",initialValue:SA.XZ_PLANE}).build()}).addField({name:"center",initialValue:[0,0,0]}).addField({name:"opacity",initialValue:1}).addField({name:"activeLineState",initialValue:null}).addField({name:"activeRotationPointName",initialValue:null}).addField({name:"image",initialValue:null}).addField({name:"activeViewType",initialValue:null}).addField({name:"lineThickness",initialValue:2}).addField({name:"sphereRadius",initialValue:5}).addField({name:"showCenter",initialValue:!0}).addField({name:"updateMethodName"}).addField({name:"planes",initialValue:(n={},f(n,SA.YZ_PLANE,{normal:[1,0,0],viewUp:[0,0,1]}),f(n,SA.XZ_PLANE,{normal:[0,-1,0],viewUp:[0,0,1]}),f(n,SA.XY_PLANE,{normal:[0,0,-1],viewUp:[0,-1,0]}),n)}).addField({name:"enableRotation",initialValue:!0}).addField({name:"enableTranslation",initialValue:!0}).addField({name:"keepOrthogonality",initialValue:!1}).addField({name:"scrollingMethod",initialValue:tQ}).addField({name:"cameraOffsets",initialValue:{}}).addField({name:"viewUpFromViewType",initialValue:{}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case SA.XY_PLANE:return[{builder:cQ,labels:["AxisXinZ","AxisYinZ"],initialValues:{axis1Name:"AxisXinZ",axis2Name:"AxisYinZ",viewType:SA.XY_PLANE,rotationEnabled:t.widgetState.getEnableRotation()}}];case SA.XZ_PLANE:return[{builder:cQ,labels:["AxisXinY","AxisZinY"],initialValues:{axis1Name:"AxisXinY",axis2Name:"AxisZinY",viewType:SA.XZ_PLANE,rotationEnabled:t.widgetState.getEnableRotation()}}];case SA.YZ_PLANE:return[{builder:cQ,labels:["AxisYinX","AxisZinX"],initialValues:{axis1Name:"AxisYinX",axis2Name:"AxisZinX",viewType:SA.YZ_PLANE,rotationEnabled:t.widgetState.getEnableRotation()}}];case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[]}},e.setImage=function(e){t.widgetState.setImage(e);var n=e.getCenter();t.widgetState.setCenter(n),EA(t.widgetState)},e.setCenter=function(n){t.widgetState.setCenter(n),EA(t.widgetState),e.modified()},e.updateCameraPoints=function(n,r,i,o,a){e.resetCamera(n,r,i,o),a&&function(e,n){var r=n.getActiveCamera().getFocalPoint(),i=t.widgetState.getCenter(),o=n.getRenderWindow().getViews()[0].getViewportSize(n),a=o[0]/o[1],s=qe(n.worldToNormalizedDisplay.apply(n,y(r).concat([a])),n.worldToNormalizedDisplay.apply(n,y(i).concat([a])),[0,0,0]),l=t.widgetState.getCameraOffsets();l[e]=s,t.widgetState.setCameraOffsets(l)}(r,n)},e.resetCamera=function(n,r,i,o){var a,s,l=t.widgetState.getImage().getCenter(),u=n.getActiveCamera().getFocalPoint(),c=n.getActiveCamera().getPosition(),d=Math.sqrt(st(c,u)),p=e.getPlaneNormalFromViewType(r),f=i?l:u,h=Ze(f,p,d,[0,0,0]);(a=n.getActiveCamera()).setFocalPoint.apply(a,y(f)),(s=n.getActiveCamera()).setPosition.apply(s,y(h)),n.getActiveCamera().setViewUp(t.widgetState.getPlanes()[r].viewUp),function(e,n,r,i,o){var a=e.getActiveCamera().getFocalPoint(),s=e.getActiveCamera().getDistance(),l=Ze(a,n,s,[0,0,0]),u=a;if(i&&(u=pr.intersectWithLine(a,l,t.widgetState.getCenter(),n).x),o){var c=t.widgetState.getCenter(),d=e.getRenderWindow().getViews()[0].getViewportSize(e),p=d[0]/d[1],f=Ke(e.worldToNormalizedDisplay.apply(e,y(c).concat([p])),t.widgetState.getCameraOffsets()[r],[0,0,0]),h=e.normalizedDisplayToWorld.apply(e,y(f).concat([p])),m=pr.intersectWithLine(h,l,c,n);u[0]=m.x[0],u[1]=m.x[1],u[2]=m.x[2]}e.getActiveCamera().setFocalPoint(u[0],u[1],u[2]);var g=Ze(u,n,s,[0,0,0]);e.getActiveCamera().setPosition(g[0],g[1],g[2]);var v=t.widgetState.getImage().getBounds();i&&e.resetCamera(v),e.resetCameraClippingRange(v)}(n,p,r,i,o)},e.updateReslicePlane=function(n,r){var i=t.widgetState.getImage().getSpacing(),o=function(n){for(var r=t.widgetState.getImage().getBounds(),i=e.getWidgetState().getCenter(),o=t.widgetState.getImage().getCenter(),a=[],s=0;s<3;s++)a[s]=-Math.abs(i[s]-o[s]),a[s]*=2;var l=Rf.newInstance();return n===SA.XZ_PLANE?(l.setOrigin(r[0]+a[0],i[1],r[4]+a[2]),l.setPoint1(r[1]-a[0],i[1],r[4]+a[2]),l.setPoint2(r[0]+a[0],i[1],r[5]-a[2])):n===SA.XY_PLANE?(l.setOrigin(r[0]+a[0],r[2]+a[1],i[2]),l.setPoint1(r[1]-a[0],r[2]+a[1],i[2]),l.setPoint2(r[0]+a[0],r[3]-a[1],i[2])):n===SA.YZ_PLANE&&(l.setOrigin(i[0],r[2]+a[1],r[4]+a[2]),l.setPoint1(i[0],r[3]-a[1],r[4]+a[2]),l.setPoint2(i[0],r[2]+a[1],r[5]-a[2])),l}(r),a=t.widgetState.getPlanes()[r],s=a.normal,l=a.viewUp;TA(o,t.widgetState.getCenter(),s,l);var u=y(o.getOrigin()),c=y(o.getPoint1()),d=y(o.getPoint2());PA(t.widgetState.getImage().getBounds(),u,c,d),o.setOrigin.apply(o,y(u)),o.setPoint1.apply(o,y(c)),o.setPoint2.apply(o,y(d));var p=o.getOrigin(),f=o.getPoint1(),h=[];qe(f,p,h);var m=o.getPoint2(),g=[];qe(m,p,g);for(var v=nt(h),b=nt(g),w=Do(new Float64Array(16)),x=0;x<3;x++)w[4*x+0]=h[x],w[4*x+1]=g[x],w[4*x+2]=s[x];var S=Math.abs(h[0]*i[0])+Math.abs(h[1]*i[1])+Math.abs(h[2]*i[2]),C=Math.abs(g[0]*i[0])+Math.abs(g[1]*i[1])+Math.abs(g[2]*i[2]),A=[],P=[];Vh(A,[].concat(y(o.getOrigin()),[1]),w),Io(w,w),Vh(P,A,w),w[12]=P[0],w[13]=P[1],w[14]=P[2];var _=0,O=0,E=0===S?Number.MAX_SAFE_INTEGER:v/S,T=1073741823;if(E>T)mQ("Invalid X extent: ",E," on view type : ",r),_=0;else for(_=1;_T)mQ("Invalid Y extent:",D," on view type : ",r),O=0;else for(O=1;O2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vQ,n),Oq.extend(e,t,n),gQ(e,t)}var bQ={newInstance:de.newInstance(yQ,"vtkResliceCursorWidget"),extend:yQ},wQ=de.vtkErrorMacro;function xQ(e,t){t.classHierarchy.push("vtkSpline1D"),e.computeCloseCoefficients=function(e,n,r,i){wQ("".concat(t.classHierarchy.slice(-1)[0]," should implement computeCloseCoefficients"))},e.computeOpenCoefficients=function(e,n,r,i){wQ("".concat(t.classHierarchy.slice(-1)[0]," should implement computeOpenCoefficients"))},e.getValue=function(e,n){wQ("".concat(t.classHierarchy.slice(-1)[0]," should implement getValue"))}}var SQ={};function CQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SQ,n),de.obj(e,t),xQ(e,t)}var AQ={newInstance:de.newInstance(CQ,"vtkSpline1D"),extend:CQ},PQ=de.vtkErrorMacro;function _Q(e,t){t.classHierarchy.push("vtkCardinalSpline1D"),e.computeCloseCoefficients=function(e,n,r,i){t.coefficients&&t.coefficients.length===4*e||(t.coefficients=new Float32Array(4*e));for(var o=e-1,a=1;a0;g--)t.coefficients[4*g+0]=t.coefficients[4*g+3]-t.coefficients[4*g+2]*t.coefficients[4*(g+1)+0],t.coefficients[4*g+1]=n[g]-t.coefficients[4*g+2]*t.coefficients[4*(g+1)+1];n[0]=(h-f*t.coefficients[5]-d*t.coefficients[4*(o-1)+1])/(p+f*t.coefficients[4]+d*t.coefficients[4*(o-1)+0]),n[o]=n[0];for(var v=1;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OQ,n),AQ.extend(e,t,n),de.obj(e,t),_Q(e,t)}var TQ={newInstance:de.newInstance(EQ,"vtkCardinalSpline1D"),extend:EQ},DQ=de.vtkErrorMacro;function IQ(e,t){t.classHierarchy.push("vtkKochanekSpline1D"),e.computeCloseCoefficients=function(e,n,r,i){t.coefficients&&t.coefficients.length===4*e||(t.coefficients=new Float32Array(4*e));for(var o=e-1,a=1;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kQ,n),AQ.extend(e,t,n),de.obj(e,t),IQ(e,t)}var NQ={newInstance:de.newInstance(MQ,"vtkKochanekSpline1D"),extend:MQ},RQ="CARDINAL_SPLINE",FQ="KOCHANEK_SPLINE",BQ=de.vtkErrorMacro;function LQ(e,t){function n(e,n){0===n.length&&BQ("Splines require at least one points"),1===n.length&&n.push(n[0]);var r=n.length,i=null,o=null;if(t.close){if(i=new Float32Array(r),0===t.intervals.length){o=new Float32Array(r);for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,VQ,n),de.obj(e,t),de.setGet(e,t,["close","intervals"]),LQ(e,t)}var UQ={newInstance:de.newInstance(jQ,"vtkSpline3D"),extend:jQ},GQ=de.vtkWarningMacro;function zQ(e,t){t.classHierarchy.push("vtkTriangleFilter"),e.requestData=function(e,n){var r=e[0],i=r.getPoints().getData(),o=r.getPolys().getData(),a=r.getPolys().getDataType(),s=r.getPoints().getDataType(),l=[],u=[];if(t.errorCount=0,o)for(var c=0,d=0;d3){var g=ap.newInstance();g.setPoints(p),g.triangulate()||(GQ("Triangulation failed at cellOffset ".concat(d)),++t.errorCount);var v=g.getPointArray(),b=Math.floor(v.length/9),w=[];w.length=9;for(var x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,WQ,n),de.setGet(e,t,[]),de.get(e,t,["errorCount"]),de.obj(e,t),de.algo(e,t,1,1),zQ(e,t)}var KQ={newInstance:de.newInstance(HQ,"vtkTriangleFilter"),extend:HQ};function qQ(e,t){t.classHierarchy.push("vtkLineFilter"),e.requestData=function(e,t){var n=ju.newInstance();n.getPoints().setData(e[0].getPoints().getData()),n.getLines().setData(e[0].getLines().getData()),t[0]=n}}var XQ={};function YQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,XQ,n),de.setGet(e,t,[]),de.obj(e,t),de.algo(e,t,1,1),qQ(e,t)}var ZQ={newInstance:de.newInstance(YQ,"vtkLineFilter"),extend:YQ};function JQ(e,t){t.classHierarchy.push("vtkSplineContextRepresentation"),t.pipelines={area:{actor:pv.newInstance(),mapper:Uv.newInstance(),triangleFilter:KQ.newInstance()},border:{actor:pv.newInstance(),mapper:Uv.newInstance(),lineFilter:ZQ.newInstance()}},t.pipelines.area.triangleFilter.setInputConnection(e.getOutputPort()),t.pipelines.area.mapper.setInputConnection(t.pipelines.area.triangleFilter.getOutputPort()),t.pipelines.area.actor.setMapper(t.pipelines.area.mapper),t.pipelines.area.actor.getProperty().setOpacity(.2),t.pipelines.area.actor.getProperty().setColor(0,1,0),e.addActor(t.pipelines.area.actor),t.pipelines.border.lineFilter.setInputConnection(e.getOutputPort()),t.pipelines.border.mapper.setInputConnection(t.pipelines.border.lineFilter.getOutputPort()),t.pipelines.border.actor.setMapper(t.pipelines.border.mapper),t.pipelines.border.actor.getProperty().setOpacity(1),t.pipelines.border.actor.getProperty().setColor(.1,1,.1),t.pipelines.border.actor.setVisibility(t.outputBorder),e.addActor(t.pipelines.border.actor),e.requestData=function(n,r){var i;if(!t.deleted){var o=ju.newInstance(),a=n[0],s=e.getRepresentationStates(a).filter((function(e){return e.getVisible&&e.getVisible()})).map((function(e){return e.getOrigin()}));if(s.length<=1)r[0]=o;else{var l=s.length;t.close&&s.push(s[0]);var u=UQ.newInstance({close:t.close,kind:a.getSplineKind(),tension:a.getSplineTension(),bias:a.getSplineBias(),continuity:a.getSplineContinuity()});u.computeCoefficients(s);var c=new Float32Array(3*l*t.resolution),d=new Uint32Array(l*t.resolution+2);d[0]=l*t.resolution+1,d[l*t.resolution+1]=0;for(var p=0;p2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QQ,n),LX.extend(e,t,n),de.get(e,t,["mapper"]),de.setGet(e,t,["resolution","close","fill","outputBorder","borderColor","errorBorderColor"]),JQ(e,t)}var e$={newInstance:de.newInstance($Q,"vtkSplineContextRepresentation"),extend:$Q};function t$(e,t){t.classHierarchy.push("vtkSplineWidgetProp");var n=function(){if(null!==t.handleSizeInPixels){var e=t.handleSizeInPixels*Ki(t.apiSpecificRenderWindow.displayToWorld(0,0,0,t.renderer),t.apiSpecificRenderWindow.displayToWorld(1,0,0,t.renderer));t.moveHandle.setScale1(e),t.widgetState.getHandleList().forEach((function(t){t.setScale1(e)}))}},r=function(){var e;(!t.lastHandle||t.keysDown.Control||!t.freeHand||qi(t.moveHandle.getOrigin(),t.lastHandle.getOrigin())>t.freehandMinDistance*t.freehandMinDistance)&&(t.lastHandle=t.widgetState.addHandle(),(e=t.lastHandle).setOrigin.apply(e,y(t.moveHandle.getOrigin())),t.lastHandle.setColor(t.moveHandle.getColor()),t.lastHandle.setScale1(t.moveHandle.getScale1()),t.firstHandle||(t.firstHandle=t.lastHandle),t.apiSpecificRenderWindow.setCursor("grabbing"))},i=function(){return t.widgetState.getHandleList().reduce((function(e,n){var r=e.closestHandle,i=e.closestDistance,o=qi(t.moveHandle.getOrigin(),n.getOrigin());return n!==t.moveHandle?{closestHandle:o0&&e.loseFocus();else if("Escape"===r)e.reset(),e.loseFocus();else if(("Delete"===r||"Backspace"===r)&&t.lastHandle){t.widgetState.removeHandle(t.lastHandle);var i=t.widgetState.getHandleList();t.lastHandle=i[i.length-1]}},e.handleKeyUp=function(e){var n=e.key;t.keysDown[n]=!1},e.grabFocus=function(){t.hasFocus||(t.activeState=t.moveHandle,t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent(),n()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.moveHandle.deactivate(),t.moveHandle.setVisible(!1),t.activeState=null,t.interactor.render(),t.hasFocus=!1}}function n$(e,t){t.classHierarchy.push("vtkSplineWidget"),t.methodsToLink=["outputBorder","fill","borderColor","errorBorderColor"],t.behavior=t$,t.widgetState=gX.createBuilder().addField({name:"splineKind",initialValue:FQ}).addField({name:"splineTension",initialValue:0}).addField({name:"splineContinuity",initialValue:0}).addField({name:"splineBias",initialValue:0}).addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:.05,origin:[-1,-1,-1],visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:.05,origin:[-1,-1,-1],visible:!1}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case SA.DEFAULT:case SA.GEOMETRY:case SA.SLICE:case SA.VOLUME:default:return[{builder:AY,labels:["handles","moveHandle"]},{builder:e$,labels:["handles","moveHandle"]}]}},t.moveHandle=t.widgetState.getMoveHandle(),t.manipulator=OX.newInstance()}var r$={keysDown:{},freehandMinDistance:.1,allowFreehand:!0,resolution:32,defaultCursor:"pointer",handleSizeInPixels:10};function i$(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,r$,n),Oq.extend(e,t,n),de.setGet(e,t,["manipulator","freehandMinDistance","allowFreehand","resolution","defaultCursor","handleSizeInPixels"]),n$(e,t)}var o$=de.newInstance(i$,"vtkSplineWidget"),a$={Core:vX,Manipulators:MX,Representations:PY,Widgets3D:{vtkAngleWidget:DY,vtkDistanceWidget:FY,vtkEllipseWidget:tZ,vtkImageCroppingWidget:SZ,vtkImplicitPlaneWidget:OZ,vtkInteractiveOrientationWidget:RZ,vtkLineWidget:TJ,vtkPaintWidget:NJ,vtkPolyLineWidget:VJ,vtkRectangleWidget:eQ,vtkResliceCursorWidget:bQ,vtkShapeWidget:YY,vtkSplineWidget:{newInstance:o$,extend:i$}}};A.Common=yc,A.Filters=lh,A.Imaging=nm,A.Interaction=JA,A.IO=cM,A.Proxy=zK,A.Rendering=lH,A.ThirdParty=WK,A.Widgets=a$,A.mtime=de.getCurrentGlobalMTime,A.macro=de,window.vtk=A},9742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=l(e),a=o[0],s=o[1],u=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,d=s>0?a-4:a;for(n=0;n>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[c++]=255&t),1===s&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,l=r-i;sl?l:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a0)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,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},9560:function(e,t,n){var r;!function(i){"use strict";function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,r,i,a){return o((s=o(o(t,e),o(r,a)))<<(l=i)|s>>>32-l,n);var s,l}function s(e,t,n,r,i,o,s){return a(t&n|~t&r,e,t,i,o,s)}function l(e,t,n,r,i,o,s){return a(t&r|n&~r,e,t,i,o,s)}function u(e,t,n,r,i,o,s){return a(t^n^r,e,t,i,o,s)}function c(e,t,n,r,i,o,s){return a(n^(t|~r),e,t,i,o,s)}function d(e,t){var n,r,i,a,d;e[t>>5]|=128<>>9<<4)]=t;var p=1732584193,f=-271733879,h=-1732584194,m=271733878;for(n=0;n>5]>>>t%32&255);return n}function f(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 i}function m(e){return unescape(encodeURIComponent(e))}function g(e){return function(e){return p(d(f(e),8*e.length))}(m(e))}function v(e,t){return function(e,t){var n,r,i=f(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=d(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=d(o.concat(f(t)),512+8*t.length),p(d(a.concat(r),640))}(m(e),m(t))}function y(e,t,n){return t?n?v(t,e):h(v(t,e)):n?g(e):h(g(e))}void 0===(r=function(){return y}.call(t,n,t,e))||(e.exports=r)}()},8764:function(e,t,n){"use strict";const r=n(9742),i=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(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 d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=s(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(Y(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return p(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(Y(e,ArrayBuffer)||e&&Y(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Y(e,SharedArrayBuffer)||e&&Y(e.buffer,SharedArrayBuffer)))return f(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 l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|h(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Z(e.length)?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.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 c(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 d(e){return c(e),s(e<0?0:0|h(e))}function p(e){const t=e.length<0?0:0|h(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Y(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 i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(i)return r?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function g(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 D(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function v(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){let o,a=1,s=e.length,l=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;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function P(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(o=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.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+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(Y(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(r,i),c=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 i=this.length-t;if((void 0===n||n>i)&&(n=i),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 w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function E(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function M(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function N(e,t,n,r,i){G(t,r,i,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 a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function R(e,t,n,r,i){G(t,r,i,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 a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function F(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.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||k(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Q((function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||k(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Q((function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||W(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||W(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||M(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(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},l.prototype.writeBigUInt64LE=Q((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Q((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);M(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(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},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(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},l.prototype.writeBigInt64LE=Q((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Q((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.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(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n,r,i,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 V.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||W(t,e.length-(n+1))}(r,i,o)}function z(e,t){if("number"!=typeof e)throw new V.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new V.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new V.ERR_BUFFER_OUT_OF_BOUNDS;throw new V.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function K(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=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 q(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function X(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Z(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},8071:function(e,t,n){"use strict";var r=n(4015),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".CornerAnnotation-module-container_3w3m_ {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-direction: column;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.CornerAnnotation-module-row_1DzdL {\n flex: 1;\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n}\n\n.CornerAnnotation-module-topRow_3LKDr {\n align-items: flex-start;\n}\n\n.CornerAnnotation-module-middleRow_1PRjI {\n align-items: center;\n}\n\n.CornerAnnotation-module-bottomRow_ceeUE {\n align-items: flex-end;\n}\n\n.CornerAnnotation-module-item_3aIBZ {\n flex: 1;\n padding: 5px;\n}\n\n.CornerAnnotation-module-east_15pun {\n text-align: right;\n}\n\n.CornerAnnotation-module-west_TPlYy {\n text-align: left;\n}\n\n.CornerAnnotation-module-north_3FgKd {\n text-align: center;\n}\n\n.CornerAnnotation-module-south_2OkPO {\n text-align: center;\n}\n\n.CornerAnnotation-module-northEast_2JhtW {\n}\n\n.CornerAnnotation-module-northWest_2Fvhg {\n}\n\n.CornerAnnotation-module-southEast_3EF-2 {\n}\n\n.CornerAnnotation-module-southWest_2rNCm {\n}\n\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/CornerAnnotation/CornerAnnotation.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,oBAAoB;EACpB,8BAA8B;EAC9B,sBAAsB;EACtB,yBAAiB;KAAjB,sBAAiB;MAAjB,qBAAiB;UAAjB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,WAAW;EACX,YAAY;AACd;;AAEA;EACE,OAAO;EACP,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;AACrB;;AAEA;EAEE,uBAAuB;AACzB;;AAEA;EAEE,mBAAmB;AACrB;;AAEA;EAEE,qBAAqB;AACvB;;AAEA;EACE,OAAO;EACP,YAAY;AACd;;AAEA;EAEE,iBAAiB;AACnB;;AAEA;EAEE,gBAAgB;AAClB;;AAEA;EAEE,kBAAkB;AACpB;;AAEA;EAEE,kBAAkB;AACpB;;AAEA;AAEA;;AAEA;AAEA;;AAEA;AAEA;;AAEA;AAEA",sourcesContent:[".container {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-direction: column;\n user-select: none;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.row {\n flex: 1;\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n}\n\n.topRow {\n composes: row;\n align-items: flex-start;\n}\n\n.middleRow {\n composes: row;\n align-items: center;\n}\n\n.bottomRow {\n composes: row;\n align-items: flex-end;\n}\n\n.item {\n flex: 1;\n padding: 5px;\n}\n\n.east {\n composes: item;\n text-align: right;\n}\n\n.west {\n composes: item;\n text-align: left;\n}\n\n.north {\n composes: item;\n text-align: center;\n}\n\n.south {\n composes: item;\n text-align: center;\n}\n\n.northEast {\n composes: east;\n}\n\n.northWest {\n composes: west;\n}\n\n.southEast {\n composes: east;\n}\n\n.southWest {\n composes: west;\n}\n\n"],sourceRoot:""}]),a.locals={container:"CornerAnnotation-module-container_3w3m_",row:"CornerAnnotation-module-row_1DzdL",topRow:"CornerAnnotation-module-topRow_3LKDr CornerAnnotation-module-row_1DzdL",middleRow:"CornerAnnotation-module-middleRow_1PRjI CornerAnnotation-module-row_1DzdL",bottomRow:"CornerAnnotation-module-bottomRow_ceeUE CornerAnnotation-module-row_1DzdL",item:"CornerAnnotation-module-item_3aIBZ",east:"CornerAnnotation-module-east_15pun CornerAnnotation-module-item_3aIBZ",west:"CornerAnnotation-module-west_TPlYy CornerAnnotation-module-item_3aIBZ",north:"CornerAnnotation-module-north_3FgKd CornerAnnotation-module-item_3aIBZ",south:"CornerAnnotation-module-south_2OkPO CornerAnnotation-module-item_3aIBZ",northEast:"CornerAnnotation-module-northEast_2JhtW CornerAnnotation-module-east_15pun CornerAnnotation-module-item_3aIBZ",northWest:"CornerAnnotation-module-northWest_2Fvhg CornerAnnotation-module-west_TPlYy CornerAnnotation-module-item_3aIBZ",southEast:"CornerAnnotation-module-southEast_3EF-2 CornerAnnotation-module-east_15pun CornerAnnotation-module-item_3aIBZ",southWest:"CornerAnnotation-module-southWest_2rNCm CornerAnnotation-module-west_TPlYy CornerAnnotation-module-item_3aIBZ"},t.Z=a},631:function(e,t,n){"use strict";var r=n(4015),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".FPSMonitor-module-verticalContainer_rT-Uz {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.FPSMonitor-module-horizontalContainer_3VWaQ {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.FPSMonitor-module-leftPane_rrTm6 {\n flex: none;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.FPSMonitor-module-rightPane_-XxoH {\n flex: 1;\n display: grid;\n grid-template-columns: auto auto;\n grid-auto-rows: 1.5em;\n grid-column-gap: 5px;\n grid-row-gap: 2px;\n padding: 10px;\n}\n\n.FPSMonitor-module-title_1rQSo {\n flex: 1;\n font-weight: bold;\n padding: 5px 10px 0 10px;\n}\n\n.FPSMonitor-module-graph_25Ga0 {\n flex: none;\n border: solid 1px black;\n margin: 10px ;\n border-radius: 2px;\n overflow: hidden;\n}\n\n.FPSMonitor-module-label_3wYtB {\n font-weight: bold;\n text-transform: capitalize;\n text-align: right;\n align-self: center;\n}\n\n.FPSMonitor-module-value_f9FN2 {\n font-style: italic;\n text-align: center;\n align-self: center;\n}\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/FPSMonitor/FPSMonitor.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,sBAAsB;EACtB,2BAA2B;EAC3B,oBAAoB;AACtB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,2BAA2B;AAC7B;;AAEA;EACE,UAAU;EACV,aAAa;EACb,sBAAsB;EACtB,2BAA2B;EAC3B,oBAAoB;AACtB;;AAEA;EACE,OAAO;EACP,aAAa;EACb,gCAAgC;EAChC,qBAAqB;EACrB,oBAAoB;EACpB,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,OAAO;EACP,iBAAiB;EACjB,wBAAwB;AAC1B;;AAEA;EACE,UAAU;EACV,uBAAuB;EACvB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;EACjB,0BAA0B;EAC1B,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;AACpB",sourcesContent:[".verticalContainer {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.horizontalContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.leftPane {\n flex: none;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.rightPane {\n flex: 1;\n display: grid;\n grid-template-columns: auto auto;\n grid-auto-rows: 1.5em;\n grid-column-gap: 5px;\n grid-row-gap: 2px;\n padding: 10px;\n}\n\n.title {\n flex: 1;\n font-weight: bold;\n padding: 5px 10px 0 10px;\n}\n\n.graph {\n flex: none;\n border: solid 1px black;\n margin: 10px ;\n border-radius: 2px;\n overflow: hidden;\n}\n\n.label {\n font-weight: bold;\n text-transform: capitalize;\n text-align: right;\n align-self: center;\n}\n\n.value {\n font-style: italic;\n text-align: center;\n align-self: center;\n}\n"],sourceRoot:""}]),a.locals={verticalContainer:"FPSMonitor-module-verticalContainer_rT-Uz",horizontalContainer:"FPSMonitor-module-horizontalContainer_3VWaQ",leftPane:"FPSMonitor-module-leftPane_rrTm6",rightPane:"FPSMonitor-module-rightPane_-XxoH",title:"FPSMonitor-module-title_1rQSo",graph:"FPSMonitor-module-graph_25Ga0",label:"FPSMonitor-module-label_3wYtB",value:"FPSMonitor-module-value_f9FN2"},t.Z=a},1995:function(e,t,n){"use strict";var r=n(4015),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".Slider-module-cursor_fckbu {\n position: absolute;\n border-radius: 50%;\n box-sizing: border-box;\n cursor: move;\n}\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/Slider/Slider.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;EACtB,YAAY;AACd",sourcesContent:[".cursor {\n position: absolute;\n border-radius: 50%;\n box-sizing: border-box;\n cursor: move;\n}\n"],sourceRoot:""}]),a.locals={cursor:"Slider-module-cursor_fckbu"},t.Z=a},4734:function(e,t,n){"use strict";var r=n(4015),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".VolumeController-module-container_1gy2O {\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_Vj-Px {\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_15vFT {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module-button_15vFT svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module-sliderEntry_gZyt8 {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module-sliderIcon_3hhI0 {\n height: 1rem;\n}\n\n.VolumeController-module-slider_3OUDs {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module-piecewiseEditor_2U8eV {\n flex: 1;\n}\n\n.VolumeController-module-select_1XHcV {\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_1XHcV select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module-presets_2UsJt {\n}\n\n.VolumeController-module-shadow_3kZTD {\n}\n\n.VolumeController-module-buttonDarkBG_1YX9b {\n}\n\n.VolumeController-module-presetsDarkBG_340tN {\n color: white;\n}\n\n.VolumeController-module-presetsDarkBG_340tN option {\n color: black;\n}\n\n.VolumeController-module-shadowDarkBG_154Fl {\n color: white;\n}\n\n.VolumeController-module-shadowDarkBG_154Fl option {\n color: black;\n}\n\n.VolumeController-module-buttonBrightBG_2CDdp {\n}\n\n.VolumeController-module-presetsBrightBG_2yYG1 {\n color: black;\n}\n\n.VolumeController-module-presetsBrightBG_2yYG1 option {\n color: white;\n}\n\n.VolumeController-module-shadowBrightBG_rXD57 {\n color: black;\n}\n\n.VolumeController-module-shadowBrightBG_rXD57 option {\n color: white;\n}\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/VolumeController/VolumeController.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,8BAA8B;EAC9B,kBAAkB;EAClB,QAAQ;EACR,SAAS;EACT,oCAAoC;EACpC,kBAAkB;EAClB,YAAY;EACZ,yBAAyB;EACzB,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,8BAA8B;AAChC;;AAEA;EACE,eAAe;EACf,WAAW;EACX,gBAAgB;EAChB,iBAAiB;AACnB;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,OAAO;EACP,aAAa;EACb,mBAAmB;EACnB,mBAAmB;AACrB;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,OAAO;EACP,gBAAgB;EAChB,UAAU;AACZ;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,OAAO;EACP,YAAY;EACZ,uBAAuB;EACvB,YAAY;EACZ,YAAY;EACZ,qBAAqB;EACrB,UAAU;AACZ;;AAEA;EACE,aAAa;EACb,YAAY;AACd;;AAEA;AAEA;;AAEA;AAEA;;AAEA;AAEA;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd;;AAEA;AAEA;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd",sourcesContent:[".container {\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.line {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.button {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.button svg {\n width: 1rem;\n height: 1rem;\n}\n\n.sliderEntry {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.sliderIcon {\n composes: button;\n height: 1rem;\n}\n\n.slider {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.piecewiseEditor {\n flex: 1;\n}\n\n.select {\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.select select:focus {\n outline: none;\n border: none;\n}\n\n.presets {\n composes: select;\n}\n\n.shadow {\n composes: select;\n}\n\n.buttonDarkBG {\n composes: button;\n}\n\n.presetsDarkBG {\n composes: presets;\n color: white;\n}\n\n.presetsDarkBG option {\n color: black;\n}\n\n.shadowDarkBG {\n composes: shadow;\n color: white;\n}\n\n.shadowDarkBG option {\n color: black;\n}\n\n.buttonBrightBG {\n composes: button;\n}\n\n.presetsBrightBG {\n composes: presets;\n color: black;\n}\n\n.presetsBrightBG option {\n color: white;\n}\n\n.shadowBrightBG {\n composes: shadow;\n color: black;\n}\n\n.shadowBrightBG option {\n color: white;\n}\n"],sourceRoot:""}]),a.locals={container:"VolumeController-module-container_1gy2O",line:"VolumeController-module-line_Vj-Px",button:"VolumeController-module-button_15vFT",sliderEntry:"VolumeController-module-sliderEntry_gZyt8",sliderIcon:"VolumeController-module-sliderIcon_3hhI0 VolumeController-module-button_15vFT",slider:"VolumeController-module-slider_3OUDs",piecewiseEditor:"VolumeController-module-piecewiseEditor_2U8eV",select:"VolumeController-module-select_1XHcV",presets:"VolumeController-module-presets_2UsJt VolumeController-module-select_1XHcV",shadow:"VolumeController-module-shadow_3kZTD VolumeController-module-select_1XHcV",buttonDarkBG:"VolumeController-module-buttonDarkBG_1YX9b VolumeController-module-button_15vFT",presetsDarkBG:"VolumeController-module-presetsDarkBG_340tN VolumeController-module-presets_2UsJt VolumeController-module-select_1XHcV",shadowDarkBG:"VolumeController-module-shadowDarkBG_154Fl VolumeController-module-shadow_3kZTD VolumeController-module-select_1XHcV",buttonBrightBG:"VolumeController-module-buttonBrightBG_2CDdp VolumeController-module-button_15vFT",presetsBrightBG:"VolumeController-module-presetsBrightBG_2yYG1 VolumeController-module-presets_2UsJt VolumeController-module-select_1XHcV",shadowBrightBG:"VolumeController-module-shadowBrightBG_rXD57 VolumeController-module-shadow_3kZTD VolumeController-module-select_1XHcV"},t.Z=a},1406:function(e,t,n){"use strict";var r=n(4015),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".RenderWindowWithControlBar-module-rootContainer_3KuKP {\n position: relative;\n}\n\n.RenderWindowWithControlBar-module-renderWindow_1eRtq {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.RenderWindowWithControlBar-module-control_2G8qD {\n z-index: 1;\n position: absolute;\n}\n","",{version:3,sources:["webpack://./Sources/Rendering/Misc/RenderWindowWithControlBar/RenderWindowWithControlBar.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,QAAQ;EACR,SAAS;AACX;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB",sourcesContent:[".rootContainer {\n position: relative;\n}\n\n.renderWindow {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.control {\n z-index: 1;\n position: absolute;\n}\n"],sourceRoot:""}]),a.locals={rootContainer:"RenderWindowWithControlBar-module-rootContainer_3KuKP",renderWindow:"RenderWindowWithControlBar-module-renderWindow_1eRtq",control:"RenderWindowWithControlBar-module-control_2G8qD"},t.Z=a},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&a.length>i&&!a.warned){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=a.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){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 d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var u=l.length,c=h(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},645:function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=h,a/=256,u-=8);e[n+f-h]|=128*m}},5705:function(e,t,n){"use strict";var r,i,o=n.g.MutationObserver||n.g.WebKitMutationObserver;if(o){var a=0,s=new o(d),l=n.g.document.createTextNode("");s.observe(l,{characterData:!0}),r=function(){l.data=a=++a%2}}else if(n.g.setImmediate||void 0===n.g.MessageChannel)r="document"in n.g&&"onreadystatechange"in n.g.document.createElement("script")?function(){var e=n.g.document.createElement("script");e.onreadystatechange=function(){d(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},n.g.document.documentElement.appendChild(e)}:function(){setTimeout(d,0)};else{var u=new n.g.MessageChannel;u.port1.onmessage=d,r=function(){u.port2.postMessage(0)}}var c=[];function d(){var e,t;i=!0;for(var n=c.length;n;){for(t=c,c=[],e=-1;++e>2,s=(3&t)<<4|n>>4,l=f>1?(15&n)<<2|i>>6:64,u=f>2?63&i:64,c.push(o.charAt(a)+o.charAt(s)+o.charAt(l)+o.charAt(u));return c.join("")},t.decode=function(e){var t,n,r,a,s,l,u=0,c=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var p,f=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&f--,e.charAt(e.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(p=i.uint8array?new Uint8Array(0|f):new Array(0|f);u>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(u++)))>>2,r=(3&s)<<6|(l=o.indexOf(e.charAt(u++))),p[c++]=t,64!==s&&(p[c++]=n),64!==l&&(p[c++]=r);return p}},7326:function(e,t,n){"use strict";var r=n(8565),i=n(5301),o=n(5977),a=n(2541);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}o=n(5977),s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("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 i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},e.exports=s},1678:function(e,t,n){"use strict";var r=n(3718);t.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},t.DEFLATE=n(1033)},6988:function(e,t,n){"use strict";var r=n(8910),i=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}();e.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=0+n;e^=-1;for(var s=0;s>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var o=i,a=0+n;e^=-1;for(var s=0;s>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length):0}},6032:function(e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},8565:function(e,t,n){"use strict";var r;r="undefined"!=typeof Promise?Promise:n(3389),e.exports={Promise:r}},1033:function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=n(337),o=n(8910),a=n(3718),s=r?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}t.magic="\b\0",o.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},t.compressWorker=function(e){return new l("Deflate",e)},t.uncompressWorker=function(){return new l("Inflate",{})}},4979:function(e,t,n){"use strict";var r=n(8910),i=n(3718),o=n(3600),a=n(6988),s=n(1141),l=function(e,t){var n,r="";for(n=0;n>>=8;return r},u=function(e,t,n,i,u,c){var d,p,f=e.file,h=e.compression,m=c!==o.utf8encode,g=r.transformTo("string",c(f.name)),v=r.transformTo("string",o.utf8encode(f.name)),y=f.comment,b=r.transformTo("string",c(y)),w=r.transformTo("string",o.utf8encode(y)),x=v.length!==f.name.length,S=w.length!==y.length,C="",A="",P="",_=f.dir,O=f.date,E={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(E.crc32=e.crc32,E.compressedSize=e.compressedSize,E.uncompressedSize=e.uncompressedSize);var T=0;t&&(T|=8),m||!x&&!S||(T|=2048);var D,I,k=0,M=0;_&&(k|=16),"UNIX"===u?(M=798,k|=(I=D=f.unixPermissions,D||(I=_?16893:33204),(65535&I)<<16)):(M=20,k|=63&(f.dosPermissions||0)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),x&&(A=l(1,1)+l(a(g),4)+v,C+="up"+l(A.length,2)+A),S&&(P=l(1,1)+l(a(b),4)+w,C+="uc"+l(P.length,2)+P);var N="";return N+="\n\0",N+=l(T,2),N+=h.magic,N+=l(d,2),N+=l(p,2),N+=l(E.crc32,4),N+=l(E.compressedSize,4),N+=l(E.uncompressedSize,4),N+=l(g.length,2),N+=l(C.length,2),{fileRecord:s.LOCAL_FILE_HEADER+N+g+C,dirRecord:s.CENTRAL_FILE_HEADER+l(M,2)+N+l(b.length,2)+"\0\0\0\0"+l(k,4)+l(i,4)+g+C+b}},c=function(e){return s.DATA_DESCRIPTOR+l(e.crc32,4)+l(e.compressedSize,4)+l(e.uncompressedSize,4)};function d(e,t,n,r){i.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=[]}r.inherits(d,i),d.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,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},d.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=u(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=u(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:c(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},d.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t0?e.substring(0,t):""},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},g=function(e,t){return t=void 0!==t?t:s.createFolders,e=m(e),this.files[e]||f.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var y={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(v(e)){var r=e;return this.filter((function(e,t){return!t.dir&&r.test(e)}))}var i=this.files[this.root+e];return i&&!i.dir?i:null}return e=this.root+e,f.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(v(e))return this.filter((function(t,n){return n.dir&&e.test(t)}));var t=this.root+e,n=g.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=0;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.readData(4);return t===o[0]&&n===o[1]&&r===o[2]&&i===o[3]},i.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},e.exports=i},8542:function(e,t,n){"use strict";var r=n(8910);function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.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))}},e.exports=i},9583:function(e,t,n){"use strict";var r=n(414);function i(e){r.call(this,e)}n(8910).inherits(i,r),i.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},e.exports=i},9226:function(e,t,n){"use strict";var r=n(8542);function i(e){r.call(this,e)}n(8910).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.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},e.exports=i},414:function(e,t,n){"use strict";var r=n(2370);function i(e){r.call(this,e)}n(8910).inherits(i,r),i.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},e.exports=i},8435:function(e,t,n){"use strict";var r=n(8910),i=n(3790),o=n(2370),a=n(9226),s=n(9583),l=n(414);e.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},1141:function(e,t){"use strict";t.LOCAL_FILE_HEADER="PK",t.CENTRAL_FILE_HEADER="PK",t.CENTRAL_DIRECTORY_END="PK",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",t.ZIP64_CENTRAL_DIRECTORY_END="PK",t.DATA_DESCRIPTOR="PK\b"},4293:function(e,t,n){"use strict";var r=n(3718),i=n(8910);function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},e.exports=o},2541:function(e,t,n){"use strict";var r=n(3718),i=n(6988);function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n(8910).inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},e.exports=o},5977:function(e,t,n){"use strict";var r=n(8910),i=n(3718);function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},e.exports=o},5301:function(e,t,n){"use strict";var r=n(8910),i=n(3718);function o(e){i.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=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.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}})},e.exports=o},3718:function(e){"use strict";function t(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}t.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}},e.exports=t},1285:function(e,t,n){"use strict";var r=n(8910),i=n(4293),o=n(3718),a=n(8458),s=n(3790),l=n(8565),u=null;if(s.nodestream)try{u=n(1220)}catch(e){}function c(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,r.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}c.prototype={accumulate:function(e){return t=this,n=e,new l.Promise((function(e,i){var o=[],s=t._internalType,l=t._outputType,u=t._mimeType;t.on("data",(function(e,t){o.push(e),n&&n(t)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var t=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(l,function(e,t){var n,r=0,i=null,o=0;for(n=0;n=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;function u(){a.call(this,"utf-8 decode"),this.leftOver=null}function c(){a.call(this,"utf-8 encode")}s[254]=s[254]=1,t.utf8encode=function(e){return i.nodebuffer?o.newBufferFrom(e,"utf-8"):function(e){var t,n,r,o,a,s=e.length,l=0;for(o=0;o>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t}(e)},t.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,l=new Array(2*a);for(n=0,t=0;t4)l[n++]=65533,t+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&t1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(u,a),u.prototype.processChunk=function(e){var n=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=n;(n=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),n.set(o,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var a=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+s[e[n]]>t?n:t}(n),l=n;a!==n.length&&(i.uint8array?(l=n.subarray(0,a),this.leftOver=n.subarray(a,n.length)):(l=n.slice(0,a),this.leftOver=n.slice(a,n.length))),this.push({data:t.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=u,r.inherits(c,a),c.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=c},8910:function(e,t,n){"use strict";var r=n(3790),i=n(8458),o=n(2182),a=n(1623),s=n(8565);function l(e){return e}function u(e,t){for(var n=0;n1;)try{return c.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return c.stringifyByChar(e)}function p(e,t){for(var n=0;n1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e0)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=r);else if(r<0)throw new Error("Corrupted zip: missing "+Math.abs(r)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=l},9392:function(e,t,n){"use strict";var r=n(8435),i=n(8910),o=n(7326),a=n(6988),s=n(3600),l=n(1678),u=n(3790);function c(e,t){this.options=e,this.loadOptions=t}c.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 l)if(l.hasOwnProperty(t)&&l[t].magic===e)return l[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(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=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index0?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 s,this.strm.avail_out=0;var n=r.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw new Error(a[n]);if(t.header&&r.deflateSetHeader(this.strm,t.header),t.dictionary){var c;if(c="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=r.deflateSetDictionary(this.strm,c)))throw new Error(a[n]);this._dict_set=!0}}function c(e,t){var n=new u(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}u.prototype.push=function(e,t){var n,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===l.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(u),s.next_out=0,s.avail_out=u),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=u,t.deflate=c,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,c(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,c(e,t)}},125:function(e,t,n){"use strict";var r=n(1706),i=n(3231),o=n(3611),a=n(2203),s=n(1750),l=n(8495),u=n(9187),c=Object.prototype.toString;function d(e){if(!(this instanceof d))return new d(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var 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 l,this.strm.avail_out=0;var n=r.inflateInit2(this.strm,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);if(this.header=new u,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[n])}function p(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,l,u,d,p=this.strm,f=this.options.chunkSize,h=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===c.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new i.Buf8(f),p.next_out=0,p.avail_out=f),(n=r.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&h&&(n=r.inflateSetDictionary(this.strm,h)),n===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(l=o.utf8border(p.output,p.next_out),u=p.next_out-l,d=o.buf2string(p.output,l),p.next_out=u,p.avail_out=f-u,u&&i.arraySet(p.output,p.output,l,u,0),this.onData(d)):this.onData(i.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(m=!0)}while((p.avail_in>0||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=p,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,p(e,t)},t.ungzip=p},3231:function(e,t){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function l(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return l(e,e.length)},t.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n4)u[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n1?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return l(u,r)},t.utf8border=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+a[e[n]]>t?n:t}},6578:function(e){"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},2203:function(e){"use strict";e.exports={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_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}},9274:function(e){"use strict";var t=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}();e.exports=function(e,n,r,i){var o=t,a=i+r;e^=-1;for(var s=i;s>>8^o[255&(e^n[s])];return-1^e}},6431:function(e,t,n){"use strict";var r,i=n(3231),o=n(4286),a=n(6578),s=n(9274),l=n(1750),u=-2,c=258,d=262,p=103,f=113,h=666;function m(e,t){return e.msg=l[t],t}function g(e){return(e<<1)-(e>4?9:0)}function v(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.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 b(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function w(e,t){e.pending_buf[e.pending++]=t}function x(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function S(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,u=e.window,p=e.w_mask,f=e.prev,h=e.strstart+c,m=u[o+a-1],g=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===g&&u[n+a-1]===m&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&oa){if(e.match_start=t,a=r,r>=s)break;m=u[o+a-1],g=u[o+a]}}}while((t=f[t&p])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function C(e){var t,n,r,o,l,u,c,p,f,h,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=m?r-m:0}while(--n);t=n=m;do{r=e.prev[--t],e.prev[t]=r>=m?r-m:0}while(--n);o+=m}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,p=e.strstart+e.lookahead,f=o,h=void 0,(h=u.avail_in)>f&&(h=f),n=0===h?0:(u.avail_in-=h,i.arraySet(c,u.input,u.next_in,h,p),1===u.state.wrap?u.adler=a(u.adler,c,h,p):2===u.state.wrap&&(u.adler=s(u.adler,c,h,p)),u.next_in+=h,u.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=o._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){i=e.strstart+e.lookahead-3,r=o._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<=i&&(e.ins_h=(e.ins_h<15&&(s=2,r-=16),o<1||o>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return m(e,u);8===r&&(r=9);var l=new O;return e.state=l,l.strm=e,l.wrap=s,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(C(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,b(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(b(e,!1),e.strm.avail_out),1)})),new _(4,4,8,4,A),new _(4,5,16,8,A),new _(4,6,32,32,A),new _(4,4,16,16,P),new _(8,16,32,32,P),new _(8,16,128,128,P),new _(8,32,128,256,P),new _(32,128,258,1024,P),new _(32,258,258,4096,P)],t.deflateInit=function(e,t){return D(e,t,8,15,8,0)},t.deflateInit2=D,t.deflateReset=T,t.deflateResetKeep=E,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?u:(e.state.gzhead=t,0):u},t.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||t>5||t<0)return e?m(e,u):u;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===h&&4!==t)return m(e,0===e.avail_out?-5:u);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,w(i,31),w(i,139),w(i,8),i.gzhead?(w(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),w(i,255&i.gzhead.time),w(i,i.gzhead.time>>8&255),w(i,i.gzhead.time>>16&255),w(i,i.gzhead.time>>24&255),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(w(i,255&i.gzhead.extra.length),w(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(w(i,0),w(i,0),w(i,0),w(i,0),w(i,0),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,3),i.status=f);else{var d=8+(i.w_bits-8<<4)<<8;d|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=f,x(i,d),0!==i.strstart&&(x(i,e.adler>>>16),x(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending!==i.pending_buf_size));)w(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),y(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=p)}else i.status=p;if(i.status===p&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&y(e),i.pending+2<=i.pending_buf_size&&(w(i,255&e.adler),w(i,e.adler>>8&255),e.adler=0,i.status=f)):i.status=f),0!==i.pending){if(y(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(n)&&4!==t)return m(e,-5);if(i.status===h&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==h){var S=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(C(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=c){if(C(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+c;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==S&&4!==S||(i.status=h),1===S||3===S)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===S&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(v(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),y(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(w(i,255&e.adler),w(i,e.adler>>8&255),w(i,e.adler>>16&255),w(i,e.adler>>24&255),w(i,255&e.total_in),w(i,e.total_in>>8&255),w(i,e.total_in>>16&255),w(i,e.total_in>>24&255)):(x(i,e.adler>>>16),x(i,65535&e.adler)),y(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==p&&t!==f&&t!==h?m(e,u):(e.state=null,t===f?m(e,-3):0):u},t.deflateSetDictionary=function(e,t){var n,r,o,s,l,c,d,p,f=t.length;if(!e||!e.state)return u;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return u;for(1===s&&(e.adler=a(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===s&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,f-n.w_size,n.w_size,0),t=p,f=n.w_size),l=e.avail_in,c=e.next_in,d=e.input,e.avail_in=f,e.next_in=0,e.input=t,C(n);n.lookahead>=3;){r=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<>>=w=b>>>24,h-=w,0==(w=b>>>16&255))_[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(f&(1<>>=w,h-=w),h<15&&(f+=P[r++]<>>=w=b>>>24,h-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=g[(65535&b)+(f&(1<l){e.msg="invalid distance too far back",n.mode=30;break e}if(f>>>=w,h-=w,S>(w=o-a)){if((w=S-w)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(C=0,A=p,0===d){if(C+=u-w,w2;)_[o++]=A[C++],_[o++]=A[C++],_[o++]=A[C++],x-=3;x&&(_[o++]=A[C++],x>1&&(_[o++]=A[C++]))}else{C=o-S;do{_[o++]=_[C++],_[o++]=_[C++],_[o++]=_[C++],x-=3}while(x>2);x&&(_[o++]=_[C++],x>1&&(_[o++]=_[C++]))}break}}break}}while(r>3,f&=(1<<(h-=x<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function p(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(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 r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,f(e)):l}function m(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)?l:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))):l}function g(e,t){var n,r;return e?(r=new p,e.state=r,r.window=null,0!==(n=m(e,t))&&(e.state=null),n):l}var v,y,b=!0;function w(e){if(b){var t;for(v=new r.Buf32(512),y=new r.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(s(1,e.lens,0,288,v,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),b=!1}e.lencode=v,e.lenbits=9,e.distcode=y,e.distbits=5}function x(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,L,2,0),y=0,b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",n.mode=c;break}if(8!=(15&y)){e.msg="unknown compression method",n.mode=c;break}if(b-=4,M=8+(15&(y>>>=4)),0===n.wbits)n.wbits=M;else if(M>n.wbits){e.msg="invalid window size",n.mode=c;break}n.dmax=1<>8&1),512&n.flags&&(L[0]=255&y,L[1]=y>>>8&255,n.check=o(n.check,L,2,0)),y=0,b=0,n.mode=3;case 3:for(;b<32;){if(0===g)break e;g--,y+=p[h++]<>>8&255,L[2]=y>>>16&255,L[3]=y>>>24&255,n.check=o(n.check,L,4,0)),y=0,b=0,n.mode=4;case 4:for(;b<16;){if(0===g)break e;g--,y+=p[h++]<>8),512&n.flags&&(L[0]=255&y,L[1]=y>>>8&255,n.check=o(n.check,L,2,0)),y=0,b=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===g)break e;g--,y+=p[h++]<>>8&255,n.check=o(n.check,L,2,0)),y=0,b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((A=n.length)>g&&(A=g),A&&(n.head&&(M=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,p,h,A,M)),512&n.flags&&(n.check=o(n.check,p,A,h)),g-=A,h+=A,n.length-=A),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===g)break e;A=0;do{M=p[h+A++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M))}while(M&&A>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=u;break;case 10:for(;b<32;){if(0===g)break e;g--,y+=p[h++]<>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===g)break e;g--,y+=p[h++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,6===t){y>>>=2,b-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=c}y>>>=2,b-=2;break;case 14:for(y>>>=7&b,b-=7&b;b<32;){if(0===g)break e;g--,y+=p[h++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=c;break}if(n.length=65535&y,y=0,b=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(A=n.length){if(A>g&&(A=g),A>v&&(A=v),0===A)break e;r.arraySet(f,p,h,A,m),g-=A,h+=A,v-=A,m+=A,n.length-=A;break}n.mode=u;break;case 17:for(;b<14;){if(0===g)break e;g--,y+=p[h++]<>>=5,b-=5,n.ndist=1+(31&y),y>>>=5,b-=5,n.ncode=4+(15&y),y>>>=4,b-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=c;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,b-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,R={bits:n.lenbits},N=s(0,n.lens,0,19,n.lencode,0,n.work,R),n.lenbits=R.bits,N){e.msg="invalid code lengths set",n.mode=c;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,T=65535&B,!((O=B>>>24)<=b);){if(0===g)break e;g--,y+=p[h++]<>>=O,b-=O,n.lens[n.have++]=T;else{if(16===T){for(F=O+2;b>>=O,b-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=c;break}M=n.lens[n.have-1],A=3+(3&y),y>>>=2,b-=2}else if(17===T){for(F=O+3;b>>=O)),y>>>=3,b-=3}else{for(F=O+7;b>>=O)),y>>>=7,b-=7}if(n.have+A>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=c;break}for(;A--;)n.lens[n.have++]=M}}if(n.mode===c)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=c;break}if(n.lenbits=9,R={bits:n.lenbits},N=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,R),n.lenbits=R.bits,N){e.msg="invalid literal/lengths set",n.mode=c;break}if(n.distbits=6,n.distcode=n.distdyn,R={bits:n.distbits},N=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,R),n.distbits=R.bits,N){e.msg="invalid distances set",n.mode=c;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(g>=6&&v>=258){e.next_out=m,e.avail_out=v,e.next_in=h,e.avail_in=g,n.hold=y,n.bits=b,a(e,C),m=e.next_out,f=e.output,v=e.avail_out,h=e.next_in,p=e.input,g=e.avail_in,y=n.hold,b=n.bits,n.mode===u&&(n.back=-1);break}for(n.back=0;E=(B=n.lencode[y&(1<>>16&255,T=65535&B,!((O=B>>>24)<=b);){if(0===g)break e;g--,y+=p[h++]<>D)])>>>16&255,T=65535&B,!(D+(O=B>>>24)<=b);){if(0===g)break e;g--,y+=p[h++]<>>=D,b-=D,n.back+=D}if(y>>>=O,b-=O,n.back+=O,n.length=T,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=u;break}if(64&E){e.msg="invalid literal/length code",n.mode=c;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(F=n.extra;b>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(B=n.distcode[y&(1<>>16&255,T=65535&B,!((O=B>>>24)<=b);){if(0===g)break e;g--,y+=p[h++]<>D)])>>>16&255,T=65535&B,!(D+(O=B>>>24)<=b);){if(0===g)break e;g--,y+=p[h++]<>>=D,b-=D,n.back+=D}if(y>>>=O,b-=O,n.back+=O,64&E){e.msg="invalid distance code",n.mode=c;break}n.offset=T,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(F=n.extra;b>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=c;break}n.mode=25;case 25:if(0===v)break e;if(A=C-v,n.offset>A){if((A=n.offset-A)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=c;break}A>n.wnext?(A-=n.wnext,P=n.wsize-A):P=n.wnext-A,A>n.length&&(A=n.length),_=n.window}else _=f,P=m-n.offset,A=n.length;A>v&&(A=v),v-=A,n.length-=A;do{f[m++]=_[P++]}while(--A);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;f[m++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;b<32;){if(0===g)break e;g--,y|=p[h++]<=1&&0===R[_];_--);if(O>_&&(O=_),0===_)return u[c++]=20971520,u[c++]=20971520,p.bits=1,0;for(P=1;P<_&&0===R[P];P++);for(O0&&(0===e||1!==_))return-1;for(F[1]=0,C=1;C<15;C++)F[C+1]=F[C]+R[C];for(A=0;A852||2===e&&I>592)return 1;for(;;){b=C-T,d[A]y?(w=B[L+d[A]],x=M[N+d[A]]):(w=96,x=0),f=1<>T)+(h-=f)]=b<<24|w<<16|x|0}while(0!==h);for(f=1<>=1;if(0!==f?(k&=f-1,k+=f):k=0,A++,0==--R[C]){if(C===_)break;C=t[n+d[A]]}if(C>O&&(k&g)!==m){for(0===T&&(T=O),v+=P,D=1<<(E=C-T);E+T<_&&!((D-=R[E+T])<=0);)E++,D<<=1;if(I+=1<852||2===e&&I>592)return 1;u[m=k&g]=O<<24|E<<16|v-c|0}}return 0!==k&&(u[v+k]=C-T<<24|64<<16|0),p.bits=O,0}},1750:function(e){"use strict";e.exports={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"}},4286:function(e,t,n){"use strict";var r=n(3231);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=[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],a=[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=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var c=new Array(60);i(c);var d=new Array(512);i(d);var p=new Array(256);i(p);var f=new Array(29);i(f);var h,m,g,v=new Array(30);function y(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e<256?d[e]:d[256+(e>>>7)]}function x(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function S(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 P(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=A(o[s]++,s))}}function _(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 O(e){e.bi_valid>8?x(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 E(e,t,n,r){var i=2*t,o=2*n;return e[i]>1;n>=1;n--)T(e,o,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,T(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,h=t.stat_desc.max_length,m=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=l[2*l[2*(r=e.heap[n])+1]+1]+1)>h&&(o=h,m++),l[2*r+1]=o,r>u||(e.bl_count[o]++,a=0,r>=f&&(a=p[r-f]),s=l[2*r],e.opt_len+=s*(o+a),d&&(e.static_len+=s*(c[2*r+1]+a)));if(0!==m){do{for(o=h-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[h]--,m-=2}while(m>0);for(o=h;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>u||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),r--)}}(e,t),P(o,u,e.bl_count)}function k(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s>=7;r<30;r++)for(v[r]=i<<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)),I(e,e.l_desc),I(e,e.d_desc),a=function(e){var t;for(k(e,e.dyn_ltree,e.l_desc.max_code),k(e,e.dyn_dtree,e.d_desc.max_code),I(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?R(e,t,n,r):4===e.strategy||o===i?(S(e,2+(r?1:0),3),D(e,u,c)):(S(e,4+(r?1:0),3),function(e,t,n,r){var i;for(S(e,t-257,5),S(e,n-1,5),S(e,r-4,4),i=0;i>>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*(p[n]+256+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){S(e,2,3),C(e,256,u),function(e){16===e.bi_valid?(x(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)}},8495:function(e){"use strict";e.exports=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}},3389:function(e,t,n){"use strict";var r=n(5705);function i(){}var o={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==i&&f(this,e)}function c(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function p(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var a=h((function(){t(i,r)}));"error"===a.status&&r(a.value)}function h(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}e.exports=u,u.prototype.finally=function(e){if("function"!=typeof e)return this;var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))}))},u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(i);return this.state!==l?d(n,this.state===s?e:t,this.outcome):this.queue.push(new c(n,e,t)),n},c.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){o.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=h(p,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)f(e,r);else{e.state=s,e.outcome=t;for(var i=-1,a=e.queue.length;++i2?"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))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o,a,s,l;if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="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"))a="The ".concat(e," ").concat(i," ").concat(r(t,"type"));else{var u=("number"!=typeof l&&(l=0),l+".".length>(s=e).length||-1===s.indexOf(".",l)?"argument":"property");a='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(r(t,"type"))}return a+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:function(e,t,n){"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var i=n(9481),o=n(4229);n(5717)(u,i);for(var a=r(o.prototype),s=0;s0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),r)u.endEmitted?x(e,new w):_(e,u,t,!0);else if(u.ended)x(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?_(e,u,t,!1):I(e,u)):_(e,u,t,!1)}else r||(u.reading=!1,I(e,u));return!u.ended&&(u.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=O?e=O:(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 T(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(D,e))}function D(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,F(e)}function I(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(k,e,t))}function k(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){i("readable nexttick read 0"),e.read(0)}function R(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),F(e),t.flowing&&!t.reading&&e.read(0)}function F(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function B(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 L(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(V,t,e))}function V(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 j(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?L(this):T(this),null;if(0===(e=E(e,t))&&t.ended)return 0===t.length&&L(this),null;var r,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e0?B(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&&L(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(e){x(this,new b("_read()"))},A.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,i("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?h:s;function s(){i("onend"),e.end()}r.endEmitted?process.nextTick(a):n.once("end",a),e.on("unpipe",(function t(o,a){i("onunpipe"),o===n&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",p),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",d),e.removeListener("unpipe",t),n.removeListener("end",s),n.removeListener("end",h),n.removeListener("data",c),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,F(e))}}(n);e.on("drain",l);var u=!1;function c(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==j(r.pipes,e))&&!u&&(i("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function d(t){i("onerror",t),h(),e.removeListener("error",d),0===o(e,"error")&&x(e,t)}function p(){e.removeListener("finish",f),h()}function f(){i("onfinish"),e.removeListener("close",p),h()}function h(){i("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events.error?Array.isArray(e._events.error)?e._events.error.unshift(n):e._events.error=[n,e._events.error]:e.on(t,n)}(e,"error",d),e.once("close",p),e.once("finish",f),e.emit("pipe",n),r.flowing||(i("pipe resume"),n.resume()),e},A.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,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,i("on readable",r.length,r.reading),r.length?T(this):r.reading||process.nextTick(N,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var n=a.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(M,this),n},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(M,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(R,e,t))}(this,e)),e.paused=!1,this},A.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},A.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o 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(o){i("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new h("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,D(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=c.destroy,A.prototype._undestroy=c.undestroy,A.prototype._destroy=function(e,t){t(e)}},5850:function(e,t,n){"use strict";var r;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 o=n(8610),a=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),d=Symbol("handlePromise"),p=Symbol("stream");function f(e,t){return{value:e,done:t}}function h(e){var t=e[a];if(null!==t){var n=e[p].read();null!==n&&(e[c]=null,e[a]=null,e[s]=null,t(f(n,!1)))}}function m(e){process.nextTick(h,e)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(r={get stream(){return this[p]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(f(void 0,!0));if(this[p].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[l]?n(e[l]):t(f(void 0,!0))}))}));var n,r=this[c];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[d](n,r)}),r)}}(r,this));else{var i=this[p].read();if(null!==i)return Promise.resolve(f(i,!1));n=new Promise(this[d])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[p].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),g);e.exports=function(e){var t,n=Object.create(v,(i(t={},p,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,l,{value:null,writable:!0}),i(t,u,{value:e._readableState.endEmitted,writable:!0}),i(t,d,{value:function(e,t){var r=n[p].read();r?(n[c]=null,n[a]=null,n[s]=null,e(f(r,!1))):(n[a]=e,n[s]=t)},writable:!0}),t));return n[c]=null,o(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[s];return null!==t&&(n[c]=null,n[a]=null,n[s]=null,t(e)),void(n[l]=e)}var r=n[a];null!==r&&(n[c]=null,n[a]=null,n[s]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",m.bind(null,n)),n}},7327:function(e,t,n){"use strict";function r(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 o=n(8764).Buffer,a=n(2361).inspect,s=a&&a.custom||"inspect";e.exports=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 o.alloc(0);for(var t,n,r,i=o.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=i,r=s,o.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return i},t.consume=function(e,t){var n;return ei.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++n}return this.length-=n,r},t._getBuffer=function(e){var t=o.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var i=n.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0==(e-=a)){a===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(a));break}++r}return this.length-=r,t},t[s]=function(e,t){return a(this,function(e){for(var t=1;t0,(function(e){r||(r=e),e&&a.forEach(u),o||(a.forEach(u),i(r))}))}));return t.reduce(c)}},2457:function(e,t,n){"use strict";var r=n(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,i){var o=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},2503:function(e,t,n){e.exports=n(7187).EventEmitter},9509:function(e,t,n){var r=n(8764),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},6377:function(e,t,n){var r=n(4832),i=n(8652),o=n(801),a=n(2030),s=n(3618),l=n(9049),u=n(1971);u.alea=r,u.xor128=i,u.xorwow=o,u.xorshift7=a,u.xor4096=s,u.tychei=l,e.exports=u},4832:function(e,t,n){var r;!function(e,i,o){function a(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n>>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 s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function l(e,t){var n=new a(e),r=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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.alea=l}(0,e=n.nmd(e),n.amdD)},9049:function(e,t,n){var r;!function(e,i,o){function a(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,i=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.tychei=l}(0,e=n.nmd(e),n.amdD)},8652:function(e,t,n){var r;!function(e,i,o){function a(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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xor128=l}(0,e=n.nmd(e),n.amdD)},3618:function(e,t,n){var r;!function(e,i,o){function a(e){var t=this;t.next=function(){var e,n,r=t.w,i=t.X,o=t.i;return t.w=r=r+1640531527|0,n=i[o+34&127],e=i[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=i[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,i,o,a,s=[],l=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,l=Math.max(l,t.length)),i=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(a=a+1640531527|0,i=0==(n=s[127&o]^=r+a)?i+1:0);for(i>=128&&(s[127&(t&&t.length||0)]=-1),i=127,o=512;o>0;--o)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;e.w=a,e.X=s,e.i=i}(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function l(e,t){null==e&&(e=+new Date);var n=new a(e),r=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,r&&(r.X&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xor4096=l}(0,e=n.nmd(e),n.amdD)},2030:function(e,t,n){var r;!function(e,i,o){function a(e){var t=this;t.next=function(){var e,n,r=t.x,i=t.i;return e=r[i],n=(e^=e>>>7)^e<<24,n^=(e=r[i+1&7])^e>>>10,n^=(e=r[i+3&7])^e>>>3,n^=(e=r[i+4&7])^e<<7,e=r[i+7&7],n^=(e^=e<<13)^e<<9,r[i]=n,t.i=i+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 s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function l(e,t){null==e&&(e=+new Date);var n=new a(e),r=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,r&&(r.x&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xorshift7=l}(0,e=n.nmd(e),n.amdD)},801:function(e,t,n){var r;!function(e,i,o){function a(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 s(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 l(e,t){var n=new a(e),r=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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xorwow=l}(0,e=n.nmd(e),n.amdD)},1971:function(e,t,n){var r;!function(i,o,a){var s,l=256,u=a.pow(l,6),c=a.pow(2,52),d=2*c,p=255;function f(e,t,n){var r=[],p=v(g((t=1==t?{entropy:!0}:t||{}).entropy?[e,y(o)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(l):(e=new Uint8Array(l),(i.crypto||i.msCrypto).getRandomValues(e)),y(e)}catch(e){var t=i.navigator,n=t&&t.plugins;return[+new Date,i,n,i.screen,y(o)]}}():e,3),r),f=new h(r),b=function(){for(var e=f.g(6),t=u,n=0;e=d;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return 0|f.g(4)},b.quick=function(){return f.g(4)/4294967296},b.double=b,v(y(f.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&m(r,f),e.state=function(){return m(f,{})}),n?(a.random=e,t):e})(b,p,"global"in t?t.global:this==a,t.state)}function h(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i 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\nbool valueWithinScalarRange(vec4 val, vec4 min, vec4 max) {\n bool withinRange = false;\n #if vtkNumComponents == 1\n if (val.r >= min.r && val.r <= max.r) {\n withinRange = true;\n }\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents == 2\n if (val.r >= min.r && val.r <= max.r &&\n val.g >= min.g && val.g <= max.g) {\n withinRange = true;\n }\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 3\n if (all(greaterThanEqual(val, ipScalarRangeMin)) &&\n all(lessThanEqual(val, ipScalarRangeMax))) {\n withinRange = true;\n }\n #endif\n return withinRange;\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 || vtkBlendMode == 4 //AVERAGE_INTENSITY_BLEND || ADDITIVE_BLEND\n vec4 ipScalarRangeMin = vec4 (\n //VTK::IPScalarRangeMin,\n //VTK::IPScalarRangeMin,\n //VTK::IPScalarRangeMin,\n //VTK::IPScalarRangeMax);\n vec4 ipScalarRangeMax = vec4(\n //VTK::IPScalarRangeMax,\n //VTK::IPScalarRangeMax,\n //VTK::IPScalarRangeMax,\n //VTK::IPScalarRangeMax);\n\n vec4 sum = vec4(0.);\n\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\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 if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n // Sum the values across each step in the path\n sum += tValue;\n }\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 IPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n #if vtkBlendMode == 3 // Average\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n #endif\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"},3123:function(e){e.exports="//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 vertexDC;\n\nvarying vec3 vertexVCVSOutput;\nuniform mat4 PCVCMatrix;\n\nuniform float dcxmin;\nuniform float dcxmax;\nuniform float dcymin;\nuniform float dcymax;\n\nvoid main()\n{\n // dcsmall is the device coords reduced to the\n // x y area covered by the volume\n vec4 dcsmall = vec4(\n dcxmin + 0.5 * (vertexDC.x + 1.0) * (dcxmax - dcxmin),\n dcymin + 0.5 * (vertexDC.y + 1.0) * (dcymax - dcymin),\n vertexDC.z,\n vertexDC.w);\n vec4 vcpos = PCVCMatrix * dcsmall;\n vertexVCVSOutput = vcpos.xyz/vcpos.w;\n gl_Position = dcsmall;\n}\n"},2830:function(e,t,n){e.exports=i;var r=n(7187).EventEmitter;function i(){r.call(this)}n(46)(i,r),i.Readable=n(9481),i.Writable=n(4229),i.Duplex=n(6753),i.Transform=n(4605),i.PassThrough=n(2725),i.finished=n(8610),i.pipeline=n(9946),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},46:function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},2553:function(e,t,n){"use strict";var r=n(9509).Buffer,i=r.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}};function o(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&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=d,t=3;break;default:return this.write=p,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(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 l(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 u(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 c(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 d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.s=o,o.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?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):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)},o.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}},3379:function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function a(e){for(var t=-1,n=0;n1&&void 0!==arguments[1]?arguments[1]:null,n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments[3];return new Promise((function(o,a){var s=n._messageId++;n._messages.set(s,[o,a,i]),n._worker.postMessage([s,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(i,o){var a=t._messageId++;t._messages.set(a,[i,o,r]),t._worker.postMessage([a,e],n||[])}))}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(211);t.FixedSizeSet=i.FixedSizeSet;var o=n(212);t.ObjectCache=o.ObjectCache;var a=n(213);t.CompareCache=a.CompareCache;var s=n(214);t.Lazy=s.Lazy;var l=n(215);function u(e,t,n){if(m(e))e.forEach((function(e,r){return t.call(n,r,e)}));else for(var r in e)e.hasOwnProperty(r)&&t.call(n,r,e[r])}function c(e){var t,n;if(d(e))return e;if(f(e)){var i=[];try{for(var o=r(e),a=o.next();!a.done;a=o.next()){var s=a.value;i.push(c(s))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}if(p(e)){for(var l in i={},e)if(e.hasOwnProperty(l)){var u=e[l];i[l]=c(u)}return i}return e}function d(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function p(e){var t=typeof e;return!!e&&("function"===t||"object"===t)}function f(e){return Array.isArray(e)}function h(e){return e instanceof Set}function m(e){return e instanceof Map}function g(e){if(p(e)){var t=Object.getPrototypeOf(e),n=t.constructor;return t&&n&&"function"==typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)}return!1}t.StringWalker=l.StringWalker,t.applyMixin=function(e,t){for(var n=[],r=2;r>6|192;else{if(i>55295&&i<56320){if(++r>=e.length)throw new Error("Incomplete surrogate pair.");var o=e.charCodeAt(r);if(o<56320||o>57343)throw new Error("Invalid surrogate character.");i=65536+((1023&i)<<10)+(1023&o),t[n++]=i>>18|240,t[n++]=i>>12&63|128}else t[n++]=i>>12|224;t[n++]=i>>6&63|128}t[n++]=63&i|128}}return t.subarray(0,n)},t.utf8Decode=function(e){for(var t="",n=0;n127)if(r>191&&r<224){if(n>=e.length)throw new Error("Incomplete 2-byte sequence.");r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length)throw new Error("Incomplete 3-byte sequence.");r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248))throw new Error("Unknown multi-byte start.");if(n+2>=e.length)throw new Error("Incomplete 4-byte sequence.");r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}if(r<=65535)t+=String.fromCharCode(r);else{if(!(r<=1114111))throw new Error("Code point exceeds UTF-16 limit.");r-=65536,t+=String.fromCharCode(r>>10|55296),t+=String.fromCharCode(1023&r|56320)}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Before=0]="Before",e[e.Equal=1]="Equal",e[e.After=2]="After"}(t.BoundaryPosition||(t.BoundaryPosition={})),function(e){e[e.None=0]="None",e[e.Capturing=1]="Capturing",e[e.AtTarget=2]="AtTarget",e[e.Bubbling=3]="Bubbling"}(t.EventPhase||(t.EventPhase={})),function(e){e[e.Element=1]="Element",e[e.Attribute=2]="Attribute",e[e.Text=3]="Text",e[e.CData=4]="CData",e[e.EntityReference=5]="EntityReference",e[e.Entity=6]="Entity",e[e.ProcessingInstruction=7]="ProcessingInstruction",e[e.Comment=8]="Comment",e[e.Document=9]="Document",e[e.DocumentType=10]="DocumentType",e[e.DocumentFragment=11]="DocumentFragment",e[e.Notation=12]="Notation"}(t.NodeType||(t.NodeType={})),function(e){e[e.Disconnected=1]="Disconnected",e[e.Preceding=2]="Preceding",e[e.Following=4]="Following",e[e.Contains=8]="Contains",e[e.ContainedBy=16]="ContainedBy",e[e.ImplementationSpecific=32]="ImplementationSpecific"}(t.Position||(t.Position={})),function(e){e[e.Accept=1]="Accept",e[e.Reject=2]="Reject",e[e.Skip=3]="Skip"}(t.FilterResult||(t.FilterResult={})),function(e){e[e.All=4294967295]="All",e[e.Element=1]="Element",e[e.Attribute=2]="Attribute",e[e.Text=4]="Text",e[e.CDataSection=8]="CDataSection",e[e.EntityReference=16]="EntityReference",e[e.Entity=32]="Entity",e[e.ProcessingInstruction=64]="ProcessingInstruction",e[e.Comment=128]="Comment",e[e.Document=256]="Document",e[e.DocumentType=512]="DocumentType",e[e.DocumentFragment=1024]="DocumentFragment",e[e.Notation=2048]="Notation"}(t.WhatToShow||(t.WhatToShow={})),function(e){e[e.StartToStart=0]="StartToStart",e[e.StartToEnd=1]="StartToEnd",e[e.EndToEnd=2]="EndToEnd",e[e.EndToStart=3]="EndToStart"}(t.HowToCompare||(t.HowToCompare={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(240);t.Cast=r.Cast;var i=n(150);t.Guard=i.Guard;var o=n(241);t.EmptySet=o.EmptySet},function(e,t,n){var r=n(11),i=n(55).f,o=n(21),a=n(25),s=n(79),l=n(118),u=n(122);e.exports=function(e,t){var n,c,d,p,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(c in t){if(p=t[c],d=e.noTargetGet?(f=i(n,c))&&f.value:n[c],!u(m?c:h+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},function(e,t,n){var r=n(11),i=n(80),o=n(14),a=n(58),s=n(85),l=n(123),u=i("wks"),c=r.Symbol,d=l?c:c&&c.withoutSetter||a;e.exports=function(e){return o(u,e)||(s&&o(c,e)?u[e]=c[e]:u[e]=d("Symbol."+e)),u[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(29),o=function(){function e(){this._features={mutationObservers:!0,customElements:!0,slots:!0,steps:!0},this._window=null,this._compareCache=new r.CompareCache,this._rangeList=new r.FixedSizeSet}return e.prototype.setFeatures=function(e){if(void 0===e&&(e=!0),r.isObject(e))for(var t in e)this._features[t]=e[t]||!1;else for(var t in this._features)this._features[t]=e},Object.defineProperty(e.prototype,"features",{get:function(){return this._features},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return null===this._window&&(this._window=i.create_window()),this._window},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"compareCache",{get:function(){return this._compareCache},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeList",{get:function(){return this._rangeList},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return e._instance||(e._instance=new e),e._instance},enumerable:!0,configurable:!0}),e}();t.dom=o.instance},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(227));t.base64=i;var o=r(n(146));t.byte=o;var a=r(n(147));t.byteSequence=a;var s=r(n(95));t.codePoint=s;var l=r(n(231));t.json=l;var u=r(n(232));t.list=u;var c=r(n(233));t.map=c;var d=r(n(234));t.namespace=d;var p=r(n(235));t.queue=p;var f=r(n(236));t.set=f;var h=r(n(237));t.stack=h;var m=r(n(238));t.string=m},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){void 0===n&&(n="");var r=e.call(this,n)||this;return r.name=t,r}return i(t,e),t}(Error);t.DOMException=o;var a=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"DOMStringSizeError",t)||this}return i(t,e),t}(o);t.DOMStringSizeError=a;var s=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"WrongDocumentError","The object is in the wrong document. "+t)||this}return i(t,e),t}(o);t.WrongDocumentError=s;var l=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NoDataAllowedError",t)||this}return i(t,e),t}(o);t.NoDataAllowedError=l;var u=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NoModificationAllowedError","The object can not be modified. "+t)||this}return i(t,e),t}(o);t.NoModificationAllowedError=u;var c=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotSupportedError","The operation is not supported. "+t)||this}return i(t,e),t}(o);t.NotSupportedError=c;var d=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InUseAttributeError",t)||this}return i(t,e),t}(o);t.InUseAttributeError=d;var p=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidStateError","The object is in an invalid state. "+t)||this}return i(t,e),t}(o);t.InvalidStateError=p;var f=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidModificationError","The object can not be modified in this way. "+t)||this}return i(t,e),t}(o);t.InvalidModificationError=f;var h=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NamespaceError","The operation is not allowed by Namespaces in XML. [XMLNS] "+t)||this}return i(t,e),t}(o);t.NamespaceError=h;var m=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidAccessError","The object does not support the operation or argument. "+t)||this}return i(t,e),t}(o);t.InvalidAccessError=m;var g=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"ValidationError",t)||this}return i(t,e),t}(o);t.ValidationError=g;var v=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"TypeMismatchError",t)||this}return i(t,e),t}(o);t.TypeMismatchError=v;var y=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"SecurityError","The operation is insecure. "+t)||this}return i(t,e),t}(o);t.SecurityError=y;var b=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NetworkError","A network error occurred. "+t)||this}return i(t,e),t}(o);t.NetworkError=b;var w=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"AbortError","The operation was aborted. "+t)||this}return i(t,e),t}(o);t.AbortError=w;var x=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"URLMismatchError","The given URL does not match another URL. "+t)||this}return i(t,e),t}(o);t.URLMismatchError=x;var S=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"QuotaExceededError","The quota has been exceeded. "+t)||this}return i(t,e),t}(o);t.QuotaExceededError=S;var C=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"TimeoutError","The operation timed out. "+t)||this}return i(t,e),t}(o);t.TimeoutError=C;var A=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidNodeTypeError","The supplied node is incorrect or has an incorrect ancestor for this operation. "+t)||this}return i(t,e),t}(o);t.InvalidNodeTypeError=A;var P=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"DataCloneError","The object can not be cloned. "+t)||this}return i(t,e),t}(o);t.DataCloneError=P;var _=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotImplementedError","The DOM method is not implemented by this module. "+t)||this}return i(t,e),t}(o);t.NotImplementedError=_;var O=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"HierarchyRequestError","The operation would yield an incorrect node tree. "+t)||this}return i(t,e),t}(o);t.HierarchyRequestError=O;var E=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotFoundError","The object can not be found here. "+t)||this}return i(t,e),t}(o);t.NotFoundError=E;var T=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"IndexSizeError","The index is not in the allowed range. "+t)||this}return i(t,e),t}(o);t.IndexSizeError=T;var D=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"SyntaxError","The string did not match the expected pattern. "+t)||this}return i(t,e),t}(o);t.SyntaxError=D;var I=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidCharacterError","The string contains invalid characters. "+t)||this}return i(t,e),t}(o);t.InvalidCharacterError=I},function(e,t,n){"use strict";var r=n(53),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(77))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.idl_defineConst=function(e,t,n){Object.defineProperty(e,t,{writable:!1,enumerable:!0,configurable:!1,value:n})}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(16),i=n(114),o=n(18),a=n(56),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(8);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(2);function a(e,t,n){if(void 0===n&&(n=!1),n&&i.Guard.isElementNode(t)&&i.Guard.isShadowRoot(t.shadowRoot)&&t.shadowRoot._firstChild)return t.shadowRoot._firstChild;if(t._firstChild)return t._firstChild;if(t===e)return null;if(t._nextSibling)return t._nextSibling;for(var r=t._parent;r&&r!==e;){if(r._nextSibling)return r._nextSibling;r=r._parent}return null}function s(){var e;return(e={})[Symbol.iterator]=function(){return{next:function(){return{done:!0,value:null}}}},e}function l(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);for(var i=t?e:a(e,e,n);i&&r&&!r(i);)i=a(e,i,n);return i}function u(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var o=a(e,t,r);o&&i&&!i(o);)o=a(e,o,r);return o}function c(e,t,n,r){var i;return void 0===t&&(t=!1),void 0===n&&(n=!1),t||0!==e._children.size?((i={})[Symbol.iterator]=function(){var i=t?e:a(e,e,n);return{next:function(){for(;i&&r&&!r(i);)i=a(e,i,n);if(null===i)return{done:!0,value:null};var t={done:!1,value:i};return i=a(e,i,n),t}}},i):s()}function d(e,t,n){void 0===t&&(t=!1);for(var r=t?e:e._parent;r&&n&&!n(r);)r=r._parent;return r}function p(e,t,n,r){void 0===n&&(n=!1);for(var i=t._parent;i&&r&&!r(i);)i=i._parent;return i}function f(e){return i.Guard.isDocumentTypeNode(e)?0:i.Guard.isCharacterDataNode(e)?e._data.length:e._children.size}function h(e,t){if(void 0===t&&(t=!1),t){var n=h(e,!1);return i.Guard.isShadowRoot(n)?h(n._host,!0):n}return e._parent?h(e._parent):e}function m(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var o=n?e:r&&i.Guard.isShadowRoot(e)?e._host:e._parent;null!==o;){if(o===t)return!0;o=r&&i.Guard.isShadowRoot(o)?o._host:o._parent}return!1}function g(e){for(var t=h(e),n=0,r=l(t);null!==r;){if(n++,r===e)return n;r=u(t,r)}return-1}t.tree_getFirstDescendantNode=l,t.tree_getNextDescendantNode=u,t.tree_getDescendantNodes=c,t.tree_getDescendantElements=function(e,t,n,r){var o;return void 0===t&&(t=!1),void 0===n&&(n=!1),t||0!==e._children.size?((o={})[Symbol.iterator]=function(){var o=c(e,t,n,(function(e){return i.Guard.isElementNode(e)}))[Symbol.iterator](),a=o.next().value;return{next:function(){for(;a&&r&&!r(a);)a=o.next().value;if(null===a)return{done:!0,value:null};var e={done:!1,value:a};return a=o.next().value,e}}},o):s()},t.tree_getSiblingNodes=function(e,t,n){var r;return void 0===t&&(t=!1),e._parent&&0!==e._parent._children.size?((r={})[Symbol.iterator]=function(){var r=e._parent?e._parent._firstChild:null;return{next:function(){for(;r&&(n&&!n(r)||!t&&r===e);)r=r._nextSibling;if(null===r)return{done:!0,value:null};var i={done:!1,value:r};return r=r._nextSibling,i}}},r):s()},t.tree_getFirstAncestorNode=d,t.tree_getNextAncestorNode=p,t.tree_getAncestorNodes=function(e,t,n){var r;return void 0===t&&(t=!1),t||e._parent?((r={})[Symbol.iterator]=function(){var r=d(e,t,n);return{next:function(){if(null===r)return{done:!0,value:null};var e={done:!1,value:r};return r=p(0,r,t,n),e}}},r):s()},t.tree_getCommonAncestor=function(e,t){if(e===t)return e._parent;for(var n=[],r=[],i=d(e,!0);null!==i;)n.push(i),i=p(0,i,!0);for(var o=d(t,!0);null!==o;)r.push(o),o=p(0,o,!0);for(var a=n.length,s=r.length,l=null,u=Math.min(a,s);u>0;u--){var c=n[--a];if(c!==r[--s])break;l=c}return l},t.tree_getFollowingNode=function(e,t){if(t._firstChild)return t._firstChild;if(t._nextSibling)return t._nextSibling;for(;;){var n=t._parent;if(null===n||n===e)return null;if(n._nextSibling)return n._nextSibling;t=n}},t.tree_getPrecedingNode=function(e,t){return t===e?null:t._previousSibling?(t=t._previousSibling)._lastChild?t._lastChild:t:t._parent},t.tree_isConstrained=function e(t){var n,i,a,s,l,u;switch(t._nodeType){case o.NodeType.Document:var c=!1,d=!1;try{for(var p=r(t._children),f=p.next();!f.done;f=p.next())switch(f.value._nodeType){case o.NodeType.ProcessingInstruction:case o.NodeType.Comment:break;case o.NodeType.DocumentType:if(c||d)return!1;c=!0;break;case o.NodeType.Element:if(d)return!1;d=!0;break;default:return!1}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}break;case o.NodeType.DocumentFragment:case o.NodeType.Element:try{for(var h=r(t._children),m=h.next();!m.done;m=h.next())switch(m.value._nodeType){case o.NodeType.Element:case o.NodeType.Text:case o.NodeType.ProcessingInstruction:case o.NodeType.CData:case o.NodeType.Comment:break;default:return!1}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}break;case o.NodeType.DocumentType:case o.NodeType.Text:case o.NodeType.ProcessingInstruction:case o.NodeType.CData:case o.NodeType.Comment:return!t.hasChildNodes()}try{for(var g=r(t._children),v=g.next();!v.done;v=g.next())if(!e(v.value))return!1}catch(e){l={error:e}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}return!0},t.tree_nodeLength=f,t.tree_isEmpty=function(e){return 0===f(e)},t.tree_rootNode=h,t.tree_isDescendantOf=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var i=l(e,n,r);null!==i;){if(i===t)return!0;i=u(e,i,n,r)}return!1},t.tree_isAncestorOf=m,t.tree_isHostIncludingAncestorOf=function e(t,n,r){if(void 0===r&&(r=!1),m(t,n,r))return!0;var o=h(t);return!(!i.Guard.isDocumentFragmentNode(o)||null===o._host||!e(o._host,n,r))},t.tree_isSiblingOf=function(e,t,n){return void 0===n&&(n=!1),e!==t?null!==e._parent&&e._parent===t._parent:!!n},t.tree_isPreceding=function(e,t){var n=g(e),r=g(t);return-1!==n&&-1!==r&&h(e)===h(t)&&rn},t.tree_isParentOf=function(e,t){return e._parent===t},t.tree_isChildOf=function(e,t){return t._parent===e},t.tree_previousSibling=function(e){return e._previousSibling},t.tree_nextSibling=function(e){return e._nextSibling},t.tree_firstChild=function(e){return e._firstChild},t.tree_lastChild=function(e){return e._lastChild},t.tree_treePosition=g,t.tree_index=function(e){for(var t=0;null!==e._previousSibling;)t++,e=e._previousSibling;return t},t.tree_retarget=function(e,t){for(;;){if(!e||!i.Guard.isNode(e))return e;var n=h(e);if(!i.Guard.isShadowRoot(n))return e;if(t&&i.Guard.isNode(t)&&m(n,t,!0,!0))return e;e=n.host}}},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(24),i=n(129),o=n(49),a=n(43),s=n(87),l=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(89),i=n(25),o=n(201);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,n){var r=n(16),i=n(15),o=n(40);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(136).charAt,i=n(43),o=n(87),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(11),i=n(202),o=n(19),a=n(21),s=n(5),l=s("iterator"),u=s("toStringTag"),c=o.values;for(var d in i){var p=r[d],f=p&&p.prototype;if(f){if(f[l]!==c)try{a(f,l,c)}catch(e){f[l]=c}if(f[u]||a(f,u,d),i[d])for(var h in o)if(f[h]!==o[h])try{a(f,h,o[h])}catch(e){f[h]=o[h]}}}},function(e,t,n){var r=n(41),i=n(35);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(11),i=n(21),o=n(14),a=n(79),s=n(116),l=n(43),u=l.get,c=l.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var l=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),c(n).source=d.join("string"==typeof t?t:"")),e!==r?(l?!p&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},function(e,t,n){var r=n(47),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(35);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(16),i=n(8),o=n(14),a=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var n=[][e],u=!!o(t,"ACCESSORS")&&t.ACCESSORS,c=o(t,0)?t[0]:l,d=o(t,1)?t[1]:void 0;return s[e]=!!n&&!i((function(){if(u&&!r)return!0;var e={length:-1};u?a(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,c,d)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(148),i=n(149),o=n(151),a=n(97),s=n(153),l=n(154),u=n(155),c=n(98),d=n(99),p=n(156),f=n(157),h=n(100),m=n(158),g=n(159),v=n(160),y=n(161),b=n(162),w=n(163),x=n(164),S=n(165),C=n(166),A=n(167),P=n(168),_=n(169),O=n(170);t.create_domImplementation=function(e){return r.DOMImplementationImpl._create(e)},t.create_window=function(){return i.WindowImpl._create()},t.create_xmlDocument=function(){return new o.XMLDocumentImpl},t.create_document=function(){return new a.DocumentImpl},t.create_abortController=function(){return new s.AbortControllerImpl},t.create_abortSignal=function(){return l.AbortSignalImpl._create()},t.create_documentType=function(e,t,n,r){return u.DocumentTypeImpl._create(e,t,n,r)},t.create_element=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_htmlElement=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_htmlUnknownElement=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_documentFragment=function(e){return d.DocumentFragmentImpl._create(e)},t.create_shadowRoot=function(e,t){return p.ShadowRootImpl._create(e,t)},t.create_attr=function(e,t){return f.AttrImpl._create(e,t)},t.create_text=function(e,t){return h.TextImpl._create(e,t)},t.create_cdataSection=function(e,t){return m.CDATASectionImpl._create(e,t)},t.create_comment=function(e,t){return g.CommentImpl._create(e,t)},t.create_processingInstruction=function(e,t,n){return v.ProcessingInstructionImpl._create(e,t,n)},t.create_htmlCollection=function(e,t){return void 0===t&&(t=function(){return!0}),y.HTMLCollectionImpl._create(e,t)},t.create_nodeList=function(e){return b.NodeListImpl._create(e)},t.create_nodeListStatic=function(e,t){return w.NodeListStaticImpl._create(e,t)},t.create_namedNodeMap=function(e){return x.NamedNodeMapImpl._create(e)},t.create_range=function(e,t){return S.RangeImpl._create(e,t)},t.create_nodeIterator=function(e,t,n){return C.NodeIteratorImpl._create(e,t,n)},t.create_treeWalker=function(e,t){return A.TreeWalkerImpl._create(e,t)},t.create_nodeFilter=function(){return P.NodeFilterImpl._create()},t.create_mutationRecord=function(e,t,n,r,i,o,a,s,l){return _.MutationRecordImpl._create(e,t,n,r,i,o,a,s,l)},t.create_domTokenList=function(e,t){return O.DOMTokenListImpl._create(e,t)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(17),a=n(3),s=n(71),l=new Map;function u(e,t){if(t!==e._root&&o.tree_isAncestorOf(e._reference,t,!0)){if(e._pointerBeforeReference)for(;;){var n=o.tree_getFollowingNode(e._root,t);if(null!==n&&o.tree_isDescendantOf(e._root,n,!0)&&!o.tree_isDescendantOf(t,n,!0))return void(e._reference=n);if(null===n)return void(e._pointerBeforeReference=!1)}if(null===t._previousSibling)null!==t._parent&&(e._reference=t._parent);else{for(var r=t._previousSibling,i=o.tree_getFirstDescendantNode(t._previousSibling,!0,!1);null!==i;)null!==i&&(r=i),i=o.tree_getNextDescendantNode(t._previousSibling,i,!0,!1);e._reference=r}}}function c(e,t,n,r,i){if(a.Guard.isSlot(e)&&"name"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,s.shadowTree_assignSlotablesForATree(o.tree_rootNode(e))}}function d(e,t,n,r,i){if(a.Guard.isSlotable(e)&&"slot"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,s.shadowTree_isAssigned(e)&&s.shadowTree_assignSlotables(e._assignedSlot),s.shadowTree_assignASlot(e)}}function p(e,t,n,r){"id"===t&&null===r&&(e._uniqueIdentifier=n||void 0)}t.dom_runRemovingSteps=function(e,t){},t.dom_runCloningSteps=function(e,t,n,r){},t.dom_runAdoptingSteps=function(e,t){},t.dom_runAttributeChangeSteps=function(e,t,n,o,a){var s,l;i.dom.features.slots&&(d.call(e,e,t,n,o,a),c.call(e,e,t,n,o,a)),p.call(e,e,t,o,a);try{for(var u=r(e._attributeChangeSteps),f=u.next();!f.done;f=u.next())f.value.call(e,e,t,n,o,a)}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=u.return)&&l.call(u)}finally{if(s)throw s.error}}},t.dom_runInsertionSteps=function(e){},t.dom_runNodeIteratorPreRemovingSteps=function(e,t){u.call(e,e,t)},t.dom_hasSupportedTokens=function(e){return l.has(e)},t.dom_getSupportedTokens=function(e){return l.get(e)||new Set},t.dom_runEventConstructingSteps=function(e){},t.dom_runChildTextContentChangeSteps=function(e){}},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(46),a=n(44),s=n(16),l=n(85),u=n(123),c=n(8),d=n(14),p=n(59),f=n(13),h=n(18),m=n(27),g=n(24),v=n(56),y=n(40),b=n(60),w=n(61),x=n(81),S=n(189),C=n(84),A=n(55),P=n(15),_=n(78),O=n(21),E=n(25),T=n(80),D=n(57),I=n(45),k=n(58),M=n(5),N=n(124),R=n(125),F=n(62),B=n(43),L=n(36).forEach,V=D("hidden"),j=M("toPrimitive"),U=B.set,G=B.getterFor("Symbol"),z=Object.prototype,W=i.Symbol,H=o("JSON","stringify"),K=A.f,q=P.f,X=S.f,Y=_.f,Z=T("symbols"),J=T("op-symbols"),Q=T("string-to-symbol-registry"),$=T("symbol-to-string-registry"),ee=T("wks"),te=i.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=s&&c((function(){return 7!=b(q({},"a",{get:function(){return q(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=K(z,t);r&&delete z[t],q(e,t,n),r&&e!==z&&q(z,t,r)}:q,ie=function(e,t){var n=Z[e]=b(W.prototype);return U(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},oe=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof W},ae=function(e,t,n){e===z&&ae(J,t,n),h(e);var r=v(t,!0);return h(n),d(Z,r)?(n.enumerable?(d(e,V)&&e[V][r]&&(e[V][r]=!1),n=b(n,{enumerable:y(0,!1)})):(d(e,V)||q(e,V,y(1,{})),e[V][r]=!0),re(e,r,n)):q(e,r,n)},se=function(e,t){h(e);var n=g(t),r=w(n).concat(de(n));return L(r,(function(t){s&&!le.call(n,t)||ae(e,t,n[t])})),e},le=function(e){var t=v(e,!0),n=Y.call(this,t);return!(this===z&&d(Z,t)&&!d(J,t))&&(!(n||!d(this,t)||!d(Z,t)||d(this,V)&&this[V][t])||n)},ue=function(e,t){var n=g(e),r=v(t,!0);if(n!==z||!d(Z,r)||d(J,r)){var i=K(n,r);return!i||!d(Z,r)||d(n,V)&&n[V][r]||(i.enumerable=!0),i}},ce=function(e){var t=X(g(e)),n=[];return L(t,(function(e){d(Z,e)||d(I,e)||n.push(e)})),n},de=function(e){var t=e===z,n=X(t?J:g(e)),r=[];return L(n,(function(e){!d(Z,e)||t&&!d(z,e)||r.push(Z[e])})),r};l||(E((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=k(e),n=function(e){this===z&&n.call(J,e),d(this,V)&&d(this[V],t)&&(this[V][t]=!1),re(this,t,y(1,e))};return s&&ne&&re(z,t,{configurable:!0,set:n}),ie(t,e)}).prototype,"toString",(function(){return G(this).tag})),E(W,"withoutSetter",(function(e){return ie(k(e),e)})),_.f=le,P.f=ae,A.f=ue,x.f=S.f=ce,C.f=de,N.f=function(e){return ie(M(e),e)},s&&(q(W.prototype,"description",{configurable:!0,get:function(){return G(this).description}}),a||E(z,"propertyIsEnumerable",le,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:W}),L(w(ee),(function(e){R(e)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=String(e);if(d(Q,t))return Q[t];var n=W(t);return Q[t]=n,$[n]=t,n},keyFor:function(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(d($,e))return $[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(e,t){return void 0===t?b(e):se(b(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ce,getOwnPropertySymbols:de}),r({target:"Object",stat:!0,forced:c((function(){C.f(1)}))},{getOwnPropertySymbols:function(e){return C.f(m(e))}}),H&&r({target:"JSON",stat:!0,forced:!l||c((function(){var e=W();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(f(t)||void 0!==e)&&!oe(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!oe(t))return t}),i[1]=t,H.apply(null,i)}}),W.prototype[j]||O(W.prototype,j,W.prototype.valueOf),F(W,"Symbol"),I[V]=!0},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(11),a=n(14),s=n(13),l=n(15).f,u=n(118),c=o.Symbol;if(i&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var d={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new c(e):void 0===e?c():c(e);return""===e&&(d[t]=!0),t};u(p,c);var f=p.prototype=c.prototype;f.constructor=p;var h=f.toString,m="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;l(f,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(d,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){n(125)("iterator")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(69),u=n(3),c=n(9),d=n(0),p=n(152),f=n(12),h=function(e){function t(){var t=e.call(this)||this;return t._parent=null,t._firstChild=null,t._lastChild=null,t._previousSibling=null,t._nextSibling=null,t}return i(t,e),Object.defineProperty(t.prototype,"_childNodes",{get:function(){return this.__childNodes||(this.__childNodes=d.create_nodeList(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_nodeDocument",{get:function(){return this._nodeDocumentOverride||a.dom.window._associatedDocument},set:function(e){this._nodeDocumentOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_registeredObserverList",{get:function(){return this.__registeredObserverList||(this.__registeredObserverList=[])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this._nodeType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeName",{get:function(){return u.Guard.isElementNode(this)?this._htmlUppercasedQualifiedName:u.Guard.isAttrNode(this)?this._qualifiedName:u.Guard.isExclusiveTextNode(this)?"#text":u.Guard.isCDATASectionNode(this)?"#cdata-section":u.Guard.isProcessingInstructionNode(this)?this._target:u.Guard.isCommentNode(this)?"#comment":u.Guard.isDocumentNode(this)?"#document":u.Guard.isDocumentTypeNode(this)?this._name:u.Guard.isDocumentFragmentNode(this)?"#document-fragment":""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"baseURI",{get:function(){return p.urlSerializer(this._nodeDocument._URL)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return u.Guard.isElementNode(this)&&d.shadowTree_isConnected(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this._nodeType===s.NodeType.Document?null:this._nodeDocument},enumerable:!0,configurable:!0}),t.prototype.getRootNode=function(e){return d.tree_rootNode(this,!!e&&e.composed)},Object.defineProperty(t.prototype,"parentNode",{get:function(){return this._nodeType===s.NodeType.Attribute?null:this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this._parent&&u.Guard.isElementNode(this._parent)?this._parent:null},enumerable:!0,configurable:!0}),t.prototype.hasChildNodes=function(){return null!==this._firstChild},Object.defineProperty(t.prototype,"childNodes",{get:function(){return this._childNodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._firstChild},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this._lastChild},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this._previousSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this._nextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return u.Guard.isAttrNode(this)?this._value:u.Guard.isCharacterDataNode(this)?this._data:null},set:function(e){null===e&&(e=""),u.Guard.isAttrNode(this)?d.attr_setAnExistingAttributeValue(this,e):u.Guard.isCharacterDataNode(this)&&d.characterData_replaceData(this,0,this._data.length,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textContent",{get:function(){return u.Guard.isDocumentFragmentNode(this)||u.Guard.isElementNode(this)?d.text_descendantTextContent(this):u.Guard.isAttrNode(this)?this._value:u.Guard.isCharacterDataNode(this)?this._data:null},set:function(e){null===e&&(e=""),u.Guard.isDocumentFragmentNode(this)||u.Guard.isElementNode(this)?d.node_stringReplaceAll(e,this):u.Guard.isAttrNode(this)?d.attr_setAnExistingAttributeValue(this,e):u.Guard.isCharacterDataNode(this)&&d.characterData_replaceData(this,0,d.tree_nodeLength(this),e)},enumerable:!0,configurable:!0}),t.prototype.normalize=function(){for(var e,t,n,r,i=[],s=d.tree_getFirstDescendantNode(this,!1,!1,(function(e){return u.Guard.isExclusiveTextNode(e)}));null!==s;)i.push(s),s=d.tree_getNextDescendantNode(this,s,!1,!1,(function(e){return u.Guard.isExclusiveTextNode(e)}));for(var l=0;lC;C++)if((p||C in w)&&(y=x(v=w[C],C,b),e))if(t)P[C]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return C;case 2:l.call(P,v)}else if(c)return!1;return d?-1:u||c?c:P}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t1)throw new s.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has "+y+" element nodes.");if(1===y){try{for(var S=r(t._children),C=S.next();!C.done;C=S.next())if(C.value._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("The document node already has a document element node.")}catch(e){a={error:e}}finally{try{C&&!C.done&&(u=S.return)&&u.call(S)}finally{if(a)throw a.error}}if(n){if(v===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");for(var A=n._nextSibling;A;){if(A._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");A=A._nextSibling}}}}else if(g===l.NodeType.Element){try{for(var P=r(t._children),_=P.next();!_.done;_=P.next())if(_.value._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Document already has a document element node. Node is "+e.nodeName+".")}catch(e){c={error:e}}finally{try{_&&!_.done&&(d=P.return)&&d.call(P)}finally{if(c)throw c.error}}if(n){if(v===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+e.nodeName+".");for(A=n._nextSibling;A;){if(A._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+e.nodeName+".");A=A._nextSibling}}}else if(g===l.NodeType.DocumentType){try{for(var O=r(t._children),E=O.next();!E.done;E=O.next())if(E.value._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Document already has a document type node. Node is "+e.nodeName+".")}catch(e){p={error:e}}finally{try{E&&!E.done&&(h=O.return)&&h.call(O)}finally{if(p)throw p.error}}if(n)for(var T=n._previousSibling;T;){if(T._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+e.nodeName+".");T=T._previousSibling}else for(T=t._firstChild;T;){if(T._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+e.nodeName+".");T=T._nextSibling}}}function w(e,t,n){b(e,t,n);var r=n;return r===e&&(r=e._nextSibling),y.document_adopt(e,t._nodeDocument),x(e,t,r),e}function x(e,t,n,i){var s,h;if(null!==n||e._nodeType===l.NodeType.DocumentFragment){var y=e._nodeType===l.NodeType.DocumentFragment?e._children.size:1;if(null!==n&&0!==a.dom.rangeList.size){var b=f.tree_index(n);try{for(var w=r(a.dom.rangeList),x=w.next();!x.done;x=w.next()){var C=x.value;C._start[0]===t&&C._start[1]>b&&(C._start[1]+=y),C._end[0]===t&&C._end[1]>b&&(C._end[1]+=y)}}catch(e){s={error:e}}finally{try{x&&!x.done&&(h=w.return)&&h.call(w)}finally{if(s)throw s.error}}}var A=e._nodeType===l.NodeType.DocumentFragment?new(Array.bind.apply(Array,o([void 0],e._children))):[e];if(e._nodeType===l.NodeType.DocumentFragment)for(;e._firstChild;)S(e._firstChild,e,!0);a.dom.features.mutationObservers&&e._nodeType===l.NodeType.DocumentFragment&&g.observer_queueTreeMutationRecord(e,[],A,null,null);for(var P=n?n._previousSibling:t._lastChild,_=null===n?-1:f.tree_index(n),O=0;Ox&&A._start[1]--,A._end[0]===t&&A._end[1]>x&&A._end[1]--}}catch(e){i={error:e}}finally{try{C&&!C.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}try{for(var P=r(a.dom.rangeList),_=P.next();!_.done;_=P.next())(A=_.value)._start[0]===t&&A._start[1]>x&&(A._start[1]-=1),A._end[0]===t&&A._end[1]>x&&(A._end[1]-=1)}catch(e){s={error:e}}finally{try{_&&!_.done&&(l=P.return)&&l.call(P)}finally{if(s)throw s.error}}}if(a.dom.features.steps)try{for(var O=r(h.nodeIterator_iteratorList()),E=O.next();!E.done;E=O.next()){var T=E.value;T._root._nodeDocument===e._nodeDocument&&v.dom_runNodeIteratorPreRemovingSteps(T,e)}}catch(e){d={error:e}}finally{try{E&&!E.done&&(y=O.return)&&y.call(O)}finally{if(d)throw d.error}}var D=e._previousSibling,I=e._nextSibling;u.Guard.isDocumentNode(t)&&u.Guard.isElementNode(e)&&(t._documentElement=null),e._parent=null,t._children.delete(e);var k=e._previousSibling,M=e._nextSibling;e._previousSibling=null,e._nextSibling=null,k&&(k._nextSibling=M),M&&(M._previousSibling=k),k||(t._firstChild=M),M||(t._lastChild=k),a.dom.features.slots&&u.Guard.isSlotable(e)&&null!==e._assignedSlot&&m.shadowTree_isAssigned(e)&&m.shadowTree_assignSlotables(e._assignedSlot),a.dom.features.slots&&u.Guard.isShadowRoot(f.tree_rootNode(t))&&u.Guard.isSlot(t)&&c.isEmpty(t._assignedNodes)&&m.shadowTree_signalASlotChange(t),a.dom.features.slots&&null!==f.tree_getFirstDescendantNode(e,!0,!1,(function(e){return u.Guard.isSlot(e)}))&&(m.shadowTree_assignSlotablesForATree(f.tree_rootNode(t)),m.shadowTree_assignSlotablesForATree(e)),a.dom.features.steps&&v.dom_runRemovingSteps(e,t),a.dom.features.customElements&&u.Guard.isCustomElementNode(e)&&p.customElement_enqueueACustomElementCallbackReaction(e,"disconnectedCallback",[]);for(var N=f.tree_getFirstDescendantNode(e,!1,!0);null!==N;)a.dom.features.steps&&v.dom_runRemovingSteps(N,e),a.dom.features.customElements&&u.Guard.isCustomElementNode(N)&&p.customElement_enqueueACustomElementCallbackReaction(N,"disconnectedCallback",[]),N=f.tree_getNextDescendantNode(e,N,!1,!0);if(a.dom.features.mutationObservers)for(var R=f.tree_getFirstAncestorNode(t,!0);null!==R;){try{for(var F=(b=void 0,r(R._registeredObserverList)),B=F.next();!B.done;B=F.next()){var L=B.value;L.options.subtree&&e._registeredObserverList.push({observer:L.observer,options:L.options,source:L})}}catch(e){b={error:e}}finally{try{B&&!B.done&&(w=F.return)&&w.call(F)}finally{if(b)throw b.error}}R=f.tree_getNextAncestorNode(t,R,!0)}a.dom.features.mutationObservers&&(n||g.observer_queueTreeMutationRecord(t,[],[e],D,I)),a.dom.features.steps&&u.Guard.isTextNode(e)&&v.dom_runChildTextContentChangeSteps(t)}t.mutation_ensurePreInsertionValidity=b,t.mutation_preInsert=w,t.mutation_insert=x,t.mutation_append=function(e,t){return w(e,t,null)},t.mutation_replace=function(e,t,n){var i,o,u,c,d,p,h,m;if(n._nodeType!==l.NodeType.Document&&n._nodeType!==l.NodeType.DocumentFragment&&n._nodeType!==l.NodeType.Element)throw new s.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is "+n.nodeName+".");if(f.tree_isHostIncludingAncestorOf(n,t,!0))throw new s.HierarchyRequestError("The node to be inserted cannot be an ancestor of parent node. Node is "+t.nodeName+", parent node is "+n.nodeName+".");if(e._parent!==n)throw new s.NotFoundError("The reference child node cannot be found under parent node. Child node is "+e.nodeName+", parent node is "+n.nodeName+".");if(t._nodeType!==l.NodeType.DocumentFragment&&t._nodeType!==l.NodeType.DocumentType&&t._nodeType!==l.NodeType.Element&&t._nodeType!==l.NodeType.Text&&t._nodeType!==l.NodeType.ProcessingInstruction&&t._nodeType!==l.NodeType.CData&&t._nodeType!==l.NodeType.Comment)throw new s.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is "+t.nodeName+".");if(t._nodeType===l.NodeType.Text&&n._nodeType===l.NodeType.Document)throw new s.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is "+t.nodeName+".");if(t._nodeType===l.NodeType.DocumentType&&n._nodeType!==l.NodeType.Document)throw new s.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is "+n.nodeName+".");if(n._nodeType===l.NodeType.Document)if(t._nodeType===l.NodeType.DocumentFragment){var v=0;try{for(var b=r(t._children),w=b.next();!w.done;w=b.next()){var C=w.value;if(C._nodeType===l.NodeType.Element)v++;else if(C._nodeType===l.NodeType.Text)throw new s.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is "+C.nodeName+".")}}catch(e){i={error:e}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}if(v>1)throw new s.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has "+v+" element nodes.");if(1===v){try{for(var A=r(n._children),P=A.next();!P.done;P=A.next())if((I=P.value)._nodeType===l.NodeType.Element&&I!==e)throw new s.HierarchyRequestError("The document node already has a document element node.")}catch(e){u={error:e}}finally{try{P&&!P.done&&(c=A.return)&&c.call(A)}finally{if(u)throw u.error}}for(var _=e._nextSibling;_;){if(_._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");_=_._nextSibling}}}else if(t._nodeType===l.NodeType.Element){try{for(var O=r(n._children),E=O.next();!E.done;E=O.next())if((I=E.value)._nodeType===l.NodeType.Element&&I!==e)throw new s.HierarchyRequestError("Document already has a document element node. Node is "+t.nodeName+".")}catch(e){d={error:e}}finally{try{E&&!E.done&&(p=O.return)&&p.call(O)}finally{if(d)throw d.error}}for(_=e._nextSibling;_;){if(_._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+t.nodeName+".");_=_._nextSibling}}else if(t._nodeType===l.NodeType.DocumentType){try{for(var T=r(n._children),D=T.next();!D.done;D=T.next()){var I;if((I=D.value)._nodeType===l.NodeType.DocumentType&&I!==e)throw new s.HierarchyRequestError("Document already has a document type node. Node is "+t.nodeName+".")}}catch(e){h={error:e}}finally{try{D&&!D.done&&(m=T.return)&&m.call(T)}finally{if(h)throw h.error}}for(var k=e._previousSibling;k;){if(k._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+t.nodeName+".");k=k._previousSibling}}var M=e._nextSibling;M===t&&(M=t._nextSibling);var N=e._previousSibling;y.document_adopt(t,n._nodeDocument);var R=[];null!==e._parent&&(R.push(e),S(e,e._parent,!0));var F=[];return t._nodeType===l.NodeType.DocumentFragment?F=Array.from(t._children):F.push(t),x(t,n,M,!0),a.dom.features.mutationObservers&&g.observer_queueTreeMutationRecord(n,F,R,N,M),e},t.mutation_replaceAll=function(e,t){var n,i;null!==e&&y.document_adopt(e,t._nodeDocument);var o=Array.from(t._children),s=[];e&&e._nodeType===l.NodeType.DocumentFragment?s=Array.from(e._children):null!==e&&s.push(e);try{for(var u=r(o),c=u.next();!c.done;c=u.next())S(c.value,t,!0)}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}null!==e&&x(e,t,null,!0),a.dom.features.mutationObservers&&g.observer_queueTreeMutationRecord(t,s,o,null,null)},t.mutation_preRemove=function(e,t){if(e._parent!==t)throw new s.NotFoundError("The child node cannot be found under parent node. Child node is "+e.nodeName+", parent node is "+t.nodeName+".");return S(e,t),e},t.mutation_remove=S},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n0?r:n)(e)}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t){e.exports={}},function(e,t,n){"use strict";n(31),n(32),n(33),n(219),n(64),n(19),n(65),n(20),n(92),n(66),n(91),n(143),n(22),n(144),n(23);var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t/g,">");else for(var i=0;i"===o?">":o}this.text(r)},e.prototype._serializeDocumentFragmentNS=function(e,t,n,i,o,a){var s,l;try{for(var u=r(e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;this._serializeNodeNS(d,t,n,i,o,a)}}catch(e){s={error:e}}finally{try{c&&!c.done&&(l=u.return)&&l.call(u)}finally{if(s)throw s.error}}},e.prototype._serializeDocumentFragment=function(e,t,n){var i,o;try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;this._serializeNode(l,t,n)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype._serializeDocumentType=function(e,t,n){if(t&&!c.xml_isPubidChar(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!c.xml_isLegalChar(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");this.docType(e.name,e.publicId,e.systemId)},e.prototype._serializeProcessingInstruction=function(e,t,n){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!c.xml_isLegalChar(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");this.instruction(e.target,e.data)},e.prototype._serializeCData=function(e,t,n){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");this.cdata(e.data)},e.prototype._serializeAttributesNS=function(e,t,n,i,o,a,l){var d,p,f=[],h=a?new s.LocalNameSet:void 0;try{for(var m=r(e.attributes),g=m.next();!g.done;g=m.next()){var v=g.value;if(a||o||null!==v.namespaceURI){if(a&&h&&h.has(v.namespaceURI,v.localName))throw new Error("Element contains duplicate attributes (well-formed required).");a&&h&&h.set(v.namespaceURI,v.localName);var y=v.namespaceURI,b=null;if(null!==y)if(b=t.get(v.prefix,y),y===u.namespace.XMLNS){if(v.value===u.namespace.XML||null===v.prefix&&o||null!==v.prefix&&(!(v.localName in i)||i[v.localName]!==v.value)&&t.has(v.localName,v.value))continue;if(a&&v.value===u.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(a&&""===v.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===v.prefix&&(b="xmlns")}else null===b&&(b=null===v.prefix||t.hasPrefix(v.prefix)&&!t.has(v.prefix,y)?this._generatePrefix(y,t,n):v.prefix,f.push([null,"xmlns",b,this._serializeAttributeValue(y,a,l)]));if(a&&(-1!==v.localName.indexOf(":")||!c.xml_isName(v.localName)||"xmlns"===v.localName&&null===y))throw new Error("Attribute local name contains invalid characters (well-formed required).");f.push([y,b,v.localName,this._serializeAttributeValue(v.value,a,l)])}else f.push([null,null,v.localName,this._serializeAttributeValue(v.value,a,l)])}}catch(e){d={error:e}}finally{try{g&&!g.done&&(p=m.return)&&p.call(m)}finally{if(d)throw d.error}}return f},e.prototype._serializeAttributes=function(e,t,n){var i,o,a=[],s=t?{}:void 0;try{for(var l=r(e.attributes),u=l.next();!u.done;u=l.next()){var d=u.value;if(t){if(t&&s&&d.localName in s)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&s&&(s[d.localName]=!0),t&&(-1!==d.localName.indexOf(":")||!c.xml_isName(d.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");a.push([null,null,d.localName,this._serializeAttributeValue(d.value,t,n)])}else a.push([null,null,d.localName,this._serializeAttributeValue(d.value,t,n)])}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return a},e.prototype._recordNamespaceInformation=function(e,t,n){var i,o,a=null;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var c=l.value,d=c.namespaceURI,p=c.prefix;if(d===u.namespace.XMLNS){if(null===p){a=c.value;continue}var f=c.localName,h=c.value;if(h===u.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value.toString();return n.value++,t.set(r,e),r},e.prototype._serializeAttributeValue=function(e,t,n){if(t&&null!==e&&!c.xml_isLegalChar(e))throw new Error("Invalid characters in attribute value.");if(null===e)return"";if(n)return e.replace(/(?!&(lt|gt|amp|apos|quot);)&/g,"&").replace(//g,">").replace(/"/g,""");for(var r="",i=0;i"===o?">":o}return r},e._VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),e}();t.BaseWriter=d},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(3),s=n(7),l=n(29),u=n(17),c=n(96);function d(){var e=o.dom.window;e._mutationObserverMicrotaskQueued||(e._mutationObserverMicrotaskQueued=!0,Promise.resolve().then((function(){p()})))}function p(){var e,t,n,i,l=o.dom.window;l._mutationObserverMicrotaskQueued=!1;var u=s.set.clone(l._mutationObservers),d=s.set.clone(l._signalSlots);s.set.empty(l._signalSlots);var p=function(e){var t=s.list.clone(e._recordQueue);s.list.empty(e._recordQueue);for(var n=0;n"+e+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete f.prototype[a[n]];return f()};s[c]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[c]=e):n=f(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(120),i=n(83);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(15).f,i=n(14),o=n(5)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(8),i=n(5),o=n(128),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";var r=n(4),i=n(121).indexOf,o=n(48),a=n(28),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:l||!u||!c},{indexOf:function(e){return l?s.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(16),i=n(15).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(25),i=n(18),o=n(8),a=n(135),s=RegExp.prototype,l=s.toString,u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),c="toString"!=l.name;(u||c)&&r(RegExp.prototype,"toString",(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(137),n(20),n(66),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(2),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=a.applyDefaults(n,{format:"object",wellFormed:!1,noDoubleEncoding:!1,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){return this._currentList=[],this._currentIndex=0,this._listRegister=[this._currentList],this.serializeNode(e,this._writerOptions.wellFormed,this._writerOptions.noDoubleEncoding),this._process(this._currentList,this._writerOptions)},t.prototype._process=function(e,t){var n,r,i,o,l,u,c;if(0===e.length)return{};for(var d={},p=!1,f=0,h=0,m=0,g=0,v=0;v2)try{for(var c=o(e),d=c.next();!d.done;d=c.next()){var p=d.value;t[r+(s++).toString()]=p}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(l)throw l.error}}else t[i>1?r+(s++).toString():r]=e;return s},t.prototype.beginElement=function(e){var t,n,r=[];if(0===this._currentList.length)this._currentList.push(((t={})[e]=r,t));else{var i=this._currentList[this._currentList.length-1];this._isElementNode(i,e)?0!==i[e].length&&a.isArray(i[e][0])?i[e].push(r):i[e]=[i[e],r]:this._currentList.push(((n={})[e]=r,n))}this._currentIndex++,this._listRegister.length>this._currentIndex?this._listRegister[this._currentIndex]=r:this._listRegister.push(r),this._currentList=r},t.prototype.endElement=function(){this._currentList=this._listRegister[--this._currentIndex]},t.prototype.attribute=function(e,t){var n,r;if(0===this._currentList.length)this._currentList.push({"@":(n={},n[e]=t,n)});else{var i=this._currentList[this._currentList.length-1];this._isAttrNode(i)?i["@"][e]=t:this._currentList.push({"@":(r={},r[e]=t,r)})}},t.prototype.comment=function(e){if(0===this._currentList.length)this._currentList.push({"!":e});else{var t=this._currentList[this._currentList.length-1];this._isCommentNode(t)?a.isArray(t["!"])?t["!"].push(e):t["!"]=[t["!"],e]:this._currentList.push({"!":e})}},t.prototype.text=function(e){if(0===this._currentList.length)this._currentList.push({"#":e});else{var t=this._currentList[this._currentList.length-1];this._isTextNode(t)?a.isArray(t["#"])?t["#"].push(e):t["#"]=[t["#"],e]:this._currentList.push({"#":e})}},t.prototype.instruction=function(e,t){var n=""===t?e:e+" "+t;if(0===this._currentList.length)this._currentList.push({"?":n});else{var r=this._currentList[this._currentList.length-1];this._isInstructionNode(r)?a.isArray(r["?"])?r["?"].push(n):r["?"]=[r["?"],n]:this._currentList.push({"?":n})}},t.prototype.cdata=function(e){if(0===this._currentList.length)this._currentList.push({$:e});else{var t=this._currentList[this._currentList.length-1];this._isCDATANode(t)?a.isArray(t.$)?t.$.push(e):t.$=[t.$,e]:this._currentList.push({$:e})}},t.prototype._isAttrNode=function(e){return"@"in e},t.prototype._isTextNode=function(e){return"#"in e},t.prototype._isCommentNode=function(e){return"!"in e},t.prototype._isInstructionNode=function(e){return"?"in e},t.prototype._isCDATANode=function(e){return"$"in e},t.prototype._isElementNode=function(e,t){return t in e},t.prototype._getAttrKey=function(){return this._builderOptions.convert.att},t.prototype._getNodeKey=function(e){switch(e){case s.NodeType.Comment:return this._builderOptions.convert.comment;case s.NodeType.Text:return this._builderOptions.convert.text;case s.NodeType.ProcessingInstruction:return this._builderOptions.convert.ins;case s.NodeType.CData:return this._builderOptions.convert.cdata;default:throw new Error("Invalid node type.")}},t}(n(50).BaseWriter);t.ObjectWriter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._items={},this._nullItems={}}return e.prototype.set=function(e,t){null===e?this._nullItems[t]=!0:(this._items[e]||(this._items[e]={}),this._items[e][t]=!0)},e.prototype.has=function(e,t){return null===e?!0===this._nullItems[t]:!!this._items[e]&&!0===this._items[e][t]},e}();t.LocalNameSet=r},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=n(3),a=n(0),s=function(){function e(){}return Object.defineProperty(e.prototype,"_eventListenerList",{get:function(){return this.__eventListenerList||(this.__eventListenerList=[])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventHandlerMap",{get:function(){return this.__eventHandlerMap||(this.__eventHandlerMap={})},enumerable:!0,configurable:!0}),e.prototype.addEventListener=function(e,t,n){void 0===n&&(n={passive:!1,once:!1,capture:!1});var i,s=r(a.eventTarget_flattenMore(n),3),l=s[0],u=s[1],c=s[2];t&&(i=o.Guard.isEventListener(t)?t:{handleEvent:t},a.eventTarget_addEventListener(this,{type:e,callback:i,capture:l,passive:u,once:c,removed:!1}))},e.prototype.removeEventListener=function(e,t,n){void 0===n&&(n={capture:!1});var r=a.eventTarget_flatten(n);if(t)for(var i=0;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",f)),p&&(n=new RegExp("^"+h+"$(?!\\s)",f)),c&&(t=a.lastIndex),r=s.call(u?n:a,g),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:c&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),p&&r&&r.length>1&&l.call(r[0],n,(function(){for(i=1;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=0;M--)if(null!==(R=k[M]).shadowAdjustedTarget){I=R;break}if(null!==I)if(l.Guard.isNode(I.shadowAdjustedTarget)&&l.Guard.isShadowRoot(p.tree_rootNode(I.shadowAdjustedTarget,!0)))d=!0;else if(l.Guard.isNode(I.relatedTarget)&&l.Guard.isShadowRoot(p.tree_rootNode(I.relatedTarget,!0)))d=!0;else for(var N=0;N=0;M--)null!==(R=k[M]).shadowAdjustedTarget?e._eventPhase=s.EventPhase.AtTarget:e._eventPhase=s.EventPhase.Capturing,b(R,e,"capturing",i);for(M=0;M0&&null!==(l=i[a-1]).shadowAdjustedTarget)&&(t._target=l.shadowAdjustedTarget)}if(t._relatedTarget=e.relatedTarget,t._touchTargetList=e.touchTargetList,!t._stopPropagationFlag){t._currentTarget=e.invocationTarget;var u=t._currentTarget._eventListenerList,c=new(Array.bind.apply(Array,o([void 0],u)));if(!w(t,c,n,e,r)&&t._isTrusted){var d=t._type;"animationend"===d?t._type="webkitAnimationEnd":"animationiteration"===d?t._type="webkitAnimationIteration":"animationstart"===d?t._type="webkitAnimationStart":"transitionend"===d&&(t._type="webkitTransitionEnd"),w(t,c,n,e,r),t._type=d}}}function w(e,t,n,r,i){void 0===i&&(i={value:!1});for(var o=!1,a=0;a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),l=n(2),u=n(9),c=n(34),d=n(3),p=n(1),f=n(7),h=n(152),m=n(0),g=n(12),v=function(e){function t(){var t=e.call(this)||this;return t._children=new Set,t._encoding={name:"UTF-8",labels:["unicode-1-1-utf-8","utf-8","utf8"]},t._contentType="application/xml",t._URL={scheme:"about",username:"",password:"",host:null,port:null,path:["blank"],query:null,fragment:null,_cannotBeABaseURLFlag:!0,_blobURLEntry:null},t._origin=null,t._type="xml",t._mode="no-quirks",t._documentElement=null,t._hasNamespaces=!1,t._nodeDocumentOverwrite=null,t}return i(t,e),Object.defineProperty(t.prototype,"_nodeDocument",{get:function(){return this._nodeDocumentOverwrite||this},set:function(e){this._nodeDocumentOverwrite=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"implementation",{get:function(){return this._implementation||(this._implementation=m.create_domImplementation(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"URL",{get:function(){return h.urlSerializer(this._URL)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentURI",{get:function(){return this.URL},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return"null"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"compatMode",{get:function(){return"quirks"===this._mode?"BackCompat":"CSS1Compat"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSet",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"charset",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return this._contentType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"doctype",{get:function(){var e,t;try{for(var n=o(this._children),r=n.next();!r.done;r=n.next()){var i=r.value;if(d.Guard.isDocumentTypeNode(i))return i}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentElement",{get:function(){return this._documentElement},enumerable:!0,configurable:!0}),t.prototype.getElementsByTagName=function(e){return m.node_listOfElementsWithQualifiedName(e,this)},t.prototype.getElementsByTagNameNS=function(e,t){return m.node_listOfElementsWithNamespace(e,t,this)},t.prototype.getElementsByClassName=function(e){return m.node_listOfElementsWithClassNames(e,this)},t.prototype.createElement=function(e,t){if(!m.xml_isName(e))throw new u.InvalidCharacterError;"html"===this._type&&(e=e.toLowerCase());var n=null;void 0!==t&&(n=p.isString(t)?t:t.is);var r="html"===this._type||"application/xhtml+xml"===this._contentType?f.namespace.HTML:null;return m.element_createAnElement(this,e,r,null,n,!0)},t.prototype.createElementNS=function(e,t,n){return m.document_internalCreateElementNS(this,e,t,n)},t.prototype.createDocumentFragment=function(){return m.create_documentFragment(this)},t.prototype.createTextNode=function(e){return m.create_text(this,e)},t.prototype.createCDATASection=function(e){if("html"===this._type)throw new u.NotSupportedError;if(-1!==e.indexOf("]]>"))throw new u.InvalidCharacterError;return m.create_cdataSection(this,e)},t.prototype.createComment=function(e){return m.create_comment(this,e)},t.prototype.createProcessingInstruction=function(e,t){if(!m.xml_isName(e))throw new u.InvalidCharacterError;if(-1!==t.indexOf("?>"))throw new u.InvalidCharacterError;return m.create_processingInstruction(this,e,t)},t.prototype.importNode=function(e,t){if(void 0===t&&(t=!1),d.Guard.isDocumentNode(e)||d.Guard.isShadowRoot(e))throw new u.NotSupportedError;return m.node_clone(e,this,t)},t.prototype.adoptNode=function(e){if(d.Guard.isDocumentNode(e))throw new u.NotSupportedError;if(d.Guard.isShadowRoot(e))throw new u.HierarchyRequestError;return m.document_adopt(e,this),e},t.prototype.createAttribute=function(e){if(!m.xml_isName(e))throw new u.InvalidCharacterError;return"html"===this._type&&(e=e.toLowerCase()),m.create_attr(this,e)},t.prototype.createAttributeNS=function(e,t){var n=a(m.namespace_validateAndExtract(e,t),3),r=n[0],i=n[1],o=n[2],s=m.create_attr(this,o);return s._namespace=r,s._namespacePrefix=i,s},t.prototype.createEvent=function(e){return m.event_createLegacyEvent(e)},t.prototype.createRange=function(){var e=m.create_range();return e._start=[this,0],e._end=[this,0],e},t.prototype.createNodeIterator=function(e,t,n){void 0===t&&(t=l.WhatToShow.All),void 0===n&&(n=null);var r=m.create_nodeIterator(e,e,!0);return r._whatToShow=t,r._iteratorCollection=m.create_nodeList(e),p.isFunction(n)?(r._filter=m.create_nodeFilter(),r._filter.acceptNode=n):r._filter=n,r},t.prototype.createTreeWalker=function(e,t,n){void 0===t&&(t=l.WhatToShow.All),void 0===n&&(n=null);var r=m.create_treeWalker(e,e);return r._whatToShow=t,p.isFunction(n)?(r._filter=m.create_nodeFilter(),r._filter.acceptNode=n):r._filter=n,r},t.prototype._getTheParent=function(e){return"load"===e._type?null:s.dom.window},t.prototype.getElementById=function(e){throw new Error("Mixin: NonElementParentNode not implemented.")},Object.defineProperty(t.prototype,"children",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstElementChild",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastElementChild",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childElementCount",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),t.prototype.prepend=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),l=n(34),u=n(9),c=n(7),d=n(0),p=n(12),f=function(e){function t(){var t=e.call(this)||this;return t._children=new Set,t._namespace=null,t._namespacePrefix=null,t._localName="",t._customElementState="undefined",t._customElementDefinition=null,t._is=null,t._shadowRoot=null,t._attributeList=d.create_namedNodeMap(t),t._attributeChangeSteps=[],t._name="",t._assignedSlot=null,t}return i(t,e),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return this._namespace},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefix",{get:function(){return this._namespacePrefix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localName",{get:function(){return this._localName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this._htmlUppercasedQualifiedName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return d.element_getAnAttributeValue(this,"id")},set:function(e){d.element_setAnAttributeValue(this,"id",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return d.element_getAnAttributeValue(this,"class")},set:function(e){d.element_setAnAttributeValue(this,"class",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){var e=d.element_getAnAttributeByName("class",this);return null===e&&(e=d.create_attr(this._nodeDocument,"class")),d.create_domTokenList(this,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"slot",{get:function(){return d.element_getAnAttributeValue(this,"slot")},set:function(e){d.element_setAnAttributeValue(this,"slot",e)},enumerable:!0,configurable:!0}),t.prototype.hasAttributes=function(){return 0!==this._attributeList.length},Object.defineProperty(t.prototype,"attributes",{get:function(){return this._attributeList},enumerable:!0,configurable:!0}),t.prototype.getAttributeNames=function(){var e,t,n=[];try{for(var r=o(this._attributeList),i=r.next();!i.done;i=r.next()){var a=i.value;n.push(a._qualifiedName)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},t.prototype.getAttribute=function(e){var t=d.element_getAnAttributeByName(e,this);return t?t._value:null},t.prototype.getAttributeNS=function(e,t){var n=d.element_getAnAttributeByNamespaceAndLocalName(e,t,this);return n?n._value:null},t.prototype.setAttribute=function(e,t){if(!d.xml_isName(e))throw new u.InvalidCharacterError;this._namespace===c.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toLowerCase());for(var n=null,r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),s=n(70),l=n(0),u=n(12),c=function(e){function t(t){void 0===t&&(t="");var n=e.call(this,t)||this;return n._name="",n._assignedSlot=null,n}return i(t,e),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,t,n="";try{for(var r=o(l.text_contiguousTextNodes(this,!0)),i=r.next();!i.done;i=r.next())n+=i.value._data}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),t.prototype.splitText=function(e){return l.text_split(this,e)},Object.defineProperty(t.prototype,"assignedSlot",{get:function(){throw new Error("Mixin: Slotable not implemented.")},enumerable:!0,configurable:!0}),t._create=function(e,n){void 0===n&&(n="");var r=new t(n);return r._nodeDocument=e,r},t}(s.CharacterDataImpl);t.TextImpl=c,u.idl_defineConst(c.prototype,"_nodeType",a.NodeType.Text)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return Object.defineProperty(e.prototype,"_startNode",{get:function(){return this._start[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_startOffset",{get:function(){return this._start[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_endNode",{get:function(){return this._end[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_endOffset",{get:function(){return this._end[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_collapsed",{get:function(){return this._start[0]===this._end[0]&&this._start[1]===this._end[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startContainer",{get:function(){return this._startNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startOffset",{get:function(){return this._startOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endContainer",{get:function(){return this._endNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endOffset",{get:function(){return this._endOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsed",{get:function(){return this._collapsed},enumerable:!0,configurable:!0}),e}();t.AbstractRangeImpl=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(e){this._activeFlag=!1,this._root=e,this._whatToShow=r.WhatToShow.All,this._filter=null}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"whatToShow",{get:function(){return this._whatToShow},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),e}();t.TraverserImpl=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(0),o=n(12),a=function(){function e(e,t){this._target=null,this._relatedTarget=null,this._touchTargetList=[],this._path=[],this._currentTarget=null,this._eventPhase=r.EventPhase.None,this._stopPropagationFlag=!1,this._stopImmediatePropagationFlag=!1,this._canceledFlag=!1,this._inPassiveListenerFlag=!1,this._composedFlag=!1,this._initializedFlag=!1,this._dispatchFlag=!1,this._isTrusted=!1,this._bubbles=!1,this._cancelable=!1,this._type=e,t&&(this._bubbles=t.bubbles||!1,this._cancelable=t.cancelable||!1,this._composedFlag=t.composed||!1),this._initializedFlag=!0,this._timeStamp=(new Date).getTime()}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"srcElement",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},enumerable:!0,configurable:!0}),e.prototype.composedPath=function(){var e=[],t=this._path;if(0===t.length)return e;var n=this._currentTarget;if(null===n)throw new Error("Event currentTarget is null.");e.push(n);for(var r=0,i=0,o=t.length-1;o>=0;){if(t[o].rootOfClosedTree&&i++,t[o].invocationTarget===n){r=o;break}t[o].slotInClosedTree&&i--,o--}var a=i,s=i;for(o=r-1;o>=0;)t[o].rootOfClosedTree&&a++,a<=s&&e.unshift(t[o].invocationTarget),t[o].slotInClosedTree&&--a0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(3),s=n(1),l=n(98),u=n(72),c=n(17),d=n(173),p=n(30),f=n(52),h=n(37);t.document_elementInterface=function(e,t){return l.ElementImpl},t.document_internalCreateElementNS=function(e,t,n,i){var o=r(d.namespace_validateAndExtract(t,n),3),a=o[0],l=o[1],u=o[2],c=null;return void 0!==i&&(c=s.isString(i)?i:i.is),f.element_createAnElement(e,u,a,l,c,!0)},t.document_adopt=function(e,t){var n,r;if(e._nodeDocument!==t||null!==e._parent){var s=e._nodeDocument;if(e._parent&&h.mutation_remove(e,e._parent),t!==s)for(var l=c.tree_getFirstDescendantNode(e,!0,!0);null!==l;){if(l._nodeDocument=t,a.Guard.isElementNode(l))try{for(var d=(n=void 0,i(l._attributeList._asArray())),f=d.next();!f.done;f=d.next())f.value._nodeDocument=t}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}o.dom.features.customElements&&a.Guard.isElementNode(l)&&"custom"===l._customElementState&&u.customElement_enqueueACustomElementCallbackReaction(l,"adoptedCallback",[s,t]),o.dom.features.steps&&p.dom_runAdoptingSteps(l,s),l=c.tree_getNextDescendantNode(e,l,!0,!0)}}}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(9),s=n(17),l=n(51),u=n(30);t.characterData_replaceData=function(e,t,n,c){var d,p,f=s.tree_nodeLength(e);if(t>f)throw new a.IndexSizeError("Offset exceeds character data length. Offset: "+t+", Length: "+f+", Node is "+e.nodeName+".");t+n>f&&(n=f-t),i.dom.features.mutationObservers&&l.observer_queueMutationRecord("characterData",e,null,null,e._data,[],[],null,null);var h=e._data.substring(0,t)+c+e._data.substring(t+n);e._data=h;try{for(var m=r(i.dom.rangeList),g=m.next();!g.done;g=m.next()){var v=g.value;v._start[0]===e&&v._start[1]>t&&v._start[1]<=t+n&&(v._start[1]=t),v._end[0]===e&&v._end[1]>t&&v._end[1]<=t+n&&(v._end[1]=t),v._start[0]===e&&v._start[1]>t+n&&(v._start[1]+=c.length-n),v._end[0]===e&&v._end[1]>t+n&&(v._end[1]+=c.length-n)}}catch(e){d={error:e}}finally{try{g&&!g.done&&(p=m.return)&&p.call(m)}finally{if(d)throw d.error}}i.dom.features.steps&&o.Guard.isTextNode(e)&&null!==e._parent&&u.dom_runChildTextContentChangeSteps(e._parent)},t.characterData_substringData=function(e,t,n){var r=s.tree_nodeLength(e);if(t>r)throw new a.IndexSizeError("Offset exceeds character data length. Offset: "+t+", Length: "+r+", Node is "+e.nodeName+".");return t+n>r?e._data.substr(t):e._data.substr(t,n)}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(7);function s(e){var t=a.string.splitAStringOnASCIIWhitespace(e);return new Set(t)}function l(e){return i(e).join(" ")}t.orderedSet_parse=s,t.orderedSet_serialize=l,t.orderedSet_sanitize=function(e){return l(s(e))},t.orderedSet_contains=function(e,t,n){var r,i,a,s;try{for(var l=o(t),u=l.next();!u.done;u=l.next()){var c=u.value,d=!1;try{for(var p=(a=void 0,o(e)),f=p.next();!f.done;f=p.next()){var h=f.value;if(n){if(h===c){d=!0;break}}else if(h.toUpperCase()===c.toUpperCase()){d=!0;break}}}catch(e){a={error:e}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}if(!d)return!1}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!0}},function(e,t,n){"use strict";n(261),Object.defineProperty(t,"__esModule",{value:!0});var r=n(262),i=n(109),o=n(1);i.dom.setFeatures(!1),t.createDocument=function(){var e=(new r.DOMImplementation).createDocument(null,"root",null);return e.documentElement&&e.removeChild(e.documentElement),e},t.sanitizeInput=function(e,t){if(null==e)return e;if(void 0===t)return e+"";var n="";e+="";for(var r=0;r=32&&i<=55295||i>=57344&&i<=65533)n+=e.charAt(r);else if(i>=55296&&i<=56319&&r=56320&&a<=57343?(i=1024*(i-55296)+a-56320+65536,n+=String.fromCodePoint(i),r++):n+=o.isString(t)?t:t(e.charAt(r),r,e)}else n+=o.isString(t)?t:t(e.charAt(r),r,e)}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(153);t.AbortController=i.AbortControllerImpl;var o=n(154);t.AbortSignal=o.AbortSignalImpl;var a=n(101);t.AbstractRange=a.AbstractRangeImpl;var s=n(157);t.Attr=s.AttrImpl;var l=n(158);t.CDATASection=l.CDATASectionImpl;var u=n(70);t.CharacterData=u.CharacterDataImpl;var c=n(263),d=n(159);t.Comment=d.CommentImpl;var p=n(171);t.CustomEvent=p.CustomEventImpl;var f=n(99);t.DocumentFragment=f.DocumentFragmentImpl;var h=n(97);t.Document=h.DocumentImpl;var m=n(264),g=n(155);t.DocumentType=g.DocumentTypeImpl;var v=n(6);t.dom=v.dom;var y=n(148);t.DOMImplementation=y.DOMImplementationImpl;var b=n(170);t.DOMTokenList=b.DOMTokenListImpl;var w=n(98);t.Element=w.ElementImpl;var x=n(103);t.Event=x.EventImpl;var S=n(69);t.EventTarget=S.EventTargetImpl;var C=n(161);t.HTMLCollection=C.HTMLCollectionImpl;var A=n(265);t.MutationObserver=A.MutationObserverImpl;var P=n(169);t.MutationRecord=P.MutationRecordImpl;var _=n(164);t.NamedNodeMap=_.NamedNodeMapImpl;var O=n(168);t.NodeFilter=O.NodeFilterImpl;var E=n(34);t.Node=E.NodeImpl;var T=n(166);t.NodeIterator=T.NodeIteratorImpl;var D=n(162);t.NodeList=D.NodeListImpl;var I=n(163);t.NodeListStatic=I.NodeListStaticImpl;var k=n(266),M=n(267),N=n(268),R=n(160);t.ProcessingInstruction=R.ProcessingInstructionImpl;var F=n(165);t.Range=F.RangeImpl;var B=n(156);t.ShadowRoot=B.ShadowRootImpl;var L=n(269),V=n(270);t.StaticRange=V.StaticRangeImpl;var j=n(100);t.Text=j.TextImpl;var U=n(102);t.Traverser=U.TraverserImpl;var G=n(167);t.TreeWalker=G.TreeWalkerImpl;var z=n(149);t.Window=z.WindowImpl;var W=n(151);t.XMLDocument=W.XMLDocumentImpl,r.applyMixin(w.ElementImpl,c.ChildNodeImpl),r.applyMixin(u.CharacterDataImpl,c.ChildNodeImpl),r.applyMixin(g.DocumentTypeImpl,c.ChildNodeImpl),r.applyMixin(h.DocumentImpl,m.DocumentOrShadowRootImpl),r.applyMixin(B.ShadowRootImpl,m.DocumentOrShadowRootImpl),r.applyMixin(w.ElementImpl,k.NonDocumentTypeChildNodeImpl),r.applyMixin(u.CharacterDataImpl,k.NonDocumentTypeChildNodeImpl),r.applyMixin(h.DocumentImpl,M.NonElementParentNodeImpl),r.applyMixin(f.DocumentFragmentImpl,M.NonElementParentNodeImpl),r.applyMixin(h.DocumentImpl,N.ParentNodeImpl),r.applyMixin(f.DocumentFragmentImpl,N.ParentNodeImpl),r.applyMixin(w.ElementImpl,N.ParentNodeImpl),r.applyMixin(j.TextImpl,L.SlotableImpl),r.applyMixin(w.ElementImpl,L.SlotableImpl)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.EOF=0]="EOF",e[e.Declaration=1]="Declaration",e[e.DocType=2]="DocType",e[e.Element=3]="Element",e[e.Text=4]="Text",e[e.CDATA=5]="CDATA",e[e.PI=6]="PI",e[e.Comment=7]="Comment",e[e.ClosingTag=8]="ClosingTag"}(t.TokenType||(t.TokenType={}))},function(e,t,n){"use strict";n(64),n(20),n(66);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){var n=this,r=this._builderOptions,i=null;return o.isFunction(t)?i=this.parse(e,t.apply(this)):o.isArray(t)||o.isSet(t)?o.forEachArray(t,(function(t){return i=n.parse(e,t)}),this):o.forEachObject(t,(function(t,a){if(o.isFunction(a)&&(a=a.apply(n)),r.ignoreConverters||0!==t.indexOf(r.convert.att))if(r.ignoreConverters||0!==t.indexOf(r.convert.text))if(r.ignoreConverters||0!==t.indexOf(r.convert.cdata))if(r.ignoreConverters||0!==t.indexOf(r.convert.comment))if(r.ignoreConverters||0!==t.indexOf(r.convert.ins)){if((o.isArray(a)||o.isSet(a))&&o.isEmpty(a));else if((o.isMap(a)||o.isObject(a))&&o.isEmpty(a))i=n.element(e,void 0,n.sanitize(t))||i;else if(r.keepNullNodes||null!=a)if(o.isArray(a)||o.isSet(a))o.forEachArray(a,(function(r){var o={};o[t]=r,i=n.parse(e,o)}),n);else if(o.isMap(a)||o.isObject(a))(s=n.element(e,void 0,n.sanitize(t)))&&(i=s,n.parse(s,a));else if(null!=a&&""!==a){var s;(s=n.element(e,void 0,n.sanitize(t)))&&(i=s,n.text(s,n.sanitize(a)))}else i=n.element(e,void 0,n.sanitize(t))||i}else if(o.isString(a)){var l=a.indexOf(" "),u=-1===l?a:a.substr(0,l),c=-1===l?"":a.substr(l+1);i=n.instruction(e,n.sanitize(u),n.sanitize(c))||i}else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){var r=t.indexOf(" "),o=-1===r?t:t.substr(0,r),a=-1===r?"":t.substr(r+1);i=n.instruction(e,n.sanitize(o),n.sanitize(a))||i}),n):o.forEachObject(a,(function(t,r){return i=n.instruction(e,n.sanitize(t),n.sanitize(r))||i}),n);else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){return i=n.comment(e,n.sanitize(t))||i}),n):i=n.comment(e,n.sanitize(a))||i;else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){return i=n.cdata(e,n.sanitize(t))||i}),n):i=n.cdata(e,n.sanitize(a))||i;else i=o.isMap(a)||o.isObject(a)?n.parse(e,a):n.text(e,n.sanitize(a))||i;else if(t===r.convert.att){if(o.isArray(a)||o.isSet(a))throw new Error("Invalid attribute: "+a.toString()+". "+e._debugInfo());o.forEachObject(a,(function(t,r){i=n.attribute(e,void 0,n.sanitize(t),n.sanitize(r))||i}))}else i=n.attribute(e,void 0,n.sanitize(t.substr(r.convert.att.length)),n.sanitize(a))||i}),this),i||e},t}(n(74).BaseReader);t.ObjectReader=a},function(e,t,n){"use strict";var r=n(39);e.exports=new r({explicit:[n(286),n(287),n(288)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.BaseCBWriter=function(e){this.level=0,this._builderOptions=e,this._writerOptions=e}},function(e,t,n){var r=n(16),i=n(8),o=n(115);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(11),i=n(13),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(117),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(11),i=n(79),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(14),i=n(186),o=n(55),a=n(15);e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,u=0;ul;)r(s,n=t[l++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(24),i=n(26),o=n(82),a=function(e){return function(t,n,a){var s,l=r(t),u=i(l.length),c=o(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(8),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(85);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(5);t.f=r},function(e,t,n){var r=n(119),i=n(14),o=n(124),a=n(15).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(13),i=n(59),o=n(5)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r,i,o=n(11),a=n(192),s=o.process,l=s&&s.versions,u=l&&l.v8;u?i=(r=u.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(5),i=n(60),o=n(15),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){"use strict";var r,i,o,a=n(131),s=n(21),l=n(14),u=n(5),c=n(44),d=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):p=!0),null==r&&(r={}),c||l(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(14),i=n(27),o=n(57),a=n(195),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){var r=n(18),i=n(196);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){"use strict";var r=n(56),i=n(15),o=n(40);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(89),i=n(42),o=n(5)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";var r=n(18);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(47),i=n(35),o=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){var r=n(4),i=n(27),o=n(61);r({target:"Object",stat:!0,forced:n(8)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(122),a=n(25),s=n(139),l=n(140),u=n(141),c=n(13),d=n(8),p=n(207),f=n(62),h=n(208);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),v=m?"set":"add",y=i[e],b=y&&y.prototype,w=y,x={},S=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof y||!(g||b.forEach&&!d((function(){(new y).entries().next()})))))w=n.getConstructor(t,e,m,v),s.REQUIRED=!0;else if(o(e,!0)){var C=new w,A=C[v](g?{}:-0,1)!=C,P=d((function(){C.has(1)})),_=p((function(e){new y(e)})),O=!g&&d((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));_||((w=t((function(t,n){u(t,w,e);var r=h(new y,t,w);return null!=n&&l(n,r[v],r,m),r}))).prototype=b,b.constructor=w),(P||O)&&(S("delete"),S("has"),m&&S("get")),(O||A)&&S(v),g&&b.clear&&delete b.clear}return x[e]=w,r({global:!0,forced:w!=y},x),f(w,e),g||n.setStrong(w,e,m),w}},function(e,t,n){var r=n(45),i=n(13),o=n(14),a=n(15).f,s=n(58),l=n(203),u=s("meta"),c=0,d=Object.isExtensible||function(){return!0},p=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!d(e))return"F";if(!t)return"E";p(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!d(e))return!0;if(!t)return!1;p(e)}return e[u].weakData},onFreeze:function(e){return l&&f.REQUIRED&&d(e)&&!o(e,u)&&p(e),e}};r[u]=!0},function(e,t,n){var r=n(18),i=n(204),o=n(26),a=n(86),s=n(205),l=n(206),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var p,f,h,m,g,v,y,b=a(t,n,c?2:1);if(d)p=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(i(f)){for(h=0,m=o(e.length);m>h;h++)if((g=c?b(r(y=e[h])[0],y[1]):b(e[h]))&&g instanceof u)return g;return new u(!1)}p=f.call(e)}for(v=p.next;!(y=v.call(p)).done;)if("object"==typeof(g=l(p,b,y.value,c))&&g&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!0,e)}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var r=n(15).f,i=n(60),o=n(209),a=n(86),s=n(141),l=n(140),u=n(87),c=n(210),d=n(16),p=n(139).fastKey,f=n(43),h=f.set,m=f.getterFor;e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t),h(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=r&&l(r,e[u],e,n)})),f=m(t),g=function(e,t,n){var r,i,o=f(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=p(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=f(e),i=p(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=f(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=f(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),d?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=f(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(c.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&r(c.prototype,"size",{get:function(){return f(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=m(t),o=m(r);u(e,t,(function(e,t){h(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){"use strict";var r,i=n(4),o=n(55).f,a=n(26),s=n(221),l=n(35),u=n(223),c=n(44),d="".endsWith,p=Math.min,f=u("endsWith");i({target:"String",proto:!0,forced:!(!c&&!f&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||f)},{endsWith:function(e){var t=String(l(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:p(a(n),r),o=String(e);return d?d.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,n){"use strict";var r=n(224),i=n(18),o=n(27),a=n(26),s=n(47),l=n(35),u=n(225),c=n(226),d=Math.max,p=Math.min,f=Math.floor,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=l(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!g&&v||"string"==typeof r&&-1===r.indexOf(y)){var o=n(t,e,this,r);if(o.done)return o.value}var l=i(e),f=String(this),h="function"==typeof r;h||(r=String(r));var m=l.global;if(m){var w=l.unicode;l.lastIndex=0}for(var x=[];;){var S=c(l,f);if(null===S)break;if(x.push(S),!m)break;""===String(S[0])&&(l.lastIndex=u(f,a(l.lastIndex),w))}for(var C,A="",P=0,_=0;_=P&&(A+=f.slice(P,E)+M,P=E+O.length)}return A+f.slice(P)}];function b(e,n,r,i,a,s){var l=r+e.length,u=i.length,c=m;return void 0!==a&&(a=o(a),c=h),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>u){var d=f(c/10);return 0===d?t:d<=u?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";(function(e){var r=n(228),i=n(229),o=n(230);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.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 j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function m(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 T(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){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=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=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;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var d=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function P(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function R(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,o){return o||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return o||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),d=0;di)&&(n=i),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 w(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.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&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.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;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=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 U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(77))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isASCIIByte=function(e){return e>=0&&e<=127}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t=65&&n<=90&&(e[t]=n+32)}},t.byteUppercase=function(e){for(var t=0;t=97&&n<=122&&(e[t]=n-32)}},t.byteCaseInsensitiveMatch=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n=65&&r<=90&&(r+=32),i>=65&&i<=90&&(i+=32),r!==i)return!1}return!0},t.startsWith=function(e,t){for(var n=0;;){if(n>=e.length)return!1;if(n>=t.length)return!0;if(e[n]!==t[n])return!1;n++}},t.byteLessThan=function(e,t){for(var n=0;;){if(n>=e.length)return!1;if(n>=t.length)return!0;var r=e[n],i=t[n];if(ri)return!1;n++}},t.isomorphicDecode=function(e){return String.fromCodePoint.apply(String,i(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(7),o=n(0),a=n(12),s=function(){function e(e){this._associatedDocument=e||r.dom.window.document}return e.prototype.createDocumentType=function(e,t,n){return o.namespace_validate(e),o.create_documentType(this._associatedDocument,e,t,n)},e.prototype.createDocument=function(e,t,n){void 0===n&&(n=null);var r=o.create_xmlDocument(),a=null;return t&&(a=o.document_internalCreateElementNS(r,e,t)),n&&r.appendChild(n),a&&r.appendChild(a),r._origin=this._associatedDocument._origin,e===i.namespace.HTML?r._contentType="application/xhtml+xml":e===i.namespace.SVG?r._contentType="image/svg+xml":r._contentType="application/xml",r},e.prototype.createHTMLDocument=function(e){var t=o.create_document();t._type="html",t._contentType="text/html",t.appendChild(o.create_documentType(t,"html","",""));var n=o.element_createAnElement(t,"html",i.namespace.HTML);t.appendChild(n);var r=o.element_createAnElement(t,"head",i.namespace.HTML);if(n.appendChild(r),void 0!==e){var a=o.element_createAnElement(t,"title",i.namespace.HTML);r.appendChild(a);var s=o.create_text(t,e);a.appendChild(s)}var l=o.element_createAnElement(t,"body",i.namespace.HTML);return n.appendChild(l),t._origin=this._associatedDocument._origin,t},e.prototype.hasFeature=function(){return!0},e._create=function(t){return new e(t)},e}();t.DOMImplementationImpl=s,a.idl_defineConst(s.prototype,"_ID","@oozcitak/dom")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),a=n(1),s=n(0),l=function(e){function t(){var t=e.call(this)||this;return t._signalSlots=new Set,t._mutationObserverMicrotaskQueued=!1,t._mutationObservers=new Set,t._iteratorList=new a.FixedSizeSet,t._associatedDocument=s.create_document(),t}return i(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._associatedDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._currentEvent},enumerable:!0,configurable:!0}),t._create=function(){return new t},t}(o.EventTargetImpl);t.WindowImpl=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){}return e.isNode=function(e){return!!e&&void 0!==e._nodeType},e.isDocumentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Document},e.isDocumentTypeNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.DocumentType},e.isDocumentFragmentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.DocumentFragment},e.isAttrNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Attribute},e.isCharacterDataNode=function(t){if(!e.isNode(t))return!1;var n=t._nodeType;return n===r.NodeType.Text||n===r.NodeType.ProcessingInstruction||n===r.NodeType.Comment||n===r.NodeType.CData},e.isTextNode=function(t){return e.isNode(t)&&(t._nodeType===r.NodeType.Text||t._nodeType===r.NodeType.CData)},e.isExclusiveTextNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Text},e.isCDATASectionNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.CData},e.isCommentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Comment},e.isProcessingInstructionNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.ProcessingInstruction},e.isElementNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Element},e.isCustomElementNode=function(t){return e.isElementNode(t)&&"custom"===t._customElementState},e.isShadowRoot=function(e){return!!e&&void 0!==e.host},e.isMouseEvent=function(e){return!!e&&void 0!==e.screenX&&null!=e.screenY},e.isSlotable=function(t){return!!t&&void 0!==t._name&&void 0!==t._assignedSlot&&(e.isTextNode(t)||e.isElementNode(t))},e.isSlot=function(t){return!!t&&void 0!==t._name&&void 0!==t._assignedNodes&&e.isElementNode(t)},e.isWindow=function(e){return!!e&&void 0!==e.navigator},e.isEventListener=function(e){return!!e&&void 0!==e.handleEvent},e.isRegisteredObserver=function(e){return!!e&&void 0!==e.observer&&void 0!==e.options},e.isTransientRegisteredObserver=function(t){return!!t&&void 0!==t.source&&e.isRegisteredObserver(t)},e}();t.Guard=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return e.call(this)||this}return i(t,e),t}(n(97).DocumentImpl);t.XMLDocumentImpl=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o,a=n(1),s=n(242),l=n(7),u=n(243),c={ftp:21,file:null,http:80,https:443,ws:80,wss:443},d=/[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/,g=/[\0\t\f\r #%/:?@\[\\\]]/;function v(e){void 0!==o&&o.call(null,"Validation Error: "+e)}function y(e){return e in c}function b(e){return y(e.scheme)}function w(e){return c[e]||null}function x(e){return""!==e.username||""!==e.password}function S(e,t){var n,i;void 0===t&&(t=!1);var o=e.scheme+":";if(null!==e.host?(o+="//",x(e)&&(o+=e.username,""!==e.password&&(o+=":"+e.password),o+="@"),o+=C(e.host),null!==e.port&&(o+=":"+e.port)):null===e.host&&"file"===e.scheme&&(o+="//"),e._cannotBeABaseURLFlag)o+=e.path[0];else try{for(var a=r(e.path),s=a.next();!s.done;s=a.next())o+="/"+s.value}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return null!==e.query&&(o+="?"+e.query),t||null===e.fragment||(o+="#"+e.fragment),o}function C(e){return a.isNumber(e)?A(e):a.isArray(e)?"["+P(e)+"]":e}function A(e){for(var t="",n=e,r=1;r<=4;r++)t=(n%256).toString()+t,4!==r&&(t="."+t),n=Math.floor(n/256);return t}function P(e){for(var t="",n=null,r=-1,i=0,o=0,a=0;a<8;a++)if(0===e[a]){i=1;for(var s=a+1;s<8&&0===e[s];s++)i++;i>o&&(o=i,r=a)}o>1&&(n=r);for(var l=!1,u=0;u<8;u++)l&&0===e[u]||(l&&(l=!1),n!==u?(t+=e[u].toString(16),7!==u&&(t+=":")):(t+=0===u?"::":":",l=!0));return t}function _(e,t,n,i,o){var u,c,g,S;if(void 0===i){i={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null};var C=/^[\u0000-\u001F\u0020]+/,A=/[\u0000-\u001F\u0020]+$/;(C.test(e)||A.test(e))&&v("Input string contains leading or trailing control characters or space."),e=(e=e.replace(C,"")).replace(A,"")}var P=/[\u0009\u000A\u000D]/g;P.test(e)&&v("Input string contains tab or newline characters."),e=e.replace(P,"");var _=void 0===o?s.ParserState.SchemeStart:o;void 0===t&&(t=null);for(var N=void 0===n||"replacement"===n||"UTF-16BE"===n||"UTF-16LE"===n?"UTF-8":n,R="",F=!1,B=!1,V=!1,j=new a.StringWalker(e);;){switch(_){case s.ParserState.SchemeStart:if(l.codePoint.ASCIIAlpha.test(j.c()))R+=j.c().toLowerCase(),_=s.ParserState.Scheme;else{if(void 0!==o)return v("Invalid scheme start character."),null;_=s.ParserState.NoScheme,j.pointer--}break;case s.ParserState.Scheme:if(l.codePoint.ASCIIAlphanumeric.test(j.c())||"+"===j.c()||"-"===j.c()||"."===j.c())R+=j.c().toLowerCase();else{if(":"!==j.c()){if(void 0===o){R="",_=s.ParserState.NoScheme,j.pointer=0;continue}return v("Invalid input string."),null}if(void 0!==o){if(y(i.scheme)&&!y(R))return i;if(!y(i.scheme)&&y(R))return i;if((x(i)||null!==i.port)&&"file"===R)return i;if("file"===i.scheme&&(""===i.host||null===i.host))return i}if(i.scheme=R,void 0!==o)return i.port===w(i.scheme)&&(i.port=null),i;R="","file"===i.scheme?(j.remaining().startsWith("//")||v("Invalid file URL scheme, '//' expected."),_=s.ParserState.File):b(i)&&null!==t&&t.scheme===i.scheme?_=s.ParserState.SpecialRelativeOrAuthority:b(i)?_=s.ParserState.SpecialAuthoritySlashes:j.remaining().startsWith("/")?(_=s.ParserState.PathOrAuthority,j.pointer++):(i._cannotBeABaseURLFlag=!0,i.path.push(""),_=s.ParserState.CannotBeABaseURLPath)}break;case s.ParserState.NoScheme:if(null===t||t._cannotBeABaseURLFlag&&"#"!==j.c())return v("Invalid input string."),null;t._cannotBeABaseURLFlag&&"#"===j.c()?(i.scheme=t.scheme,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",i._cannotBeABaseURLFlag=!0,_=s.ParserState.Fragment):"file"!==t.scheme?(_=s.ParserState.Relative,j.pointer--):(_=s.ParserState.File,j.pointer--);break;case s.ParserState.SpecialRelativeOrAuthority:"/"===j.c()&&j.remaining().startsWith("/")?(_=s.ParserState.SpecialAuthorityIgnoreSlashes,j.pointer++):(v("Invalid input string."),_=s.ParserState.Relative,j.pointer--);break;case s.ParserState.PathOrAuthority:"/"===j.c()?_=s.ParserState.Authority:(_=s.ParserState.Path,j.pointer--);break;case s.ParserState.Relative:if(null===t)throw new Error("Invalid parser state. Base URL is null.");switch(i.scheme=t.scheme,j.c()){case"":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query=t.query;break;case"/":_=s.ParserState.RelativeSlash;break;case"?":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query="",_=s.ParserState.Query;break;case"#":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",_=s.ParserState.Fragment;break;default:b(i)&&"\\"===j.c()?(v("Invalid input string."),_=s.ParserState.RelativeSlash):(i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),0!==i.path.length&&i.path.splice(i.path.length-1,1),_=s.ParserState.Path,j.pointer--)}break;case s.ParserState.RelativeSlash:if(!b(i)||"/"!==j.c()&&"\\"!==j.c())if("/"===j.c())_=s.ParserState.Authority;else{if(null===t)throw new Error("Invalid parser state. Base URL is null.");i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,_=s.ParserState.Path,j.pointer--}else"\\"===j.c()&&v("Invalid input string."),_=s.ParserState.SpecialAuthorityIgnoreSlashes;break;case s.ParserState.SpecialAuthoritySlashes:"/"===j.c()&&j.remaining().startsWith("/")?(_=s.ParserState.SpecialAuthorityIgnoreSlashes,j.pointer++):(v("Expected '//'."),_=s.ParserState.SpecialAuthorityIgnoreSlashes,j.pointer--);break;case s.ParserState.SpecialAuthorityIgnoreSlashes:"/"!==j.c()&&"\\"!==j.c()?(_=s.ParserState.Authority,j.pointer--):v("Unexpected '/' or '\\'.");break;case s.ParserState.Authority:if("@"===j.c()){v("Unexpected '@'."),F&&(R="%40"+R),F=!0;try{for(var G=(u=void 0,r(R)),z=G.next();!z.done;z=G.next()){var W=z.value;if(":"!==W||V){var H=U(W,h);V?i.password+=H:i.username+=H}else V=!0}}catch(e){u={error:e}}finally{try{z&&!z.done&&(c=G.return)&&c.call(G)}finally{if(u)throw u.error}}R=""}else if(""===j.c()||"/"===j.c()||"?"===j.c()||"#"===j.c()||b(i)&&"\\"===j.c()){if(F&&""===R)return v("Invalid input string."),null;j.pointer-=R.length+1,R="",_=s.ParserState.Host}else R+=j.c();break;case s.ParserState.Host:case s.ParserState.Hostname:if(void 0!==o&&"file"===i.scheme)j.pointer--,_=s.ParserState.FileHost;else if(":"!==j.c()||B)if(""===j.c()||"/"===j.c()||"?"===j.c()||"#"===j.c()||b(i)&&"\\"===j.c()){if(j.pointer--,b(i)&&""===R)return v("Invalid input string."),null;if(void 0!==o&&""===R&&(x(i)||null!==i.port))return v("Invalid input string."),i;if(null===(q=M(R,!b(i))))return null;if(i.host=q,R="",_=s.ParserState.PathStart,void 0!==o)return i}else"["===j.c()&&(B=!0),"]"===j.c()&&(B=!1),R+=j.c();else{if(""===R)return v("Invalid input string."),null;if(null===(q=M(R,!b(i))))return null;if(i.host=q,R="",_=s.ParserState.Port,o===s.ParserState.Hostname)return i}break;case s.ParserState.Port:if(l.codePoint.ASCIIDigit.test(j.c()))R+=j.c();else{if(!(""===j.c()||"/"===j.c()||"?"===j.c()||"#"===j.c()||b(i)&&"\\"===j.c()||o))return v("Invalid input string."),null;if(""!==R&&""!==R){var K=parseInt(R,10);if(K>Math.pow(2,16)-1)return v("Invalid port number."),null;i.port=K===w(i.scheme)?null:K,R=""}if(void 0!==o)return i;_=s.ParserState.PathStart,j.pointer--}break;case s.ParserState.File:if(i.scheme="file","/"===j.c()||"\\"===j.c())"\\"===j.c()&&v("Invalid input string."),_=s.ParserState.FileSlash;else if(null!==t&&"file"===t.scheme)switch(j.c()){case"":i.host=t.host,i.path=l.list.clone(t.path),i.query=t.query;break;case"?":i.host=t.host,i.path=l.list.clone(t.path),i.query="",_=s.ParserState.Query;break;case"#":i.host=t.host,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",_=s.ParserState.Fragment;break;default:k(j.substring())?v("Unexpected windows drive letter in input string."):(i.host=t.host,i.path=l.list.clone(t.path),T(i)),_=s.ParserState.Path,j.pointer--}else _=s.ParserState.Path,j.pointer--;break;case s.ParserState.FileSlash:"/"===j.c()||"\\"===j.c()?("\\"===j.c()&&v("Invalid input string."),_=s.ParserState.FileHost):(null===t||"file"!==t.scheme||k(j.substring())||(D(t.path[0])?i.path.push(t.path[0]):i.host=t.host),_=s.ParserState.Path,j.pointer--);break;case s.ParserState.FileHost:if(""===j.c()||"/"===j.c()||"\\"===j.c()||"?"===j.c()||"#"===j.c())if(j.pointer--,void 0===o&&I(R))v("Unexpected windows drive letter in input string."),_=s.ParserState.Path;else if(""===R){if(i.host="",void 0!==o)return i;_=s.ParserState.PathStart}else{var q;if(null===(q=M(R,!b(i))))return null;if("localhost"===q&&(q=""),i.host=q,void 0!==o)return i;R="",_=s.ParserState.PathStart}else R+=j.c();break;case s.ParserState.PathStart:b(i)?("\\"===j.c()&&v("Invalid input string."),_=s.ParserState.Path,"/"!==j.c()&&"\\"!==j.c()&&j.pointer--):void 0===o&&"?"===j.c()?(i.query="",_=s.ParserState.Query):void 0===o&&"#"===j.c()?(i.fragment="",_=s.ParserState.Fragment):""!==j.c()&&(_=s.ParserState.Path,"/"!==j.c()&&j.pointer--);break;case s.ParserState.Path:if(""===j.c()||"/"===j.c()||b(i)&&"\\"===j.c()||void 0===o&&("?"===j.c()||"#"===j.c())){if(b(i)&&"\\"===j.c()&&v("Invalid input string."),E(R))T(i),"/"===j.c()||b(i)&&"\\"===j.c()||i.path.push("");else if(!O(R)||"/"===j.c()||b(i)&&"\\"===j.c()){if(!O(R)){if("file"===i.scheme&&0===i.path.length&&I(R)){null!==i.host&&""!==i.host&&(v("Invalid input string."),i.host="");var X=Array.from(R);R=X.slice(0,1)+":"+X.slice(2)}i.path.push(R)}}else i.path.push("");if(R="","file"===i.scheme&&(""===j.c()||"?"===j.c()||"#"===j.c()))for(;i.path.length>1&&""===i.path[0];)v("Invalid input string."),i.path.splice(0,1);"?"===j.c()&&(i.query="",_=s.ParserState.Query),"#"===j.c()&&(i.fragment="",_=s.ParserState.Fragment)}else m.test(j.c())||"%"===j.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==j.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(j.remaining())||v("Percent encoded character must be followed by two hex digits."),R+=U(j.c(),f);break;case s.ParserState.CannotBeABaseURLPath:"?"===j.c()?(i.query="",_=s.ParserState.Query):"#"===j.c()?(i.fragment="",_=s.ParserState.Fragment):(""===j.c()||m.test(j.c())||"%"===j.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==j.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(j.remaining())||v("Percent encoded character must be followed by two hex digits."),""!==j.c()&&(i.path[0]+=U(j.c(),d)));break;case s.ParserState.Query:if("UTF-8"===N||b(i)&&"ws"!==i.scheme&&"wss"!==i.scheme||(N="UTF-8"),void 0===o&&"#"===j.c())i.fragment="",_=s.ParserState.Fragment;else if(""!==j.c()){if(m.test(j.c())||"%"===j.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==j.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(j.remaining())||v("Percent encoded character must be followed by two hex digits."),"UTF-8"!==N.toUpperCase())throw new Error("Only UTF-8 encoding is supported.");var Y=a.utf8Encode(j.c());if(Y.length>=3&&38===Y[0]&&35===Y[1]&&59===Y[Y.length-1])Y=Y.subarray(2,Y.length-1),i.query+="%26%23"+l.byteSequence.isomorphicDecode(Y)+"%3B";else try{for(var Z=(g=void 0,r(Y)),J=Z.next();!J.done;J=Z.next()){var Q=J.value;Q<33||Q>126||34===Q||35===Q||60===Q||62===Q||39===Q&&b(i)?i.query+=L(Q):i.query+=String.fromCharCode(Q)}}catch(e){g={error:e}}finally{try{J&&!J.done&&(S=Z.return)&&S.call(Z)}finally{if(g)throw g.error}}}break;case s.ParserState.Fragment:""===j.c()||("\0"===j.c()?v("NULL character in input string."):(m.test(j.c())||"%"===j.c()||v("Unexpected character in fragment string."),"%"!==j.c()||/^[A-Za-z0-9][A-Za-z0-9]/.test(j.remaining())||v("Unexpected character in fragment string."),i.fragment+=U(j.c(),p)))}if(j.eof)break;j.pointer++}return i}function O(e){return"."===e||"%2e"===e.toLowerCase()}function E(e){var t=e.toLowerCase();return".."===t||".%2e"===t||"%2e."===t||"%2e%2e"===t}function T(e){var t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&D(t[0])||e.path.splice(e.path.length-1,1))}function D(e){return e.length>=2&&l.codePoint.ASCIIAlpha.test(e[0])&&":"===e[1]}function I(e){return e.length>=2&&l.codePoint.ASCIIAlpha.test(e[0])&&(":"===e[1]||"|"===e[1])}function k(e){return e.length>=2&&I(e)&&(2===e.length||"/"===e[2]||"\\"===e[2]||"?"===e[2]||"#"===e[2])}function M(e,t){if(void 0===t&&(t=!1),e.startsWith("["))return e.endsWith("]")?F(e.substring(1,e.length-1)):(v("Expected ']' after '['."),null);if(t)return B(e);var n=W(a.utf8Decode(j(e)));if(null===n)return v("Invalid domain."),null;if(g.test(n))return v("Invalid domain."),null;var r=R(n);return null===r||a.isNumber(r)?r:n}function N(e,t){void 0===t&&(t={value:!1});var n=10;return e.startsWith("0x")||e.startsWith("0X")?(t.value=!0,e=e.substr(2),n=16):e.length>=2&&"0"===e[0]&&(t.value=!0,e=e.substr(1),n=8),""===e?0:(10===n?/^[0-9]+$/:16===n?/^[0-9A-Fa-f]+$/:/^[0-7]+$/).test(e)?parseInt(e,n):null}function R(e){var t,n,i,o,a={value:!1},s=e.split(".");if(""===s[s.length-1]&&(a.value=!0,s.length>1&&s.pop()),s.length>4)return e;var l=[];try{for(var u=r(s),c=u.next();!c.done;c=u.next()){var d=c.value;if(""===d)return e;if(null===(y=N(d,a)))return e;l.push(y)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}a.value&&v("Invalid IP v4 address.");for(var p=0;p255&&(v("Invalid IP v4 address."),p=Math.pow(256,5-l.length))return v("Invalid IP v4 address."),null;var f=l[l.length-1];l.pop();var h=0;try{for(var m=r(l),g=m.next();!g.done;g=m.next()){var y;f+=(y=g.value)*Math.pow(256,3-h),h++}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}return f}function F(e){var t,n=[0,0,0,0,0,0,0,0],r=0,o=null,s=new a.StringWalker(e);if(":"===s.c()){if(!s.remaining().startsWith(":"))return v("Invalid IP v6 address."),null;s.pointer+=2,o=r+=1}for(;""!==s.c();){if(8===r)return v("Invalid IP v6 address."),null;if(":"!==s.c()){for(var u=0,c=0;c<4&&l.codePoint.ASCIIHexDigit.test(s.c());)u=16*u+parseInt(s.c(),16),s.pointer++,c++;if("."===s.c()){if(0===c)return v("Invalid IP v6 address."),null;if(s.pointer-=c,r>6)return v("Invalid IP v6 address."),null;for(var d=0;""!==s.c();){var p=null;if(d>0){if(!("."===s.c()&&d<4))return v("Invalid IP v6 address."),null;s.pointer++}if(!l.codePoint.ASCIIDigit.test(s.c()))return v("Invalid IP v6 address."),null;for(;l.codePoint.ASCIIDigit.test(s.c());){var f=parseInt(s.c(),10);if(null===p)p=f;else{if(0===p)return v("Invalid IP v6 address."),null;p=10*p+f}if(p>255)return v("Invalid IP v6 address."),null;s.pointer++}if(null===p)return v("Invalid IP v6 address."),null;n[r]=256*n[r]+p,2!=++d&&4!==d||r++}if(4!==d)return v("Invalid IP v6 address."),null;break}if(":"===s.c()){if(s.pointer++,""===s.c())return v("Invalid IP v6 address."),null}else if(""!==s.c())return v("Invalid IP v6 address."),null;n[r]=u,r++}else{if(null!==o)return v("Invalid IP v6 address."),null;s.pointer++,o=++r}}if(null!==o){var h=r-o;for(r=7;0!==r&&h>0;)t=i([n[o+h-1],n[r]],2),n[r]=t[0],n[o+h-1]=t[1],r--,h--}else if(null===o&&8!==r)return v("Invalid IP v6 address."),null;return n}function B(e){var t,n;if(/[\x00\t\f\r #/:?@\[\\\]]/.test(e))return v("Invalid host string."),null;var i="";try{for(var o=r(e),a=o.next();!a.done;a=o.next())i+=U(a.value,d)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function L(e){return"%"+("00"+e.toString(16).toUpperCase()).slice(-2)}function V(e){for(var t=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},n=new Uint8Array(e.length),r=0,i=0;i=e.length-2)n[r]=o,r++;else if(37!==o||t(e[i+1])&&t(e[i+2])){var s=parseInt(a.utf8Decode(Uint8Array.of(e[i+1],e[i+2])),16);n[r]=s,r++,i+=2}else n[r]=o,r++}return n.subarray(0,r)}function j(e){return V(a.utf8Encode(e))}function U(e,t){var n,i;if(!t.test(e))return e;var o=a.utf8Encode(e),s="";try{for(var l=r(o),u=l.next();!u.done;u=l.next())s+=L(u.value)}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s}function G(e){var t,n,i,o,s=[],l=[];try{for(var u=r(e),c=u.next();!c.done;c=u.next()){var d=c.value;38===d?(s.push(Uint8Array.from(l)),l=[]):l.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}0!==l.length&&s.push(Uint8Array.from(l));var p=[];try{for(var f=r(s),h=f.next();!h.done;h=f.next()){var m=h.value;if(0!==m.length){for(var g=m.indexOf(61),v=-1!==g?m.slice(0,g):m,y=-1!==g?m.slice(g+1):new Uint8Array,b=0;b=48&&s<=57||s>=65&&s<=90||95===s||s>=97&&s<=122?String.fromCodePoint(s):L(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function W(e,t){void 0===t&&(t=!1);var n=u.domainToASCII(e);return""===n?(v("Invalid domain name."),null):n}t.setValidationErrorCallback=function(e){o=e},t.newURL=function(){return{scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null}},t.isSpecialScheme=y,t.isSpecial=b,t.defaultPort=w,t.includesCredentials=x,t.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e._cannotBeABaseURLFlag||"file"===e.scheme},t.urlSerializer=S,t.hostSerializer=C,t.iPv4Serializer=A,t.iPv6Serializer=P,t.urlParser=function(e,t,n){var r=_(e,t,n);return null===r?null:("blob"!==r.scheme||(r._blobURLEntry=null),r)},t.basicURLParser=_,t.setTheUsername=function(e,t){var n,i,o="";try{for(var a=r(t),s=a.next();!s.done;s=a.next())o+=U(s.value,h)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}e.username=o},t.setThePassword=function(e,t){var n,i,o="";try{for(var a=r(t),s=a.next();!s.done;s=a.next())o+=U(s.value,h)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}e.password=o},t.isSingleDotPathSegment=O,t.isDoubleDotPathSegment=E,t.shorten=T,t.isNormalizedWindowsDriveLetter=D,t.isWindowsDriveLetter=I,t.startsWithAWindowsDriveLetter=k,t.hostParser=M,t.iPv4NumberParser=N,t.iPv4Parser=R,t.iPv6Parser=F,t.opaqueHostParser=B,t.resolveABlobURL=function(e){return null},t.percentEncode=L,t.percentDecode=V,t.stringPercentDecode=j,t.utf8PercentEncode=U,t.hostEquals=function(e,t){return e===t},t.urlEquals=function(e,t,n){return void 0===n&&(n=!1),S(e,n)===S(t,n)},t.urlEncodedStringParser=function(e){return G(a.utf8Encode(e))},t.urlEncodedParser=G,t.urlEncodedByteSerializer=z,t.urlEncodedSerializer=function(e,t){var n,i;if("UTF-8"!==(void 0===t||"replacement"===t||"UTF-16BE"===t||"UTF-16LE"===t?"UTF-8":t).toUpperCase())throw new Error("Only UTF-8 encoding is supported.");var o="";try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=z(a.utf8Encode(u[0])),d=u[1];d=z(a.utf8Encode(d)),""!==o&&(o+="&"),o+=c+"="+d}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},t.origin=function e(t){switch(t.scheme){case"blob":t._blobURLEntry;var n=_(t.path[0]);return null===n?s.OpaqueOrigin:e(n);case"ftp":case"http":case"https":case"ws":case"wss":return[t.scheme,null===t.host?"":t.host,t.port,null];case"file":default:return s.OpaqueOrigin}},t.domainToASCII=W,t.domainToUnicode=function(e,t){void 0===t&&(t=!1);var n=u.domainToUnicode(e);return""===n&&v("Invalid domain name."),n},t.asciiSerializationOfAnOrigin=function(e){if(""===e[0]&&""===e[1]&&null===e[2]&&null===e[3])return"null";var t=e[0]+"://"+C(e[1]);return null!==e[2]&&(t+=":"+e[2].toString()),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(){this._signal=r.create_abortSignal()}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},enumerable:!0,configurable:!0}),e.prototype.abort=function(){r.abort_signalAbort(this._signal)},e}();t.AbortControllerImpl=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(69),a=n(0),s=function(e){function t(){var t=e.call(this)||this;return t._abortedFlag=!1,t._abortAlgorithms=new Set,t}return i(t,e),Object.defineProperty(t.prototype,"aborted",{get:function(){return this._abortedFlag},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onabort",{get:function(){return a.event_getterEventHandlerIDLAttribute(this,"onabort")},set:function(e){a.event_setterEventHandlerIDLAttribute(this,"onabort",e)},enumerable:!0,configurable:!0}),t._create=function(){return new t},t}(o.EventTargetImpl);t.AbortSignalImpl=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(34),s=n(12),l=function(e){function t(t,n,r){var i=e.call(this)||this;return i._name="",i._publicId="",i._systemId="",i._name=t,i._publicId=n,i._systemId=r,i}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this._publicId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this._systemId},enumerable:!0,configurable:!0}),t.prototype.before=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),a=n(0),s=function(){function e(e){return this._live=!0,this._filter=null,this._length=0,this._root=e,new Proxy(this,this)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._root._children.size},enumerable:!0,configurable:!0}),e.prototype.item=function(e){if(e<0||e>this.length-1)return null;if(e=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),a=function(){function e(e){return this._live=!1,this._items=[],this._length=0,this._root=e,this._items=[],this._filter=function(e){return!0},new Proxy(this,this)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),e.prototype.item=function(e){return e<0||e>this.length-1?null:this._items[e]},e.prototype.keys=function(){var e;return(e={})[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.length?{done:!0,value:null}:{done:!1,value:e++}}.bind(this)}}.bind(this),e},e.prototype.values=function(){var e;return(e={})[Symbol.iterator]=function(){var e=this[Symbol.iterator]();return{next:function(){return e.next()}}}.bind(this),e},e.prototype.entries=function(){var e;return(e={})[Symbol.iterator]=function(){var e=this[Symbol.iterator](),t=0;return{next:function(){var n=e.next();return n.done?{done:!0,value:null}:{done:!1,value:[t++,n.value]}}}}.bind(this),e},e.prototype[Symbol.iterator]=function(){var e=this._items[Symbol.iterator]();return{next:function(){return e.next()}}},e.prototype.forEach=function(e,t){var n,o;void 0===t&&(t=i.dom.window);var a=0;try{for(var s=r(this._items),l=s.next();!l.done;l=s.next()){var u=l.value;e.call(t,u,a++,this)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},e.prototype.get=function(e,t,n){if(!o.isString(t))return Reflect.get(e,t,n);var r=Number(t);return isNaN(r)?Reflect.get(e,t,n):e._items[r]||void 0},e.prototype.set=function(e,t,n,r){if(!o.isString(t))return Reflect.set(e,t,n,r);var i=Number(t);return isNaN(i)?Reflect.set(e,t,n,r):i>=0&&i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(101),u=n(9),c=n(0),d=n(12),p=n(3),f=function(e){function t(){var t=e.call(this)||this,n=a.dom.window._associatedDocument;return t._start=[n,0],t._end=[n,0],a.dom.rangeList.add(t),t}return i(t,e),Object.defineProperty(t.prototype,"commonAncestorContainer",{get:function(){for(var e=this._start[0];!c.tree_isAncestorOf(this._end[0],e,!0);){if(null===e._parent)throw new Error("Parent node is null.");e=e._parent}return e},enumerable:!0,configurable:!0}),t.prototype.setStart=function(e,t){c.range_setTheStart(this,e,t)},t.prototype.setEnd=function(e,t){c.range_setTheEnd(this,e,t)},t.prototype.setStartBefore=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheStart(this,t,c.tree_index(e))},t.prototype.setStartAfter=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheStart(this,t,c.tree_index(e)+1)},t.prototype.setEndBefore=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheEnd(this,t,c.tree_index(e))},t.prototype.setEndAfter=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheEnd(this,t,c.tree_index(e)+1)},t.prototype.collapse=function(e){e?this._end=this._start:this._start=this._end},t.prototype.selectNode=function(e){c.range_select(e,this)},t.prototype.selectNodeContents=function(e){if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;var t=c.tree_nodeLength(e);this._start=[e,0],this._end=[e,t]},t.prototype.compareBoundaryPoints=function(e,t){if(e!==s.HowToCompare.StartToStart&&e!==s.HowToCompare.StartToEnd&&e!==s.HowToCompare.EndToEnd&&e!==s.HowToCompare.EndToStart)throw new u.NotSupportedError;if(c.range_root(this)!==c.range_root(t))throw new u.WrongDocumentError;var n,r;switch(e){case s.HowToCompare.StartToStart:n=this._start,r=t._start;break;case s.HowToCompare.StartToEnd:n=this._end,r=t._start;break;case s.HowToCompare.EndToEnd:n=this._end,r=t._end;break;case s.HowToCompare.EndToStart:n=this._start,r=t._end;break;default:throw new u.NotSupportedError}var i=c.boundaryPoint_position(n,r);return i===s.BoundaryPosition.Before?-1:i===s.BoundaryPosition.After?1:0},t.prototype.deleteContents=function(){var e,t,n,r;if(!c.range_collapsed(this)){var i=this._startNode,a=this._startOffset,s=this._endNode,l=this._endOffset;if(i===s&&p.Guard.isCharacterDataNode(i))c.characterData_replaceData(i,a,l-a,"");else{var u,d,f=[];try{for(var h=o(c.range_getContainedNodes(this)),m=h.next();!m.done;m=h.next()){var g=(w=m.value)._parent;null!==g&&c.range_isContained(g,this)||f.push(w)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}if(c.tree_isAncestorOf(s,i,!0))u=i,d=a;else{for(var v=i;null!==v._parent&&!c.tree_isAncestorOf(s,v._parent,!0);)v=v._parent;if(null===v._parent)throw new Error("Parent node is null.");u=v._parent,d=c.tree_index(v)+1}p.Guard.isCharacterDataNode(i)&&c.characterData_replaceData(i,a,c.tree_nodeLength(i)-a,"");try{for(var y=o(f),b=y.next();!b.done;b=y.next()){var w;(w=b.value)._parent&&c.mutation_remove(w,w._parent)}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}p.Guard.isCharacterDataNode(s)&&c.characterData_replaceData(s,0,l,""),this._start=[u,d],this._end=[u,d]}}},t.prototype.extractContents=function(){return c.range_extract(this)},t.prototype.cloneContents=function(){return c.range_cloneTheContents(this)},t.prototype.insertNode=function(e){return c.range_insert(e,this)},t.prototype.surroundContents=function(e){var t,n;try{for(var r=o(c.range_getPartiallyContainedNodes(this)),i=r.next();!i.done;i=r.next()){var a=i.value;if(!p.Guard.isTextNode(a))throw new u.InvalidStateError}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}if(p.Guard.isDocumentNode(e)||p.Guard.isDocumentTypeNode(e)||p.Guard.isDocumentFragmentNode(e))throw new u.InvalidNodeTypeError;var s=c.range_extract(this);0!==e._children.size&&c.mutation_replaceAll(null,e),c.range_insert(e,this),c.mutation_append(s,e),c.range_select(e,this)},t.prototype.cloneRange=function(){return c.create_range(this._start,this._end)},t.prototype.detach=function(){a.dom.rangeList.delete(this)},t.prototype.isPointInRange=function(e,t){if(c.tree_rootNode(e)!==c.range_root(this))return!1;if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;if(t>c.tree_nodeLength(e))throw new u.IndexSizeError;var n=[e,t];return c.boundaryPoint_position(n,this._start)!==s.BoundaryPosition.Before&&c.boundaryPoint_position(n,this._end)!==s.BoundaryPosition.After},t.prototype.comparePoint=function(e,t){if(c.tree_rootNode(e)!==c.range_root(this))throw new u.WrongDocumentError;if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;if(t>c.tree_nodeLength(e))throw new u.IndexSizeError;var n=[e,t];return c.boundaryPoint_position(n,this._start)===s.BoundaryPosition.Before?-1:c.boundaryPoint_position(n,this._end)===s.BoundaryPosition.After?1:0},t.prototype.intersectsNode=function(e){if(c.tree_rootNode(e)!==c.range_root(this))return!1;var t=e._parent;if(null===t)return!0;var n=c.tree_index(e);return c.boundaryPoint_position([t,n],this._end)===s.BoundaryPosition.Before&&c.boundaryPoint_position([t,n+1],this._start)===s.BoundaryPosition.After},t.prototype.toString=function(){var e,t,n="";if(this._startNode===this._endNode&&p.Guard.isTextNode(this._startNode))return this._startNode._data.substring(this._startOffset,this._endOffset);p.Guard.isTextNode(this._startNode)&&(n+=this._startNode._data.substring(this._startOffset));try{for(var r=o(c.range_getContainedNodes(this)),i=r.next();!i.done;i=r.next()){var a=i.value;p.Guard.isTextNode(a)&&(n+=a._data)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return p.Guard.isTextNode(this._endNode)&&(n+=this._endNode._data.substring(0,this._endOffset)),n},t._create=function(e,n){var r=new t;return e&&(r._start=e),n&&(r._end=n),r},t.START_TO_START=0,t.START_TO_END=1,t.END_TO_END=2,t.END_TO_START=3,t}(l.AbstractRangeImpl);t.RangeImpl=f,d.idl_defineConst(f.prototype,"START_TO_START",0),d.idl_defineConst(f.prototype,"START_TO_END",1),d.idl_defineConst(f.prototype,"END_TO_END",2),d.idl_defineConst(f.prototype,"END_TO_START",3)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(102),a=n(0),s=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i._iteratorCollection=void 0,i._reference=n,i._pointerBeforeReference=r,a.nodeIterator_iteratorList().add(i),i}return i(t,e),Object.defineProperty(t.prototype,"referenceNode",{get:function(){return this._reference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pointerBeforeReferenceNode",{get:function(){return this._pointerBeforeReference},enumerable:!0,configurable:!0}),t.prototype.nextNode=function(){return a.nodeIterator_traverse(this,!0)},t.prototype.previousNode=function(){return a.nodeIterator_traverse(this,!1)},t.prototype.detach=function(){a.nodeIterator_iteratorList().delete(this)},t._create=function(e,n,r){return new t(e,n,r)},t}(o.TraverserImpl);t.NodeIteratorImpl=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(102),s=n(0),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._current=n,r}return i(t,e),Object.defineProperty(t.prototype,"currentNode",{get:function(){return this._current},set:function(e){this._current=e},enumerable:!0,configurable:!0}),t.prototype.parentNode=function(){for(var e=this._current;null!==e&&e!==this._root;)if(null!==(e=e._parent)&&s.traversal_filter(this,e)===o.FilterResult.Accept)return this._current=e,e;return null},t.prototype.firstChild=function(){return s.treeWalker_traverseChildren(this,!0)},t.prototype.lastChild=function(){return s.treeWalker_traverseChildren(this,!1)},t.prototype.nextSibling=function(){return s.treeWalker_traverseSiblings(this,!0)},t.prototype.previousNode=function(){for(var e=this._current;e!==this._root;){for(var t=e._previousSibling;t;){e=t;for(var n=s.traversal_filter(this,e);n!==o.FilterResult.Reject&&e._lastChild;)e=e._lastChild,n=s.traversal_filter(this,e);if(n===o.FilterResult.Accept)return this._current=e,e;t=e._previousSibling}if(e===this._root||null===e._parent)return null;if(e=e._parent,s.traversal_filter(this,e)===o.FilterResult.Accept)return this._current=e,e}return null},t.prototype.previousSibling=function(){return s.treeWalker_traverseSiblings(this,!1)},t.prototype.nextNode=function(){for(var e=this._current,t=o.FilterResult.Accept;;){for(;t!==o.FilterResult.Reject&&e._firstChild;)if(e=e._firstChild,(t=s.traversal_filter(this,e))===o.FilterResult.Accept)return this._current=e,e;for(var n=null,r=e;null!==r;){if(r===this._root)return null;if(null!==(n=r._nextSibling)){e=n;break}r=r._parent}if((t=s.traversal_filter(this,e))===o.FilterResult.Accept)return this._current=e,e}},t._create=function(e,n){return new t(e,n)},t}(a.TraverserImpl);t.TreeWalkerImpl=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(12),o=function(){function e(){}return e.prototype.acceptNode=function(e){return r.FilterResult.Accept},e._create=function(){return new e},e.FILTER_ACCEPT=1,e.FILTER_REJECT=2,e.FILTER_SKIP=3,e.SHOW_ALL=4294967295,e.SHOW_ELEMENT=1,e.SHOW_ATTRIBUTE=2,e.SHOW_TEXT=4,e.SHOW_CDATA_SECTION=8,e.SHOW_ENTITY_REFERENCE=16,e.SHOW_ENTITY=32,e.SHOW_PROCESSING_INSTRUCTION=64,e.SHOW_COMMENT=128,e.SHOW_DOCUMENT=256,e.SHOW_DOCUMENT_TYPE=512,e.SHOW_DOCUMENT_FRAGMENT=1024,e.SHOW_NOTATION=2048,e}();t.NodeFilterImpl=o,i.idl_defineConst(o.prototype,"FILTER_ACCEPT",1),i.idl_defineConst(o.prototype,"FILTER_REJECT",2),i.idl_defineConst(o.prototype,"FILTER_SKIP",3),i.idl_defineConst(o.prototype,"SHOW_ALL",4294967295),i.idl_defineConst(o.prototype,"SHOW_ELEMENT",1),i.idl_defineConst(o.prototype,"SHOW_ATTRIBUTE",2),i.idl_defineConst(o.prototype,"SHOW_TEXT",4),i.idl_defineConst(o.prototype,"SHOW_CDATA_SECTION",8),i.idl_defineConst(o.prototype,"SHOW_ENTITY_REFERENCE",16),i.idl_defineConst(o.prototype,"SHOW_ENTITY",32),i.idl_defineConst(o.prototype,"SHOW_PROCESSING_INSTRUCTION",64),i.idl_defineConst(o.prototype,"SHOW_COMMENT",128),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT",256),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT_TYPE",512),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT_FRAGMENT",1024),i.idl_defineConst(o.prototype,"SHOW_NOTATION",2048)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,i,o,a,s,l){this._type=e,this._target=t,this._addedNodes=n,this._removedNodes=r,this._previousSibling=i,this._nextSibling=o,this._attributeName=a,this._attributeNamespace=s,this._oldValue=l}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addedNodes",{get:function(){return this._addedNodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removedNodes",{get:function(){return this._removedNodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this._previousSibling},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this._nextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this._attributeName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeNamespace",{get:function(){return this._attributeNamespace},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._oldValue},enumerable:!0,configurable:!0}),e._create=function(t,n,r,i,o,a,s,l,u){return new e(t,n,r,i,o,a,s,l,u)},e}();t.MutationRecordImpl=r},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(9),a=n(7),s=n(0),l=function(){function e(e,t){this._element=e,this._attribute=t,this._tokenSet=new Set;var n=t._localName,r=s.element_getAnAttributeValue(e,n),o=this;this._element._attributeChangeSteps.push((function(e,t,n,r,i){t===o._attribute._localName&&null===i&&(r?o._tokenSet=s.orderedSet_parse(r):o._tokenSet.clear())})),i.dom.features.steps&&s.dom_runAttributeChangeSteps(e,n,r,r,null)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._tokenSet.size},enumerable:!0,configurable:!0}),e.prototype.item=function(e){var t,n,i=0;try{for(var o=r(this._tokenSet),a=o.next();!a.done;a=o.next()){var s=a.value;if(i===e)return s;i++}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return null},e.prototype.contains=function(e){return this._tokenSet.has(e)},e.prototype.add=function(){for(var e,t,n=[],i=0;i=97&&n<=122||n>=65&&n<=90||58===n||95===n||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533||0!==t&&(45===n||46===n||n>=48&&n<=57||183===n||n>=768&&n<=879||n>=8255&&n<=8256))){if(n>=55296&&n<=56319&&t=56320&&r<=57343&&(t++,(n=1024*(n-55296)+r-56320+65536)>=65536&&n<=983039))continue}return!1}}return!0},t.xml_isQName=function(e){for(var t=!1,n=0;n=97&&r<=122||r>=65&&r<=90||95===r||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||0!==n&&(45===r||46===r||r>=48&&r<=57||183===r||r>=768&&r<=879||r>=8255&&r<=8256))){if(0===n||58!==r){if(r>=55296&&r<=56319&&n=56320&&i<=57343&&(n++,(r=1024*(r-55296)+i-56320+65536)>=65536&&r<=983039))continue}return!1}if(t)return!1;if(n===e.length-1)return!1;t=!0}}return!0},t.xml_isLegalChar=function(e){for(var t=0;t=32&&n<=55295||n>=57344&&n<=65533)){if(n>=55296&&n<=56319&&t=56320&&r<=57343&&(t++,(n=1024*(n-55296)+r-56320+65536)>=65536&&n<=1114111))continue}return!1}}return!0},t.xml_isPubidChar=function(e){for(var t=0;t=97&&n<=122||n>=65&&n<=90||n>=39&&n<=59||32===n||13===n||10===n||n>=35&&n<=37||33===n||61===n||63===n||64===n||95===n))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(17);t.boundaryPoint_position=function e(t,n){var o=t[0],a=t[1],s=n[0],l=n[1];if(console.assert(i.tree_rootNode(o)===i.tree_rootNode(s),"Boundary points must share the same root node."),o===s)return a===l?r.BoundaryPosition.Equal:a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(7),s=n(29),l=n(107),u=n(30),c=n(37),d=n(52);t.node_stringReplaceAll=function(e,t){var n=null;""!==e&&(n=s.create_text(t._nodeDocument,e)),c.mutation_replaceAll(n,t)},t.node_clone=function e(t,n,a){var l,p,f,h,m;if(void 0===n&&(n=null),void 0===a&&(a=!1),null===n&&(n=t._nodeDocument),o.Guard.isElementNode(t)){m=d.element_createAnElement(n,t._localName,t._namespace,t._namespacePrefix,t._is,!1);try{for(var g=r(t._attributeList),v=g.next();!v.done;v=g.next()){var y=e(v.value,n);d.element_append(y,m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(p=g.return)&&p.call(g)}finally{if(l)throw l.error}}}else if(o.Guard.isDocumentNode(t)){var b=s.create_document();b._encoding=t._encoding,b._contentType=t._contentType,b._URL=t._URL,b._origin=t._origin,b._type=t._type,b._mode=t._mode,m=b}else if(o.Guard.isDocumentTypeNode(t))m=s.create_documentType(n,t._name,t._publicId,t._systemId);else if(o.Guard.isAttrNode(t)){var w=s.create_attr(n,t.localName);w._namespace=t._namespace,w._namespacePrefix=t._namespacePrefix,w._value=t._value,m=w}else m=o.Guard.isExclusiveTextNode(t)?s.create_text(n,t._data):o.Guard.isCDATASectionNode(t)?s.create_cdataSection(n,t._data):o.Guard.isCommentNode(t)?s.create_comment(n,t._data):o.Guard.isProcessingInstructionNode(t)?s.create_processingInstruction(n,t._target,t._data):o.Guard.isDocumentFragmentNode(t)?s.create_documentFragment(n):Object.create(t);if(o.Guard.isDocumentNode(m)?(m._nodeDocument=m,n=m):m._nodeDocument=n,i.dom.features.steps&&u.dom_runCloningSteps(m,t,n,a),a)try{for(var x=r(t._children),S=x.next();!S.done;S=x.next()){var C=e(S.value,n,!0);c.mutation_append(C,m)}}catch(e){f={error:e}}finally{try{S&&!S.done&&(h=x.return)&&h.call(x)}finally{if(f)throw f.error}}return m},t.node_equals=function e(t,n){var i,a,s,l;if(t._nodeType!==n._nodeType)return!1;if(o.Guard.isDocumentTypeNode(t)&&o.Guard.isDocumentTypeNode(n)){if(t._name!==n._name||t._publicId!==n._publicId||t._systemId!==n._systemId)return!1}else if(o.Guard.isElementNode(t)&&o.Guard.isElementNode(n)){if(t._namespace!==n._namespace||t._namespacePrefix!==n._namespacePrefix||t._localName!==n._localName||t._attributeList.length!==n._attributeList.length)return!1}else if(o.Guard.isAttrNode(t)&&o.Guard.isAttrNode(n)){if(t._namespace!==n._namespace||t._localName!==n._localName||t._value!==n._value)return!1}else if(o.Guard.isProcessingInstructionNode(t)&&o.Guard.isProcessingInstructionNode(n)){if(t._target!==n._target||t._data!==n._data)return!1}else if(o.Guard.isCharacterDataNode(t)&&o.Guard.isCharacterDataNode(n)&&t._data!==n._data)return!1;if(o.Guard.isElementNode(t)&&o.Guard.isElementNode(n)){var u={};try{for(var c=r(t._attributeList),d=c.next();!d.done;d=c.next())u[(h=d.value)._localName]=h}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}try{for(var p=r(n._attributeList),f=p.next();!f.done;f=p.next()){var h,m=f.value;if(!(h=u[m._localName]))return!1;if(!e(h,m))return!1}}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}if(t._children.size!==n._children.size)return!1;for(var g=t._children[Symbol.iterator](),v=n._children[Symbol.iterator](),y=g.next(),b=v.next();!y.done&&!b.done;){if(!e(y.value,b.value))return!1;y=g.next(),b=v.next()}return!0},t.node_listOfElementsWithQualifiedName=function(e,t){return"*"===e?s.create_htmlCollection(t):"html"===t._nodeDocument._type?s.create_htmlCollection(t,(function(t){return t._namespace===a.namespace.HTML&&t._qualifiedName===e.toLowerCase()||t._namespace!==a.namespace.HTML&&t._qualifiedName===e})):s.create_htmlCollection(t,(function(t){return t._qualifiedName===e}))},t.node_listOfElementsWithNamespace=function(e,t,n){return""===e&&(e=null),"*"===e&&"*"===t?s.create_htmlCollection(n):"*"===e?s.create_htmlCollection(n,(function(e){return e._localName===t})):"*"===t?s.create_htmlCollection(n,(function(t){return t._namespace===e})):s.create_htmlCollection(n,(function(n){return n._localName===t&&n._namespace===e}))},t.node_listOfElementsWithClassNames=function(e,t){var n=l.orderedSet_parse(e);if(0===n.size)return s.create_htmlCollection(t,(function(){return!1}));var r="quirks"!==t._nodeDocument._mode;return s.create_htmlCollection(t,(function(e){var t=e.classList;return l.orderedSet_contains(t._tokenSet,n,r)}))},t.node_locateANamespacePrefix=function e(t,n){if(t._namespace===n&&null!==t._namespacePrefix)return t._namespacePrefix;for(var r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(9),s=n(29),l=n(17),u=n(106),c=n(37);t.text_contiguousTextNodes=function(e,t){var n;return void 0===t&&(t=!1),(n={})[Symbol.iterator]=function(){for(var n=e;n&&o.Guard.isTextNode(n._previousSibling);)n=n._previousSibling;return{next:function(){if(n&&!t&&n===e&&(n=o.Guard.isTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=o.Guard.isTextNode(n._nextSibling)?n._nextSibling:null,r}}},n},t.text_contiguousExclusiveTextNodes=function(e,t){var n;return void 0===t&&(t=!1),(n={})[Symbol.iterator]=function(){for(var n=e;n&&o.Guard.isExclusiveTextNode(n._previousSibling);)n=n._previousSibling;return{next:function(){if(n&&!t&&n===e&&(n=o.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=o.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null,r}}},n},t.text_descendantTextContent=function(e){for(var t="",n=l.tree_getFirstDescendantNode(e,!1,!1,(function(e){return o.Guard.isTextNode(e)}));null!==n;)t+=n._data,n=l.tree_getNextDescendantNode(e,n,!1,!1,(function(e){return o.Guard.isTextNode(e)}));return t},t.text_split=function(e,t){var n,o,d=e._data.length;if(t>d)throw new a.IndexSizeError;var p=d-t,f=u.characterData_substringData(e,t,p),h=s.create_text(e._nodeDocument,f),m=e._parent;if(null!==m){c.mutation_insert(h,m,e._nextSibling);try{for(var g=r(i.dom.rangeList),v=g.next();!v.done;v=g.next()){var y=v.value;y._start[0]===e&&y._start[1]>t&&(y._start[0]=h,y._start[1]-=t),y._end[0]===e&&y._end[1]>t&&(y._end[0]=h,y._end[1]-=t);var b=l.tree_index(e);y._start[0]===m&&y._start[1]===b+1&&y._start[1]++,y._end[0]===m&&y._end[1]===b+1&&y._end[1]++}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}}return u.characterData_replaceData(e,t,p,""),h}},function(e,t,n){"use strict";var r=n(4),i=n(41),o=n(24),a=n(48),s=[].join,l=i!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:l||!u},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(110),o=function(){function e(e,t){this._options={skipWhitespaceOnlyText:!1},this.err={line:-1,col:-1,index:-1,str:""},this._str=e,this._index=0,this._length=e.length,t&&(this._options.skipWhitespaceOnlyText=t.skipWhitespaceOnlyText||!1)}return e.prototype.nextToken=function(){if(this.eof())return{type:i.TokenType.EOF};var t=this.skipIfStartsWith("<")?this.openBracket():this.text();return this._options.skipWhitespaceOnlyText&&t.type===i.TokenType.Text&&e.isWhiteSpaceToken(t)&&(t=this.nextToken()),t},e.prototype.openBracket=function(){return this.skipIfStartsWith("?")?this.skipIfStartsWith("xml")?e.isSpace(this._str[this._index])?this.declaration():(this.seek(-3),this.pi()):this.pi():this.skipIfStartsWith("!")?this.skipIfStartsWith("--")?this.comment():this.skipIfStartsWith("[CDATA[")?this.cdata():this.skipIfStartsWith("DOCTYPE")?this.doctype():void this.throwError("Invalid '!' in opening tag."):this.skipIfStartsWith("/")?this.closeTag():this.openTag()},e.prototype.declaration=function(){for(var e="",t="",n="";!this.eof();){if(this.skipSpace(),this.skipIfStartsWith("?>"))return{type:i.TokenType.Declaration,version:e,encoding:t,standalone:n};var o=r(this.attribute(),2),a=o[0],s=o[1];"version"===a?e=s:"encoding"===a?t=s:"standalone"===a?n=s:this.throwError("Invalid attribute name: "+a)}this.throwError("Missing declaration end symbol `?>`")},e.prototype.doctype=function(){var e="",t="";this.skipSpace();var n=this.takeUntil2("[",">",!0);return this.skipSpace(),this.skipIfStartsWith("PUBLIC")?(e=this.quotedString(),t=this.quotedString()):this.skipIfStartsWith("SYSTEM")&&(t=this.quotedString()),this.skipSpace(),this.skipIfStartsWith("[")&&(this.skipUntil("]"),this.skipIfStartsWith("]")||this.throwError("Missing end bracket of DTD internal subset")),this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing doctype end symbol `>`"),{type:i.TokenType.DocType,name:n,pubId:e,sysId:t}},e.prototype.pi=function(){var e=this.takeUntilStartsWith("?>",!0);if(this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.skipSpace(),this.skipIfStartsWith("?>"))return{type:i.TokenType.PI,target:e,data:""};var t=this.takeUntilStartsWith("?>");return this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.seek(2),{type:i.TokenType.PI,target:e,data:t}},e.prototype.text=function(){var e=this.takeUntil("<");return{type:i.TokenType.Text,data:e}},e.prototype.comment=function(){var e=this.takeUntilStartsWith("--\x3e");return this.eof()&&this.throwError("Missing comment end symbol `--\x3e`"),this.seek(3),{type:i.TokenType.Comment,data:e}},e.prototype.cdata=function(){var e=this.takeUntilStartsWith("]]>");return this.eof()&&this.throwError("Missing CDATA end symbol `]>`"),this.seek(3),{type:i.TokenType.CDATA,data:e}},e.prototype.openTag=function(){this.skipSpace();var e=this.takeUntil2(">","/",!0);if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:i.TokenType.Element,name:e,attributes:[],selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:i.TokenType.Element,name:e,attributes:[],selfClosing:!0};for(var t=[];!this.eof();){if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:i.TokenType.Element,name:e,attributes:t,selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:i.TokenType.Element,name:e,attributes:t,selfClosing:!0};var n=this.attribute();t.push(n)}this.throwError("Missing opening element tag end symbol `>`")},e.prototype.closeTag=function(){this.skipSpace();var e=this.takeUntil(">",!0);return this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing closing element tag end symbol `>`"),{type:i.TokenType.ClosingTag,name:e}},e.prototype.attribute=function(){this.skipSpace();var e=this.takeUntil("=",!0);return this.skipSpace(),this.skipIfStartsWith("=")||this.throwError("Missing equals sign before attribute value"),[e,this.quotedString()]},e.prototype.quotedString=function(){this.skipSpace();var t=this.take(1);e.isQuote(t)||this.throwError("Missing start quote character before quoted value");var n=this.takeUntil(t);return this.skipIfStartsWith(t)||this.throwError("Missing end quote character after quoted value"),n},e.prototype.eof=function(){return this._index>=this._length},e.prototype.skipIfStartsWith=function(e){var t=e.length;if(1===t)return this._str[this._index]===e&&(this._index++,!0);for(var n=0;nthis._length&&(this._index=this._length)},e.prototype.skipSpace=function(){for(;!this.eof()&&e.isSpace(this._str[this._index]);)this._index++},e.prototype.take=function(e){if(1===e)return this._str[this._index++];var t=this._index;return this.seek(e),this._str.slice(t,this._index)},e.prototype.takeUntil=function(t,n){void 0===n&&(n=!1);for(var r=this._index;this._indexthis._index){o=n.index;break}throw this.err={line:r,col:this._index-i,index:this._index,str:this._str.substring(i,o)},new Error(e+"\nIndex: "+this.err.index+"\nLn: "+this.err.line+", Col: "+this.err.col+"\nInput: "+this.err.str)},e.prototype[Symbol.iterator]=function(){return this._index=0,{next:function(){var e=this.nextToken();return e.type===i.TokenType.EOF?{done:!0,value:null}:{done:!1,value:e}}.bind(this)}},e}();t.XMLStringLexer=o},function(e,t,n){"use strict";var r=n(39);e.exports=new r({include:[n(181)]})},function(e,t,n){"use strict";var r=n(39);e.exports=new r({include:[n(112)],implicit:[n(289),n(290),n(291),n(292)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(90),i=n(1),o=n(3),a=n(76),s=n(108);function l(e,t){var n=c(void 0===e||u(e)?e:r.DefaultBuilderOptions),i=u(e)?t:e,o=s.createDocument();d(o,n);var l=new a.XMLBuilderImpl(o);return void 0!==i&&l.ele(i),l}function u(e){if(!i.isPlainObject(e))return!1;for(var t in e)if(e.hasOwnProperty(t)&&!r.XMLBuilderOptionKeys.has(t))return!1;return!0}function c(e){void 0===e&&(e={});var t=i.applyDefaults(e,r.DefaultBuilderOptions);if(0===t.convert.att.length||0===t.convert.ins.length||0===t.convert.text.length||0===t.convert.cdata.length||0===t.convert.comment.length)throw new Error("JS object converter strings cannot be zero length.");return t}function d(e,t,n){var r=e;r._xmlBuilderOptions=t,r._isFragment=n}t.builder=function(e,t){var n=c(u(e)?e:r.DefaultBuilderOptions),s=o.Guard.isNode(e)||i.isArray(e)?e:t;if(void 0===s)throw new Error("Invalid arguments.");if(i.isArray(s)){for(var l=[],d=0;d0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(90),a=n(1),s=n(216),l=n(2),u=n(3),c=n(0),d=n(108),p=n(7),f=n(276),h=function(){function e(e){this._domNode=e}return Object.defineProperty(e.prototype,"node",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.set=function(e){return this._options=a.applyDefaults(a.applyDefaults(this._options,e,!0),o.DefaultBuilderOptions),this},e.prototype.ele=function(t,n,i){var o,s,l,u,p,h;if(a.isObject(t))return new f.ObjectReader(this._options).parse(this,t);if(null!==t&&/^\s*0&&(void 0===e&&(e=t.slice(r+1)),t=t.slice(0,r)),void 0===e)e=n?this._options.defaultNamespace.ele:this._options.defaultNamespace.att;else if(null!==e&&"@"===e[0]){var i=e.slice(1);if(void 0===(e=this._options.namespaceAlias[i]))throw new Error("Namespace alias `"+i+"` is not defined. "+this._debugInfo())}return[e,t]},e.prototype._updateNamespace=function(t){var n,o,a,s,l=this._domNode;if(u.Guard.isElementNode(l)&&null!==t&&l.namespaceURI!==t){var d=r(c.namespace_extractQName(l.prefix?l.prefix+":"+l.localName:l.localName),2),p=d[0],f=d[1],h=c.create_element(this._doc,f,t,p);try{for(var m=i(l.attributes),g=m.next();!g.done;g=m.next()){var v=g.value,y=v.prefix?v.prefix+":"+v.localName:v.localName,b=r(c.namespace_extractQName(y),1)[0],w=v.namespaceURI;null===w&&null!==b&&(w=l.lookupNamespaceURI(b)),null===w?h.setAttribute(y,v.value):h.setAttributeNS(w,y,v.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}var x=l.parentNode;if(null===x)throw new Error("Parent node is null."+this._debugInfo());x.replaceChild(h,l),this._domNode=h;try{for(var S=i(l.childNodes),C=S.next();!C.done;C=S.next()){var A=C.value.cloneNode(!0);if(h.appendChild(A),u.Guard.isElementNode(A)){var P=r(c.namespace_extractQName(A.prefix?A.prefix+":"+A.localName:A.localName),1)[0],_=h.lookupNamespaceURI(P);new e(A)._updateNamespace(_)}}}catch(e){a={error:e}}finally{try{C&&!C.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}}},Object.defineProperty(e.prototype,"_doc",{get:function(){var e=this.node;if(u.Guard.isDocumentNode(e))return e;var t=e.ownerDocument;if(!t)throw new Error("Owner document is null. "+this._debugInfo());return t},enumerable:!0,configurable:!0}),e.prototype._debugInfo=function(e){var t=this.node,n=t.parentNode;e=e||t.nodeName;var r=n?n.nodeName:"";return r?"node: <"+e+">, parent: <"+r+">":"node: <"+e+">"},Object.defineProperty(e.prototype,"_options",{get:function(){var e=this._doc;if(void 0===e._xmlBuilderOptions)throw new Error("Builder options is not set.");return e._xmlBuilderOptions},set:function(e){this._doc._xmlBuilderOptions=e},enumerable:!0,configurable:!0}),e}();t.XMLBuilderImpl=h},function(e,t,n){var r=n(11),i=n(116),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){var r=n(46),i=n(81),o=n(84),a=n(18);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(16),i=n(15),o=n(18),a=n(61);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(46);e.exports=r("document","documentElement")},function(e,t,n){var r=n(24),i=n(81).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(4),i=n(36).every,o=n(48),a=n(28),s=o("every"),l=a("every");r({target:"Array",proto:!0,forced:!s||!l},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(4),i=n(36).filter,o=n(63),a=n(28),s=o("filter"),l=a("filter");r({target:"Array",proto:!0,forced:!s||!l},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(46);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(4),i=n(36).find,o=n(129),a=n(28),s=!0,l=a("find");"find"in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(130).IteratorPrototype,i=n(60),o=n(40),a=n(62),s=n(49),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,u,!1,!0),s[u]=l,e}},function(e,t,n){var r=n(8);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(4),i=n(36).map,o=n(63),a=n(28),s=o("map"),l=a("map");r({target:"Array",proto:!0,forced:!s||!l},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(4),i=n(199).left,o=n(48),a=n(28),s=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!l},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(126),i=n(27),o=n(41),a=n(26),s=function(e){return function(t,n,s,l){r(n);var u=i(t),c=o(u),d=a(u.length),p=e?d-1:0,f=e?-1:1;if(s<2)for(;;){if(p in c){l=c[p],p+=f;break}if(p+=f,e?p<0:d<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:d>p;p+=f)p in c&&(l=n(l,c[p],p,u));return l}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(4),i=n(36).some,o=n(48),a=n(28),s=o("some"),l=a("some");r({target:"Array",proto:!0,forced:!s||!l},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(89),i=n(134);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(8);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(5),i=n(49),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(134),i=n(49),o=n(5)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(18);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(5)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r=n(13),i=n(132);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(46),i=n(15),o=n(5),a=n(16),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e=1e3),this._items=new Set,this._limit=e}return e.prototype.add=function(e){if(this._items.add(e),this._items.size>this._limit){var t=this._items.values().next();t.done||this._items.delete(t.value)}return this},e.prototype.delete=function(e){return this._items.delete(e)},e.prototype.has=function(e){return this._items.has(e)},e.prototype.clear=function(){this._items.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this._items.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;this._items.forEach((function(r){return e.call(t,r,r,n)}))},e.prototype.keys=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.keys())];case 1:return e.sent(),[2]}}))},e.prototype.values=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.values())];case 1:return e.sent(),[2]}}))},e.prototype.entries=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.entries())];case 1:return e.sent(),[2]}}))},e.prototype[Symbol.iterator]=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items)];case 1:return e.sent(),[2]}}))},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"FixedSizeSet"},enumerable:!0,configurable:!0}),e}();t.FixedSizeSet=o},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e=1e3),this._items=new Map,this._limit=e}return e.prototype.get=function(e){return this._items.get(e)},e.prototype.set=function(e,t){if(this._items.set(e,t),this._items.size>this._limit){var n=this._items.keys().next();n.done||this._items.delete(n.value)}},e.prototype.delete=function(e){return this._items.delete(e)},e.prototype.has=function(e){return this._items.has(e)},e.prototype.clear=function(){this._items.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this._items.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){this._items.forEach((function(n,r){return e.call(t,r,n)}))},e.prototype.keys=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.keys())];case 1:return e.sent(),[2]}}))},e.prototype.values=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.values())];case 1:return e.sent(),[2]}}))},e.prototype.entries=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.entries())];case 1:return e.sent(),[2]}}))},e.prototype[Symbol.iterator]=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items)];case 1:return e.sent(),[2]}}))},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"ObjectCache"},enumerable:!0,configurable:!0}),e}();t.ObjectCache=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){void 0===e&&(e=1e3),this._items=new Map,this._limit=e}return e.prototype.check=function(e,t){if(this._items.get(e)===t)return!0;if(this._items.get(t)===e)return!1;var n=Math.random()<.5;if(n?this._items.set(e,t):this._items.set(t,e),this._items.size>this._limit){var r=this._items.keys().next();r.done||this._items.delete(r.value)}return n},e}();t.CompareCache=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._initialized=!1,this._value=void 0,this._initFunc=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._initialized||(this._value=this._initFunc(),this._initialized=!0),this._value},enumerable:!0,configurable:!0}),e}();t.Lazy=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._pointer=0,this._chars=Array.from(e),this._length=this._chars.length}return Object.defineProperty(e.prototype,"eof",{get:function(){return this._pointer>=this._length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.codePoint=function(){if(void 0===this._codePoint)if(this.eof)this._codePoint=-1;else{var e=this._chars[this._pointer].codePointAt(0);this._codePoint=void 0!==e?e:-1}return this._codePoint},e.prototype.c=function(){return void 0===this._c&&(this._c=this.eof?"":this._chars[this._pointer]),this._c},e.prototype.remaining=function(){return void 0===this._remaining&&(this._remaining=this.eof?"":this._chars.slice(this._pointer+1).join("")),this._remaining},e.prototype.substring=function(){return void 0===this._substring&&(this._substring=this.eof?"":this._chars.slice(this._pointer).join("")),this._substring},Object.defineProperty(e.prototype,"pointer",{get:function(){return this._pointer},set:function(e){e!==this._pointer&&(this._pointer=e,this._codePoint=void 0,this._c=void 0,this._remaining=void 0,this._substring=void 0)},enumerable:!0,configurable:!0}),e}();t.StringWalker=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(217);t.MapWriter=r.MapWriter;var i=n(257);t.XMLWriter=i.XMLWriter;var o=n(67);t.ObjectWriter=o.ObjectWriter;var a=n(259);t.JSONWriter=a.JSONWriter;var s=n(260);t.YAMLWriter=s.YAMLWriter},function(e,t,n){"use strict";n(19),n(218),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(67),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=o.applyDefaults(n,{format:"map",wellFormed:!1,noDoubleEncoding:!1,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){var t=o.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1,noDoubleEncoding:!1,verbose:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e);return this._convertObject(n)},t.prototype._convertObject=function(e){if(o.isArray(e)){for(var t=0;t=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=d("concat"),v=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!m||!g},{concat:function(e){var t,n,r,i,o,a=s(this),d=c(a,0),p=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(d,p++,o)}return d.length=p,d}})},function(e,t,n){"use strict";var r=n(8);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r=n(222);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(13),i=n(42),o=n(5)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";n(92);var r=n(25),i=n(8),o=n(5),a=n(93),s=n(21),l=o("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),c="$0"==="a".replace(/./,"$0"),d=o("replace"),p=!!/./[d]&&""===/./[d]("a","$0"),f=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=o(e),m=!i((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!u||!c||p)||"split"===e&&!f){var v=/./[h],y=n(h,""[e],(function(e,t,n,r,i){return t.exec===a?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=y[0],w=y[1];r(String.prototype,e,b),r(RegExp.prototype,h,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}d&&s(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(136).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(42),i=n(93);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(95);t.forgivingBase64Encode=function(t){return e.from(t).toString("base64")},t.forgivingBase64Decode=function(t){return""===t?"":((t=t.replace(r.ASCIIWhiteSpace,"")).length%4==0&&(t.endsWith("==")?t=t.substr(0,t.length-2):t.endsWith("=")&&(t=t.substr(0,t.length-1))),t.length%4==1?null:/[0-9A-Za-z+/]/.test(t)?e.from(t,"base64").toString("utf8"):null)}}).call(this,n(145).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,d=s>0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)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 c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=h,a/=256,u-=8);e[n+f-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);function o(e){var t,n;if(null===e||i.isString(e)||i.isNumber(e))return e;if(i.isArray(e)){var a=new Array;try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value;a.push(o(u))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}if(i.isObject(e)){for(var c in a=new Map,e)if(e.hasOwnProperty(c)){var d=e[c];a.set(c,o(d))}return a}return e}t.parseJSONFromBytes=function(e){var t=i.utf8Decode(e);return JSON.parse.call(void 0,t)},t.serializeJSONToBytes=function(e){var t=JSON.stringify.call(void 0,e);return i.utf8Encode(t)},t.parseJSONIntoInfraValues=function(e){return o(JSON.parse.call(void 0,e))},t.convertAJSONDerivedJavaScriptValueToAnInfraValue=o},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1);t.append=function(e,t){e.push(t)},t.extend=function(e,t){e.push.apply(e,o(t))},t.prepend=function(e,t){e.unshift(t)},t.replace=function(e,t,n){var r,i,o=0;try{for(var l=a(e),u=l.next();!u.done;u=l.next()){var c=u.value;if(s.isFunction(t))t.call(null,c)&&(e[o]=n);else if(c===t)return void(e[o]=n);o++}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}},t.insert=function(e,t,n){e.splice(n,0,t)},t.remove=function(e,t){for(var n=e.length;n--;){var r=e[n];if(s.isFunction(t))t.call(null,r)&&e.splice(n,1);else if(r===t)return void e.splice(n,1)}},t.empty=function(e){e.length=0},t.contains=function(e,t){var n,r;try{for(var i=a(e),o=i.next();!o.done;o=i.next()){var l=o.value;if(s.isFunction(t)){if(t.call(null,l))return!0}else if(l===t)return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},t.size=function(e,t){var n,r;if(void 0===t)return e.length;var i=0;try{for(var o=a(e),s=o.next();!s.done;s=o.next()){var l=s.value;t.call(null,l)&&i++}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t.isEmpty=function(e){return 0===e.length},t.forEach=function(e,t){var n,i,o,s,l,u;return r(this,(function(r){switch(r.label){case 0:return void 0!==t?[3,2]:[5,a(e)];case 1:return r.sent(),[3,9];case 2:r.trys.push([2,7,8,9]),n=a(e),i=n.next(),r.label=3;case 3:return i.done?[3,6]:(o=i.value,t.call(null,o)?[4,o]:[3,5]);case 4:r.sent(),r.label=5;case 5:return i=n.next(),[3,3];case 6:return[3,9];case 7:return s=r.sent(),l={error:s},[3,9];case 8:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(l)throw l.error}return[7];case 9:return[2]}}))},t.clone=function(e){return new(Array.bind.apply(Array,o([void 0],e)))},t.sortInAscendingOrder=function(e,t){return e.sort((function(e,n){return t.call(null,e,n)?-1:1}))},t.sortInDescendingOrder=function(e,t){return e.sort((function(e,n){return t.call(null,e,n)?1:-1}))}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(95),o=n(147),a=n(146),s=n(1);function l(e,t){for(var n=0;;){var r=n=65&&l<=90?String.fromCodePoint(l+32):s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function p(e){return e.replace(/^[\t\n\f\r ]+/,"").replace(/[\t\n\f\r ]+$/,"")}function f(e,t,n){if(!s.isArray(t))return f(e,Array.from(t),n);for(var r="";n.position=97&&l<=122?String.fromCodePoint(l-32):s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},t.asciiCaseInsensitiveMatch=function(e,t){return d(e)===d(t)},t.asciiEncode=function(e){return console.assert(c(e),"asciiEncode requires an ASCII string."),u(e)},t.asciiDecode=function(e){var t,n;try{for(var i=r(e),s=i.next();!s.done;s=i.next()){var l=s.value;console.assert(a.isASCIIByte(l),"asciiDecode requires an ASCII byte sequence.")}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o.isomorphicDecode(e)},t.stripNewlines=function(e){return e.replace(/[\n\r]/g,"")},t.normalizeNewlines=function(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")},t.stripLeadingAndTrailingASCIIWhitespace=p,t.stripAndCollapseASCIIWhitespace=function(e){return p(e.replace(/[\t\n\f\r ]{2,}/g," "))},t.collectASequenceOfCodePoints=f,t.skipASCIIWhitespace=h,t.strictlySplit=function e(t,n){if(!s.isArray(t))return e(Array.from(t),n);var r={position:0},i=[],o=f((function(e){return n!==e}),t,r);for(i.push(o);r.position=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(96);t.abort_add=function(e,t){t._abortedFlag||t._abortAlgorithms.add(e)},t.abort_remove=function(e,t){t._abortAlgorithms.delete(e)},t.abort_signalAbort=function(e){var t,n;if(!e._abortedFlag){e._abortedFlag=!0;try{for(var o=r(e._abortAlgorithms),a=o.next();!a.done;a=o.next())a.value.call(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}e._abortAlgorithms.clear(),i.event_fireAnEvent("abort",e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(150),i=function(){function e(){}return e.asNode=function(e){if(r.Guard.isNode(e))return e;throw new Error("Invalid object. Node expected.")},e}();t.Cast=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return Object.defineProperty(e.prototype,"size",{get:function(){return 0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){throw new Error("Cannot add to an empty set.")},e.prototype.clear=function(){},e.prototype.delete=function(e){return!1},e.prototype.forEach=function(e,t){},e.prototype.has=function(e){return!1},e.prototype[Symbol.iterator]=function(){return new i},e.prototype.entries=function(){return new i},e.prototype.keys=function(){return new i},e.prototype.values=function(){return new i},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"EmptySet"},enumerable:!0,configurable:!0}),e}();t.EmptySet=r;var i=function(){function e(){}return e.prototype[Symbol.iterator]=function(){return this},e.prototype.next=function(){return{done:!0,value:null}},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SchemeStart=0]="SchemeStart",e[e.Scheme=1]="Scheme",e[e.NoScheme=2]="NoScheme",e[e.SpecialRelativeOrAuthority=3]="SpecialRelativeOrAuthority",e[e.PathOrAuthority=4]="PathOrAuthority",e[e.Relative=5]="Relative",e[e.RelativeSlash=6]="RelativeSlash",e[e.SpecialAuthoritySlashes=7]="SpecialAuthoritySlashes",e[e.SpecialAuthorityIgnoreSlashes=8]="SpecialAuthorityIgnoreSlashes",e[e.Authority=9]="Authority",e[e.Host=10]="Host",e[e.Hostname=11]="Hostname",e[e.Port=12]="Port",e[e.File=13]="File",e[e.FileSlash=14]="FileSlash",e[e.FileHost=15]="FileHost",e[e.PathStart=16]="PathStart",e[e.Path=17]="Path",e[e.CannotBeABaseURLPath=18]="CannotBeABaseURLPath",e[e.Query=19]="Query",e[e.Fragment=20]="Fragment"}(t.ParserState||(t.ParserState={})),t.OpaqueOrigin=["","",null,null]},function(e,t,n){"use strict";var r=n(244),i=n(246);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(247);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?M+="x":M+=k[N];if(!M.match(f)){var F=D.slice(0,O),B=D.slice(O+1),L=k.match(h);L&&(F.push(L[1]),B.unshift(L[2])),B.length&&(b="/"+B.join(".")+b),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var V=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+V,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[S])for(O=0,I=c.length;O0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var P=C.slice(-1)[0],_=(n.host||e.host||C.length>1)&&("."===P||".."===P)||""===P,O=0,E=C.length;E>=0;E--)"."===(P=C[E])?C.splice(E,1):".."===P?(C.splice(E,1),O++):O&&(C.splice(E,1),O--);if(!x&&!S)for(;O--;O)C.unshift("..");!x||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),_&&"/"!==C.join("/").substr(-1)&&C.push("");var T,D=""===C[0]||C[0]&&"/"===C[0].charAt(0);return A&&(n.hostname=n.host=D?"":C.length?C.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift())),(x=x||n.host&&C.length)&&!D&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(p[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=36)e=f(e/35);return f(r+36*e/(e+38))}function S(e){var t,n,r,i,o,a,s,u,c,d,p,h=[],g=e.length,v=0,y=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=g&&m("invalid-input"),((u=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>f((l-v)/a))&&m("overflow"),v+=u*a,!(u<(c=s<=w?1:s>=w+26?26:s-w));s+=36)a>f(l/(d=36-c))&&m("overflow"),a*=d;w=x(v-o,t=h.length+1,0==o),f(v/t)>l-y&&m("overflow"),y+=f(v/t),v%=t,h.splice(v++,0,y)}return b(h)}function C(e){var t,n,r,i,o,a,s,u,c,d,p,g,v,b,S,C=[];for(g=(e=y(e)).length,t=128,n=0,o=72,a=0;a=t&&pf((l-n)/(v=r+1))&&m("overflow"),n+=(s-t)*v,t=s,a=0;al&&m("overflow"),p==t){for(u=n,c=36;!(u<(d=c<=o?1:c>=o+26?26:c-o));c+=36)S=u-d,b=36-d,C.push(h(w(d+S%b,0))),u=f(S/b);C.push(h(w(u,0))),o=x(n,v,r==i),n=0,++r}++n,++t}return C.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:b},decode:S,encode:C,toASCII:function(e){return v(e,(function(e){return c.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return v(e,(function(e){return u.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(245)(e),n(77))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(248),t.encode=t.stringify=n(249)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c=0?(d=m.substr(0,g),p=m.substr(g+1)):(d=m,p=""),f=decodeURIComponent(d),h=decodeURIComponent(p),r(a,f)?i(a[f])?a[f].push(h):a[f]=[a[f],h]:a[f]=h}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);function o(e){return i.isBoolean(e)?e:e.capture||!1}t.eventTarget_flatten=o,t.eventTarget_flattenMore=function(e){var t=o(e),n=!1,r=!1;return i.isBoolean(e)||(n=e.once||!1,r=e.passive||!1),[t,r,n]},t.eventTarget_addEventListener=function(e,t){if(null!==t.callback){for(var n=0;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(29);t.parentNode_convertNodesIntoANode=function(e,t){for(var n,a,s=null,l=0;l=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t0;I--){var k;if(b(k=D[I],e)){T=k;break}}var M,N,R=[];try{for(var F=r(P._children),B=F.next();!B.done;B=F.next())if(y(z=B.value,e)){if(l.Guard.isDocumentTypeNode(z))throw new s.HierarchyRequestError;R.push(z)}}catch(e){i={error:e}}finally{try{B&&!B.done&&(a=F.return)&&a.call(F)}finally{if(i)throw i.error}}if(c.tree_isAncestorOf(C,x,!0))M=x,N=S;else{for(var L=x;null!==L._parent&&!c.tree_isAncestorOf(C,L._parent);)L=L._parent;if(null===L._parent)throw new Error("Parent node is null.");M=L._parent,N=1+c.tree_index(L)}if(l.Guard.isCharacterDataNode(_))(V=f.node_clone(x))._data=p.characterData_substringData(x,S,c.tree_nodeLength(x)-S),h.mutation_append(V,v),p.characterData_replaceData(x,S,c.tree_nodeLength(x)-S,"");else if(null!==_){var V=f.node_clone(_);h.mutation_append(V,v);var j=w(u.create_range([x,S],[_,c.tree_nodeLength(_)]));h.mutation_append(j,V)}try{for(var U=r(R),G=U.next();!G.done;G=U.next()){var z=G.value;h.mutation_append(z,v)}}catch(e){d={error:e}}finally{try{G&&!G.done&&(m=U.return)&&m.call(U)}finally{if(d)throw d.error}}return l.Guard.isCharacterDataNode(T)?((V=f.node_clone(C))._data=p.characterData_substringData(C,0,A),h.mutation_append(V,v),p.characterData_replaceData(C,0,A,"")):null!==T&&(V=f.node_clone(T),h.mutation_append(V,v),j=w(u.create_range([T,0],[C,A])),h.mutation_append(j,V)),e._start=[M,N],e._end=[M,N],v}t.range_collapsed=g,t.range_root=v,t.range_isContained=y,t.range_isPartiallyContained=b,t.range_setTheStart=function(e,t,n){if(l.Guard.isDocumentTypeNode(t))throw new s.InvalidNodeTypeError;if(n>c.tree_nodeLength(t))throw new s.IndexSizeError;var r=[t,n];v(e)===c.tree_rootNode(t)&&d.boundaryPoint_position(r,e._end)!==a.BoundaryPosition.After||(e._end=r),e._start=r},t.range_setTheEnd=function(e,t,n){if(l.Guard.isDocumentTypeNode(t))throw new s.InvalidNodeTypeError;if(n>c.tree_nodeLength(t))throw new s.IndexSizeError;var r=[t,n];v(e)===c.tree_rootNode(t)&&d.boundaryPoint_position(r,e._start)!==a.BoundaryPosition.Before||(e._start=r),e._end=r},t.range_select=function(e,t){var n=e._parent;if(null===n)throw new s.InvalidNodeTypeError;var r=c.tree_index(e);t._start=[n,r],t._end=[n,r+1]},t.range_extract=w,t.range_cloneTheContents=function e(t){var n,i,a,d,m,v,x=u.create_documentFragment(t._startNode._nodeDocument);if(g(t))return x;var S=t._startNode,C=t._startOffset,A=t._endNode,P=t._endOffset;S===A&&l.Guard.isCharacterDataNode(S)&&((B=f.node_clone(S))._data=p.characterData_substringData(S,C,P-C),h.mutation_append(B,x));for(var _=S;!c.tree_isAncestorOf(A,_,!0);){if(null===_._parent)throw new Error("Parent node is null.");_=_._parent}var O=null;if(!c.tree_isAncestorOf(A,S,!0))try{for(var E=r(_._children),T=E.next();!T.done;T=E.next())if(b(M=T.value,t)){O=M;break}}catch(e){n={error:e}}finally{try{T&&!T.done&&(i=E.return)&&i.call(E)}finally{if(n)throw n.error}}var D=null;if(!c.tree_isAncestorOf(S,A,!0))for(var I=o(_._children),k=I.length-1;k>0;k--){var M;if(b(M=I[k],t)){D=M;break}}var N=[];try{for(var R=r(_._children),F=R.next();!F.done;F=R.next())if(y(U=F.value,t)){if(l.Guard.isDocumentTypeNode(U))throw new s.HierarchyRequestError;N.push(U)}}catch(e){a={error:e}}finally{try{F&&!F.done&&(d=R.return)&&d.call(R)}finally{if(a)throw a.error}}if(l.Guard.isCharacterDataNode(O))(B=f.node_clone(S))._data=p.characterData_substringData(S,C,c.tree_nodeLength(S)-C),h.mutation_append(B,x);else if(null!==O){var B=f.node_clone(O);h.mutation_append(B,x);var L=e(u.create_range([S,C],[O,c.tree_nodeLength(O)]));h.mutation_append(L,B)}try{for(var V=r(N),j=V.next();!j.done;j=V.next()){var U=j.value;B=f.node_clone(U),h.mutation_append(B,x)}}catch(e){m={error:e}}finally{try{j&&!j.done&&(v=V.return)&&v.call(V)}finally{if(m)throw m.error}}return l.Guard.isCharacterDataNode(D)?((B=f.node_clone(A))._data=p.characterData_substringData(A,0,P),h.mutation_append(B,x)):null!==D&&(B=f.node_clone(D),x.append(B),L=w(u.create_range([D,0],[A,P])),h.mutation_append(L,B)),x},t.range_insert=function(e,t){var n,i;if(l.Guard.isProcessingInstructionNode(t._startNode)||l.Guard.isCommentNode(t._startNode)||l.Guard.isTextNode(t._startNode)&&null===t._startNode._parent||t._startNode===e)throw new s.HierarchyRequestError;var o,a=null;if(l.Guard.isTextNode(t._startNode))a=t._startNode;else{var u=0;try{for(var d=r(t._startNode._children),p=d.next();!p.done;p=d.next()){var f=p.value;if(u===t._startOffset){a=f;break}u++}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(null===a)o=t._startNode;else{if(null===a._parent)throw new Error("Parent node is null.");o=a._parent}h.mutation_ensurePreInsertionValidity(e,o,a),l.Guard.isTextNode(t._startNode)&&(a=m.text_split(t._startNode,t._startOffset)),e===a&&(a=e._nextSibling),null!==e._parent&&h.mutation_remove(e,e._parent);var v=null===a?c.tree_nodeLength(o):c.tree_index(a);l.Guard.isDocumentFragmentNode(e)?v+=c.tree_nodeLength(e):v++,h.mutation_preInsert(e,o,a),g(t)&&(t._end=[o,v])},t.range_getContainedNodes=function(e){var t;return(t={})[Symbol.iterator]=function(){var t=e.commonAncestorContainer,n=c.tree_getFirstDescendantNode(t);return{next:function(){for(;n&&!y(n,e);)n=c.tree_getNextDescendantNode(t,n);if(null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=c.tree_getNextDescendantNode(t,n),r}}},t},t.range_getPartiallyContainedNodes=function(e){var t;return(t={})[Symbol.iterator]=function(){var t=e.commonAncestorContainer,n=c.tree_getFirstDescendantNode(t);return{next:function(){for(;n&&!b(n,e);)n=c.tree_getNextDescendantNode(t,n);if(null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=c.tree_getNextDescendantNode(t,n),r}}},t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9);t.selectors_scopeMatchASelectorsString=function(e,t){throw new r.NotSupportedError}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(104);t.treeWalker_traverseChildren=function(e,t){for(var n=t?e._current._firstChild:e._current._lastChild;null!==n;){var o=i.traversal_filter(e,n);if(o===r.FilterResult.Accept)return e._current=n,n;if(o===r.FilterResult.Skip){var a=t?n._firstChild:n._lastChild;if(null!==a){n=a;continue}}for(;null!==n;){var s=t?n._nextSibling:n._previousSibling;if(null!==s){n=s;break}var l=n._parent;if(null===l||l===e._root||l===e._current)return null;n=l}}return null},t.treeWalker_traverseSiblings=function(e,t){var n=e._current;if(n===e._root)return null;for(;;){for(var o=t?n._nextSibling:n._previousSibling;null!==o;){n=o;var a=i.traversal_filter(e,n);if(a===r.FilterResult.Accept)return e._current=n,n;o=t?n._firstChild:n._lastChild,a!==r.FilterResult.Reject&&null!==o||(o=t?n._nextSibling:n._previousSibling)}if(null===(n=n._parent)||n===e._root)return null;if(i.traversal_filter(e,n)===r.FilterResult.Accept)return null}}},function(e,t,n){"use strict";n(88),n(73);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(2),s=n(50),l=n(3),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r._indentation={},r._lengthToLastNewline=0,r._writerOptions=o.applyDefaults(n,{wellFormed:!1,noDoubleEncoding:!1,headless:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,width:0,allowEmptyTags:!1,indentTextOnlyNodes:!1,spaceBeforeSlash:!1}),r}return i(t,e),t.prototype.serialize=function(e){return this._refs={suppressPretty:!1,emptyNode:!1,markup:""},e.nodeType!==a.NodeType.Document||this._writerOptions.headless||this.declaration(this._builderOptions.version,this._builderOptions.encoding,this._builderOptions.standalone),this.serializeNode(e,this._writerOptions.wellFormed,this._writerOptions.noDoubleEncoding),this._writerOptions.prettyPrint&&this._refs.markup.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(this._refs.markup=this._refs.markup.slice(0,-this._writerOptions.newline.length)),this._refs.markup},t.prototype.declaration=function(e,t,n){this._beginLine(),this._refs.markup+='",this._endLine()},t.prototype.docType=function(e,t,n){this._beginLine(),this._refs.markup+=t&&n?"':t?"':n?"':"",this._endLine()},t.prototype.openTagBegin=function(e){this._beginLine(),this._refs.markup+="<"+e},t.prototype.openTagEnd=function(e,t,n){if(this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._writerOptions.prettyPrint&&!t&&!n){for(var r=!0,i=!0,o=this.currentNode.firstChild,a=0,s=0;o;){if(l.Guard.isExclusiveTextNode(o))s++;else{if(!l.Guard.isCDATASectionNode(o)){r=!1,i=!1;break}a++}""!==o.data&&(i=!1),o=o.nextSibling}this._refs.suppressPretty=!this._writerOptions.indentTextOnlyNodes&&r&&(a<=1&&0===s||0===a),this._refs.emptyNode=i}(n||t||this._refs.emptyNode)&&this._writerOptions.allowEmptyTags?this._refs.markup+=">":this._refs.markup+=n?" />":t||this._refs.emptyNode?this._writerOptions.spaceBeforeSlash?" />":"/>":">",this._endLine()},t.prototype.closeTag=function(e){this._refs.emptyNode||(this._beginLine(),this._refs.markup+=""),this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._endLine()},t.prototype.attribute=function(e,t){var n=e+'="'+t+'"';this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._refs.markup.length-this._lengthToLastNewline+1+n.length>this._writerOptions.width?(this._endLine(),this._beginLine(),this._refs.markup+=this._indent(1)+n):this._refs.markup+=" "+n},t.prototype.text=function(e){""!==e&&(this._beginLine(),this._refs.markup+=e,this._endLine())},t.prototype.cdata=function(e){""!==e&&(this._beginLine(),this._refs.markup+="",this._endLine())},t.prototype.comment=function(e){this._beginLine(),this._refs.markup+="\x3c!--"+e+"--\x3e",this._endLine()},t.prototype.instruction=function(e,t){this._beginLine(),this._refs.markup+="",this._endLine()},t.prototype._beginLine=function(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._indent(this._writerOptions.offset+this.level))},t.prototype._endLine=function(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._writerOptions.newline,this._lengthToLastNewline=this._refs.markup.length)},t.prototype._indent=function(e){if(e<=0)return"";if(void 0!==this._indentation[e])return this._indentation[e];var t=this._writerOptions.indent.repeat(e);return this._indentation[e]=t,t},t}(s.BaseWriter);t.XMLWriter=u},function(e,t,n){"use strict";var r=n(47),i=n(35);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(178),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(67),s=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=s.applyDefaults(n,{wellFormed:!1,noDoubleEncoding:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){var t=s.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1,noDoubleEncoding:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e);return this._beginLine(this._writerOptions,0)+this._convertObject(n,this._writerOptions)},t.prototype._convertObject=function(e,t,n){var r,i,a=this;void 0===n&&(n=0);var l="",u=this._isLeafNode(e);if(s.isArray(e)){l+="[";var c=e.length,d=0;try{for(var p=o(e),f=p.next();!f.done;f=p.next()){var h=f.value;l+=this._endLine(t,n+1)+this._beginLine(t,n+1)+this._convertObject(h,t,n+1),d0?new Array(n).join(e.indent):""},t.prototype._endLine=function(e,t){return e.prettyPrint?e.newline:""},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t.prototype._isLeafNode=function(e){return this._descendantCount(e)<=1},t.prototype._descendantCount=function(e,t){var n=this;return void 0===t&&(t=0),s.isArray(e)?s.forEachArray(e,(function(e){return t+=n._descendantCount(e,t)}),this):s.isObject(e)?s.forEachObject(e,(function(e,r){return t+=n._descendantCount(r,t)}),this):t++,t},t}(n(50).BaseWriter);t.JSONWriter=l},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(178),n(88),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(67),s=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;if(r._writerOptions=s.applyDefaults(n,{wellFormed:!1,noDoubleEncoding:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),r._writerOptions.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(r._writerOptions.offset<0)throw new Error("YAML offset should be zero or a positive number.");return r}return i(t,e),t.prototype.serialize=function(e){var t=s.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1,noDoubleEncoding:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e),r=this._beginLine(this._writerOptions,0)+"---"+this._endLine(this._writerOptions)+this._convertObject(n,this._writerOptions,0);return r.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(r=r.slice(0,-this._writerOptions.newline.length)),r},t.prototype._convertObject=function(e,t,n,r){var i,a,l=this;void 0===r&&(r=!1);var u="";if(s.isArray(e))try{for(var c=o(e),d=c.next();!d.done;d=c.next()){var p=d.value;u+=this._beginLine(t,n,!0),s.isObject(p)?s.isEmpty(p)?u+='""'+this._endLine(t):u+=this._convertObject(p,t,n,!0):u+=this._val(p)+this._endLine(t)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}else s.forEachObject(e,(function(e,i){r?(u+=l._key(e),r=!1):u+=l._beginLine(t,n)+l._key(e),s.isObject(i)?s.isEmpty(i)?u+=' ""'+l._endLine(t):u+=l._endLine(t)+l._convertObject(i,t,n+1):u+=" "+l._val(i)+l._endLine(t)}),this);return u},t.prototype._beginLine=function(e,t,n){void 0===n&&(n=!1);var r=e.offset+t+1,i=new Array(r).join(e.indent);return n?i.substr(0,i.length-2)+"-"+i.substr(-1,1):i},t.prototype._endLine=function(e){return e.newline},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(50).BaseWriter);t.YAMLWriter=l},function(e,t,n){var r=n(4),i=n(82),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(109).dom.setFeatures(!0);var r=n(109);t.DOMImplementation=r.DOMImplementation;var i=n(271);t.DOMParser=i.DOMParser;var o=n(274);t.XMLSerializer=o.XMLSerializer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(0),o=function(){function e(){}return e.prototype.before=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(7),s=function(){function e(e){this._nodeList=[],this._recordQueue=[],this._callback=e;var t=i.dom.window;a.set.append(t._mutationObservers,this)}return e.prototype.observe=function(e,t){var n,i;if(void 0===(t=t||{childList:!1,subtree:!1}).attributeOldValue&&void 0===t.attributeFilter||void 0!==t.attributes||(t.attributes=!0),void 0!==t.characterDataOldValue&&void 0===t.characterData&&(t.characterData=!0),!t.childList&&!t.attributes&&!t.characterData)throw new TypeError;if(t.attributeOldValue&&!t.attributes)throw new TypeError;if(void 0!==t.attributeFilter&&!t.attributes)throw new TypeError;if(t.characterDataOldValue&&!t.characterData)throw new TypeError;var s=!1,l=t,u=function(e){var t,n;if(e.observer===c){s=!0;try{for(var i=(t=void 0,r(c._nodeList)),u=i.next();!u.done;u=i.next()){var d=u.value;a.list.remove(d._registeredObserverList,(function(t){return o.Guard.isTransientRegisteredObserver(t)&&t.source===e}))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.options=l}},c=this;try{for(var d=r(e._registeredObserverList),p=d.next();!p.done;p=d.next())u(p.value)}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}s||(e._registeredObserverList.push({observer:this,options:t}),this._nodeList.push(e))},e.prototype.disconnect=function(){var e,t,n=this;try{for(var i=r(this._nodeList),o=i.next();!o.done;o=i.next()){var s=o.value;a.list.remove(s._registeredObserverList,(function(e){return e.observer===n}))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this._recordQueue=[]},e.prototype.takeRecords=function(){var e=this._recordQueue;return this._recordQueue=[],e},e}();t.MutationObserverImpl=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(){function e(){}return Object.defineProperty(e.prototype,"previousElementSibling",{get:function(){for(var e=r.Cast.asNode(this)._previousSibling;e;){if(r.Guard.isElementNode(e))return e;e=e._previousSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextElementSibling",{get:function(){for(var e=r.Cast.asNode(this)._nextSibling;e;){if(r.Guard.isElementNode(e))return e;e=e._nextSibling}return null},enumerable:!0,configurable:!0}),e}();t.NonDocumentTypeChildNodeImpl=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(0),o=function(){function e(){}return e.prototype.getElementById=function(e){for(var t=i.tree_getFirstDescendantNode(r.Cast.asNode(this),!1,!1,(function(e){return r.Guard.isElementNode(e)}));null!==t;){if(t._uniqueIdentifier===e)return t;t=i.tree_getNextDescendantNode(r.Cast.asNode(this),t,!1,!1,(function(e){return r.Guard.isElementNode(e)}))}return null},e}();t.NonElementParentNodeImpl=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(0),a=function(){function e(){}return Object.defineProperty(e.prototype,"children",{get:function(){return o.create_htmlCollection(i.Cast.asNode(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){for(var e=i.Cast.asNode(this)._firstChild;e;){if(i.Guard.isElementNode(e))return e;e=e._nextSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){for(var e=i.Cast.asNode(this)._lastChild;e;){if(i.Guard.isElementNode(e))return e;e=e._previousSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){var e,t,n=0;try{for(var o=r(i.Cast.asNode(this)._children),a=o.next();!a.done;a=o.next()){var s=a.value;i.Guard.isElementNode(s)&&n++}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),e.prototype.prepend=function(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(179),a=n(110),s=n(7),l=n(0),u=n(68),c=function(){function e(){}return e.prototype.parse=function(e){for(var t,n,c,d,p=new o.XMLStringLexer(e,{skipWhitespaceOnlyText:!0}),f=l.create_document(),h=f,m=p.nextToken();m.type!==a.TokenType.EOF;){switch(m.type){case a.TokenType.Declaration:var g=m;if("1.0"!==g.version)throw new Error("Invalid xml version: "+g.version);break;case a.TokenType.DocType:var v=m;if(!l.xml_isPubidChar(v.pubId))throw new Error("DocType public identifier does not match PubidChar construct.");if(!l.xml_isLegalChar(v.sysId)||-1!==v.sysId.indexOf('"')&&-1!==v.sysId.indexOf("'"))throw new Error("DocType system identifier contains invalid characters.");h.appendChild(f.implementation.createDocumentType(v.name,v.pubId,v.sysId));break;case a.TokenType.CDATA:var y=m;if(!l.xml_isLegalChar(y.data)||-1!==y.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters.");h.appendChild(f.createCDATASection(y.data));break;case a.TokenType.Comment:var b=m;if(!l.xml_isLegalChar(b.data)||-1!==b.data.indexOf("--")||b.data.endsWith("-"))throw new Error("Comment data contains invalid characters.");h.appendChild(f.createComment(b.data));break;case a.TokenType.PI:var w=m;if(-1!==w.target.indexOf(":")||/^xml$/i.test(w.target))throw new Error("Processing instruction target contains invalid characters.");if(!l.xml_isLegalChar(w.data)||-1!==w.data.indexOf("?>"))throw new Error("Processing instruction data contains invalid characters.");h.appendChild(f.createProcessingInstruction(w.target,w.data));break;case a.TokenType.Text:var x=m;if(!l.xml_isLegalChar(x.data))throw new Error("Text data contains invalid characters.");h.appendChild(f.createTextNode(x.data));break;case a.TokenType.Element:var S=m,C=r(l.namespace_extractQName(S.name),2),A=C[0],P=C[1];if(-1!==P.indexOf(":")||!l.xml_isName(P))throw new Error("Node local name contains invalid characters.");if("xmlns"===A)throw new Error("An element cannot have the 'xmlns' prefix.");var _=h.lookupNamespaceURI(A),O={};try{for(var E=(t=void 0,i(S.attributes)),T=E.next();!T.done;T=E.next()){var D=r(T.value,2),I=D[0],k=D[1];if("xmlns"===I)_=k;else{var M=r(l.namespace_extractQName(I),2),N=M[0],R=M[1];"xmlns"===N&&(R===A&&(_=k),O[R]=k)}}}catch(e){t={error:e}}finally{try{T&&!T.done&&(n=E.return)&&n.call(E)}finally{if(t)throw t.error}}var F=null!==_?f.createElementNS(_,S.name):f.createElement(S.name);h.appendChild(F);var B=new u.LocalNameSet;try{for(var L=(c=void 0,i(S.attributes)),V=L.next();!V.done;V=L.next()){var j=r(V.value,2),U=(I=j[0],k=j[1],r(l.namespace_extractQName(I),2)),G=(N=U[0],R=U[1],null);if("xmlns"===N||null===N&&"xmlns"===R?G=s.namespace.XMLNS:null!==(G=F.lookupNamespaceURI(N))&&F.isDefaultNamespace(G)?G=null:null===G&&null!==N&&(G=O[N]||null),B.has(G,R))throw new Error("Element contains duplicate attributes.");if(B.set(G,R),G===s.namespace.XMLNS&&k===s.namespace.XMLNS)throw new Error("XMLNS namespace is reserved.");if(-1!==R.indexOf(":")||!l.xml_isName(R))throw new Error("Attribute local name contains invalid characters.");if("xmlns"===N&&""===k)throw new Error("Empty XML namespace is not allowed.");null!==G?F.setAttributeNS(G,I,k):F.setAttribute(I,k)}}catch(e){c={error:e}}finally{try{V&&!V.done&&(d=L.return)&&d.call(L)}finally{if(c)throw c.error}}S.selfClosing||(h=F);break;case a.TokenType.ClosingTag:if(m.name!==h.nodeName)throw new Error("Closing tag name does not match opening tag name.");h._parent&&(h=h._parent)}m=p.nextToken()}return f},e}();t.XMLParserImpl=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(275);t.XMLSerializer=r.XMLSerializerImpl},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(68),a=n(94),s=n(9),l=n(7),u=n(0),c=function(){function e(){}return e.prototype.serializeToString=function(e){return this._xmlSerialization(e,!1)},e.prototype._xmlSerialization=function(e,t){if(void 0===e._nodeDocument||e._nodeDocument._hasNamespaces){var n=new a.NamespacePrefixMap;n.set("xml",l.namespace.XML);try{return this._serializeNodeNS(e,null,n,{value:1},t)}catch(e){throw new s.InvalidStateError}}else try{return this._serializeNode(e,t)}catch(e){throw new s.InvalidStateError}},e.prototype._serializeNodeNS=function(e,t,n,r,o){switch(e.nodeType){case i.NodeType.Element:return this._serializeElementNS(e,t,n,r,o);case i.NodeType.Document:return this._serializeDocumentNS(e,t,n,r,o);case i.NodeType.Comment:return this._serializeComment(e,o);case i.NodeType.Text:return this._serializeText(e,o);case i.NodeType.DocumentFragment:return this._serializeDocumentFragmentNS(e,t,n,r,o);case i.NodeType.DocumentType:return this._serializeDocumentType(e,o);case i.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,o);case i.NodeType.CData:return this._serializeCData(e,o);default:throw new Error("Unknown node type: "+e.nodeType)}},e.prototype._serializeNode=function(e,t){switch(e.nodeType){case i.NodeType.Element:return this._serializeElement(e,t);case i.NodeType.Document:return this._serializeDocument(e,t);case i.NodeType.Comment:return this._serializeComment(e,t);case i.NodeType.Text:return this._serializeText(e,t);case i.NodeType.DocumentFragment:return this._serializeDocumentFragment(e,t);case i.NodeType.DocumentType:return this._serializeDocumentType(e,t);case i.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,t);case i.NodeType.CData:return this._serializeCData(e,t);default:throw new Error("Unknown node type: "+e.nodeType)}},e.prototype._serializeElementNS=function(t,n,i,o,a){var s,c;if(a&&(-1!==t.localName.indexOf(":")||!u.xml_isName(t.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");var d="<",p="",f=!1,h=!1,m=i.copy(),g={},v=this._recordNamespaceInformation(t,m,g),y=n,b=t.namespaceURI;if(y===b)null!==v&&(h=!0),d+=p=b===l.namespace.XML?"xml:"+t.localName:t.localName;else{var w=t.prefix,x=null;if(null===w&&b===v||(x=m.get(w,b)),"xmlns"===w){if(a)throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");x=w}null!==x?(p=x+":"+t.localName,null!==v&&v!==l.namespace.XML&&(y=v||null),d+=p):null!==w?(w in g&&(w=this._generatePrefix(b,m,o)),m.set(w,b),d+=p+=w+":"+t.localName,d+=" xmlns:"+w+'="'+this._serializeAttributeValue(b,a)+'"',null!==v&&(y=v||null)):null===v||null!==v&&v!==b?(h=!0,y=b,d+=p+=t.localName,d+=' xmlns="'+this._serializeAttributeValue(b,a)+'"'):(y=b,d+=p+=t.localName)}d+=this._serializeAttributesNS(t,m,o,g,h,a);var S=b===l.namespace.HTML;if(S&&0===t.childNodes.length&&e._VoidElementNames.has(t.localName)?(d+=" /",f=!0):S||0!==t.childNodes.length||(d+="/",f=!0),d+=">",f)return d;if(S&&"template"===t.localName);else try{for(var C=r(t._children||t.childNodes),A=C.next();!A.done;A=C.next()){var P=A.value;d+=this._serializeNodeNS(P,y,m,o,a)}}catch(e){s={error:e}}finally{try{A&&!A.done&&(c=C.return)&&c.call(C)}finally{if(s)throw s.error}}return d+""},e.prototype._serializeDocumentNS=function(e,t,n,i,o){var a,s;if(o&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");var l="";try{for(var u=r(e._children||e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;l+=this._serializeNodeNS(d,t,n,i,o)}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return l},e.prototype._serializeComment=function(e,t){if(t&&(!u.xml_isLegalChar(e.data)||-1!==e.data.indexOf("--")||e.data.endsWith("-")))throw new Error("Comment data contains invalid characters (well-formed required).");return"\x3c!--"+e.data+"--\x3e"},e.prototype._serializeText=function(e,t){if(t&&!u.xml_isLegalChar(e.data))throw new Error("Text data contains invalid characters (well-formed required).");for(var n="",r=0;r"===i?">":i}return n},e.prototype._serializeDocumentFragmentNS=function(e,t,n,i,o){var a,s,l="";try{for(var u=r(e._children||e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;l+=this._serializeNodeNS(d,t,n,i,o)}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return l},e.prototype._serializeDocumentType=function(e,t){if(t&&!u.xml_isPubidChar(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!u.xml_isLegalChar(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");return e.publicId&&e.systemId?"':e.publicId?"':e.systemId?"':""},e.prototype._serializeProcessingInstruction=function(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!u.xml_isLegalChar(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");return""},e.prototype._serializeCData=function(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");return""},e.prototype._serializeAttributesNS=function(e,t,n,i,a,s){var c,d,p="",f=s?new o.LocalNameSet:void 0;try{for(var h=r(e.attributes),m=h.next();!m.done;m=h.next()){var g=m.value;if(a||s||null!==g.namespaceURI){if(s&&f&&f.has(g.namespaceURI,g.localName))throw new Error("Element contains duplicate attributes (well-formed required).");s&&f&&f.set(g.namespaceURI,g.localName);var v=g.namespaceURI,y=null;if(null!==v)if(y=t.get(g.prefix,v),v===l.namespace.XMLNS){if(g.value===l.namespace.XML||null===g.prefix&&a||null!==g.prefix&&(!(g.localName in i)||i[g.localName]!==g.value)&&t.has(g.localName,g.value))continue;if(s&&g.value===l.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(s&&""===g.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===g.prefix&&(y="xmlns")}else null===y&&(p+=" xmlns:"+(y=null===g.prefix||t.hasPrefix(g.prefix)&&!t.has(g.prefix,v)?this._generatePrefix(v,t,n):g.prefix)+'="'+this._serializeAttributeValue(v,s)+'"');if(p+=" ",null!==y&&(p+=y+":"),s&&(-1!==g.localName.indexOf(":")||!u.xml_isName(g.localName)||"xmlns"===g.localName&&null===v))throw new Error("Attribute local name contains invalid characters (well-formed required).");p+=g.localName+'="'+this._serializeAttributeValue(g.value,s)+'"'}else p+=" "+g.localName+'="'+this._serializeAttributeValue(g.value,s)+'"'}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=h.return)&&d.call(h)}finally{if(c)throw c.error}}return p},e.prototype._recordNamespaceInformation=function(e,t,n){var i,o,a=null;try{for(var s=r(e.attributes),u=s.next();!u.done;u=s.next()){var c=u.value,d=c.namespaceURI,p=c.prefix;if(d===l.namespace.XMLNS){if(null===p){a=c.value;continue}var f=c.localName,h=c.value;if(h===l.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value;return n.value++,t.set(r,e),r},e.prototype._serializeAttributeValue=function(e,t){if(t&&null!==e&&!u.xml_isLegalChar(e))throw new Error("Invalid characters in attribute value.");if(null===e)return"";for(var n="",r=0;r"===i?">":i}return n},e.prototype._serializeElement=function(e,t){var n,i;if(t&&(-1!==e.localName.indexOf(":")||!u.xml_isName(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");var o=!1,a=e.localName,s="<"+a;if(s+=this._serializeAttributes(e,t),0===e._children.size&&(s+="/",o=!0),s+=">",o)return s;try{for(var l=r(e._children),c=l.next();!c.done;c=l.next()){var d=c.value;s+=this._serializeNode(d,t)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s+""},e.prototype._serializeDocument=function(e,t){var n,i;if(t&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");var o="";try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;o+=this._serializeNode(l,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype._serializeDocumentFragment=function(e,t){var n,i,o="";try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;o+=this._serializeNode(l,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype._serializeAttributes=function(e,t){var n,i,o="",a=t?{}:void 0;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var c=l.value;if(t&&a&&c.localName in a)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&a&&(a[c.localName]=!0),t&&(-1!==c.localName.indexOf(":")||!u.xml_isName(c.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");o+=" "+c.localName+'="'+this._serializeAttributeValue(c.value,t)+'"'}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e._VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),e}();t.XMLSerializerImpl=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(277);t.XMLReader=r.XMLReader;var i=n(111);t.ObjectReader=i.ObjectReader;var o=n(280);t.JSONReader=o.JSONReader;var a=n(281);t.YAMLReader=a.YAMLReader},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(65),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(179),l=n(110),u=n(7),c=n(0),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){for(var n,r,i,d,p=new s.XMLStringLexer(t,{skipWhitespaceOnlyText:!0}),f=e,h=p.nextToken();h.type!==l.TokenType.EOF;){switch(h.type){case l.TokenType.Declaration:var m=h,g=this.sanitize(m.version);if("1.0"!==g)throw new Error("Invalid xml version: "+g);var v={version:g};m.encoding&&(v.encoding=this.sanitize(m.encoding)),m.standalone&&(v.standalone="yes"===this.sanitize(m.standalone)),f.set(v);break;case l.TokenType.DocType:var y=h;f=this.docType(f,this.sanitize(y.name),this.sanitize(y.pubId),this.sanitize(y.sysId))||f;break;case l.TokenType.CDATA:var b=h;f=this.cdata(f,this.sanitize(b.data))||f;break;case l.TokenType.Comment:var w=h;f=this.comment(f,this.sanitize(w.data))||f;break;case l.TokenType.PI:var x=h;f=this.instruction(f,this.sanitize(x.target),this.sanitize(x.data))||f;break;case l.TokenType.Text:var S=h;f=this.text(f,this.sanitize(S.data))||f;break;case l.TokenType.Element:var C=h,A=this.sanitize(C.name),P=o(c.namespace_extractQName(A),1)[0],_=f.node.lookupNamespaceURI(P),O={};try{for(var E=(n=void 0,a(C.attributes)),T=E.next();!T.done;T=E.next()){var D=o(T.value,2),I=D[0],k=D[1];if(I=this.sanitize(I),k=this.sanitize(k),"xmlns"===I)_=k;else{var M=o(c.namespace_extractQName(I),2),N=M[0],R=M[1];"xmlns"===N&&(R===P&&(_=k),O[R]=k)}}}catch(e){n={error:e}}finally{try{T&&!T.done&&(r=E.return)&&r.call(E)}finally{if(n)throw n.error}}var F=null!==_?this.element(f,_,A):this.element(f,void 0,A);if(void 0===F)break;try{for(var B=(i=void 0,a(C.attributes)),L=B.next();!L.done;L=B.next()){var V=o(L.value,2);I=V[0],k=V[1],I=this.sanitize(I),k=this.sanitize(k);var j=o(c.namespace_extractQName(I),2),U=(N=j[0],R=j[1],null);"xmlns"===N||null===N&&"xmlns"===R?U=u.namespace.XMLNS:null!==(U=F.node.lookupNamespaceURI(N))&&F.node.isDefaultNamespace(U)?U=null:null===U&&null!==N&&(U=O[N]||null),null!==U?this.attribute(F,U,I,k):this.attribute(F,void 0,I,k)}}catch(e){i={error:e}}finally{try{L&&!L.done&&(d=B.return)&&d.call(B)}finally{if(i)throw i.error}}C.selfClosing||(f=F);break;case l.TokenType.ClosingTag:f.node.parentNode&&(f=f.up())}h=p.nextToken()}return f},t}(n(74).BaseReader);t.XMLReader=d},function(e,t,n){var r=n(4),i=n(279);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){"use strict";var r=n(16),i=n(8),o=n(61),a=n(84),s=n(78),l=n(27),u=n(41),c=Object.assign,d=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,c=1,d=a.f,p=s.f;i>c;)for(var f,h=u(arguments[c++]),m=d?o(h).concat(d(h)):o(h),g=m.length,v=0;g>v;)f=m[v++],r&&!p.call(h,f)||(n[f]=h[f]);return n}:c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(111),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){return new o.ObjectReader(this._builderOptions).parse(e,JSON.parse(t))},t}(n(74).BaseReader);t.JSONReader=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(111),a=n(74),s=n(282),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){var n=s.safeLoad(t);if(void 0===n)throw new Error("Unable to parse YAML document.");return new o.ObjectReader(this._builderOptions).parse(e,n)},t}(a.BaseReader);t.YAMLReader=l},function(e,t,n){"use strict";var r=n(283);e.exports=r},function(e,t,n){"use strict";var r=n(284),i=n(303);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(10),e.exports.Schema=n(39),e.exports.FAILSAFE_SCHEMA=n(112),e.exports.JSON_SCHEMA=n(181),e.exports.CORE_SCHEMA=n(180),e.exports.DEFAULT_SAFE_SCHEMA=n(54),e.exports.DEFAULT_FULL_SCHEMA=n(75),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n(53),e.exports.MINIMAL_SCHEMA=n(112),e.exports.SAFE_SCHEMA=n(54),e.exports.DEFAULT_SCHEMA=n(75),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},function(e,t,n){"use strict";var r=n(38),i=n(53),o=n(285),a=n(54),s=n(75),l=Object.prototype.hasOwnProperty,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[\x85\u2028\u2029]/,d=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,f=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function v(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function w(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var S=new Array(256),C=new Array(256),A=0;A<256;A++)S[A]=w(A)?1:0,C[A]=w(A);function P(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function O(e,t){throw _(e,t)}function E(e,t){e.onWarning&&e.onWarning.call(null,_(e,t))}var T={YAML:function(e,t,n){var r,i,o;null!==e.version&&O(e,"duplication of %YAML directive"),1!==n.length&&O(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&O(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&O(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&E(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&O(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&O(e,'there is a previously declared suffix for "'+r+'" tag handle'),f.test(i)||O(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function D(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function B(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&v(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,N(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,j(e,t,3,!1,!0),a.push(e.result),N(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)O(e,"bad indentation of a sequence entry");else if(e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt)&&(j(e,t,4,!0,i)&&(m?f=e.result:h=e.result),m||(k(e,c,d,p,f,h,o,a),p=f=h=null),N(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)O(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(e,"repeat of an indentation width identifier"):(d=t+o-1,c=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(M(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndentd&&(d=e.lineIndent),m(a))p++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:O(e,"expected hexadecimal character");e.result+=x(o),e.position++}else O(e,"unknown escape sequence");n=r=e.position}else m(s)?(D(e,n,r,!0),F(e,N(e,!1,t)),n=r=e.position):e.position===e.lineStart&&R(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?P=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!v(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||O(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],N(e,!0,-1),!0}(e)?(P=!0,null===e.tag&&null===e.anchor||O(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,u,c,d=e.kind,p=e.result;if(v(c=e.input.charCodeAt(e.position))||y(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(v(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==c;){if(58===c){if(v(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===c){if(v(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||n&&y(c))break;if(m(c)){if(s=e.line,l=e.lineStart,u=e.lineIndent,N(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}a&&(D(e,i,o,!1),F(e,e.line-s),i=o=e.position,a=!1),g(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return D(e,i,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}(e,f,1===n)&&(P=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===w&&(P=u&&B(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&O(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,d=e.implicitTypes.length;c tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):O(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||P}function U(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(N(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&M(e),l.call(T,n)?T[n](e,n,r):E(e,'unknown document directive "'+n+'"')}N(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,N(e,!0,-1)):a&&O(e,"directives end mark is expected"),j(e,e.lineIndent-1,4,!1,!0),N(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(o,e.position))&&E(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&R(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,N(e,!0,-1)):e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(38),i=n(10);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(38),i=n(10),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(10),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,u,c,d=0,p=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],u=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),c=new Date(Date.UTC(n,r,a,s,l,u,d)),p&&c.setTime(c.getTime()-p),c},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(145).Buffer}catch(e){}var i=n(10),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,l=0,u=[];for(t=0;t>16&255),u.push(l>>8&255),u.push(255&l)),l=l<<6|s.indexOf(i.charAt(t));return 0==(n=a%4*6)?(u.push(l>>16&255),u.push(l>>8&255),u.push(255&l)):18===n?(u.push(l>>10&255),u.push(l>>2&255)):12===n&&u.push(l>>4&255),r?r.from?r.from(u):new r(u):u},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0==(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";var r=n(10),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],u=e;for(t=0,n=u.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(302)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var i=n(10);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?s:null,u=!1;if(t){u="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(u||c)&&((a=new r.CommentHandler).attach=c,t.comment=!0,l=s)}var d,p=!1;t&&"string"==typeof t.sourceType&&(p="module"===t.sourceType),d=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,l):new o.Parser(e,t,l);var f=p?d.parseModule():d.parseScript();return u&&a&&(f.comments=a.comments),d.config.tokens&&(f.tokens=d.tokens),d.config.tolerant&&(f.errors=d.errorHandler.errors),f}t.parse=s,t.parseModule=function(e,t,n){var r=t||{};return r.sourceType="module",s(e,r,n)},t.parseScript=function(e,t,n){var r=t||{};return r.sourceType="script",s(e,r,n)},t.tokenize=function(e,t,n){var r,i=new a.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=e.start.offset;)t=o.node,this.stack.pop();if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),l=n(7),u=n(8),c=n(13),d=n(14);function p(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=p(n.namespace)+":"+p(n.name);break;case s.JSXSyntax.JSXMemberExpression:var r=e;t=p(r.object)+"."+p(r.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var f=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,a=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!a);break;default:n=(n=n&&!(i&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var l=t.substr(1,t.length-2);i&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):i||a||!d.XHTMLEntities[l]||(t=d.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],r="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)r+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var i=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===i&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new a.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6);t.JSXClosingElement=function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e};t.JSXElement=function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXEmptyExpression=function(){this.type=r.JSXSyntax.JSXEmptyExpression};t.JSXExpressionContainer=function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXIdentifier=function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e};t.JSXMemberExpression=function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXAttribute=function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXNamespacedName=function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXOpeningElement=function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXSpreadAttribute=function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXText=function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);t.ArrayExpression=function(e){this.type=r.Syntax.ArrayExpression,this.elements=e};t.ArrayPattern=function(e){this.type=r.Syntax.ArrayPattern,this.elements=e};t.ArrowFunctionExpression=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.AssignmentExpression=function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentPattern=function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AsyncArrowFunctionExpression=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncFunctionDeclaration=function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AwaitExpression=function(e){this.type=r.Syntax.AwaitExpression,this.argument=e};t.BinaryExpression=function(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BlockStatement=function(e){this.type=r.Syntax.BlockStatement,this.body=e};t.BreakStatement=function(e){this.type=r.Syntax.BreakStatement,this.label=e};t.CallExpression=function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CatchClause=function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t};t.ClassBody=function(e){this.type=r.Syntax.ClassBody,this.body=e};t.ClassDeclaration=function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ComputedMemberExpression=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ConditionalExpression=function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ContinueStatement=function(e){this.type=r.Syntax.ContinueStatement,this.label=e};t.DebuggerStatement=function(){this.type=r.Syntax.DebuggerStatement};t.Directive=function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.DoWhileStatement=function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t};t.EmptyStatement=function(){this.type=r.Syntax.EmptyStatement};t.ExportAllDeclaration=function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e};t.ExportDefaultDeclaration=function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportNamedDeclaration=function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportSpecifier=function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExpressionStatement=function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e};t.ForInStatement=function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForOfStatement=function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForStatement=function(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i};t.FunctionDeclaration=function(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionExpression=function(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.Identifier=function(e){this.type=r.Syntax.Identifier,this.name=e};t.IfStatement=function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.ImportDeclaration=function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDefaultSpecifier=function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportNamespaceSpecifier=function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportSpecifier=function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.LabeledStatement=function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t};t.Literal=function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t};t.MetaProperty=function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t};t.MethodDefinition=function(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o};t.Module=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"};t.NewExpression=function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t};t.ObjectExpression=function(e){this.type=r.Syntax.ObjectExpression,this.properties=e};t.ObjectPattern=function(e){this.type=r.Syntax.ObjectPattern,this.properties=e};t.Property=function(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a};t.RegexLiteral=function(e,t,n,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:i}};t.RestElement=function(e){this.type=r.Syntax.RestElement,this.argument=e};t.ReturnStatement=function(e){this.type=r.Syntax.ReturnStatement,this.argument=e};t.Script=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"};t.SequenceExpression=function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e};t.SpreadElement=function(e){this.type=r.Syntax.SpreadElement,this.argument=e};t.StaticMemberExpression=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.Super=function(){this.type=r.Syntax.Super};t.SwitchCase=function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchStatement=function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.TaggedTemplateExpression=function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TemplateElement=function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateLiteral=function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.ThisExpression=function(){this.type=r.Syntax.ThisExpression};t.ThrowStatement=function(e){this.type=r.Syntax.ThrowStatement,this.argument=e};t.TryStatement=function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.UnaryExpression=function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UpdateExpression=function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.VariableDeclaration=function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclarator=function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t};t.WhileStatement=function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t};t.WithStatement=function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t};t.YieldExpression=function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),a=n(7),s=n(12),l=n(2),u=n(13),c=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,s=null,l=!1,u=!1,c=!1,d=!1;if(3===r.type){var p=r.value;this.nextToken(),l=this.match("["),i=(d=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(p))}else this.match("*")?this.nextToken():(l=this.match("["),i=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!d&&"get"===r.value&&f)t="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===r.type&&!d&&"set"===r.value&&f)t="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&f)t="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!d)!l&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0;else if(3===r.type)if(p=this.finalize(n,new a.Identifier(r.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(p,h))}else c=!0,s=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,i,l,s,u,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(o=0;o")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[o,n.value,s],u=[r];!((r=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&r<=u[u.length-1];){s=l.pop();var c=l.pop();u.pop(),o=l.pop(),i.pop();var d=this.startNode(i[i.length-1]);l.push(this.finalize(d,new a.BinaryExpression(c,o,s)))}l.push(this.nextToken().value),u.push(r),i.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=l.length-1;t=l[p];for(var f=i.pop();p>1;){var h=i.pop(),m=f&&f.lineStart;d=this.startNode(h,m),c=l[p-1],t=this.finalize(d,new a.BinaryExpression(c,l[p-2],t)),p-=2,f=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var u=this.context.strict,c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=i;var f=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=m}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=h.type!==l.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=i?this.finalize(f,new a.AsyncArrowFunctionExpression(s.params,h,g)):this.finalize(f,new a.ArrowFunctionExpression(s.params,h,g)),this.context.strict=u,this.context.allowStrictDirective=c,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var v=e;this.scanner.isRestrictedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var y=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(y,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(i,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new a.Identifier(l.value));if(this.match("=")){e.push(l),s=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(l),new a.AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(l),s=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new a.Property("init",n,o,r,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new a.AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,s=null,u=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var d=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=d,1===p.length&&this.matchKeyword("in")){var f=p[0];f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,u=!1):(r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(d=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=d,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new a.VariableDeclaration(p,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(p,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,u=!1):(this.consumeSemicolon(),r=this.finalize(r,new a.VariableDeclaration(p,h)))):(r=this.finalize(r,new a.Identifier(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null)}else{var m=this.lookahead;if(d=this.context.allowIn,this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=d,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,u=!1;else{if(this.match(",")){for(var g=[r];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(m),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new a.ForStatement(r,i,s,n)):u?this.finalize(c,new a.ForInStatement(e,t,n)):this.finalize(c,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var u=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(u,o.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(u,o.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[i],e=new a.LabeledStatement(r,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,s=null,l=!1,u=!1,c=!1,d=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,l=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(d=!0,t=this.lookahead,i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&f?(r="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&f&&(r="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&f&&(r="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0),!r&&i&&this.match("(")&&(r="init",s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),l||(c&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!c&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!u||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new a.MethodDefinition(i,l,s,r,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],l=null,u=!1;for(this.expect("{");!this.match("}");)u=u||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):u?(r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(r,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,l))}return e},e}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},r.push(a)),r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(n))++this.index;else if(i.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2,r=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,r=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,r=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r1114111||"}"!==e)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=i.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),i.Character.isIdentifierPart(t));)n+=e=i.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(t)||i.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(i.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&r.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];r.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],i.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(i.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!i.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r;n=55296&&e<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t-1&&n>=e.flowLevel;switch(function(e,t,n,r,i){var o,a,s,l,u=!1,c=!1,d=-1!==r,p=-1,f=g(l=e.charCodeAt(0))&&65279!==l&&!m(l)&&45!==l&&63!==l&&58!==l&&44!==l&&91!==l&&93!==l&&123!==l&&125!==l&&35!==l&&38!==l&&42!==l&&33!==l&&124!==l&&61!==l&&62!==l&&39!==l&&34!==l&&37!==l&&64!==l&&96!==l&&!m(e.charCodeAt(e.length-1));if(t)for(o=0;o0?e.charCodeAt(o-1):null,f=f&&v(a,s)}else{for(o=0;or&&" "!==e[p+1],p=o);else if(!g(a))return 5;s=o>0?e.charCodeAt(o-1):null,f=f&&v(a,s)}c=c||d&&o-p-1>r&&" "!==e[p+1]}return u||c?n>9&&y(e)?5:c?4:3:f&&!i(e)?1:2}(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+w(t,e.indent)+x(f(function(e,t){for(var n,r,i,o=/(\n+)([^\n]*)/g,a=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,S(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=o.exec(e);){var l=r[1],u=r[2];n=" "===u[0],a+=l+(s||n||""===u?"":"\n")+S(u,t),s=n}return a}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=d(1024*(t-55296)+n-56320+65536),o++):i+=!(r=u[t])&&g(t)?e[o]:r||d(t);return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function w(e,t){var n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function S(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function C(e,t,n){var r,o,a,u,c,d;for(a=0,u=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+d+'" style');r=c.represent[d](t,d)}e.dump=r}return!0}return!1}function A(e,t,n,r,o,a){e.tag=null,e.dump=n,C(e,n,!1)||C(e,n,!0);var l=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var u,c,d="[object Object]"===l||"[object Array]"===l;if(d&&(c=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(o=!1),c&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(d&&c&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var o,a,s,l,u,c,d="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=f.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,u&&(c+=h(e,t)),A(e,t+1,l,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",d+=c+=e.dump));e.tag=p,e.dump=d||"{}"}(e,t,e.dump,o),c&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var r,i,o,a,s,l="",u=e.tag,c=Object.keys(n);for(r=0,i=c.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),A(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=u,e.dump="{"+l+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l){var p=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function P(e,t){var n=new p(t=t||{});return n.noRefs||function(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(90),l=n(1),u=n(182),c=n(0),d=n(7),p=n(94),f=n(68),h=n(3),m=n(305),g=n(306),v=n(307),y=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return r._hasDeclaration=!1,r._docTypeName="",r._hasDocumentElement=!1,r._currentElementSerialized=!1,r._openTags=[],r._ended=!1,r._fragment=n,r._options=l.applyDefaults(t||{},s.DefaultXMLBuilderCBOptions),r._builderOptions={defaultNamespace:r._options.defaultNamespace,namespaceAlias:r._options.namespaceAlias},"json"===r._options.format?r._writer=new g.JSONCBWriter(r._options):"yaml"===r._options.format?r._writer=new v.YAMLCBWriter(r._options):r._writer=new m.XMLCBWriter(r._options),void 0!==r._options.data&&r.on("data",r._options.data),void 0!==r._options.end&&r.on("end",r._options.end),void 0!==r._options.error&&r.on("error",r._options.error),r._prefixMap=new p.NamespacePrefixMap,r._prefixMap.set("xml",d.namespace.XML),r._prefixIndex={value:1},r._push(r._writer.frontMatter()),r}return i(t,e),t.prototype.ele=function(e,t,n){var r,i;if(l.isObject(e)||l.isString(e)&&(/^\s*/g,">");else for(var r=0;r"===i?">":i}return this._push(this._writer.text(n)),this},t.prototype.ins=function(e,t){var n;void 0===t&&(t=""),this._serializeOpenTag(!0);try{n=u.fragment(this._builderOptions).ins(e,t).first().node}catch(e){return this.emit("error",e),this}return this._options.wellFormed&&(-1!==n.target.indexOf(":")||/^xml$/i.test(n.target))?(this.emit("error",new Error("Processing instruction target contains invalid characters (well-formed required).")),this):this._options.wellFormed&&!c.xml_isLegalChar(n.data)?(this.emit("error",Error("Processing instruction data contains invalid characters (well-formed required).")),this):(this._push(this._writer.instruction(n.target,n.data)),this)},t.prototype.dat=function(e){var t;this._serializeOpenTag(!0);try{t=u.fragment(this._builderOptions).dat(e).first().node}catch(e){return this.emit("error",e),this}return this._push(this._writer.cdata(t.data)),this},t.prototype.dec=function(e){return void 0===e&&(e={version:"1.0"}),this._fragment?(this.emit("error",Error("Cannot insert an XML declaration into a document fragment.")),this):this._hasDeclaration?(this.emit("error",Error("XML declaration is already inserted.")),this):(this._push(this._writer.declaration(e.version||"1.0",e.encoding,e.standalone)),this._hasDeclaration=!0,this)},t.prototype.dtd=function(e){if(this._fragment)return this.emit("error",Error("Cannot insert a DocType declaration into a document fragment.")),this;if(""!==this._docTypeName)return this.emit("error",new Error("DocType declaration is already inserted.")),this;if(this._hasDocumentElement)return this.emit("error",new Error("Cannot insert DocType declaration after document element.")),this;var t;try{t=u.create().dtd(e).first().node}catch(e){return this.emit("error",e),this}return this._options.wellFormed&&!c.xml_isPubidChar(t.publicId)?(this.emit("error",new Error("DocType public identifier does not match PubidChar construct (well-formed required).")),this):this._options.wellFormed&&(!c.xml_isLegalChar(t.systemId)||-1!==t.systemId.indexOf('"')&&-1!==t.systemId.indexOf("'"))?(this.emit("error",new Error("DocType system identifier contains invalid characters (well-formed required).")),this):(this._docTypeName=e.name,this._push(this._writer.docType(e.name,t.publicId,t.systemId)),this)},t.prototype.up=function(){return this._serializeOpenTag(!1),this._serializeCloseTag(),this},t.prototype.end=function(){for(this._serializeOpenTag(!1);this._openTags.length>0;)this._serializeCloseTag();return this._push(null),this},t.prototype._serializeOpenTag=function(e){if(!this._currentElementSerialized&&void 0!==this._currentElement){var n=this._currentElement.node;if(!this._options.wellFormed||-1===n.localName.indexOf(":")&&c.xml_isName(n.localName)){var r="",i=!1,o=this._prefixMap.copy(),a={},s=this._recordNamespaceInformation(n,o,a),l=0===this._openTags.length?null:this._openTags[this._openTags.length-1][1],u=n.namespaceURI;if(null===u&&(u=l),l===u)null!==s&&(i=!0),r=u===d.namespace.XML?"xml:"+n.localName:n.localName,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r));else{var p=n.prefix,f=null;if(null===p&&u===s||(f=o.get(p,u)),"xmlns"===p){if(this._options.wellFormed)return void this.emit("error",new Error("An element cannot have the 'xmlns' prefix (well-formed required)."));f=p}null!==f?(r=f+":"+n.localName,null!==s&&s!==d.namespace.XML&&(l=s||null),this._writer.beginElement(r),this._push(this._writer.openTagBegin(r))):null!==p?(p in a&&(p=this._generatePrefix(u,o,this._prefixIndex)),o.set(p,u),r+=p+":"+n.localName,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)),this._push(this._writer.attribute("xmlns:"+p,this._serializeAttributeValue(u,this._options.wellFormed))),null!==s&&(l=s||null)):null===s||null!==s&&s!==u?(i=!0,r+=n.localName,l=u,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)),this._push(this._writer.attribute("xmlns",this._serializeAttributeValue(u,this._options.wellFormed)))):(r+=n.localName,l=u,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)))}this._serializeAttributes(n,o,this._prefixIndex,a,i,this._options.wellFormed);var h=u===d.namespace.HTML;h&&!e&&t._VoidElementNames.has(n.localName)?(this._push(this._writer.openTagEnd(r,!0,!0)),this._writer.endElement(r)):h||e?this._push(this._writer.openTagEnd(r,!1,!1)):(this._push(this._writer.openTagEnd(r,!0,!1)),this._writer.endElement(r)),this._currentElementSerialized=!0,this._openTags.push([r,l,this._prefixMap,e]),this._isPrefixMapModified(this._prefixMap,o)&&(this._prefixMap=o),this._writer.level++}else this.emit("error",new Error("Node local name contains invalid characters (well-formed required)."))}},t.prototype._serializeCloseTag=function(){this._writer.level--;var e=this._openTags.pop();if(void 0!==e){var t=a(e,4),n=t[0],r=(t[1],t[2]),i=t[3];this._prefixMap=r,i&&(this._push(this._writer.closeTag(n)),this._writer.endElement(n))}else this.emit("error",new Error("Last element is undefined."))},t.prototype._push=function(e){null===e?(this._ended=!0,this.emit("end")):this._ended?this.emit("error",new Error("Cannot push to ended stream.")):0!==e.length&&(this._writer.hasData=!0,this.emit("data",e,this._writer.level))},t.prototype._fromNode=function(e){var t,n,r,i;if(h.Guard.isElementNode(e)){var a=e.prefix?e.prefix+":"+e.localName:e.localName;null!==e.namespaceURI?this.ele(e.namespaceURI,a):this.ele(a);try{for(var s=o(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.prefix?u.prefix+":"+u.localName:u.localName;null!==u.namespaceURI?this.att(u.namespaceURI,c,u.value):this.att(c,u.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}try{for(var d=o(e.childNodes),p=d.next();!p.done;p=d.next()){var f=p.value;this._fromNode(f)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}this.up()}else h.Guard.isExclusiveTextNode(e)&&e.data?this.txt(e.data):h.Guard.isCommentNode(e)?this.com(e.data):h.Guard.isCDATASectionNode(e)?this.dat(e.data):h.Guard.isProcessingInstructionNode(e)&&this.ins(e.target,e.data)},t.prototype._serializeAttributes=function(e,t,n,r,i,a){var s,l,u=a?new f.LocalNameSet:void 0;try{for(var p=o(e.attributes),h=p.next();!h.done;h=p.next()){var m=h.value;if(a||i||null!==m.namespaceURI){if(a&&u&&u.has(m.namespaceURI,m.localName))return void this.emit("error",new Error("Element contains duplicate attributes (well-formed required)."));a&&u&&u.set(m.namespaceURI,m.localName);var g=m.namespaceURI,v=null;if(null!==g)if(v=t.get(m.prefix,g),g===d.namespace.XMLNS){if(m.value===d.namespace.XML||null===m.prefix&&i||null!==m.prefix&&(!(m.localName in r)||r[m.localName]!==m.value)&&t.has(m.localName,m.value))continue;if(a&&m.value===d.namespace.XMLNS)return void this.emit("error",new Error("XMLNS namespace is reserved (well-formed required)."));if(a&&""===m.value)return void this.emit("error",new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."));"xmlns"===m.prefix&&(v="xmlns")}else null===v&&(v=null===m.prefix||t.hasPrefix(m.prefix)&&!t.has(m.prefix,g)?this._generatePrefix(g,t,n):m.prefix,this._push(this._writer.attribute("xmlns:"+v,this._serializeAttributeValue(g,this._options.wellFormed))));if(a&&(-1!==m.localName.indexOf(":")||!c.xml_isName(m.localName)||"xmlns"===m.localName&&null===g))return void this.emit("error",new Error("Attribute local name contains invalid characters (well-formed required)."));this._push(this._writer.attribute((null!==v?v+":":"")+m.localName,this._serializeAttributeValue(m.value,this._options.wellFormed)))}else this._push(this._writer.attribute(m.localName,this._serializeAttributeValue(m.value,this._options.wellFormed)))}}catch(e){s={error:e}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}},t.prototype._serializeAttributeValue=function(e,t){if(t&&null!==e&&!c.xml_isLegalChar(e))return this.emit("error",new Error("Invalid characters in attribute value.")),"";if(null===e)return"";if(this._options.noDoubleEncoding)return e.replace(/(?!&(lt|gt|amp|apos|quot);)&/g,"&").replace(//g,">").replace(/"/g,""");for(var n="",r=0;r"===i?">":i}return n},t.prototype._recordNamespaceInformation=function(e,t,n){var r,i,a=null;try{for(var s=o(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.namespaceURI,p=u.prefix;if(c===d.namespace.XMLNS){if(null===p){a=u.value;continue}var f=u.localName,h=u.value;if(h===d.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},t.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value;return n.value++,t.set(r,e),r},t.prototype._isPrefixMapModified=function(e,t){var n=e._items,r=t._items,i=e._nullItems,o=t._nullItems;for(var a in r){var s=n[a];if(void 0===s)return!0;var l=r[a];if(s.length!==l.length)return!0;for(var u=0;u"},t.prototype.docType=function(e,t,n){return this._beginLine()+(t&&n?"':t?"':n?"':"")},t.prototype.comment=function(e){return this._beginLine()+"\x3c!--"+e+"--\x3e"},t.prototype.text=function(e){return this._beginLine()+e},t.prototype.instruction=function(e,t){return t?this._beginLine()+"":this._beginLine()+""},t.prototype.cdata=function(e){return this._beginLine()+""},t.prototype.openTagBegin=function(e){return this._lineLength+=1+e.length,this._beginLine()+"<"+e},t.prototype.openTagEnd=function(e,t,n){return n?" />":t?this._writerOptions.allowEmptyTags?">":this._writerOptions.spaceBeforeSlash?" />":"/>":">"},t.prototype.closeTag=function(e){return this._beginLine()+""},t.prototype.attribute=function(e,t){var n=e+'="'+t+'"';return this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._lineLength+1+n.length>this._writerOptions.width?(n=this._beginLine()+this._indent(1)+n,this._lineLength=n.length,n):(this._lineLength+=1+n.length," "+n)},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){},t.prototype._beginLine=function(){if(this._writerOptions.prettyPrint){var e=(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level);return this._lineLength=e.length,e}return""},t.prototype._indent=function(e){return e<=0?"":this._writerOptions.indent.repeat(e)},t}(n(113).BaseCBWriter);t.XMLCBWriter=o},function(e,t,n){"use strict";n(73);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n._hasChildren=[],n._additionalLevel=0,n}return i(t,e),t.prototype.frontMatter=function(){return""},t.prototype.declaration=function(e,t,n){return""},t.prototype.docType=function(e,t,n){return""},t.prototype.comment=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.comment)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.text=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.text)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.instruction=function(e,t){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.ins)+this._sep()+this._val(t?e+" "+t:e)+this._sep()+"}"},t.prototype.cdata=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.cdata)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.attribute=function(e,t){return this._comma()+this._beginLine(1)+"{"+this._sep()+this._key(this._builderOptions.convert.att+e)+this._sep()+this._val(t)+this._sep()+"}"},t.prototype.openTagBegin=function(e){var t=this._comma()+this._beginLine()+"{"+this._sep()+this._key(e)+this._sep()+"{";return this._additionalLevel++,this.hasData=!0,t+=this._beginLine()+this._key(this._builderOptions.convert.text)+this._sep()+"[",this._hasChildren.push(!1),t},t.prototype.openTagEnd=function(e,t,n){if(t){var r=this._sep()+"]";return this._additionalLevel--,r+(this._beginLine()+"}")+this._sep()+"}"}return""},t.prototype.closeTag=function(e){var t=this._beginLine()+"]";return this._additionalLevel--,t+(this._beginLine()+"}")+this._sep()+"}"},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){this._hasChildren.pop()},t.prototype._beginLine=function(e){return void 0===e&&(e=0),this._writerOptions.prettyPrint?(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level+e):""},t.prototype._indent=function(e){return e+this._additionalLevel<=0?"":this._writerOptions.indent.repeat(e+this._additionalLevel)},t.prototype._comma=function(){var e=this._hasChildren[this._hasChildren.length-1]?",":"";return this._hasChildren.length>0&&(this._hasChildren[this._hasChildren.length-1]=!0),e},t.prototype._sep=function(){return this._writerOptions.prettyPrint?" ":""},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(113).BaseCBWriter);t.JSONCBWriter=o},function(e,t,n){"use strict";n(73);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;if(n._rootWritten=!1,n._additionalLevel=0,t.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(t.offset<0)throw new Error("YAML offset should be zero or a positive number.");return n}return i(t,e),t.prototype.frontMatter=function(){return this._beginLine()+"---"},t.prototype.declaration=function(e,t,n){return""},t.prototype.docType=function(e,t,n){return""},t.prototype.comment=function(e){return this._beginLine()+this._key(this._builderOptions.convert.comment)+" "+this._val(e)},t.prototype.text=function(e){return this._beginLine()+this._key(this._builderOptions.convert.text)+" "+this._val(e)},t.prototype.instruction=function(e,t){return this._beginLine()+this._key(this._builderOptions.convert.ins)+" "+this._val(t?e+" "+t:e)},t.prototype.cdata=function(e){return this._beginLine()+this._key(this._builderOptions.convert.cdata)+" "+this._val(e)},t.prototype.attribute=function(e,t){this._additionalLevel++;var n=this._beginLine()+this._key(this._builderOptions.convert.att+e)+" "+this._val(t);return this._additionalLevel--,n},t.prototype.openTagBegin=function(e){var t=this._beginLine()+this._key(e);return this._rootWritten||(this._rootWritten=!0),this.hasData=!0,this._additionalLevel++,t+(this._beginLine(!0)+this._key(this._builderOptions.convert.text))},t.prototype.openTagEnd=function(e,t,n){return t?" "+this._val(""):""},t.prototype.closeTag=function(e){return this._additionalLevel--,""},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){},t.prototype._beginLine=function(e){return void 0===e&&(e=!1),(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level,e)},t.prototype._indent=function(e,t){if(e+this._additionalLevel<=0)return"";var n=this._writerOptions.indent.repeat(e+this._additionalLevel);return!t&&this._rootWritten?n.substr(0,n.length-2)+"-"+n.substr(-1,1):n},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(113).BaseCBWriter);t.YAMLCBWriter=o},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a,s;if(u(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),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){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},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(76);t.createCB=function(e){return new r.XMLBuilderCBImpl(e)},t.fragmentCB=function(e){return new r.XMLBuilderCBImpl(e,!0)}}])},2361:function(){},4616:function(){},5042:function(){}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.amdD=function(){throw new Error("define cannot be used indirect")},n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(9737)}()})); +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){var e={757:function(e,t,n){e.exports=n(666)},49:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,{LUFactor3x3:function(){return Dt},LUSolve3x3:function(){return Et},Pi:function(){return Be},add:function(){return ot},angleBetweenVectors:function(){return xt},areBoundsInitialized:function(){return mn},areEquals:function(){return jt},areMatricesEqual:function(){return Gt},arrayMax:function(){return Ke},arrayMin:function(){return He},arrayRange:function(){return Xe},beginCombination:function(){return $e},binomial:function(){return Qe},boundsIsWithinOtherBounds:function(){return Cn},ceil:function(){return Ue},ceilLog2:function(){return qe},clampAndNormalizeValue:function(){return bn},clampValue:function(){return vn},clampVector:function(){return yn},computeBoundsFromPoints:function(){return gn},createUninitializedBounds:function(){return kn},cross:function(){return ft},default:function(){return Ln},degreesFromRadians:function(){return Ve},determinant2x2:function(){return Tt},determinant3x3:function(){return Lt},diagonalize3x3:function(){return qt},distance2BetweenPoints:function(){return wt},dot:function(){return dt},dot2D:function(){return yt},estimateMatrixCondition:function(){return en},extentIsWithinOtherExtent:function(){return Sn},factorial:function(){return Ye},float2CssRGBA:function(){return Bn},floatRGB2HexCode:function(){return Rn},floatToHex2:function(){return Nn},floor:function(){return Ge},gaussian:function(){return it},gaussianAmplitude:function(){return Ct},gaussianWeight:function(){return At},getAdjustedScalarRange:function(){return xn},getMajorAxisIndex:function(){return Mn},getScalarTypeFittingRange:function(){return wn},getSeed:function(){return nt},hex2float:function(){return on},hsv2rgb:function(){return sn},identity3x3:function(){return Bt},inf:function(){return _n},invert3x3:function(){return Ft},invertMatrix:function(){return $t},isFinite:function(){return Dn},isInf:function(){return Tn},isNaN:function(){return En},isNan:function(){return In},isPowerOfTwo:function(){return Je},jacobi:function(){return tn},jacobiN:function(){return Wt},lab2rgb:function(){return fn},lab2xyz:function(){return ln},linearSolve3x3:function(){return It},luFactorLinearSystem:function(){return Zt},luSolveLinearSystem:function(){return Jt},matrix3x3ToQuaternion:function(){return Ht},max:function(){return We},min:function(){return ze},multiply3x3_mat3:function(){return Mt},multiply3x3_vect3:function(){return kt},multiplyAccumulate:function(){return ut},multiplyAccumulate2D:function(){return ct},multiplyMatrix:function(){return Nt},multiplyQuaternion:function(){return Kt},multiplyScalar:function(){return st},multiplyScalar2D:function(){return lt},nearestPowerOfTwo:function(){return Ze},negInf:function(){return On},nextCombination:function(){return et},norm:function(){return ht},norm2D:function(){return _t},normalize:function(){return mt},normalize2D:function(){return Ot},orthogonalize3x3:function(){return Xt},outer:function(){return pt},outer2D:function(){return Pt},perpendiculars:function(){return gt},pointIsWithinBounds:function(){return An},projectVector:function(){return vt},projectVector2D:function(){return bt},quaternionToMatrix3x3:function(){return Vt},radiansFromDegrees:function(){return Le},random:function(){return rt},randomSeed:function(){return tt},rgb2hsv:function(){return an},rgb2lab:function(){return pn},rgb2xyz:function(){return dn},round:function(){return je},roundNumber:function(){return Ut},roundVector:function(){return zt},signedAngleBetweenVectors:function(){return St},singularValueDecomposition3x3:function(){return Yt},solve3PointCircle:function(){return Pn},solveHomogeneousLeastSquares:function(){return nn},solveLeastSquares:function(){return rn},solveLinearSystem:function(){return Qt},subtract:function(){return at},transpose3x3:function(){return Rt},uninitializeBounds:function(){return hn},xyz2lab:function(){return un},xyz2rgb:function(){return cn}});var i={};n.r(i),n.d(i,{add:function(){return qi},angle:function(){return Ao},bezier:function(){return go},ceil:function(){return Qi},clone:function(){return zi},copy:function(){return Ki},create:function(){return Ui},cross:function(){return fo},dist:function(){return Mo},distance:function(){return oo},div:function(){return ko},divide:function(){return Ji},dot:function(){return po},equals:function(){return To},exactEquals:function(){return Oo},floor:function(){return $i},forEach:function(){return Bo},fromValues:function(){return Hi},hermite:function(){return mo},inverse:function(){return uo},len:function(){return Ro},length:function(){return Wi},lerp:function(){return ho},max:function(){return to},min:function(){return eo},mul:function(){return Io},multiply:function(){return Zi},negate:function(){return lo},normalize:function(){return co},random:function(){return vo},rotateX:function(){return xo},rotateY:function(){return So},rotateZ:function(){return Co},round:function(){return no},scale:function(){return ro},scaleAndAdd:function(){return io},set:function(){return Xi},sqrDist:function(){return No},sqrLen:function(){return Fo},squaredDistance:function(){return ao},squaredLength:function(){return so},str:function(){return _o},sub:function(){return Eo},subtract:function(){return Yi},transformMat3:function(){return bo},transformMat4:function(){return yo},transformQuat:function(){return wo},zero:function(){return Po}});var o={};n.r(o),n.d(o,{add:function(){return Ca},adjoint:function(){return Ko},clone:function(){return Vo},copy:function(){return jo},create:function(){return Lo},determinant:function(){return Xo},equals:function(){return Ta},exactEquals:function(){return Oa},frob:function(){return Sa},fromQuat:function(){return ha},fromQuat2:function(){return la},fromRotation:function(){return ra},fromRotationTranslation:function(){return sa},fromRotationTranslationScale:function(){return pa},fromRotationTranslationScaleOrigin:function(){return fa},fromScaling:function(){return na},fromTranslation:function(){return ta},fromValues:function(){return Go},fromXRotation:function(){return ia},fromYRotation:function(){return oa},fromZRotation:function(){return aa},frustum:function(){return ma},getRotation:function(){return da},getScaling:function(){return ca},getTranslation:function(){return ua},identity:function(){return zo},invert:function(){return Ho},lookAt:function(){return ba},mul:function(){return Da},multiply:function(){return qo},multiplyScalar:function(){return Pa},multiplyScalarAndAdd:function(){return _a},ortho:function(){return ya},perspective:function(){return ga},perspectiveFromFieldOfView:function(){return va},rotate:function(){return Jo},rotateX:function(){return Qo},rotateY:function(){return $o},rotateZ:function(){return ea},scale:function(){return Zo},set:function(){return Uo},str:function(){return xa},sub:function(){return Ea},subtract:function(){return Aa},targetTo:function(){return wa},translate:function(){return Yo},transpose:function(){return Wo}});var a={};n.r(a),n.d(a,{add:function(){return ts},adjoint:function(){return ja},clone:function(){return Ma},copy:function(){return Na},create:function(){return Ia},determinant:function(){return Ga},equals:function(){return as},exactEquals:function(){return os},frob:function(){return es},fromMat2d:function(){return Ya},fromMat4:function(){return ka},fromQuat:function(){return Za},fromRotation:function(){return Xa},fromScaling:function(){return qa},fromTranslation:function(){return Ka},fromValues:function(){return Ra},identity:function(){return Ba},invert:function(){return Va},mul:function(){return ss},multiply:function(){return Ua},multiplyScalar:function(){return rs},multiplyScalarAndAdd:function(){return is},normalFromMat4:function(){return Ja},projection:function(){return Qa},rotate:function(){return Wa},scale:function(){return Ha},set:function(){return Fa},str:function(){return $a},sub:function(){return ls},subtract:function(){return ns},translate:function(){return za},transpose:function(){return La}});var s=[];s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63;for(var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0;u>16&255,r[p++]=d>>8&255,r[p++]=255&d}switch(a){case 3:for(;!c(e[u]);)u++;for(d=s[e.charCodeAt(u++)]<<10;!c(e[u]);)u++;for(d|=s[e.charCodeAt(u++)]<<4;!c(e[u]);)u++;d|=s[e.charCodeAt(u++)]>>2,r[p++]=d>>8&255,r[p++]=255&d;break;case 2:for(;!c(e[u]);)u++;for(d=s[e.charCodeAt(u++)]<<2;!c(e[u]);)u++;d|=s[e.charCodeAt(u++)]>>4,r[p++]=255&d;break;case 1:throw new Error("BASE64: remain 1 should not happen")}return p}function p(e,t,n){var r=(e<<16)+(t<<8)+n;return l[r>>18]+l[r>>12&63]+l[r>>6&63]+l[63&r]}function f(e){for(var t=new Uint8Array(e),n=e.byteLength%3,r=e.byteLength-n,i=Array(r/3),o=0;o0){var s=p(t[r],t[r+1]||0,t[r+2]||0);1===n?i.push("".concat(s.substr(0,2),"==")):2===n&&i.push("".concat(s.substr(0,3),"="))}return i.join("")}var h={toArrayBuffer:function(e){for(var t=function(e){for(var t=e.length,n=[],r=null,i=0;ie.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?t-1:0),r=1;r1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};$(t);var n=[];function r(e){n[e]=null}function i(e){return Object.freeze({unsubscribe:function(){r(e)}})}return Number.isInteger(t.mtime)||(t.mtime=++j),"classHierarchy"in t?t.classHierarchy instanceof B||(t.classHierarchy=B.from(t.classHierarchy)):t.classHierarchy=new B("vtkObject"),e.isDeleted=function(){return!!t.deleted},e.modified=function(r){t.deleted?K("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],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1;return Object.keys(n).forEach((function(a){var s=i?null:e["set".concat(Q(a))];s&&Array.isArray(n[a])&&s.length>1?o=s.apply(void 0,w(n[a]))||o:s?o=s(n[a])||o:(-1!==["mtime"].indexOf(a)||r||X("Warning: Set value to model directly ".concat(a,", ").concat(n[a])),t[a]=n[a],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 i=n.get(),o=Object.keys(t).sort(),a=Object.keys(i).sort();a.forEach((function(e){var n=o.indexOf(e);-1===n?r&&H("add ".concat(e," in shallowCopy")):o.splice(n,1),t[e]=i[e]})),o.length&&r&&H("Untouched keys: ".concat(o.join(", "))),e.modified()},e}function ie(e,t,n){n.forEach((function(n){"object"===b(n)?e["get".concat(Q(n.name))]=function(){return t[n.name]}:e["get".concat(Q(n))]=function(){return t[n]}}))}Y.Float32Array=Float32Array,Y.Float64Array=Float64Array,Y.Uint8Array=Uint8Array,Y.Int8Array=Int8Array,Y.Uint16Array=Uint16Array,Y.Int16Array=Int16Array,Y.Uint32Array=Uint32Array,Y.Int32Array=Int32Array,Y.Uint8ClampedArray=Uint8ClampedArray;var oe={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 K("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 K("Set Enum outside numeric range ".concat(n,", ").concat(r)),new RangeError("Set Enum outside numeric range")}return!1}throw K("Set Enum with invalid argument (String/Number) ".concat(n,", ").concat(r)),new TypeError("Set Enum with invalid argument (String/Number)")}}};function ae(e){if("object"===b(e)){var t=oe[e.type];if(t)return function(n,r){return t(n,r,e)};throw K("No setter for field ".concat(e)),new TypeError("No setter for field")}return function(t,n){return function(r){return n.deleted?(K("instance deleted - cannot call any method"),!1):n[e]!==r&&(n[e]=r,t.modified(),!0)}}}function se(e,t,n){n.forEach((function(n){"object"===b(n)?e["set".concat(Q(n.name))]=ae(n)(e,t):e["set".concat(Q(n))]=ae(n)(e,t)}))}function le(e,t,n){ie(e,t,n),se(e,t,n)}function ue(e,t,n){n.forEach((function(n){e["get".concat(Q(n))]=function(){return t[n]?[].concat(t[n]):t[n]},e["get".concat(Q(n),"ByReference")]=function(){return t[n]}}))}function ce(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;n.forEach((function(n){if(t[n]&&r&&t[n].length!==r)throw new RangeError("Invalid initial number of values for array (".concat(n,")"));e["set".concat(Q(n))]=function(){if(t.deleted)return K("instance deleted - cannot call any method"),!1;for(var o=arguments.length,a=new Array(o),s=0;s=0)&&(u=u[0]),null==u)l=t[n]!==u;else{if(r&&u.length!==r){if(!(u.length4&&void 0!==arguments[4]?arguments[4]:void 0;ue(e,t,n),ce(e,t,n,r,i)}function pe(e,t,n,r){function i(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.deleted?K("instance deleted - cannot call any method"):r>=t.numberOfInputs?K("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)K("instance deleted - cannot call any method");else{if(r>=t.numberOfInputs){var i="algorithm ".concat(e.getClassName()," only has ");return i+="".concat(t.numberOfInputs),void K(i+=" input ports. To add more input ports, use addInputConnection()")}t.inputData[r]=null,t.inputConnection[r]=n}}function a(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t.deleted?(K("instance deleted - cannot call any method"),null):(e.shouldUpdate()&&e.update(),t.output[n])}if(t.inputData?t.inputData=t.inputData.map(T):t.inputData=[],t.inputConnection?t.inputConnection=t.inputConnection.map(T):t.inputConnection=[],t.output?t.output=t.output.map(T):t.output=[],t.inputArrayToProcess?t.inputArrayToProcess=t.inputArrayToProcess.map(T):t.inputArrayToProcess=[],t.numberOfInputs=n,e.shouldUpdate=function(){for(var n=e.getMTime(),i=r,o=1/0;i--;){if(!t.output[i])return!0;if(t.output[i].isDeleted())return!0;var a=t.output[i].getMTime();if(ao)return!0;return!1},t.numberOfInputs){for(var s=t.numberOfInputs;s--;)t.inputData.push(null),t.inputConnection.push(null);e.setInputData=i,e.setInputConnection=o,e.addInputData=function(e){if(t.deleted)K("instance deleted - cannot call any method");else{for(var n=t.numberOfInputs;n&&!t.inputData[n-1]&&!t.inputConnection[n-1];)n--;n===t.numberOfInputs&&t.numberOfInputs++,i(e,n)}},e.addInputConnection=function(e){if(t.deleted)K("instance deleted - cannot call any method");else{for(var n=t.numberOfInputs;n&&!t.inputData[n-1]&&!t.inputConnection[n-1];)n--;n===t.numberOfInputs&&t.numberOfInputs++,o(e,n)}},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=a,e.getOutputPort=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=function(){return a(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]:0;if(!e.apply)return console.error("Invalid callback for event ".concat(n)),null;if(t.deleted)return K("instance deleted - cannot call any method"),null;var a=o++;return r.push([a,e,i]),r.sort((function(e,t){return t[2]-e[2]})),s(a)},e.delete=function(){i(),r.forEach((function(e){return a(y(e,1)[0])}))}}function me(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&&T.register(t,n),n}function ge(){for(var e=arguments.length,t=new Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(ve(e)){if(r.indexOf(e)>=0)return n;r.push(e);var i=t(e);void 0!==i&&n.push(i);var o=e.get();Object.keys(o).forEach((function(e){var i=o[e];Array.isArray(i)?i.forEach((function(e){ye(e,t,n,r)})):ye(i,t,n,r)}))}return n}function be(e,t){var n=arguments.length>2&&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 we=1,xe="__root__";function Se(e,t){be(e,t);var n=e.delete;t.proxyId="".concat(we++),t.ui=JSON.parse(JSON.stringify(t.ui||[])),ie(e,t,["proxyId","proxyGroup","proxyName"]),le(e,t,["proxyManager"]);var r={},i={};function o(e,t){i[t]||(i[t]=[]);for(var n=i[t],a=0;a0&&void 0!==arguments[0]?arguments[0]:xe;return i[e]}function s(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xe,r=[],i=t.proxyId,o=a(n)||[],l=0;l1&&void 0!==arguments[1]&&arguments[1];if(t.propertyLinkMap[e])return t.propertyLinkMap[e];var r=null,i=[],o=0,a=!1;function s(n){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(a)return null;var l=[],u=null;for(o=i.length;o--;){var c=i[o];c.instance===n?u=c:l.push(c)}if(!u)return null;var d=u.instance["get".concat(Q(u.propertyName))]();if(!ee(d,r)||s){for(r=d,a=!0;l.length;){var p=l.pop();p.instance.set(m({},p.propertyName,r))}a=!1}return t.propertyLinkMap[e].persistent&&(t.propertyLinkMap[e].value=d),d}function l(e,t){var n=[];for(o=i.length;o--;){var r=i[o];r.instance!==e||r.propertyName!==t&&void 0!==t||(r.subscription.unsubscribe(),n.push(o))}for(;n.length;)i.splice(n.pop(),1)}function u(n,r){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=n.onModified(s),u=i[0];return i.push({instance:n,propertyName:r,subscription:a}),o&&(t.propertyLinkMap[e].persistent&&void 0!==t.propertyLinkMap[e].value?n.set(m({},r,t.propertyLinkMap[e].value)):u&&s(u.instance,!0)),{unsubscribe:function(){return l(n,r)}}}function c(){for(;i.length;)i.pop().subscription.unsubscribe()}var d={bind:u,unbind:l,unsubscribe:c,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),i=r.length;i--;)t.propertyLinkMap[r[i]].unsubscribe();Object.keys(t.propertyLinkSubscribers).forEach(e.gcPropertyLinks),n()},ne((function(){if(t.links)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,r=["TB","GB","MB","KB"],i=Number(e),o="B";i>n;)i/=n,o=r.pop();return"".concat(i.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:ie,getArray:ue,getCurrentGlobalMTime:function(){return j},getStateArrayMapFunc:te,isVtkObject:ve,keystore:be,newInstance:me,newTypedArray:Z,newTypedArrayFrom:J,normalizeWheel:function(e){var t=0,n=0,r=0,i=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,i=10*n,"deltaY"in e&&(i=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||i)&&e.deltaMode&&(1===e.deltaMode?(r*=40,i*=40):(r*=800,i*=800)),r&&!t&&(t=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:i}},obj:re,proxy:Se,proxyPropertyMapping:Ce,proxyPropertyState:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};function i(e){for(var n=Object.keys(e),r=n.length;r--;){var i=n[r];t[i].set(e[i])}}t.this=e;for(var o=Object.keys(r),a=o.length,s=function(){var s=o[a];t[s]=r[s];var l=n[s];e["set".concat(Q(s))]=function(n){n!==t[s]&&(t[s]=n,i(l[n]),e.modified())}};a--;)s();o.length&&ie(e,t,o)},safeArrays:$,set:se,setArray:ce,setGet:le,setGetArray:de,setImmediate:ne,setLoggerFunction:function(e,t){W[e]&&(W[e]=t||z)},throttle:function(e,t){var n=!1,r=null;function i(){n=!1,null!==r&&(o.apply(void 0,w(r)),r=null)}function o(){for(var o=arguments.length,a=new Array(o),s=0;s0&&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,i=t,o=e.length;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=-1/0,i=t,o=e.length;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=1/0,i=-1/0,o=t,a=e.length;o=0;--i)if(n[i]0&&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()}var it=Ne("gaussian");function ot(e,t,n){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function at(e,t,n){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function st(e,t){return e[0]*=t,e[1]*=t,e[2]*=t,e}function lt(e,t){return e[0]*=t,e[1]*=t,e}function ut(e,t,n,r){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r}function ct(e,t,n,r){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function dt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function pt(e,t,n){for(var r=0;r<3;r++)for(var i=0;i<3;i++)n[r][i]=e[r]*t[i]}function ft(e,t,n){var r=e[1]*t[2]-e[2]*t[1],i=e[2]*t[0]-e[0]*t[2],o=e[0]*t[1]-e[1]*t[0];return n[0]=r,n[1]=i,n[2]=o,n}function ht(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;rl&&s>u?(i=0,o=1,a=2):l>u?(i=1,o=2,a=0):(i=2,o=0,a=1);var d=e[i]/c,p=e[o]/c,f=e[a]/c,h=Math.sqrt(d*d+f*f);if(0!==r){var m=Math.sin(r),g=Math.cos(r);t&&(t[i]=(f*g-d*p*m)/h,t[o]=m*h,t[a]=(-d*g-p*f*m)/h),n&&(n[i]=(-f*m-d*p*g)/h,n[o]=g*h,n[a]=(d*m-p*f*g)/h)}else t&&(t[i]=f/h,t[o]=0,t[a]=-d/h),n&&(n[i]=-d*p/h,n[o]=h,n[a]=-p*f/h)}function vt(e,t,n){var r=dt(t,t);if(0===r)return n[0]=0,n[1]=0,n[2]=0,!1;for(var i=dt(e,t)/r,o=0;o<3;o++)n[o]=t[o];return st(n,i),!0}function yt(e,t){return e[0]*t[0]+e[1]*t[1]}function bt(e,t,n){var r=yt(t,t);if(0===r)return n[0]=0,n[1]=0,!1;for(var i=yt(e,t)/r,o=0;o<2;o++)n[o]=t[o];return lt(n,i),!0}function wt(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])+(e[2]-t[2])*(e[2]-t[2])}function xt(e,t){var n=[0,0,0];return ft(e,t,n),Math.atan2(ht(n),dt(e,t))}function St(e,t,n){var r=[0,0,0];ft(e,t,r);var i=Math.atan2(ht(r),dt(e,t));return dt(r,n)>=0?i:-i}function Ct(e,t,n){var r=Math.abs(e-n);return 1/Math.sqrt(2*Math.PI*t)*Math.exp(-Math.pow(r,2)/(2*t))}function At(e,t,n){var r=Math.abs(e-n);return Math.exp(-Math.pow(r,2)/(2*t))}function Pt(e,t,n){for(var r=0;r<2;r++)for(var i=0;i<2;i++)n[r][i]=e[r]*t[i]}function _t(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Ot(e){var t=_t(e);return 0!==t&&(e[0]/=t,e[1]/=t),t}function Tt(){for(var e=arguments.length,t=new Array(e),n=0;ni&&(i=r),(r=Math.abs(e[a][2]))>i&&(i=r),o[a]=1/i;i=o[0]*Math.abs(e[0][0]),n=0,(r=o[1]*Math.abs(e[1][0]))>=i&&(i=r,n=1),(r=o[2]*Math.abs(e[2][0]))>=i&&(n=2),0!==n&&(Re(e[n],e[0]),o[n]=o[0]),t[0]=n,e[1][0]/=e[0][0],e[2][0]/=e[0][0],e[1][1]-=e[1][0]*e[0][1],e[2][1]-=e[2][0]*e[0][1],i=o[1]*Math.abs(e[1][1]),n=1,(r=o[2]*Math.abs(e[2][1]))>=i&&(n=2,Re(e[2],e[1]),o[2]=o[1]),t[1]=n,e[2][1]/=e[1][1],e[1][2]-=e[1][0]*e[0][2],e[2][2]-=e[2][0]*e[0][2]+e[2][1]*e[1][2],t[2]=2}function Et(e,t,n){var r=n[t[0]];n[t[0]]=n[0],n[0]=r,r=n[t[1]],n[t[1]]=n[1],n[1]=r-e[1][0]*n[0],r=n[t[2]],n[t[2]]=n[2],n[2]=r-e[2][0]*n[0]-e[2][1]*n[1],n[2]/=e[2][2],n[1]=(n[1]-e[1][2]*n[2])/e[1][1],n[0]=(n[0]-e[0][1]*n[1]-e[0][2]*n[2])/e[0][0]}function It(e,t,n){var r=e[0][0],i=e[0][1],o=e[0][2],a=e[1][0],s=e[1][1],l=e[1][2],u=e[2][0],c=e[2][1],d=e[2][2],p=+Tt(s,c,l,d),f=-Tt(a,u,l,d),h=+Tt(a,u,s,c),m=-Tt(i,c,o,d),g=+Tt(r,u,o,d),v=-Tt(r,u,i,c),y=+Tt(i,s,o,l),b=-Tt(r,a,o,l),w=+Tt(r,a,i,s),x=r*p+i*f+o*h,S=p*t[0]+m*t[1]+y*t[2],C=f*t[0]+g*t[1]+b*t[2],A=h*t[0]+v*t[1]+w*t[2];n[0]=S/x,n[1]=C/x,n[2]=A/x}function kt(e,t,n){var r=e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],i=e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],o=e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2];n[0]=r,n[1]=i,n[2]=o}function Mt(e,t,n){for(var r=[[0,0,0],[0,0,0],[0,0,0]],i=0;i<3;i++)r[0][i]=e[0][0]*t[0][i]+e[0][1]*t[1][i]+e[0][2]*t[2][i],r[1][i]=e[1][0]*t[0][i]+e[1][1]*t[1][i]+e[1][2]*t[2][i],r[2][i]=e[2][0]*t[0][i]+e[2][1]*t[1][i]+e[2][2]*t[2][i];for(var o=0;o<3;o++)n[o][0]=r[o][0],n[o][1]=r[o][1],n[o][2]=r[o][2]}function Nt(e,t,n,r,i,o,a){r!==i&&Ee("Number of columns of A must match number of rows of B.");for(var s=0;s2&&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)}var Gt=jt;function Ut(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 zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t[0]=Ut(e[0],n),t[1]=Ut(e[1],n),t[2]=Ut(e[2],n),t}function Wt(e,t,n,r){var i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,w=Fe(t),x=Fe(t),S=function(e,t,n,r,i){v=e[t][n],g=e[r][i],e[t][n]=v-m*(g+v*f),e[r][i]=g+m*(v-g*f)};for(l=0;l3&&Math.abs(n[l])+v===Math.abs(n[l])&&Math.abs(n[s])+v===Math.abs(n[s]))e[l][s]=0;else if(Math.abs(e[l][s])>c){for(g=n[s]-n[l],Math.abs(g)+v===Math.abs(g)?p=e[l][s]/g:(d=.5*g/e[l][s],p=1/(Math.abs(d)+Math.sqrt(1+d*d)),d<0&&(p=-p)),y=1/Math.sqrt(1+p*p),f=(m=p*y)/(1+y),g=p*e[l][s],x[l]-=g,x[s]+=g,n[l]-=g,n[s]+=g,e[l][s]=0,o=0;o<=l-1;o++)S(e,o,l,o,s);for(o=l+1;o<=s-1;o++)S(e,l,o,o,s);for(o=s+1;o=20)return Ie("vtkMath::Jacobi: Error extracting eigenfunctions"),0;for(o=0;o=b&&(b=n[a=i]);if(a!==o)for(n[a]=n[o],n[o]=b,i=0;i>1)+(1&t);for(o=0;o=0&&u++;if(u(r=l>s?l:s)?u:r,i[a]=1,0!==r&&(i[a]/=r)}var c=Math.abs(t[0][0])*i[0],d=Math.abs(t[1][0])*i[1],p=Math.abs(t[2][0])*i[2];o[0]=0,d>=(r=c)&&(r=d,o[0]=1),p>=r&&(o[0]=2),0!==o[0]&&(Re(t[o[0]],t[0]),i[o[0]]=i[0]);var f=Math.abs(t[1][1])*i[1],h=Math.abs(t[2][1])*i[2];o[1]=1,h>=(r=f)&&(o[1]=2,Re(t[2],t[1])),o[2]=2;var m=0;if(Lt(t)<0){m=1;for(var g=0;g<3;g++)t[0][g]=-t[0][g],t[1][g]=-t[1][g],t[2][g]=-t[2][g]}var v=Fe(4);if(Ht(t,v),Vt(v,t),m)for(var y=0;y<3;y++)t[0][y]=-t[0][y],t[1][y]=-t[1][y],t[2][y]=-t[2][y];1!==o[1]&&Re(t[o[1]],t[1]),0!==o[0]&&Re(t[o[0]],t[0])}function qt(e,t,n){var r,i,o,a,s,l,u=[Fe(3),Fe(3),Fe(3)],c=Fe(3),d=Fe(3);for(r=0;r<3;r++)u[r][0]=e[r][0],u[r][1]=e[r][1],u[r][2]=e[r][2],c[r]=u[r],d[r]=n[r];if(Wt(c,3,t,d),t[0]!==t[1]||t[0]!==t[2]){for(Rt(n,n),r=0;r<3;r++)if(t[(r+1)%3]===t[(r+2)%3]){for(l=Math.abs(n[r][0]),a=0,i=1;i<3;i++)l<(s=Math.abs(n[r][i]))&&(l=s,a=i);return a!==r&&(s=t[a],t[a]=t[r],t[r]=s,Re(n[r],n[a])),n[a][a]<0&&(n[a][0]=-n[a][0],n[a][1]=-n[a][1],n[a][2]=-n[a][2]),o=(a+2)%3,n[i=(a+1)%3][0]=0,n[i][1]=0,n[i][2]=0,n[i][i]=1,ft(n[a],n[i],n[o]),mt(n[o]),ft(n[o],n[a],n[i]),void Rt(n,n)}for(l=Math.abs(n[0][0]),a=0,r=1;r<3;r++)l<(s=Math.abs(n[r][0]))&&(l=s,a=r);for(0!==a&&(s=t[a],t[a]=t[0],t[0]=s,Re(n[a],n[0])),Math.abs(n[1][1])a&&(a=u);if(0===a)return Ie("Unable to factor linear system"),0;d[r]=1/a}for(i=0;i=a&&(a=l,c=r)}if(i!==c){for(o=0;o=0)for(o=a;o<=i-1;o++)l-=e[i][o]*n[o];else 0!==l&&(a=i);n[i]=l}for(i=r-1;i>=0;i--){for(l=n[i],o=i+1;o3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=r||Fe(n),a=i||Fe(n);if(0===Zt(e,o,n))return 0;for(var s=0;sWe&&(r=Math.abs(e[i][o]));for(var a=0;a6&&void 0!==arguments[6])||arguments[6];if(eMe&&(p=0,d[u]=0);if(p&&1===i)return Ie("Detected homogeneous system (Y=0), calling SolveHomogeneousLeastSquares()"),nn(e,t,n,o);if(p)h=1;else for(u=0;u1&&void 0!==arguments[1]?arguments[1]:[0,.5,1];switch(e.length){case 3:return t[0]=17*parseInt(e[0],16)/255,t[1]=17*parseInt(e[1],16)/255,t[2]=17*parseInt(e[2],16)/255,t;case 4:return t[0]=17*parseInt(e[1],16)/255,t[1]=17*parseInt(e[2],16)/255,t[2]=17*parseInt(e[3],16)/255,t;case 6:return t[0]=parseInt(e.substr(0,2),16)/255,t[1]=parseInt(e.substr(2,2),16)/255,t[2]=parseInt(e.substr(4,2),16)/255,t;case 7:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t;case 9:return t[0]=parseInt(e.substr(1,2),16)/255,t[1]=parseInt(e.substr(3,2),16)/255,t[2]=parseInt(e.substr(5,2),16)/255,t[3]=parseInt(e.substr(7,2),16)/255,t;default:return t}}function an(e,t){var n,r,i=y(e,3),o=i[0],a=i[1],s=i[2],l=1/6,u=o,c=o;a>u?u=a:au?u=s:s0?(u-c)/u:0)>0?(n=o===u?l*(a-s)/(u-c):a===u?1/3+l*(s-o)/(u-c):2/3+l*(o-a)/(u-c))<0&&(n+=1):n=0,t[0]=n,t[1]=r,t[2]=d}function sn(e,t){var n,r,i,o=y(e,3),a=o[0],s=o[1],l=o[2],u=1/3,c=1/6,d=2/3,p=5/6;a>c&&a<=u?(r=1,n=(u-a)/c,i=0):a>u&&a<=.5?(r=1,i=(a-u)/c,n=0):a>.5&&a<=d?(i=1,r=(d-a)/c,n=0):a>d&&a<=p?(i=1,n=(a-d)/c,r=0):a>p&&a<=1?(n=1,i=(1-a)/c,r=0):(n=1,r=a/c,i=0),n=s*n+(1-s),r=s*r+(1-s),i=s*i+(1-s),n*=l,r*=l,i*=l,t[0]=n,t[1]=r,t[2]=i}function ln(e,t){var n=y(e,3),r=(n[0]+16)/116,i=n[1]/500+r,o=r-n[2]/200;r=Math.pow(r,3)>.008856?Math.pow(r,3):(r-16/116)/7.787,i=Math.pow(i,3)>.008856?Math.pow(i,3):(i-16/116)/7.787,o=Math.pow(o,3)>.008856?Math.pow(o,3):(o-16/116)/7.787;t[0]=.9505*i,t[1]=1*r,t[2]=1.089*o}function un(e,t){var n=y(e,3),r=n[0]/.9505,i=n[1]/1,o=n[2]/1.089;r=r>.008856?Math.pow(r,1/3):7.787*r+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,t[0]=116*i-16,t[1]=500*(r-i),t[2]=200*(i-o)}function cn(e,t){var n=y(e,3),r=n[0],i=n[1],o=n[2],a=3.2406*r+-1.5372*i+-.4986*o,s=-.9689*r+1.8758*i+.0415*o,l=.0557*r+-.204*i+1.057*o;a>.0031308?a=1.055*Math.pow(a,1/2.4)-.055:a*=12.92,s>.0031308?s=1.055*Math.pow(s,1/2.4)-.055:s*=12.92,l>.0031308?l=1.055*Math.pow(l,1/2.4)-.055:l*=12.92;var u=a;u1&&(a/=u,s/=u,l/=u),a<0&&(a=0),s<0&&(s=0),l<0&&(l=0),t[0]=a,t[1]=s,t[2]=l}function dn(e,t){var n=y(e,3),r=n[0],i=n[1],o=n[2];r>.04045?r=Math.pow((r+.055)/1.055,2.4):r/=12.92,i>.04045?i=Math.pow((i+.055)/1.055,2.4):i/=12.92,o>.04045?o=Math.pow((o+.055)/1.055,2.4):o/=12.92,t[0]=.4124*r+.3576*i+.1805*o,t[1]=.2126*r+.7152*i+.0722*o,t[2]=.0193*r+.1192*i+.9505*o}function pn(e,t){var n=[0,0,0];dn(e,n),un(n,t)}function fn(e,t){var n=[0,0,0];ln(e,n),cn(n,t)}function hn(e){return e[0]=1,e[1]=-1,e[2]=1,e[3]=-1,e[4]=1,e[5]=-1,e}function mn(e){return!(e[1]-e[0]<0)}function gn(e,t,n){return 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]),n}function vn(e,t,n){return en?n:e}function yn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[0,0,0];return r[0]=vn(e[0],t[0],n[0]),r[1]=vn(e[1],t[1],n[1]),r[2]=vn(e[2],t[2],n[2]),r}function bn(e,t){var n=0;return t[0]!==t[1]&&(n=((n=et[1]?t[1]:e)-t[0])/(t[1]-t[0])),n}var wn=Ne("GetScalarTypeFittingRange"),xn=Ne("GetAdjustedScalarRange");function Sn(e,t){if(!e||!t)return 0;for(var n=0;n<6;n+=2)if(e[n]t[n+1]||e[n+1]t[n+1])return 0;return 1}function Cn(e,t,n){if(!e||!t)return 0;for(var r=0;r<6;r+=2)if(e[r]+n[r/2]t[r+1]||e[r+1]+n[r/2]t[r+1])return 0;return 1}function An(e,t,n){if(!e||!t||!n)return 0;for(var r=0;r<3;r++)if(e[r]+n[r]t[2*r+1])return 0;return 1}function Pn(e,t,n,r){for(var i=Fe(3),o=Fe(3),a=Fe(3),s=Fe(3),l=Fe(3),u=Fe(3),c=0;c<3;++c)i[c]=e[c]-t[c],o[c]=t[c]-n[c],a[c]=n[c]-e[c],s[c]=-i[c],l[c]=-o[c],u[c]=-a[c];var d=ht(s),p=ht(l),f=ht(a),h=Fe(3);ft(i,o,h);for(var m=ht(h),g=d*p*f/(2*m),v=2*m*m,y=p*p*dt(i,u)/v,b=f*f*dt(s,o)/v,w=d*d*dt(a,l)/v,x=0;x<3;++x)r[x]=y*e[x]+b*t[x]+w*n[x];return g}var _n=1/0,On=-1/0,Tn=function(e){return!Number.isFinite(e)},Dn=Number.isFinite,En=Number.isNaN,In=En;function kn(){return[].concat([Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE])}function Mn(e){for(var t=-1,n=-1,r=0;rt&&(n=r,t=i)}return n}function Nn(e){var t=Math.floor(255*e);return t>15?t.toString(16):"0".concat(t.toString(16))}function Rn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#";return"".concat(t).concat(e.map(Nn).join(""))}function Fn(e){return Math.round(255*e)}function Bn(e){return 3===e.length?"rgb(".concat(e.map(Fn).join(", "),")"):"rgba(".concat(Fn(e[0]||0),", ").concat(Fn(e[1]||0),", ").concat(Fn(e[2]||0),", ").concat(e[3]||0,")")}var Ln={Pi:Be,radiansFromDegrees:Le,degreesFromRadians:Ve,round:je,floor:Ge,ceil:Ue,ceilLog2:qe,min:ze,max:We,arrayMin:He,arrayMax:Ke,arrayRange:Xe,isPowerOfTwo:Je,nearestPowerOfTwo:Ze,factorial:Ye,binomial:Qe,beginCombination:$e,nextCombination:et,randomSeed:tt,getSeed:nt,random:rt,gaussian:it,add:ot,subtract:at,multiplyScalar:st,multiplyScalar2D:lt,multiplyAccumulate:ut,multiplyAccumulate2D:ct,dot:dt,outer:pt,cross:ft,norm:ht,normalize:mt,perpendiculars:gt,projectVector:vt,projectVector2D:bt,distance2BetweenPoints:wt,angleBetweenVectors:xt,gaussianAmplitude:Ct,gaussianWeight:At,dot2D:yt,outer2D:Pt,norm2D:_t,normalize2D:Ot,determinant2x2:Tt,LUFactor3x3:Dt,LUSolve3x3:Et,linearSolve3x3:It,multiply3x3_vect3:kt,multiply3x3_mat3:Mt,multiplyMatrix:Nt,transpose3x3:Rt,invert3x3:Ft,identity3x3:Bt,determinant3x3:Lt,quaternionToMatrix3x3:Vt,areEquals:jt,areMatricesEqual:Gt,roundNumber:Ut,roundVector:zt,matrix3x3ToQuaternion:Ht,multiplyQuaternion:Kt,orthogonalize3x3:Xt,diagonalize3x3:qt,singularValueDecomposition3x3:Yt,solveLinearSystem:Qt,invertMatrix:$t,luFactorLinearSystem:Zt,luSolveLinearSystem:Jt,estimateMatrixCondition:en,jacobi:tn,jacobiN:Wt,solveHomogeneousLeastSquares:nn,solveLeastSquares:rn,hex2float:on,rgb2hsv:an,hsv2rgb:sn,lab2xyz:ln,xyz2lab:un,xyz2rgb:cn,rgb2xyz:dn,rgb2lab:pn,lab2rgb:fn,uninitializeBounds:hn,areBoundsInitialized:mn,computeBoundsFromPoints:gn,clampValue:vn,clampVector:yn,clampAndNormalizeValue:bn,getScalarTypeFittingRange:wn,getAdjustedScalarRange:xn,extentIsWithinOtherExtent:Sn,boundsIsWithinOtherBounds:Cn,pointIsWithinBounds:An,solve3PointCircle:Pn,inf:_n,negInf:On,isInf:Tn,isNan:En,isNaN:En,isFinite:Dn,createUninitializedBounds:kn,getMajorAxisIndex:Mn,floatToHex2:Nn,floatRGB2HexCode:Rn,float2CssRGBA:Bn};function Vn(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 jn(e){for(var t=1;ti&&(e=i),t1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=Un(),i=e.length,o=0;if(t<0&&n>1){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:0,n=e||[];n.length<=t;)n.push(null);return n}function Hn(e){return Object.prototype.toString.call(e).slice(8,-1)}var Kn={computeRange:zn,createRangeHelper:Un,getDataType:Hn,getMaxNorm:function(e){for(var t=e.getNumberOfComponents(),n=0,r=0;rn&&(n=i)}return n}};function Xn(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,i){i!==t.values[e*t.numberOfComponents+r]&&(t.values[e*t.numberOfComponents+r]=i,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=Wn(t.ranges,t.numberOfComponents)),(r=t.ranges[n])?(t.rangeTuple[0]=r.min,t.rangeTuple[1]=r.max,t.rangeTuple):(r=zn(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=Wn(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,i=0;i1&&void 0!==arguments[1]?arguments[1]:Gn,r=t.numberOfComponents||1;n.length!==r&&(n.length=r);var i=e*r;if(1===r)n[0]=t.values[i];else if(2===r)n[0]=t.values[i],n[1]=t.values[i+1];else if(3===r)n[0]=t.values[i],n[1]=t.values[i+1],n[2]=t.values[i+2];else if(4===r)n[0]=t.values[i],n[1]=t.values[i+1],n[2]=t.values[i+2],n[3]=t.values[i+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 Zn({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=Hn(e),r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),n()},e.getState=function(){var n=jn(jn({},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 qn={name:"",numberOfComponents:1,size:0,dataType:Oe.DefaultDataType,rangeTuple:[0,0]};function Yn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,qn,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=J(t.dataType,t.values)):t.values=Z(t.dataType,t.size),t.values&&(t.size=t.values.length,t.dataType=Hn(t.values)),re(e,t),se(e,t,["name","numberOfComponents"]),Xn(e,t)}var Zn=me(Yn,"vtkDataArray"),Jn=jn(jn({newInstance:Zn,extend:Yn},Kn),Oe);function Qn(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 $n(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Jn.extend(e,t,rr(n)),nr(e,t)}var or=$n({newInstance:Ae.newInstance(ir,"vtkCellArray"),extend:ir},tr);function ar(){var e=new ArrayBuffer(4),t=new Uint8Array(e),n=new Uint32Array(e);return t[0]=161,t[1]=178,t[2]=195,t[3]=212,3569595041===n[0]?"LittleEndian":2712847316===n[0]?"BigEndian":null}var sr={ENDIANNESS:ar(),getEndianness:ar,swapBytes:function(e,t){if(!(t<2))for(var n=new Int8Array(e),r=n.length,i=[],o=0;o>15,n=(31744&e)>>10,r=1023&e;return 0===n?(t?-1:1)*Math.pow(2,-14)*(r/Math.pow(2,10)):31===n?r?NaN:1/0*(t?-1:1):(t?-1:1)*Math.pow(2,n-15)*(1+r/Math.pow(2,10))},toHalf:function(e){lr[0]=e;var t=ur[0],n=t>>16&32768,r=t>>12&2047,i=t>>23&255;return i<103?n:i>142?(n|=31744,n|=(255===i?0:1)&&8388607&t):i<113?n|=((r|=2048)>>114-i)+(r>>113-i&1):(n|=i-112<<10|r>>1,n+=1&r)}};function dr(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 pr=1e-6,fr="coincide",hr="disjoint";function mr(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 gr(e,t,n,r){var i=[];at(e,t,i);var o=dt(n,i);r[0]=e[0]-o*n[0],r[1]=e[1]-o*n[1],r[2]=e[2]-o*n[2]}function vr(e,t,n){var r=dt(e,t),i=dt(t,t);return 0===i&&(i=1),n[0]=e[0]-r*t[0]/i,n[1]=e[1]-r*t[1]/i,n[2]=e[2]-r*t[2]/i,n}function yr(e,t,n,r){var i=[];at(e,t,i);var o=dt(n,i),a=dt(n,n);0!==a?(r[0]=e[0]-o*n[0]/a,r[1]=e[1]-o*n[1]/a,r[2]=e[2]-o*n[2]/a):(r[0]=e[0],r[1]=e[1],r[2]=e[2])}function br(e,t,n,r){var i={intersection:!1,betweenPoints:!1,t:Number.MAX_VALUE,x:[]},o=[],a=[];at(t,e,o),at(n,e,a);var s=dt(r,a),l=dt(r,o);return(l<0?-l:l)<=(s<0?-s*pr:s*pr)||(i.t=s/l,i.x[0]=e[0]+i.t*o[0],i.x[1]=e[1]+i.t*o[1],i.x[2]=e[2]+i.t*o[2],i.intersection=!0,i.betweenPoints=i.t>=0&&i.t<=1),i}function wr(e,t,n,r){var i={intersection:!1,l0:[],l1:[],error:null},o=[];ft(t,r,o);var a,s=o.map((function(e){return Math.abs(e)}));if(s[0]+s[1]+s[2]s[1]&&s[0]>s[2]?"x":s[1]>s[2]?"y":"z";var u=[],c=-dt(t,e),d=-dt(r,n);switch(a){case"x":u[0]=0,u[1]=(d*t[2]-c*r[2])/o[0],u[2]=(c*r[1]-d*t[1])/o[0];break;case"y":u[0]=(c*r[2]-d*t[2])/o[1],u[1]=0,u[2]=(d*t[0]-c*r[0])/o[1];break;case"z":u[0]=(d*t[1]-c*r[1])/o[2],u[1]=(c*r[0]-d*t[0])/o[2],u[2]=0}return i.l0=u,ot(u,o,i.l1),i.intersection=!0,i}var xr={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:mr,projectPoint:gr,projectVector:vr,generalizedProjectPoint:yr,intersectWithLine:br,intersectWithPlane:wr,DISJOINT:hr,COINCIDE:fr};function Sr(e,t){t.classHierarchy.push("vtkPlane"),e.distanceToPlane=function(e){return mr(e,t.origin,t.normal)},e.projectPoint=function(e,n){gr(e,t.origin,t.normal,n)},e.projectVector=function(e,n){return vr(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){yr(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 br(e,n,t.origin,t.normal)},e.intersectWithPlane=function(e,n){return wr(e,n,t.origin,t.normal)}}var Cr={normal:[0,0,1],origin:[0,0,0]};function Ar(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cr,n),Ae.obj(e,t),Ae.setGetArray(e,t,["normal","origin"],3),Sr(e,t)}var Pr=function(e){for(var t=1;t(arguments.length<=1?void 0:arguments[1])?r:arguments.length<=1?void 0:arguments[1],e[2]=i<(arguments.length<=2?void 0:arguments[2])?i:arguments.length<=2?void 0:arguments[2],e[3]=o>(arguments.length<=2?void 0:arguments[2])?o:arguments.length<=2?void 0:arguments[2],e[4]=a<(arguments.length<=3?void 0:arguments[3])?a: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 Mr(e,t,n,r,i,o,a){var s=y(e,6),l=s[0],u=s[1],c=s[2],d=s[3],p=s[4],f=s[5];void 0===a?(e[0]=Math.min(t[0],l),e[1]=Math.max(t[1],u),e[2]=Math.min(t[2],c),e[3]=Math.max(t[3],d),e[4]=Math.min(t[4],p),e[5]=Math.max(t[5],f)):(e[0]=Math.min(t,l),e[1]=Math.max(n,u),e[2]=Math.min(r,c),e[3]=Math.max(i,d),e[4]=Math.min(o,p),e[5]=Math.max(a,f))}function Nr(e,t,n,r){var i=y(e,6),o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[5];return e[0]=t,e[1]=t>a?t:a,e[2]=n,e[3]=n>l?n:l,e[4]=r,e[5]=r>c?r:c,o!==t||s!==n||u!==r}function Rr(e,t,n,r){var i=y(e,6),o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[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 Lr(e){return[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])]}function Vr(e,t){return e[2*t+1]-e[2*t]}function jr(e){return[Vr(e,0),Vr(e,1),Vr(e,2)]}function Gr(e){return e.slice(0,2)}function Ur(e){return e.slice(2,4)}function zr(e){return e.slice(4,6)}function Wr(e){var t=jr(e);return t[0]>t[1]?t[0]>t[2]?t[0]:t[2]:t[1]>t[2]?t[1]:t[2]}function Hr(e){if(Dr(e)){var t=jr(e);return Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2])}return null}function Kr(e){return[e[0],e[2],e[4]]}function Xr(e){return[e[1],e[3],e[5]]}function qr(e,t){return e<=0&&t>=0||e>=0&&t<=0}function Yr(e,t){for(var n=0,r=0;r<2;r++)for(var i=2;i<4;i++)for(var o=4;o<6;o++)t[n]=[e[r],e[i],e[o]],n++}function Zr(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 Jr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Lr(e);return t[0]=e[1]-n[0],t[1]=e[3]-n[1],t[2]=e[5]-n[2],t}function Qr(e,t,n,r){for(var i=[].concat(Or),o=e.getData(),a=0;ae[2*c+1]?(a[c]=0,u[c]=e[2*c+1],o=!1):a[c]=2;if(o)return r[0]=t[0],r[1]=t[1],r[2]=t[2],i[0]=0,1;for(var d=0;d<3;d++)2!==a[d]&&0!==n[d]?l[d]=(u[d]-t[d])/n[d]:l[d]=-1;for(var p=0;p<3;p++)l[s]1||l[s]<0)return 0;i[0]=l[s];for(var f=0;f<3;f++)if(s!==f){if(r[f]=t[f]+l[s]*n[f],r[f]e[2*f+1])return 0}else r[f]=u[f];return 1}function ei(e,t,n){for(var r=[],i=0,o=1,a=1,s=4;s<=5;++s){r[2]=e[s];for(var l=2;l<=3;++l){r[1]=e[l];for(var u=0;u<=1;++u)if(r[0]=e[u],i=Pr.evaluate(n,t,r),a&&(o=i>=0?1:-1,a=0),0===i||o>0&&i<0||o<0&&i>0)return 1}}return 0}function ti(e,t){if(!Dr(e)||!Dr(t))return!1;for(var n,r=[0,0,0,0,0,0],i=0;i<3;i++)if(n=!1,t[2*i]>=e[2*i]&&t[2*i]<=e[2*i+1]?(n=!0,r[2*i]=t[2*i]):e[2*i]>=t[2*i]&&e[2*i]<=t[2*i+1]&&(n=!0,r[2*i]=e[2*i]),t[2*i+1]>=e[2*i]&&t[2*i+1]<=e[2*i+1]?(n=!0,r[2*i+1]=t[2*i+1]):e[2*i+1]>=t[2*i]&&e[2*i+1]<=t[2*i+1]&&(n=!0,r[2*i+1]=e[2*i+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 ni(e,t){if(!Dr(e)||!Dr(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 ri(e,t,n,r){return!(te[1])&&(!(ne[3])&&!(re[5]))}function ii(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]],i=[0,0,0,0,0,0,0,0],o=0,a=0;a<2;a++)for(var s=2;s<4;s++)for(var l=4;l<6;l++){var u=[e[a],e[s],e[l]];i[o++]=Pr.evaluate(n,t,u)}for(var c=2;c--&&!(qr(i[r[c][0]],i[r[c][4]])&&qr(i[r[c][1]],i[r[c][5]])&&qr(i[r[c][2]],i[r[c][6]])&&qr(i[r[c][3]],i[r[c][7]])););if(c<0)return!1;for(var d=Math.sign(n[c]),p=Math.abs((e[2*c+1]-e[2*c])*n[c]),f=d>0?1:0,h=0;h<4;h++)if(0!==p){var m=Math.abs(i[r[c][h]])/p;d>0&&mf&&(f=m)}var g=(1-f)*e[2*c]+f*e[2*c+1];return d>0?e[2*c]=g:e[2*c+1]=g,!0}var oi=function(){function e(t){D(this,e),this.bounds=t,this.bounds||(this.bounds=new Float64Array(6),Er(this.bounds,Or))}return I(e,[{key:"getBounds",value:function(){return this.bounds}},{key:"equals",value:function(e){return Tr(this.bounds,e)}},{key:"isValid",value:function(){return Dr(this.bounds)}},{key:"setBounds",value:function(e){return Er(this.bounds,e)}},{key:"reset",value:function(){return Ir(this.bounds)}},{key:"addPoint",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n=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,i=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 a=e.getArrayByName(n.getName());if(a){if(n.getNumberOfComponents()===a.getNumberOfComponents())if(r>-1&&r-1?i:r;a.setTuple(s,n.getTuple(r))}else for(var l=0;ln.getNumberOfTuples())e.addArray(n);else{var u=n.getNumberOfComponents(),c=n.getNumberOfValues(),d=i>-1?i:r;ce?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 ui={arrays:[],copyFieldFlags:[],doCopyAllOn:!0,doCopyAllOff:!1};function ci(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ui,n),Ae.obj(e,t),li(e,t)}var di={newInstance:Ae.newInstance(ci,"vtkFieldData"),extend:ci},pi={SCALARS:0,VECTORS:1,NORMALS:2,TCOORDS:3,TENSORS:4,GLOBALIDS:5,PEDIGREEIDS:6,EDGEFLAG:7,NUM_ATTRIBUTES:8},fi={DEFAULT:0,SINGLE:1,DOUBLE:2},hi={AttributeCopyOperations:{COPYTUPLE:0,INTERPOLATE:1,PASSDATA:2,ALLCOPY:3},AttributeLimitTypes:{MAX:0,EXACT:1,NOLIMIT:2},AttributeTypes:pi,CellGhostTypes:{DUPLICATECELL:1,HIGHCONNECTIVITYCELL:2,LOWCONNECTIVITYCELL:4,REFINEDCELL:8,EXTERIORCELL:16,HIDDENCELL:32},DesiredOutputPrecision:fi,PointGhostTypes:{DUPLICATEPOINT:1,HIDDENPOINT:2},ghostArrayName:"vtkGhostType"};function mi(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 gi=hi.AttributeTypes,vi=hi.AttributeCopyOperations,yi=Ae.vtkWarningMacro;function bi(e,t){var n=["Scalars","Vectors","Normals","TCoords","Tensors","GlobalIds","PedigreeIds"];function r(e){var t=n.find((function(t){return gi[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,i){var o=r(i);if(n&&"PEDIGREEIDS"===o.toUpperCase()&&!n.isA("vtkDataArray"))return yi("Cannot set attribute ".concat(o,". The attribute must be a vtkDataArray.")),-1;if(n&&!e.checkNumberOfComponents(n,o))return yi("Cannot set attribute ".concat(o,". Incorrect number of components.")),-1;var a=t["active".concat(o)];if(a>=0&&a=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wi,n),di.extend(e,t,n),Ae.setGet(e,t,["activeScalars","activeNormals","activeTCoords","activeVectors","activeTensors","activeGlobalIds","activePedigreeIds"]),t.arrays||(t.arrays={}),bi(e,t)}var Si=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Oi.forEach((function(n){t[n]=Si.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))}}var Di={};function Ei(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Di,n),Ae.obj(e,t),Ae.setGet(e,t,Oi),Ti(e,t)}var Ii=function(e){for(var t=1;te[1]||e[2]>e[3]||e[4]>e[5]?Ri.EMPTY:3===t?Ri.XYZ_GRID:2===t?e[0]===e[1]?Ri.YZ_PLANE:e[2]===e[3]?Ri.XZ_PLANE:Ri.XY_PLANE:1===t?e[0]0&&(o=1/Math.sqrt(o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e}function po(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function fo(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}function ho(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}function mo(e,t,n,r,i,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return e[0]=t[0]*s+n[0]*l+r[0]*u+i[0]*c,e[1]=t[1]*s+n[1]*l+r[1]*u+i[1]*c,e[2]=t[2]*s+n[2]*l+r[2]*u+i[2]*c,e}function go(e,t,n,r,i,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,d=3*l*a,p=l*o;return e[0]=t[0]*u+n[0]*c+r[0]*d+i[0]*p,e[1]=t[1]*u+n[1]*c+r[1]*d+i[1]*p,e[2]=t[2]*u+n[2]*c+r[2]*d+i[2]*p,e}function vo(e,t){t=t||1;var n=2*Vi()*Math.PI,r=2*Vi()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}function yo(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}function bo(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function wo(e,t,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=t[0],l=t[1],u=t[2],c=i*u-o*l,d=o*s-r*u,p=r*l-i*s,f=i*p-o*d,h=o*c-r*p,m=r*d-i*c,g=2*a;return c*=g,d*=g,p*=g,f*=2,h*=2,m*=2,e[0]=s+c+f,e[1]=l+d+h,e[2]=u+p+m,e}function xo(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function So(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function Co(e,t,n,r){var i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e}function Ao(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),u=l&&po(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}function Po(e){return e[0]=0,e[1]=0,e[2]=0,e}function _o(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"}function Oo(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function To(e,t){var n=e[0],r=e[1],i=e[2],o=t[0],a=t[1],s=t[2];return Math.abs(n-o)<=Bi*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=Bi*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=Bi*Math.max(1,Math.abs(i),Math.abs(s))}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var Do,Eo=Yi,Io=Zi,ko=Ji,Mo=oo,No=ao,Ro=Wi,Fo=so,Bo=(Do=Ui(),function(e,t,n,r,i,o){var a,s;for(t||(t=3),n||(n=0),s=r?Math.min(r*t+n,e.length):e.length,a=n;a0?(n[0]=2*(s*a+c*r+l*o-u*i)/d,n[1]=2*(l*a+c*i+u*r-s*o)/d,n[2]=2*(u*a+c*o+s*i-l*r)/d):(n[0]=2*(s*a+c*r+l*o-u*i),n[1]=2*(l*a+c*i+u*r-s*o),n[2]=2*(u*a+c*o+s*i-l*r)),sa(e,t,n),e}function ua(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function ca(e,t){var n=t[0],r=t[1],i=t[2],o=t[4],a=t[5],s=t[6],l=t[8],u=t[9],c=t[10];return e[0]=Math.hypot(n,r,i),e[1]=Math.hypot(o,a,s),e[2]=Math.hypot(l,u,c),e}function da(e,t){var n=new Li(3);ca(n,t);var r=1/n[0],i=1/n[1],o=1/n[2],a=t[0]*r,s=t[1]*i,l=t[2]*o,u=t[4]*r,c=t[5]*i,d=t[6]*o,p=t[8]*r,f=t[9]*i,h=t[10]*o,m=a+c+h,g=0;return m>0?(g=2*Math.sqrt(m+1),e[3]=.25*g,e[0]=(d-f)/g,e[1]=(p-l)/g,e[2]=(s-u)/g):a>c&&a>h?(g=2*Math.sqrt(1+a-c-h),e[3]=(d-f)/g,e[0]=.25*g,e[1]=(s+u)/g,e[2]=(p+l)/g):c>h?(g=2*Math.sqrt(1+c-a-h),e[3]=(p-l)/g,e[0]=(s+u)/g,e[1]=.25*g,e[2]=(d+f)/g):(g=2*Math.sqrt(1+h-a-c),e[3]=(s-u)/g,e[0]=(p+l)/g,e[1]=(d+f)/g,e[2]=.25*g),e}function pa(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3],l=i+i,u=o+o,c=a+a,d=i*l,p=i*u,f=i*c,h=o*u,m=o*c,g=a*c,v=s*l,y=s*u,b=s*c,w=r[0],x=r[1],S=r[2];return e[0]=(1-(h+g))*w,e[1]=(p+b)*w,e[2]=(f-y)*w,e[3]=0,e[4]=(p-b)*x,e[5]=(1-(d+g))*x,e[6]=(m+v)*x,e[7]=0,e[8]=(f+y)*S,e[9]=(m-v)*S,e[10]=(1-(d+h))*S,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function fa(e,t,n,r,i){var o=t[0],a=t[1],s=t[2],l=t[3],u=o+o,c=a+a,d=s+s,p=o*u,f=o*c,h=o*d,m=a*c,g=a*d,v=s*d,y=l*u,b=l*c,w=l*d,x=r[0],S=r[1],C=r[2],A=i[0],P=i[1],_=i[2],O=(1-(m+v))*x,T=(f+w)*x,D=(h-b)*x,E=(f-w)*S,I=(1-(p+v))*S,k=(g+y)*S,M=(h+b)*C,N=(g-y)*C,R=(1-(p+m))*C;return e[0]=O,e[1]=T,e[2]=D,e[3]=0,e[4]=E,e[5]=I,e[6]=k,e[7]=0,e[8]=M,e[9]=N,e[10]=R,e[11]=0,e[12]=n[0]+A-(O*A+E*P+M*_),e[13]=n[1]+P-(T*A+I*P+N*_),e[14]=n[2]+_-(D*A+k*P+R*_),e[15]=1,e}function ha(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,p=i*a,f=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[1]=c+v,e[2]=p-g,e[3]=0,e[4]=c-v,e[5]=1-u-h,e[6]=f+m,e[7]=0,e[8]=p+g,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ma(e,t,n,r,i,o,a){var s=1/(n-t),l=1/(i-r),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}function ga(e,t,n,r,i){var o,a=1/Math.tan(t/2);return e[0]=a/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,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!=i&&i!==1/0?(o=1/(r-i),e[10]=(i+r)*o,e[14]=2*i*r*o):(e[10]=-1,e[14]=-2*r),e}function va(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*u*.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}function ya(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*u,e[15]=1,e}function ba(e,t,n,r){var i,o,a,s,l,u,c,d,p,f,h=t[0],m=t[1],g=t[2],v=r[0],y=r[1],b=r[2],w=n[0],x=n[1],S=n[2];return Math.abs(h-w)0&&(c*=f=1/Math.sqrt(f),d*=f,p*=f);var h=l*p-u*d,m=u*c-s*p,g=s*d-l*c;return(f=h*h+m*m+g*g)>0&&(h*=f=1/Math.sqrt(f),m*=f,g*=f),e[0]=h,e[1]=m,e[2]=g,e[3]=0,e[4]=d*g-p*m,e[5]=p*h-c*g,e[6]=c*m-d*h,e[7]=0,e[8]=c,e[9]=d,e[10]=p,e[11]=0,e[12]=i,e[13]=o,e[14]=a,e[15]=1,e}function xa(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]+")"}function Sa(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])}function Ca(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}function Aa(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}function Pa(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}function _a(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}function Oa(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]}function Ta(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],h=e[12],m=e[13],g=e[14],v=e[15],y=t[0],b=t[1],w=t[2],x=t[3],S=t[4],C=t[5],A=t[6],P=t[7],_=t[8],O=t[9],T=t[10],D=t[11],E=t[12],I=t[13],k=t[14],M=t[15];return Math.abs(n-y)<=Bi*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-b)<=Bi*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-w)<=Bi*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(o-x)<=Bi*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(a-S)<=Bi*Math.max(1,Math.abs(a),Math.abs(S))&&Math.abs(s-C)<=Bi*Math.max(1,Math.abs(s),Math.abs(C))&&Math.abs(l-A)<=Bi*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(u-P)<=Bi*Math.max(1,Math.abs(u),Math.abs(P))&&Math.abs(c-_)<=Bi*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(d-O)<=Bi*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(p-T)<=Bi*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(f-D)<=Bi*Math.max(1,Math.abs(f),Math.abs(D))&&Math.abs(h-E)<=Bi*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(m-I)<=Bi*Math.max(1,Math.abs(m),Math.abs(I))&&Math.abs(g-k)<=Bi*Math.max(1,Math.abs(g),Math.abs(k))&&Math.abs(v-M)<=Bi*Math.max(1,Math.abs(v),Math.abs(M))}var Da=qo,Ea=Aa;function Ia(){var e=new Li(9);return Li!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ka(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function Ma(e){var t=new Li(9);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Na(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}function Ra(e,t,n,r,i,o,a,s,l){var u=new Li(9);return u[0]=e,u[1]=t,u[2]=n,u[3]=r,u[4]=i,u[5]=o,u[6]=a,u[7]=s,u[8]=l,u}function Fa(e,t,n,r,i,o,a,s,l,u){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=o,e[5]=a,e[6]=s,e[7]=l,e[8]=u,e}function Ba(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function La(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}function Va(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*a-s*u,p=-c*o+s*l,f=u*o-a*l,h=n*d+r*p+i*f;return h?(h=1/h,e[0]=d*h,e[1]=(-c*r+i*u)*h,e[2]=(s*r-i*a)*h,e[3]=p*h,e[4]=(c*n-i*l)*h,e[5]=(-s*n+i*o)*h,e[6]=f*h,e[7]=(-u*n+r*l)*h,e[8]=(a*n-r*o)*h,e):null}function ja(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=i*u-r*c,e[2]=r*s-i*a,e[3]=s*l-o*c,e[4]=n*c-i*l,e[5]=i*o-n*s,e[6]=o*u-a*l,e[7]=r*l-n*u,e[8]=n*a-r*o,e}function Ga(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+n*(-u*i+a*s)+r*(l*i-o*s)}function Ua(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=n[0],f=n[1],h=n[2],m=n[3],g=n[4],v=n[5],y=n[6],b=n[7],w=n[8];return e[0]=p*r+f*a+h*u,e[1]=p*i+f*s+h*c,e[2]=p*o+f*l+h*d,e[3]=m*r+g*a+v*u,e[4]=m*i+g*s+v*c,e[5]=m*o+g*l+v*d,e[6]=y*r+b*a+w*u,e[7]=y*i+b*s+w*c,e[8]=y*o+b*l+w*d,e}function za(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=n[0],f=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=p*r+f*a+u,e[7]=p*i+f*s+c,e[8]=p*o+f*l+d,e}function Wa(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],p=Math.sin(n),f=Math.cos(n);return e[0]=f*r+p*a,e[1]=f*i+p*s,e[2]=f*o+p*l,e[3]=f*a-p*r,e[4]=f*s-p*i,e[5]=f*l-p*o,e[6]=u,e[7]=c,e[8]=d,e}function Ha(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function Ka(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=t[0],e[7]=t[1],e[8]=1,e}function Xa(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=-n,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function qa(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=t[1],e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Ya(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}function Za(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,p=i*a,f=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[3]=c-v,e[6]=p+g,e[1]=c+v,e[4]=1-u-h,e[7]=f-m,e[2]=p-g,e[5]=f+m,e[8]=1-u-d,e}function Ja(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],p=t[10],f=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,w=n*u-o*a,x=r*l-i*s,S=r*u-o*s,C=i*u-o*l,A=c*m-d*h,P=c*g-p*h,_=c*v-f*h,O=d*g-p*m,T=d*v-f*m,D=p*v-f*g,E=y*D-b*T+w*O+x*_-S*P+C*A;return E?(E=1/E,e[0]=(s*D-l*T+u*O)*E,e[1]=(l*_-a*D-u*P)*E,e[2]=(a*T-s*_+u*A)*E,e[3]=(i*T-r*D-o*O)*E,e[4]=(n*D-i*_+o*P)*E,e[5]=(r*_-n*T-o*A)*E,e[6]=(m*C-g*S+v*x)*E,e[7]=(g*w-h*C-v*b)*E,e[8]=(h*S-m*w+v*y)*E,e):null}function Qa(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function $a(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}function es(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])}function ts(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}function ns(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}function rs(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}function is(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}function os(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]}function as(e,t){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],d=t[0],p=t[1],f=t[2],h=t[3],m=t[4],g=t[5],v=t[6],y=t[7],b=t[8];return Math.abs(n-d)<=Bi*Math.max(1,Math.abs(n),Math.abs(d))&&Math.abs(r-p)<=Bi*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(i-f)<=Bi*Math.max(1,Math.abs(i),Math.abs(f))&&Math.abs(o-h)<=Bi*Math.max(1,Math.abs(o),Math.abs(h))&&Math.abs(a-m)<=Bi*Math.max(1,Math.abs(a),Math.abs(m))&&Math.abs(s-g)<=Bi*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-v)<=Bi*Math.max(1,Math.abs(l),Math.abs(v))&&Math.abs(u-y)<=Bi*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(c-b)<=Bi*Math.max(1,Math.abs(c),Math.abs(b))}var ss=Ua,ls=ns,us=Ae.vtkErrorMacro;function cs(e,t){t.classHierarchy.push("vtkImageData"),e.setExtent=function(){if(t.deleted)return us("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),i=0;i1&&(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 us("Requesting a point from an empty image."),null;var i=new Float64Array(3);switch(t.dataDescription){case ki.EMPTY:return null;case ki.SINGLE_POINT:break;case ki.X_LINE:i[0]=n;break;case ki.Y_LINE:i[1]=n;break;case ki.Z_LINE:i[2]=n;break;case ki.XY_PLANE:i[0]=n%r[0],i[1]=n/r[0];break;case ki.YZ_PLANE:i[1]=n%r[1],i[2]=n/r[1];break;case ki.XZ_PLANE:i[0]=n%r[0],i[2]=n/r[0];break;case ki.XYZ_GRID:i[0]=n%r[0],i[1]=n/r[0]%r[1],i[2]=n/(r[0]*r[1]);break;default:us("Invalid dataDescription")}var o=[0,0,0];return e.indexToWorld(i,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]]),i=new Float64Array(3);e.indexToWorld(r,i);for(var o=[i[0],i[0],i[1],i[1],i[2],i[2]],a=3;a<24;a+=3)Xi(r,n[a],n[a+1],n[a+2]),e.indexToWorld(r,i),i[0]o[1]&&(o[1]=i[0]),i[1]>o[3]&&(o[3]=i[1]),i[2]>o[5]&&(o[5]=i[2]);return o},e.computeTransforms=function(){ta(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],Zo(t.indexToWorld,t.indexToWorld,t.spacing),Ho(t.worldToIndex,t.indexToWorld)},e.setDirection=function(){if(t.deleted)return us("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:[];return yo(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 yo(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],i=[0,0,0];si.computeCornerPoints(e,r,i);var o=[0,0,0],a=[0,0,0];return yo(o,r,t.indexToWorld),yo(a,i,t.indexToWorld),gn(o,a,n)},e.worldToIndexBounds=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=[0,0,0],i=[0,0,0];si.computeCornerPoints(e,r,i);var o=[0,0,0],a=[0,0,0];return yo(o,r,t.worldToIndex),yo(a,i,t.worldToIndex),gn(o,a,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 i=[0,0,0],o=[0,0,0];si.computeCornerPoints(r,i,o),zt(i,i),zt(o,o);var a=e.getDimensions();yn(i,[0,0,0],[a[0]-1,a[1]-1,a[2]-1],i),yn(o,[0,0,0],[a[0]-1,a[1]-1,a[2]-1],o);for(var s=a[0],l=a[0]*a[1],u=e.getPointData().getScalars().getData(),c=-1/0,d=1/0,p=0,f=0,h=0,m=i[2];m<=o[2];m++)for(var g=i[1];g<=o[1];g++)for(var v=i[0]+g*s+m*l,y=i[0];y<=o[0];y++){if(!n||n([y,g,m],r)){var b=u[v];b>c&&(c=b),b0?f/h:0,x=h?Math.abs(p/h-w*w):0,S=Math.sqrt(x);return{minimum:d,maximum:c,average:w,variance:x,sigma:S,count:h}},e.computeIncrements=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=t,i=0;i<3;++i)n[i]=r,r*=e[2*i+1]-e[2*i]+1;return n},e.computeOffsetIndex=function(t){var n=y(t,3),r=n[0],i=n[1],o=n[2],a=e.getExtent(),s=e.getPointData().getScalars().getNumberOfComponents(),l=e.computeIncrements(a,s);return Math.floor((Math.round(r)-a[0])*l[0]+(Math.round(i)-a[2])*l[1]+(Math.round(o)-a[4])*l[2])},e.getOffsetIndexFromWorld=function(t){for(var n=e.getExtent(),r=e.worldToIndex(t),i=0;i<3;++i)if(r[i]n[2*i+1])return us("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 us("GetScalarPointer: Scalar Component ".concat(n," is not within bounds. Current Scalar numberOfComponents: ").concat(r)),NaN;var i=e.getOffsetIndexFromWorld(t);return Number.isNaN(i)?i:e.getPointData().getScalars().getComponent(i,n)}}var ds={direction:null,indexToWorld:null,worldToIndex:null,spacing:[1,1,1],origin:[0,0,0],extent:[0,-1,0,-1,0,-1],dataDescription:ki.EMPTY};function ps(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ds,n),Ii.extend(e,t,n),t.direction?Array.isArray(t.direction)&&(t.direction=new Float64Array(t.direction.slice(0,9))):t.direction=Ba(new Float64Array(9)),t.indexToWorld=new Float64Array(16),t.worldToIndex=new Float64Array(16),Ae.get(e,t,["direction","indexToWorld","worldToIndex"]),Ae.setGetArray(e,t,["origin","spacing"],3),Ae.getArray(e,t,["extent"],6),cs(e,t)}var fs={newInstance:Ae.newInstance(ps,"vtkImageData"),extend:ps};function hs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0,0],n=y(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=e.getContext("2d"),l=s.getImageData(r,i,o||e.width,a||e.height),u=fs.newInstance({type:"vtkImageData"});u.setOrigin(0,0,0),u.setSpacing(1,1,1),u.setExtent(0,(o||e.width)-1,0,(a||e.height)-1,0,0);var c=Jn.newInstance({numberOfComponents:4,values:new Uint8Array(l.data.buffer)});return c.setName("scalars"),u.getPointData().setScalars(c),u}var ms={canvasToImageData:hs,imageToImageData:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{flipX:!1,flipY:!1,rotate:0},n=document.createElement("canvas");n.width=e.width,n.height=e.height;var r=n.getContext("2d"),i=t.flipX,o=t.flipY,a=t.rotate;return r.translate(n.width/2,n.height/2),r.scale(i?-1:1,o?-1:1),r.rotate(a*Math.PI/180),r.drawImage(e,-e.width/2,-e.height/2),hs(n)}},gs={LUMINANCE:1,LUMINANCE_ALPHA:2,RGB:3,RGBA:4},vs={VectorMode:{MAGNITUDE:0,COMPONENT:1,RGBCOLORS:2},ScalarMappingTarget:gs},ys={DEFAULT:0,USE_POINT_DATA:1,USE_CELL_DATA:2,USE_POINT_FIELD_DATA:3,USE_CELL_FIELD_DATA:4,USE_FIELD_DATA:5},bs={ColorMode:{DEFAULT:0,MAP_SCALARS:1,DIRECT_SCALARS:2},GetArray:{BY_ID:0,BY_NAME:1},ScalarMode:ys};function ws(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 xs=vs.ScalarMappingTarget,Ss=vs.VectorMode,Cs=Jn.VtkDataTypes,As=bs.ColorMode,Ps=Ae.vtkErrorMacro;function _s(e){return e}function Os(e){return Math.floor(255*e+.5)}function Ts(e,t){t.classHierarchy.push("vtkScalarsToColors"),e.setVectorModeToMagnitude=function(){return e.setVectorMode(Ss.MAGNITUDE)},e.setVectorModeToComponent=function(){return e.setVectorMode(Ss.COMPONENT)},e.setVectorModeToRGBColors=function(){return e.setVectorMode(Ss.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)Ps("Values and annotations do not have the same number of tuples so ignoring");else{if(t.annotationArray=[],r&&n)for(var i=r.length,o=0;o=0?t.annotationArray[i].annotation!==r&&(t.annotationArray[i].annotation=r,o=!0):(t.annotationArray.push({value:n,annotation:r}),i=t.annotationArray.length-1,o=!0),o&&(e.updateAnnotatedValueMap(),e.modified()),i},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),i=r>=0;return i&&(t.annotationArray.splice(r,1),e.updateAnnotatedValueMap(),e.modified()),i},e.resetAnnotations=function(){t.annotationArray=[],t.annotatedValueMap=[],e.modified()},e.getAnnotationColor=function(n,r){if(t.indexedLookup){var i=e.getAnnotatedValueIndex(n);e.getIndexedColor(i,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,xs.RGBA,-1,-1):(l<0&&(l=0),l>=i&&(l=i-1),e.mapScalarsThroughTable(t,o,xs.RGBA,l))}return o},e.mapVectorsToMagnitude=function(e,t,n){for(var r=e.getNumberOfTuples(),i=e.getNumberOfComponents(),o=t.getData(),a=e.getData(),s=0;s=u&&(l=u-1)):(-1===s&&(s=e.getVectorSize()),s<=0?(l=0,s=u):(l<0&&(l=0),l>=u&&(l=u-1),l+s>u&&(s=u-l)),a!==Ss.MAGNITUDE||1!==u&&1!==s||(a=Ss.COMPONENT));var c=0;switch(l>0&&(c=l),a){case Ss.COMPONENT:e.mapScalarsThroughTable(t,n,r,c);break;default:case Ss.MAGNITUDE:var d=Jn.newInstance({numberOfComponents:1,values:new Float32Array(t.getNumberOfTuples())});e.mapVectorsToMagnitude(t,d,s),e.mapScalarsThroughTable(d,n,r,0);case Ss.RGBCOLORS:}},e.luminanceToRGBA=function(e,t,n,r){for(var i=r(n),o=t.getData(),a=e.getData(),s=o.length,l=0,u=0;u=1&&n.getDataType()===Cs.UNSIGNED_CHAR)return n;var a=Jn.newInstance({numberOfComponents:4,empty:!0,size:4*i,dataType:Cs.UNSIGNED_CHAR});if(i<=0)return a;o=(o=o>0?o:0)<1?o:1;var s=_s;switch(n.getDataType()!==Cs.FLOAT&&n.getDataType()!==Cs.DOUBLE||(s=Os),r){case 1:e.luminanceToRGBA(a,n,o,s);break;case 2:e.luminanceAlphaToRGBA(a,n,s);break;case 3:e.rGBToRGBA(a,n,o,s);break;case 4:e.rGBAToRGBA(a,n,o,s);break;default:return Ps("Cannot convert colors"),null}return a},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 Ds={alpha:1,vectorComponent:0,vectorSize:-1,vectorMode:Ss.COMPONENT,mappingRange:null,annotationArray:null,annotatedValueMap:null,indexedLookup:!1};function Es(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ds,n),Ae.obj(e,t),t.mappingRange=[0,255],t.annotationArray=[],t.annotatedValueMap=[],Ae.setGet(e,t,["vectorSize","vectorComponent","vectorMode","alpha","indexedLookup"]),Ae.setArray(e,t,["mappingRange"],2),Ae.getArray(e,t,["mappingRange"]),Ts(e,t)}var Is=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,i,o){var a=e.linearLookup;t.indexedLookup&&(a=e.indexedLookupFunction);var s=e.getMappingRange(),l={maxIndex:e.getNumberOfColors()-1,range:s,shift:0,scale:0};e.lookupShiftAndScale(s,l);var u=e.getAlpha(),c=n.getNumberOfTuples(),d=n.getNumberOfComponents(),p=r.getData(),f=n.getData();if(u>=1){if(i===gs.RGBA)for(var h=0;ht.buildTime.getMTime()&&t.insertTime.getMTime()<=t.buildTime.getMTime())&&e.forceBuild()},t.table.length>0&&t.insertTime.modified()}var Ns={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 Rs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ns,n),Is.extend(e,t,n),t.table||(t.table=[]),t.buildTime={},Ae.obj(t.buildTime),t.opaqueFlagBuildTime={},Ae.obj(t.opaqueFlagBuildTime,{mtime:0}),t.insertTime={},Ae.obj(t.insertTime,{mtime:0}),Ae.get(e,t,["buildTime"]),Ae.setGet(e,t,["numberOfColors","useAboveRangeColor","useBelowRangeColor"]),Ae.setArray(e,t,["alphaRange","hueRange","saturationRange","valueRange"],2),Ae.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),Ae.getArray(e,t,["hueRange","saturationRange","valueRange","alphaRange","nanColor","belowRangeColor","aboveRangeColor"]),Ms(e,t)}var Fs={newInstance:Ae.newInstance(Rs,"vtkLookupTable"),extend:Rs},Bs=function(e){return e},Ls=zo(new Float64Array(16)),Vs=1e-6,js=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];D(this,e),this.matrix=zo(new Float64Array(16)),this.tmp=new Float64Array(3),this.angleConv=t?Gi:Bs}return I(e,[{key:"rotateFromDirections",value:function(e,t){var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(16);Xi(n,e[0],e[1],e[2]),Xi(r,t[0],t[1],t[2]),co(n,n),co(r,r);var o=po(n,r);return o>=1||(fo(this.tmp,n,r),Wi(this.tmp)1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(Gt(Ls,this.matrix))return this;for(var r=-1===n?e.length:t+3*n,i=t;i1&&void 0!==arguments[1]?arguments[1]:3;e.getNumberOfPoints()!==n&&(t.size=n*r,t.values=Ae.newTypedArray(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,Hs,n),Jn.extend(e,t,n),Ws(e,t)}var Xs={newInstance:Ae.newInstance(Ks,"vtkPoints"),extend:Ks};function qs(e,t){t.classHierarchy.push("vtkProgressHandler"),e.startWork=function(){t.workCount+=1,1===t.workCount&&e.invokeChange(!0)},e.stopWork=function(){t.workCount-=1,0===t.workCount&&e.invokeChange(!1)},e.isWorking=function(){return!!t.workCount},e.wrapPromise=function(t){return e.startWork(),new Promise((function(n,r){t.then((function(){e.stopWork(),n.apply(void 0,arguments)}),(function(t){e.stopWork(),r(t)}))}))},e.wrapPromiseFunction=function(t){return function(){return e.wrapPromise(t.apply(void 0,arguments))}}}var Ys={workCount:0};function Zs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ys,n),Ae.obj(e,t),Ae.event(e,t,"change"),Ae.get(e,t,["workCount"]),qs(e,t)}var Js={newInstance:Ae.newInstance(Zs,"vtkProgressHandler"),extend:Zs},Qs=[];function $s(e,t){t.classHierarchy.push("vtkStringArray"),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(n,r,i){i!==t.values[n*t.numberOfComponents+r]&&(t.values[n*t.numberOfComponents+r]=i,e.modified())},e.getData=function(){return t.values},e.getTuple=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qs,r=t.numberOfComponents||1;n.length&&(n.length=r);for(var i=e*r,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 nl({name:t.name,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkStringArray".concat(e.getMTime())),t.name},e.setData=function(n,r){t.values=n,t.size=n.length,r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.modified()}}var el={name:"",numberOfComponents:1,size:0,dataType:"string"};function tl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,el,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkStringArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=w(t.values)):t.values=[],t.values&&(t.size=t.values.length),Ae.obj(e,t),Ae.set(e,t,["name"]),$s(e,t)}var nl=Ae.newInstance(tl,"vtkStringArray"),rl={newInstance:nl,extend:tl};function il(e){return e}function ol(e){return null===e||"null"===e?null:"true"===e||"false"!==e&&(void 0!==e&&"undefined"!==e?"["===e[0]&&"]"===e[e.length-1]?e.substring(1,e.length-1).split(",").map((function(e){return ol(e.trim())})):""===e||Number.isNaN(Number(e))?e:Number(e):void 0)}var al={toNativeType:ol,extractURLParameters:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.search,n={},r=e?ol:il,i=(t||"").replace(/#.*/,"").replace("?","").split("&");return i.forEach((function(e){var t=y(e.split("=").map((function(e){return decodeURIComponent(e)})),2),i=t[0],o=t[1];i&&(n[i]=!o||r(o))})),n}},sl=[];function ll(e,t){t.classHierarchy.push("vtkVariantArray"),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(n,r,i){i!==t.values[n*t.numberOfComponents+r]&&(t.values[n*t.numberOfComponents+r]=i,e.modified())},e.getData=function(){return t.values},e.getTuple=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sl,r=t.numberOfComponents||1;n.length&&(n.length=r);for(var i=e*r,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 dl({name:t.name,numberOfComponents:t.numberOfComponents})},e.getName=function(){return t.name||(e.modified(),t.name="vtkVariantArray".concat(e.getMTime())),t.name},e.setData=function(n,r){t.values=n,t.size=n.length,r&&(t.numberOfComponents=r),t.size%t.numberOfComponents!=0&&(t.numberOfComponents=1),e.modified()}}var ul={name:"",numberOfComponents:1,size:0,dataType:"JSON"};function cl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,ul,n),!t.empty&&!t.values&&!t.size)throw new TypeError("Cannot create vtkVariantArray object without: size > 0, values");t.values?Array.isArray(t.values)&&(t.values=w(t.values)):t.values=[],t.values&&(t.size=t.values.length),Ae.obj(e,t),Ae.set(e,t,["name"]),ll(e,t)}var dl=Ae.newInstance(cl,"vtkVariantArray"),pl={vtkBase64:h,vtkCellArray:or,vtkDataArray:Jn,vtkEndian:sr,vtkHalfFloat:cr,vtkImageHelper:ms,vtkLookupTable:Fs,vtkMath:r,vtkMatrixBuilder:Gs,vtkPoints:Xs,vtkProgressHandler:Js,vtkScalarsToColors:Is,vtkStringArray:rl,vtkURLExtract:al,vtkVariantArray:{newInstance:dl,extend:cl}};function fl(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 hl(e,t){t.classHierarchy.push("vtkBox"),e.setBounds=function(){for(var e=[],n=arguments.length,r=new Array(n),i=0;i1?(p=0,o=s[f]-d[f]):(o=a<=.5?c[f]-s[f]:s[f]-d[f])>l&&(l=o):(o=Math.abs(s[f]-c[f]))>0&&(p=0),o>0&&(u+=o*o);return u=Math.sqrt(u),p?l:u},e.addBounds=function(){var n=[];if(Array.isArray(arguments.length<=0?void 0:arguments[0]))n=arguments.length<=0?void 0:arguments[0];else for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ml,n),Ae.obj(e,t),hl(e,t)}var vl=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;if(n){t.pointsIds=n;var r=t.points.getData();r.length!==3*t.pointsIds.length&&(r=Ae.newTypedArray(e.getDataType(),3*t.pointsIds.length));var i=e.getData();t.pointsIds.forEach((function(e,t){var n=3*e,o=3*t;r[o]=i[n],r[++o]=i[++n],r[++o]=i[++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 hn(t.bounds);return t.bounds},e.getLength2=function(){e.getBounds();for(var n=0,r=0,i=0;i<3;i++)n+=(r=t.bounds[2*i+1]-t.bounds[2*i])*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,i,o,a){},e.evaluatePosition=function(e,t,n,r,i,o){}}var bl={bounds:[-1,-1,-1,-1,-1,-1],pointsIds:[]};function wl(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bl,n),Ae.obj(e,t),t.points||(t.points=Xs.newInstance()),Ae.get(e,t,["points","pointsIds"]),yl(e,t)}var xl={newInstance:Ae.newInstance(wl,"vtkCell"),extend:wl};function Sl(e,t){t.classHierarchy.push("vtkCone"),e.evaluateFunction=function(e){var n=Math.tan(Le(t.angle));return e[1]*e[1]+e[2]*e[2]-e[0]*e[0]*n*n},e.evaluateGradient=function(e){var n=Math.tan(Le(t.angle));return[-2*e[0]*n*n,2*e[1],2*e[2]]}}var Cl={angle:15};function Al(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cl,n),Ae.obj(e,t),Ae.setGet(e,t,["angle"]),Sl(e,t)}var Pl={newInstance:Ae.newInstance(Al,"vtkCone"),extend:Al};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}var Ol={evaluate:function(e,t,n,r){var i=new Float32Array(3);i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2];var o=dt(n,i);return dt(i,i)-o*o-e*e}};function Tl(e,t){t.classHierarchy.push("vtkCylinder"),e.evaluateFunction=function(e){var n=[e[0]-t.center[0],e[1]-t.center[1],e[2]-t.center[2]],r=dt(t.axis,n);return dt(n,n)-r*r-t.radius*t.radius},e.evaluateGradient=function(e){var n=t.axis[0]*(e[0]-t.center[0])+t.axis[1]*(e[1]-t.center[1])+t.axis[2]*(e[2]-t.center[2]),r=[t.center[0]+n*t.axis[0],t.center[1]+n*t.axis[1],t.center[2]+n*t.axis[2]];return[2*(e[0]-r[0]),2*(e[1]-r[1]),2*(e[2]-r[2])]}}var Dl={radius:.5,center:[0,0,0],axis:[0,1,0]};function El(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dl,n),Ae.obj(e,t),Ae.setGet(e,t,["radius"]),Ae.setGetArray(e,t,["center","axis"],3),Tl(e,t)}var Il=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n={origin:[0,0,0],spacing:[1,1,1]},r=[1,1,1],i=[1,0,0,0,1,0,0,0,1],o=0;o1&&void 0!==arguments[1]&&arguments[1],n={imageType:{dimension:3,pixelType:Ml,componentType:"",components:1},name:"name",origin:e.getOrigin(),spacing:e.getSpacing(),direction:{data:[1,0,0,0,1,0,0,0,1]},size:e.getDimensions()},r=e.getDirection(),i=n.size.length;n.imageType.dimension=i,n.direction.rows=i,n.direction.columns=i;for(var o=0;on&&(n=a)}}else{n=t.functions[0].evaluateFunction(e);for(var s=1;sn&&(n=l)}}return n},e.evaluateGradient=function(e){var n=t.axis[0]*(e[0]-t.center[0])+t.axis[1]*(e[1]-t.center[1])+t.axis[2]*(e[2]-t.center[2]),r=new Float32Array(3);return r[0]=t.center[0]+n*t.axis[0],r[1]=t.center[1]+n*t.axis[1],r[2]=t.center[2]+n*t.axis[2],[2*(e[0]-r[0]),2*(e[1]-r[1]),2*(e[2]-r[2])]}}var tu={operation:0,functions:[]};function nu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tu,n),Ae.obj(e,t),Ae.setGet(e,t,["operation"]),eu(e,t)}var ru=Ql({newInstance:Ae.newInstance(nu,"vtkImplicitBoolean"),extend:nu},Zl),iu={NO_INTERSECTION:0,YES_INTERSECTION:1,ON_LINE:2},ou={IntersectionState:iu};function au(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 su(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:null,o={t:Number.MIN_VALUE,distance:0},a=[];a[0]=n[0]-t[0],a[1]=n[1]-t[1],a[2]=n[2]-t[2];var s=a[0]*(e[0]-t[0])+a[1]*(e[1]-t[1])+a[2]*(e[2]-t[2]),l=dt(a,a),u=1e-5*s;return 0!==l&&(o.t=s/l),u<0&&(u=-u),-u1?r=n:(r=a,a[0]=t[0]+o.t*a[0],a[1]=t[1]+o.t*a[1],a[2]=t[2]+o.t*a[2]),i&&(i[0]=r[0],i[1]=r[1],i[2]=r[2]),o.distance=wt(r,e),o}function cu(e,t,n,r,i,o){var a=[],s=[],l=[];i[0]=0,o[0]=0,a[0]=t[0]-e[0],a[1]=t[1]-e[1],a[2]=t[2]-e[2],s[0]=r[0]-n[0],s[1]=r[1]-n[1],s[2]=r[2]-n[2],l[0]=n[0]-e[0],l[1]=n[1]-e[1],l[2]=n[2]-e[2];var u=[];u[0]=[dt(a,a),-dt(a,s)],u[1]=[u[0][1],dt(s,s)];var c=[];if(c[0]=dt(a,l),c[1]=-dt(s,l),0===Qt(u,c,2)){for(var d,p=Number.MAX_VALUE,f=[e,t,n,r],h=[n,n,e,e],m=[r,r,t,t],g=[o[0],o[0],i[0],i[0]],v=[i[0],i[0],o[0],o[0]],y=0;y<4;y++)(d=uu(f[y],h[y],m[y])).distance=0&&i[0]<=1&&o[0]>=0&&o[0]<=1?lu.YES_INTERSECTION:lu.NO_INTERSECTION}var du={distanceToLine:uu,intersection:cu};function pu(e,t){t.classHierarchy.push("vtkLine"),e.getCellDimension=function(){return 1},e.intersectWithLine=function(e,n,r,i,o){var a={intersect:0,t:Number.MAX_VALUE,subId:0,betweenPoints:null};o[1]=0,o[2]=0;var s=[],l=[],u=[];t.points.getPoint(0,l),t.points.getPoint(1,u);var c,d=[],p=[],f=cu(e,n,l,u,d,p);if(a.t=d[0],a.betweenPoints=(c=a.t)>=0&&c<=1,o[0]=p[0],f===lu.YES_INTERSECTION){for(var h=0;h<3;h++)i[h]=l[h]+o[0]*(u[h]-l[h]),s[h]=e[h]+a.t*(n[h]-e[h]);if(wt(i,s)<=r*r)return a.intersect=1,a}else{var m;if(a.t<0)return(m=uu(e,l,u,i)).distance<=r*r?(a.t=0,a.intersect=1,a.betweenPoints=!0,a):a;if(a.t>1)return(m=uu(n,l,u,i)).distance<=r*r?(a.t=1,a.intersect=1,a.betweenPoints=!0,a):a;if(o[0]<0)return o[0]=0,m=uu(l,e,n,i),a.t=m.t,m.distance<=r*r?(a.intersect=1,a):a;if(o[0]>1)return o[0]=1,m=uu(u,e,n,i),a.t=m.t,m.distance<=r*r?(a.intersect=1,a):a}return a},e.evaluatePosition=function(e,t,n,r,i,o){}}var fu={};function hu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fu,n),xl.extend(e,t,n),pu(e,t)}var mu=su(su({newInstance:Ae.newInstance(hu,"vtkLine"),extend:hu},du),ou),gu=["chemical json","name","inchi","formula","atoms","bonds","properties"];function vu(e,t){t.classHierarchy.push("vtkMolecule")}var yu={"chemical json":0,name:"",inchi:"",formula:"",atoms:null,bonds:null,properties:null};function bu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yu,n),Ae.obj(e,t),t.atoms||(t.atoms={}),t.bonds||(t.bonds={}),t.properties||(t.properties={}),Ae.setGet(e,t,gu),vu(0,t)}var wu={newInstance:Ae.newInstance(bu,"vtkMolecule"),extend:bu},xu=Ae.vtkErrorMacro;function Su(e,t){t.classHierarchy.push("vtkPiecewiseFunction"),e.getSize=function(){return t.nodes.length},e.getType=function(){var e,n=0,r=0;t.nodes.length>0&&(n=t.nodes[0].y);for(var i=1;in)switch(r){case 0:case 1:r=1;break;default:r=3}else switch(r){case 0:case 2:r=2;break;default:r=3}if(n=e,3===r)break}switch(r){case 0:return"Constant";case 1:return"NonDecreasing";case 2:return"NonIncreasing";default: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?(xu("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 i=t.nodes.length;if(n<0||n>=i)return xu("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,i,o){if(i<0||i>1)return xu("Midpoint outside range [0.0, 1.0]"),-1;if(o<0||o>1)return xu("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var a,s={x:n,y:r,midpoint:i,sharpness:o};for(t.nodes.push(s),e.sortAndUpdateRange(),a=0;a=t.nodes.length)return-1;var i=r,o=!1;return t.nodes.splice(r,1),0!==r&&r!==t.nodes.length||(o=e.updateRange()),o||e.modified(),i},e.removeAllPoints=function(){t.nodes=[],e.sortAndUpdateRange()},e.addSegment=function(n,r,i,o){e.sortAndUpdateRange();for(var a=0;a=n&&t.nodes[a].x<=i?t.nodes.splice(a,1):a++;e.addPoint(n,r,.5,0),e.addPoint(i,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 i=0;i=n[0]&&t.nodes[i].x<=n[1]?t.nodes.splice(i,1):++i;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,s=0,l=t.nodes.length,u=0;0!==l&&(u=t.nodes[l-1].y);var c=0,d=0,p=0,f=0,h=0,m=0,g=0;for(o=0;o1?e+o/(r-1)*(n-e):.5*(e+n);st.nodes[s].x;)++s.99999&&(m=.99999));if(s>=l)i[v]=t.clamping?u:0;else if(0===s)i[v]=t.clamping?t.nodes[0].y:0;else{var y=(c-d)/(p-d);if(y=y.99){if(y<.5){i[v]=f;continue}i[v]=h;continue}if(g<.01){i[v]=(1-y)*f+y*h;continue}y<.5?y=.5*Math.pow(2*y,1+10*g):y>.5&&(y=1-.5*Math.pow(2*(1-y),1+10*g));var b=y*y,w=b*y,x=2*w-3*b+1,S=-2*w+3*b,C=w-2*b+y,A=w-b,P=h-f,_=(1-g)*P;i[v]=x*f+S*h+C*_+A*_;var O=fh?f:h;i[v]=i[v]T?T:i[v]}}}}var Cu={range:[0,0],clamping:!0,allowDuplicateScalars:!1};function Au(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cu,n),Ae.obj(e,t),t.nodes=[],Ae.setGet(e,t,["allowDuplicateScalars","clamping"]),Ae.setArray(e,t,["range"],2),Ae.getArray(e,t,["range"]),Su(e,t)}var Pu={newInstance:Ae.newInstance(Au,"vtkPiecewiseFunction"),extend:Au};function _u(e,t){t.classHierarchy.push("vtkPointSet"),t.points?t.points=T(t.points):t.points=Xs.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=Xs.newInstance(),t.points.shallowCopy(e.getPoints())}}var Ou={};function Tu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ou,n),Ii.extend(e,t,n),Ae.setGet(e,t,["points"]),_u(e,t)}var Du={newInstance:Ae.newInstance(Tu,"vtkPointSet"),extend:Tu};function Eu(e,t){t.classHierarchy.push("vtkCellLinks"),e.buildLinks=function(n){var r=n.getPoints().getNumberOfPoints(),i=n.getNumberOfCells(),o=new Uint32Array(r);if(n.isA("vtkPolyData")){for(var a=0;a1&&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=w(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,Iu,n),Ae.obj(e,t),Eu(e,t)}var Mu={newInstance:Ae.newInstance(ku,"vtkCellLinks"),extend:ku},Nu={VTK_EMPTY_CELL:0,VTK_VERTEX:1,VTK_POLY_VERTEX:2,VTK_LINE:3,VTK_POLY_LINE:4,VTK_TRIANGLE:5,VTK_TRIANGLE_STRIP:6,VTK_POLYGON:7,VTK_PIXEL:8,VTK_QUAD:9,VTK_TETRA:10,VTK_VOXEL:11,VTK_HEXAHEDRON:12,VTK_WEDGE:13,VTK_PYRAMID:14,VTK_PENTAGONAL_PRISM:15,VTK_HEXAGONAL_PRISM:16,VTK_QUADRATIC_EDGE:21,VTK_QUADRATIC_TRIANGLE:22,VTK_QUADRATIC_QUAD:23,VTK_QUADRATIC_POLYGON:36,VTK_QUADRATIC_TETRA:24,VTK_QUADRATIC_HEXAHEDRON:25,VTK_QUADRATIC_WEDGE:26,VTK_QUADRATIC_PYRAMID:27,VTK_BIQUADRATIC_QUAD:28,VTK_TRIQUADRATIC_HEXAHEDRON:29,VTK_QUADRATIC_LINEAR_QUAD:30,VTK_QUADRATIC_LINEAR_WEDGE:31,VTK_BIQUADRATIC_QUADRATIC_WEDGE:32,VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON:33,VTK_BIQUADRATIC_TRIANGLE:34,VTK_CUBIC_LINE:35,VTK_CONVEX_POINT_SET:41,VTK_POLYHEDRON:42,VTK_PARAMETRIC_CURVE:51,VTK_PARAMETRIC_SURFACE:52,VTK_PARAMETRIC_TRI_SURFACE:53,VTK_PARAMETRIC_QUAD_SURFACE:54,VTK_PARAMETRIC_TETRA_REGION:55,VTK_PARAMETRIC_HEX_REGION:56,VTK_HIGHER_ORDER_EDGE:60,VTK_HIGHER_ORDER_TRIANGLE:61,VTK_HIGHER_ORDER_QUAD:62,VTK_HIGHER_ORDER_POLYGON:63,VTK_HIGHER_ORDER_TETRAHEDRON:64,VTK_HIGHER_ORDER_WEDGE:65,VTK_HIGHER_ORDER_PYRAMID:66,VTK_HIGHER_ORDER_HEXAHEDRON:67,VTK_LAGRANGE_CURVE:68,VTK_LAGRANGE_TRIANGLE:69,VTK_LAGRANGE_QUADRILATERAL:70,VTK_LAGRANGE_TETRAHEDRON:71,VTK_LAGRANGE_HEXAHEDRON:72,VTK_LAGRANGE_WEDGE:73,VTK_LAGRANGE_PYRAMID:74,VTK_NUMBER_OF_CELL_TYPES:75},Ru=["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 Fu(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 Bu={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]=Nu.VTK_EMPTY_CELL},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,Vu,n),Ae.obj(e,t),Ae.get(e,t,["size","maxId","extend"]),Ae.getArray(e,t,["typeArray","locationArray"]),Lu(e,t)}var Gu=function(e){for(var t=1;t=0)return h.dist2<=l?(s.intersect=1,s):(s.intersect=h.evaluation,s)}var m=wt(u,c),g=wt(c,d),v=wt(d,u);t.line||(t.line=mu.newInstance()),m>g&&m>v?(t.line.getPoints().setPoint(0,u),t.line.getPoints().setPoint(1,c)):g>v&&g>m?(t.line.getPoints().setPoint(0,c),t.line.getPoints().setPoint(1,d)):(t.line.getPoints().setPoint(0,d),t.line.getPoints().setPoint(1,u));var y=t.line.intersectWithLine(n,r,i,o,a);if(s.betweenPoints=y.betweenPoints,s.t=y.t,y.intersect){for(var b=[],w=[],x=[],S=0;S<3;S++)b[S]=u[S]-d[S],w[S]=c[S]-d[S],x[S]=o[S]-d[S];return a[0]=dt(x,b)/v,a[1]=dt(x,w)/g,s.intersect=1,s}return a[0]=0,a[1]=0,s.intersect=0,s},e.evaluatePosition=function(e,n,r,i){var o,a,s,l,u,c,d,p={subId:0,dist2:0,evaluation:-1},f=[],h=[],m=[],g=[],v=[],y=[],b=[],w=0,x=[],S=[],C=[],A=[],P=[];p.subId=0,r[2]=0,t.points.getPoint(1,f),t.points.getPoint(2,h),t.points.getPoint(0,m),zu(f,h,m,g),Pr.generalizedProjectPoint(e,f,g,P);var _=0;for(o=0;o<3;o++)(s=g[o]<0?-g[o]:g[o])>_&&(_=s,w=o);for(a=0,o=0;o<3;o++)o!==w&&(x[a++]=o);for(o=0;o<2;o++)v[o]=P[x[o]]-m[x[o]],y[o]=f[x[o]]-m[x[o]],b[o]=h[x[o]]-m[x[o]];if(0===(l=Tt(y,b)))return r[0]=0,r[1]=0,p.evaluation=-1,p;if(r[0]=Tt(v,b)/l,r[1]=Tt(y,v)/l,i[0]=1-(r[0]+r[1]),i[1]=r[0],i[2]=r[1],i[0]>=0&&i[0]<=1&&i[1]>=0&&i[1]<=1&&i[2]>=0&&i[2]<=1)n&&(p.dist2=wt(P,e),n[0]=P[0],n[1]=P[1],n[2]=P[2]),p.evaluation=1;else{var O;if(n)if(i[1]<0&&i[2]<0)for(u=wt(e,m),c=mu.distanceToLine(e,f,m,O,C),d=mu.distanceToLine(e,m,h,O,A),u1?r[i]-1:0)>n&&(n=t);return n}}var Xu={};function qu(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xu,n),xl.extend(e,t,n),Ku(e,t)}var Yu,Zu=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];n(e,r),Ju.forEach((function(n){t[n]=or.newInstance(),t[n].shallowCopy(e.getReferenceByName(n))}))},e.buildCells=function(){var n=e.getNumberOfVerts(),r=e.getNumberOfLines(),i=e.getNumberOfPolys(),o=e.getNumberOfStrips(),a=n+r+i+o,s=new Uint8Array(a),l=s,u=new Uint32Array(a),c=u;if(n){var d=0;t.verts.getCellSizes().forEach((function(e,t){c[t]=d,l[t]=e>1?Nu.VTK_POLY_VERTEX:Nu.VTK_VERTEX,d+=e+1})),c=c.subarray(n),l=l.subarray(n)}if(r){var p=0;t.lines.getCellSizes().forEach((function(e,t){c[t]=p,l[t]=e>2?Nu.VTK_POLY_LINE:Nu.VTK_LINE,1===e&&Qu("Building VTK_LINE ",t," with only one point, but VTK_LINE needs at least two points. Check the input."),p+=e+1})),c=c.subarray(r),l=l.subarray(r)}if(i){var f=0;t.polys.getCellSizes().forEach((function(e,t){switch(c[t]=f,e){case 3:l[t]=Nu.VTK_TRIANGLE;break;case 4:l[t]=Nu.VTK_QUAD;break;default:l[t]=Nu.VTK_POLYGON}e<3&&Qu("Building VTK_TRIANGLE ",t," with less than three points, but VTK_TRIANGLE needs at least three points. Check the input."),f+=e+1})),c+=c.subarray(i),l+=l.subarray(i)}if(o){var h=0;l.fill(Nu.VTK_TRIANGLE_STRIP,0,o),t.strips.getCellSizes().forEach((function(e,t){c[t]=h,h+=e+1}))}t.cells=Gu.newInstance(),t.cells.setCellTypes(a,s,u)},e.buildLinks=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;void 0===t.cells&&e.buildCells(),t.links=Mu.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 Nu.VTK_VERTEX:case Nu.VTK_POLY_VERTEX:r=t.verts;break;case Nu.VTK_LINE:case Nu.VTK_POLY_LINE:r=t.lines;break;case Nu.VTK_TRIANGLE:case Nu.VTK_QUAD:case Nu.VTK_POLYGON:r=t.polys;break;case Nu.VTK_TRIANGLE_STRIP:r=t.strips;break;default:return r=null,{type:0,cellPointIds:null}}var i=t.cells.getCellLocation(e);return{cellType:n,cellPointIds:r.getCell(i)}},e.getPointCells=function(e){return t.links.getCells(e)},e.getCellEdgeNeighbors=function(e,n,r){var i=t.links.getLink(n),o=t.links.getLink(r);return i.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),i=n||$u[r.cellType].newInstance();return i.initialize(e.getPoints(),r.cellPointIds),i}}var tc={};function nc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tc,n),Du.extend(e,t,n),Ae.get(e,t,["cells","links"]),Ae.setGet(e,t,["verts","lines","polys","strips"]),ec(e,t)}var rc={newInstance:Ae.newInstance(nc,"vtkPolyData"),extend:nc},ic={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 oc(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 ac(e,t){t.classHierarchy.push("vtkSelectionNode"),e.getBounds=function(){return t.points.getBounds()}}var sc={contentType:-1,fieldType:-1,properties:null,selectionList:[]};function lc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sc,n),Ae.obj(e,t),t.properties={},Ae.setGet(e,t,["contentType","fieldType","properties","selectionList"]),ac(e,t)}var uc=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fc,n),Ae.obj(e,t),Ae.setGet(e,t,["radius"]),Ae.setGetArray(e,t,["center"],3),pc(e,t)}var mc=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xc,n),Ae.obj(e,t),t.matrix=zo(new Float64Array(16)),Ae.setGet(e,t,["sourceLandmark","targetLandmark","mode"]),Ae.get(e,t,["matrix"]),wc(e,t)}var Cc=function(e){for(var t=1;t').concat(e.label,"")})).join(""),r.style.zIndex=1e3,r.style.position="absolute",r.style.left="50%",r.style.top="50%",r.style.transform="translate(-50%, -50%)",r.addEventListener("change",(function(t){n.removeChild(r),e(_c[Number(t.target.value)])})),n.appendChild(r)}))}},vtkTimerLog:{getUniversalTime:function(){return+new Date}}}},Lc=Ae.vtkErrorMacro;function Vc(e,t){t.classHierarchy.push("vtkImageDataToCornerstoneImage"),e.requestData=function(e,n){var r=e[0];if(r){var i=r.getSpacing(),o=r.getDimensions(),a=r.getPointData().getScalars(),s=a.getRange(0),l=a.getData(),u=null;if(1===o[2])u=a.data?a.data:l;else{var c=t.sliceIndex*o[0]*o[1]*l.BYTES_PER_ELEMENT;u=Ae.newTypedArray(a.getDataType(),l.buffer,c,o[0]*o[1])}var d={imageId:t.imageId,color:a.getNumberOfComponents()>1,columnPixelSpacing:i[0],columns:o[0],width:o[0],rowPixelSpacing:i[1],rows:o[1],height:o[1],intercept:0,invert:!1,minPixelValue:s[0],maxPixelValue:s[1],sizeInBytes:u.length*u.BYTES_PER_ELEMENT,slope:1,windowCenter:Math.round((s[0]+s[1])/2),windowWidth:s[1]-s[0],decodeTimeInMS:0,getPixelData:function(){return u}};n[0]=d}else Lc("Invalid or missing input")}}var jc={imageId:"default-image-id",sliceIndex:0};function Gc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jc,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["imageId","sliceIndex"]),Ae.algo(e,t,1,1),Vc(e,t)}var Uc={vtkImageDataToCornerstoneImage:{newInstance:Ae.newInstance(Gc,"vtkImageDataToCornerstoneImage"),extend:Gc}};function zc(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 Wc=K;function Hc(e,t){t.classHierarchy.push("vtkCutter");var n=function(e){for(var t=1;t=t.length&&r.stripIdx>=n.length,e}};return r}(e);!h.done;){var m=h.next();if(!(m.length<=2)){for(var g=[],v=void 0,y=0;y0,w=!0,x=1;x0!==b){w=!1;break}}if(!w){for(var S=[],C=0;C0;if(g[A]>0!==P){var _=C,O=A,T=g[O]-g[_];T<=0&&(_=A,O=C,T*=-1);var D=0;0!==T&&(D=(t.cutValue-g[_])/T);var E=m[_],I=m[O];p[0]=i[3*E],p[1]=i[3*E+1],p[2]=i[3*E+2],f[0]=i[3*I],f[1]=i[3*I+1],f[2]=i[3*I+2];var k=[p[0]+D*(f[0]-p[0]),p[1]+D*(f[1]-p[1]),p[2]+D*(f[2]-p[2])];S.push({pointEdge1:E,pointEdge2:I,intersectedPoint:k,newPointID:-1})}}for(var M=0;M2&&(l.push(j),S.forEach((function(e){l.push(e.newPointID)})))}}}n.getPoints().setData(J(r.getDataType(),a),3),0!==s.length&&n.getLines().setData(Uint16Array.from(s)),0!==l.length&&n.getPolys().setData(Uint16Array.from(l))}e.getMTime=function(){var e=n.getMTime();return t.cutFunction?e=Math.max(e,t.cutFunction.getMTime()):e},e.requestData=function(e,n){var i=e[0];if(i)if(t.cutFunction){var o=rc.newInstance();r(i,o),n[0]=o}else Wc("Missing cut function");else Wc("Invalid or missing input")}}var Kc={cutFunction:null,cutScalars:null,cutValue:0};function Xc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kc,n),re(e,t),pe(e,t,1,1),le(e,t,["cutFunction","cutValue"]),Hc(e,t)}var qc={newInstance:me(Xc,"vtkCutter"),extend:Xc},Yc={vtkCutter:qc},Zc=Ae.vtkErrorMacro;function Jc(e,t,n,r){var i,o;e.set((i=n,o=0,t.map((function(e,t){return t===o?(o+=e+1,e):e+i}))),r)}function Qc(e,t){t.classHierarchy.push("vtkAppendPolyData"),e.requestData=function(n,r){var i=e.getNumberOfInputPorts();if(i)if(1!==i){for(var o=rc.newInstance(),a=0,s=0,l=1,u=1,c=0,d=0,p=0,f=0,h=!0,m=!0,g=!0,v=0;v(l=y.getPoints().getDataType())?s:l);var w=y.getPointData();w?(h=h&&null!==w.getNormals(),m=m&&null!==w.getTCoords(),g=g&&null!==w.getScalars()):(h=!1,m=!1,g=!1)}}t.outputPointsPrecision===fi.SINGLE?s=_e.FLOAT:t.outputPointsPrecision===fi.DOUBLE&&(s=_e.DOUBLE);var x=Xs.newInstance({dataType:s});x.setNumberOfPoints(a);var S=x.getData(),C=new Uint32Array(c),A=new Uint32Array(d),P=new Uint32Array(p),_=new Uint32Array(f),O=null,T=null,D=null,E=n[i-1];if(h){var I=E.getPointData().getNormals();O=Jn.newInstance({numberOfComponents:3,numberOfTuples:a,size:3*a,dataType:I.getDataType(),name:I.getName()})}if(m){var k=E.getPointData().getTCoords();T=Jn.newInstance({numberOfComponents:2,numberOfTuples:a,size:2*a,dataType:k.getDataType(),name:k.getName()})}if(g){var M=E.getPointData().getScalars();D=Jn.newInstance({numberOfComponents:M.getNumberOfComponents(),numberOfTuples:a,size:a*M.getNumberOfComponents(),dataType:M.getDataType(),name:M.getName()})}a=0,c=0,d=0,p=0,f=0;for(var N=0;N2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$c,n),Ae.setGet(e,t,["outputPointsPrecision"]),Ae.obj(e,t),Ae.algo(e,t,1,1),Qc(e,t)}var td={newInstance:Ae.newInstance(ed,"vtkAppendPolyData"),extend:ed};function nd(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 rd=Ae.vtkWarningMacro;function id(e,t){t.classHierarchy.push("vtkCalculator"),e.setFormula=function(n){return n!==t.formula&&(t.formula=n,e.modified(),!0)},e.getFormula=function(){return t.formula},e.augmentInputArrays=function(e,t){var n=t.slice(0);return e!==Ci.POINT&&e!==Ci.VERTEX||n.push({location:Ci.COORDINATE}),n},e.createSimpleFormulaObject=function(t,n,r,i){var o=arguments.length>4&&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:pi.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(),i=e.getData();return 1===r?function(e){return i[e]}:function(r){return e.getTuple(r,n[t])}})),o=t[0],a=o.getData(),s=o.getNumberOfComponents(),l=new Array(s);if(1===s)a.forEach((function(e,t){a[t]=i.apply(void 0,w(r.map((function(e){return e(t)}))).concat([t,l]))}));else for(var u=o.getNumberOfTuples(),c=function(e){l=i.apply(void 0,w(r.map((function(t){return t(e)}))).concat([e,l])),o.setTuple(e,l)},d=0;d4&&void 0!==arguments[4]?arguments[4]:{};return e.setFormula(e.createSimpleFormulaObject(t,n,r,i,o))},e.prepareArrays=function(e,t,n){var r=[],i=[];return e.input.forEach((function(e){if(e.location===Ci.COORDINATE)r.push(t.getPoints());else{var n=[[Ci.UNIFORM,function(e){return e.getFieldData()}],[Ci.POINT,function(e){return e.getPointData()}],[Ci.CELL,function(e){return e.getCellData()}],[Ci.VERTEX,function(e){return e.getVertexData()}],[Ci.EDGE,function(e){return e.getEdgeData()}],[Ci.ROW,function(e){return e.getRowData()}]].reduce((function(e,t){return e[t[0]]=t[1],e}),{}),i="location"in e&&e.location in n?n[e.location](t):null;i?e.name?r.push(i.getArrayByName(e.name)):"index"in e?r.push(i.getArrayByIndex(e.index)):"attribute"in e&&e.location!==Ci.UNIFORM?r.push(i.getActiveAttribute(e.attribute)):(rd('No matching array for specifier "'.concat(JSON.stringify(e),'".')),r.push(null)):(rd('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,od,n),Ae.obj(e,t),Ae.algo(e,t,1,1),id(e,t)}var sd={newInstance:Ae.newInstance(ad,"vtkCalculator"),extend:ad},ld=Ae.vtkErrorMacro,ud=function(){function e(){D(this,e),this.segmentMapping={},this.segments=[null],this.faces=[]}return I(e,[{key:"addSegment",value:function(e){var t=e[0],n=e[e.length-1];if(!(t===n||e.length<2)){var r=this.segmentMapping[t],i=this.segmentMapping[n];if(void 0!==r&&void 0!==i)if(Math.abs(r)===Math.abs(i)){var o=r0)for(var s=1;s0){for(var f=this.segments[r],h=1;h0){for(var v=this.segments[i],y=1;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dd,n),Ae.obj(e,t),Ae.algo(e,t,1,1),cd(e,t)}var fd={newInstance:Ae.newInstance(pd,"vtkClosedPolyLineToSurfaceFilter"),extend:pd},hd=Ae.vtkErrorMacro;function md(e,t){t.classHierarchy.push("vtkImageCropFilter"),e.reset=function(){var t=e.getInputData();t&&e.setCroppingPlanes.apply(e,w(t.getExtent()))},e.requestData=function(e,n){var r=e[0];if(r){var i=r.getPointData().getScalars();if(i){var o=r.getExtent(),a=6===t.croppingPlanes.length?o.map((function(e,n){return n%2==0?Math.max(e,Math.round(t.croppingPlanes[n])):Math.min(e,Math.round(t.croppingPlanes[n]))})):o.slice();if(a[0]===o[0]&&a[1]===o[1]&&a[2]===o[2]&&a[3]===o[3]&&a[4]===o[4]&&a[5]===o[5]){var s=fs.newInstance();return s.shallowCopy(r),void(n[0]=s)}for(var l=0;l<3;++l)if(a[2*l]>a[2*l+1]){var u=[a[2*l+1],a[2*l]];a[2*l]=u[0],a[2*l+1]=u[1]}for(var c=0;c<6;c+=2)a[c]=Math.max(a[c],o[c]),a[c+1]=Math.min(a[c+1],o[c+1]);for(var d=i.getNumberOfComponents(),p=(a[1]-a[0]+1)*(a[3]-a[2]+1)*(a[5]-a[4]+1)*d,f=i.getData(),h=r.getDimensions(),m=d*h[0],g=d*h[0]*h[1],v=(a[0]-o[0])*d,y=(a[1]-a[0]+1)*d,b=new f.constructor(p),w=0,x=a[4];x<=a[5];++x)for(var S=a[2];S<=a[3];++S){var C=v+(S-o[2])*m+(x-o[4])*g,A=C+y,P=f.subarray(C,A);b.set(P,w),w+=P.length}var _=fs.newInstance({extent:a,origin:r.getOrigin(),direction:r.getDirection(),spacing:r.getSpacing()}),O=Jn.newInstance({name:i.getName(),numberOfComponents:d,values:b});_.getPointData().setScalars(O),n[0]=_}else hd("No scalars from input")}else hd("Invalid or missing input")},e.isResetAvailable=function(){if(0===t.croppingPlanes.length)return!1;var n=e.getInputData();if(n){var r=n.getExtent().find((function(e,n){return Math.abs(t.croppingPlanes[n]-e)>Number.EPSILON}));return void 0!==r}return!1}}var gd={croppingPlanes:[]};function vd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gd,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGetArray(e,t,["croppingPlanes"],6),md(e,t)}var yd={newInstance:Ae.newInstance(vd,"vtkImageCropFilter"),extend:vd},bd=[[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,11,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,3,8,2,8,11,11,8,9,-1,-1,-1,-1,-1,-1,-1],[3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,8,0,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,2,10,1,10,9,9,10,8,-1,-1,-1,-1,-1,-1,-1],[3,1,11,10,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,11,0,11,8,8,11,10,-1,-1,-1,-1,-1,-1,-1],[3,0,9,3,9,10,10,9,11,-1,-1,-1,-1,-1,-1,-1],[9,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,7,4,3,4,0,1,11,2,-1,-1,-1,-1,-1,-1,-1],[9,11,2,9,2,0,8,7,4,-1,-1,-1,-1,-1,-1,-1],[2,9,11,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1],[8,7,4,3,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,7,4,10,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1],[9,1,0,8,7,4,2,10,3,-1,-1,-1,-1,-1,-1,-1],[4,10,7,9,10,4,9,2,10,9,1,2,-1,-1,-1,-1],[3,1,11,3,11,10,7,4,8,-1,-1,-1,-1,-1,-1,-1],[1,11,10,1,10,4,1,4,0,7,4,10,-1,-1,-1,-1],[4,8,7,9,10,0,9,11,10,10,3,0,-1,-1,-1,-1],[4,10,7,4,9,10,9,11,10,-1,-1,-1,-1,-1,-1,-1],[9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,11,2,4,5,9,-1,-1,-1,-1,-1,-1,-1],[5,11,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1],[2,5,11,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1],[9,4,5,2,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,2,10,0,10,8,4,5,9,-1,-1,-1,-1,-1,-1,-1],[0,4,5,0,5,1,2,10,3,-1,-1,-1,-1,-1,-1,-1],[2,5,1,2,8,5,2,10,8,4,5,8,-1,-1,-1,-1],[11,10,3,11,3,1,9,4,5,-1,-1,-1,-1,-1,-1,-1],[4,5,9,0,1,8,8,1,11,8,11,10,-1,-1,-1,-1],[5,0,4,5,10,0,5,11,10,10,3,0,-1,-1,-1,-1],[5,8,4,5,11,8,11,10,8,-1,-1,-1,-1,-1,-1,-1],[9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1],[0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1],[1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,7,9,7,5,11,2,1,-1,-1,-1,-1,-1,-1,-1],[11,2,1,9,0,5,5,0,3,5,3,7,-1,-1,-1,-1],[8,2,0,8,5,2,8,7,5,11,2,5,-1,-1,-1,-1],[2,5,11,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1],[7,5,9,7,9,8,3,2,10,-1,-1,-1,-1,-1,-1,-1],[9,7,5,9,2,7,9,0,2,2,10,7,-1,-1,-1,-1],[2,10,3,0,8,1,1,8,7,1,7,5,-1,-1,-1,-1],[10,1,2,10,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1],[9,8,5,8,7,5,11,3,1,11,10,3,-1,-1,-1,-1],[5,0,7,5,9,0,7,0,10,1,11,0,10,0,11,-1],[10,0,11,10,3,0,11,0,5,8,7,0,5,0,7,-1],[10,5,11,7,5,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,1,0,5,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,3,8,1,8,9,5,6,11,-1,-1,-1,-1,-1,-1,-1],[1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,5,6,1,6,2,3,8,0,-1,-1,-1,-1,-1,-1,-1],[9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1],[5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1],[2,10,3,11,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,8,0,10,0,2,11,5,6,-1,-1,-1,-1,-1,-1,-1],[0,9,1,2,10,3,5,6,11,-1,-1,-1,-1,-1,-1,-1],[5,6,11,1,2,9,9,2,10,9,10,8,-1,-1,-1,-1],[6,10,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1],[0,10,8,0,5,10,0,1,5,5,6,10,-1,-1,-1,-1],[3,6,10,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1],[6,9,5,6,10,9,10,8,9,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,0,3,4,3,7,6,11,5,-1,-1,-1,-1,-1,-1,-1],[1,0,9,5,6,11,8,7,4,-1,-1,-1,-1,-1,-1,-1],[11,5,6,1,7,9,1,3,7,7,4,9,-1,-1,-1,-1],[6,2,1,6,1,5,4,8,7,-1,-1,-1,-1,-1,-1,-1],[1,5,2,5,6,2,3,4,0,3,7,4,-1,-1,-1,-1],[8,7,4,9,5,0,0,5,6,0,6,2,-1,-1,-1,-1],[7,9,3,7,4,9,3,9,2,5,6,9,2,9,6,-1],[3,2,10,7,4,8,11,5,6,-1,-1,-1,-1,-1,-1,-1],[5,6,11,4,2,7,4,0,2,2,10,7,-1,-1,-1,-1],[0,9,1,4,8,7,2,10,3,5,6,11,-1,-1,-1,-1],[9,1,2,9,2,10,9,10,4,7,4,10,5,6,11,-1],[8,7,4,3,5,10,3,1,5,5,6,10,-1,-1,-1,-1],[5,10,1,5,6,10,1,10,0,7,4,10,0,10,4,-1],[0,9,5,0,5,6,0,6,3,10,3,6,8,7,4,-1],[6,9,5,6,10,9,4,9,7,7,9,10,-1,-1,-1,-1],[11,9,4,6,11,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,6,11,4,11,9,0,3,8,-1,-1,-1,-1,-1,-1,-1],[11,1,0,11,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1],[8,1,3,8,6,1,8,4,6,6,11,1,-1,-1,-1,-1],[1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1],[3,8,0,1,9,2,2,9,4,2,4,6,-1,-1,-1,-1],[0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1],[11,9,4,11,4,6,10,3,2,-1,-1,-1,-1,-1,-1,-1],[0,2,8,2,10,8,4,11,9,4,6,11,-1,-1,-1,-1],[3,2,10,0,6,1,0,4,6,6,11,1,-1,-1,-1,-1],[6,1,4,6,11,1,4,1,8,2,10,1,8,1,10,-1],[9,4,6,9,6,3,9,3,1,10,3,6,-1,-1,-1,-1],[8,1,10,8,0,1,10,1,6,9,4,1,6,1,4,-1],[3,6,10,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1],[6,8,4,10,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,6,11,7,11,8,8,11,9,-1,-1,-1,-1,-1,-1,-1],[0,3,7,0,7,11,0,11,9,6,11,7,-1,-1,-1,-1],[11,7,6,1,7,11,1,8,7,1,0,8,-1,-1,-1,-1],[11,7,6,11,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1],[1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1],[2,9,6,2,1,9,6,9,7,0,3,9,7,9,3,-1],[7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1],[7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,10,3,11,8,6,11,9,8,8,7,6,-1,-1,-1,-1],[2,7,0,2,10,7,0,7,9,6,11,7,9,7,11,-1],[1,0,8,1,8,7,1,7,11,6,11,7,2,10,3,-1],[10,1,2,10,7,1,11,1,6,6,1,7,-1,-1,-1,-1],[8,6,9,8,7,6,9,6,1,10,3,6,1,6,3,-1],[0,1,9,10,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,0,8,7,6,0,3,0,10,10,0,6,-1,-1,-1,-1],[7,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,8,0,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,9,1,10,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,9,1,8,1,3,10,6,7,-1,-1,-1,-1,-1,-1,-1],[11,2,1,6,7,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,8,0,6,7,10,-1,-1,-1,-1,-1,-1,-1],[2,0,9,2,9,11,6,7,10,-1,-1,-1,-1,-1,-1,-1],[6,7,10,2,3,11,11,3,8,11,8,9,-1,-1,-1,-1],[7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1],[2,6,7,2,7,3,0,9,1,-1,-1,-1,-1,-1,-1,-1],[1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1],[11,6,7,11,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1],[11,6,7,1,11,7,1,7,8,1,8,0,-1,-1,-1,-1],[0,7,3,0,11,7,0,9,11,6,7,11,-1,-1,-1,-1],[7,11,6,7,8,11,8,9,11,-1,-1,-1,-1,-1,-1,-1],[6,4,8,10,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1],[8,10,6,8,6,4,9,1,0,-1,-1,-1,-1,-1,-1,-1],[9,6,4,9,3,6,9,1,3,10,6,3,-1,-1,-1,-1],[6,4,8,6,8,10,2,1,11,-1,-1,-1,-1,-1,-1,-1],[1,11,2,3,10,0,0,10,6,0,6,4,-1,-1,-1,-1],[4,8,10,4,10,6,0,9,2,2,9,11,-1,-1,-1,-1],[11,3,9,11,2,3,9,3,4,10,6,3,4,3,6,-1],[8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1],[0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,0,9,2,4,3,2,6,4,4,8,3,-1,-1,-1,-1],[1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1],[8,3,1,8,1,6,8,6,4,6,1,11,-1,-1,-1,-1],[11,0,1,11,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1],[4,3,6,4,8,3,6,3,11,0,9,3,11,3,9,-1],[11,4,9,6,4,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,5,9,7,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,5,9,10,6,7,-1,-1,-1,-1,-1,-1,-1],[5,1,0,5,0,4,7,10,6,-1,-1,-1,-1,-1,-1,-1],[10,6,7,8,4,3,3,4,5,3,5,1,-1,-1,-1,-1],[9,4,5,11,2,1,7,10,6,-1,-1,-1,-1,-1,-1,-1],[6,7,10,1,11,2,0,3,8,4,5,9,-1,-1,-1,-1],[7,10,6,5,11,4,4,11,2,4,2,0,-1,-1,-1,-1],[3,8,4,3,4,5,3,5,2,11,2,5,10,6,7,-1],[7,3,2,7,2,6,5,9,4,-1,-1,-1,-1,-1,-1,-1],[9,4,5,0,6,8,0,2,6,6,7,8,-1,-1,-1,-1],[3,2,6,3,6,7,1,0,5,5,0,4,-1,-1,-1,-1],[6,8,2,6,7,8,2,8,1,4,5,8,1,8,5,-1],[9,4,5,11,6,1,1,6,7,1,7,3,-1,-1,-1,-1],[1,11,6,1,6,7,1,7,0,8,0,7,9,4,5,-1],[4,11,0,4,5,11,0,11,3,6,7,11,3,11,7,-1],[7,11,6,7,8,11,5,11,4,4,11,8,-1,-1,-1,-1],[6,5,9,6,9,10,10,9,8,-1,-1,-1,-1,-1,-1,-1],[3,10,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1],[0,8,10,0,10,5,0,5,1,5,10,6,-1,-1,-1,-1],[6,3,10,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1],[1,11,2,9,10,5,9,8,10,10,6,5,-1,-1,-1,-1],[0,3,10,0,10,6,0,6,9,5,9,6,1,11,2,-1],[10,5,8,10,6,5,8,5,0,11,2,5,0,5,2,-1],[6,3,10,6,5,3,2,3,11,11,3,5,-1,-1,-1,-1],[5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1],[9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1],[1,8,5,1,0,8,5,8,6,3,2,8,6,8,2,-1],[1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,6,3,1,11,6,3,6,8,5,9,6,8,6,9,-1],[11,0,1,11,6,0,9,0,5,5,0,6,-1,-1,-1,-1],[0,8,3,5,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[11,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,7,10,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[10,11,5,10,5,7,8,0,3,-1,-1,-1,-1,-1,-1,-1],[5,7,10,5,10,11,1,0,9,-1,-1,-1,-1,-1,-1,-1],[11,5,7,11,7,10,9,1,8,8,1,3,-1,-1,-1,-1],[10,2,1,10,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1],[0,3,8,1,7,2,1,5,7,7,10,2,-1,-1,-1,-1],[9,5,7,9,7,2,9,2,0,2,7,10,-1,-1,-1,-1],[7,2,5,7,10,2,5,2,9,3,8,2,9,2,8,-1],[2,11,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1],[8,0,2,8,2,5,8,5,7,11,5,2,-1,-1,-1,-1],[9,1,0,5,3,11,5,7,3,3,2,11,-1,-1,-1,-1],[9,2,8,9,1,2,8,2,7,11,5,2,7,2,5,-1],[1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1],[9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1],[9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[5,4,8,5,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1],[5,4,0,5,0,10,5,10,11,10,0,3,-1,-1,-1,-1],[0,9,1,8,11,4,8,10,11,11,5,4,-1,-1,-1,-1],[11,4,10,11,5,4,10,4,3,9,1,4,3,4,1,-1],[2,1,5,2,5,8,2,8,10,4,8,5,-1,-1,-1,-1],[0,10,4,0,3,10,4,10,5,2,1,10,5,10,1,-1],[0,5,2,0,9,5,2,5,10,4,8,5,10,5,8,-1],[9,5,4,2,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,11,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1],[5,2,11,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1],[3,2,11,3,11,5,3,5,8,4,8,5,0,9,1,-1],[5,2,11,5,4,2,1,2,9,9,2,4,-1,-1,-1,-1],[8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1],[0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[8,5,4,8,3,5,9,5,0,0,5,3,-1,-1,-1,-1],[9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,10,4,10,9,9,10,11,-1,-1,-1,-1,-1,-1,-1],[0,3,8,4,7,9,9,7,10,9,10,11,-1,-1,-1,-1],[1,10,11,1,4,10,1,0,4,7,10,4,-1,-1,-1,-1],[3,4,1,3,8,4,1,4,11,7,10,4,11,4,10,-1],[4,7,10,9,4,10,9,10,2,9,2,1,-1,-1,-1,-1],[9,4,7,9,7,10,9,10,1,2,1,10,0,3,8,-1],[10,4,7,10,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1],[10,4,7,10,2,4,8,4,3,3,4,2,-1,-1,-1,-1],[2,11,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1],[9,7,11,9,4,7,11,7,2,8,0,7,2,7,0,-1],[3,11,7,3,2,11,7,11,4,1,0,11,4,11,0,-1],[1,2,11,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1],[4,1,9,4,7,1,0,1,8,8,1,7,-1,-1,-1,-1],[4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[9,8,11,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,10,11,9,-1,-1,-1,-1,-1,-1,-1],[0,11,1,0,8,11,8,10,11,-1,-1,-1,-1,-1,-1,-1],[3,11,1,10,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,10,2,1,9,10,9,8,10,-1,-1,-1,-1,-1,-1,-1],[3,9,0,3,10,9,1,9,2,2,9,10,-1,-1,-1,-1],[0,10,2,8,10,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[3,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,11,9,8,-1,-1,-1,-1,-1,-1,-1],[9,2,11,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[2,8,3,2,11,8,0,8,1,1,8,11,-1,-1,-1,-1],[1,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]],wd=[[0,1],[1,3],[2,3],[0,2],[4,5],[5,7],[6,7],[4,6],[0,4],[1,5],[2,6],[3,7]];var xd={getCase:function(e){return bd[e]},getEdge:function(e){return wd[e]}},Sd=Ae.vtkErrorMacro,Cd=Ae.vtkDebugMacro;function Ad(e,t){t.classHierarchy.push("vtkImageMarchingCubes");var n=[],r=[],i=[],o=[],a=new Map;e.getVoxelScalars=function(e,t,i,o,a,s,l,u){n[0]=i*o+t*a[0]+e,n[1]=n[0]+1,n[2]=n[0]+a[0],n[3]=n[2]+1,n[4]=n[0]+o,n[5]=n[4]+1,n[6]=n[4]+a[0],n[7]=n[6]+1;for(var c=0;c<8;++c)r[c]=u[n[c]]},e.getVoxelPoints=function(e,t,n,r,i){o[0]=r[0]+e*i[0],o[1]=r[1]+t*i[1],o[2]=r[2]+n*i[2],o[3]=o[0]+i[0],o[4]=o[1],o[5]=o[2],o[6]=o[0],o[7]=o[1]+i[1],o[8]=o[2],o[9]=o[3],o[10]=o[7],o[11]=o[2],o[12]=o[0],o[13]=o[1],o[14]=o[2]+i[2],o[15]=o[3],o[16]=o[1],o[17]=o[14],o[18]=o[0],o[19]=o[7],o[20]=o[14],o[21]=o[3],o[22]=o[7],o[23]=o[14]},e.getPointGradient=function(e,t,n,r,i,o,a,s){var l,u;0===e?(l=a[e+1+t*r[0]+n*i],u=a[e+t*r[0]+n*i],s[0]=(u-l)/o[0]):e===r[0]-1?(l=a[e+t*r[0]+n*i],u=a[e-1+t*r[0]+n*i],s[0]=(u-l)/o[0]):(l=a[e+1+t*r[0]+n*i],u=a[e-1+t*r[0]+n*i],s[0]=.5*(u-l)/o[0]),0===t?(l=a[e+(t+1)*r[0]+n*i],u=a[e+t*r[0]+n*i],s[1]=(u-l)/o[1]):t===r[1]-1?(l=a[e+t*r[0]+n*i],u=a[e+(t-1)*r[0]+n*i],s[1]=(u-l)/o[1]):(l=a[e+(t+1)*r[0]+n*i],u=a[e+(t-1)*r[0]+n*i],s[1]=.5*(u-l)/o[1]),0===n?(l=a[e+t*r[0]+(n+1)*i],u=a[e+t*r[0]+n*i],s[2]=(u-l)/o[2]):n===r[2]-1?(l=a[e+t*r[0]+n*i],u=a[e+t*r[0]+(n-1)*i],s[2]=(u-l)/o[2]):(l=a[e+t*r[0]+(n+1)*i],u=a[e+t*r[0]+(n-1)*i],s[2]=.5*(u-l)/o[2])},e.getVoxelGradients=function(t,n,r,o,a,s,l){var u=[];e.getPointGradient(t,n,r,o,a,s,l,u),i[0]=u[0],i[1]=u[1],i[2]=u[2],e.getPointGradient(t+1,n,r,o,a,s,l,u),i[3]=u[0],i[4]=u[1],i[5]=u[2],e.getPointGradient(t,n+1,r,o,a,s,l,u),i[6]=u[0],i[7]=u[1],i[8]=u[2],e.getPointGradient(t+1,n+1,r,o,a,s,l,u),i[9]=u[0],i[10]=u[1],i[11]=u[2],e.getPointGradient(t,n,r+1,o,a,s,l,u),i[12]=u[0],i[13]=u[1],i[14]=u[2],e.getPointGradient(t+1,n,r+1,o,a,s,l,u),i[15]=u[0],i[16]=u[1],i[17]=u[2],e.getPointGradient(t,n+1,r+1,o,a,s,l,u),i[18]=u[0],i[19]=u[1],i[20]=u[2],e.getPointGradient(t+1,n+1,r+1,o,a,s,l,u),i[21]=u[0],i[22]=u[1],i[23]=u[2]},e.produceTriangles=function(s,l,u,c,d,p,f,h,m,g,v,y,b){var w,x,S=[1,2,4,8,16,32,64,128],C=[0,1,3,2,4,5,7,6],A=[],P=[],_=[];e.getVoxelScalars(l,u,c,p,f,h,m,g);for(var O=0,T=0;T<8;T++)r[C[T]]>=s&&(O|=S[T]);var D=xd.getCase(O);if(!(D[0]<0)){e.getVoxelPoints(l+d[0],u+d[2],c+d[4],h,m),t.computeNormals&&e.getVoxelGradients(l,u,c,f,p,m,g);for(var E=0;D[E]>=0;E+=3){y.push(3);for(var I=0;I<3;I++){var k=xd.getEdge(D[E+I]);if(w=void 0,t.mergePoints&&(_[0]=n[k[0]],_[1]=n[k[1]],_[0]>_[1]&&(x=_[0],_[0]=_[1],_[1]=x),w=a.get(_)),void 0===w){var M=(s-r[k[0]])/(r[k[1]]-r[k[0]]),N=o.slice(3*k[0],3*(k[0]+1)),R=o.slice(3*k[1],3*(k[1]+1));if(A[0]=N[0]+M*(R[0]-N[0]),A[1]=N[1]+M*(R[1]-N[1]),A[2]=N[2]+M*(R[2]-N[2]),w=v.length/3,v.push(A[0],A[1],A[2]),t.computeNormals){var F=i.slice(3*k[0],3*(k[0]+1)),B=i.slice(3*k[1],3*(k[1]+1));P[0]=F[0]+M*(B[0]-F[0]),P[1]=F[1]+M*(B[1]-F[1]),P[2]=F[2]+M*(B[2]-F[2]),mt(P),b.push(P[0],P[1],P[2])}t.mergePoints&&(_[0]=n[k[0]],_[1]=n[k[1]],_[0]>_[1]&&(x=_[0],_[0]=_[1],_[1]=x),a[_]=w)}y.push(w)}}}},e.requestData=function(n,r){var i=n[0];if(i){console.time("mcubes");for(var o=i.getOrigin(),a=i.getSpacing(),s=i.getDimensions(),l=i.getPointData().getScalars().getData(),u=[],c=[],d=[],p=i.getExtent(),f=s[0]*s[1],h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Pd,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["contourValue","computeNormals","mergePoints"]),Ae.algo(e,t,1,1),Ad(e,t)}var Od={newInstance:Ae.newInstance(_d,"vtkImageMarchingCubes"),extend:_d},Td=[[-1,-1,-1,-1,-1],[0,3,-1,-1,-1],[1,0,-1,-1,-1],[1,3,-1,-1,-1],[2,1,-1,-1,-1],[0,3,2,1,-1],[2,0,-1,-1,-1],[2,3,-1,-1,-1],[3,2,-1,-1,-1],[0,2,-1,-1,-1],[1,0,3,2,-1],[1,2,-1,-1,-1],[3,1,-1,-1,-1],[0,1,-1,-1,-1],[3,0,-1,-1,-1],[-1,-1,-1,-1,-1]],Dd=[[0,1],[1,3],[2,3],[0,2]];var Ed={getCase:function(e){return Td[e]},getEdge:function(e){return Dd[e]}},Id=Ae.vtkErrorMacro,kd=Ae.vtkDebugMacro;function Md(e,t){t.classHierarchy.push("vtkImageMarchingSquares"),e.getContourValues=function(){return t.contourValues},e.setContourValues=function(n){t.contourValues=n,e.modified()};var n=[],r=[],i=[],o=new Map;e.getPixelScalars=function(e,t,i,o,a,s,l,u){n[0]=i*o+t*a[0]+e,n[1]=n[0]+1,n[2]=n[0]+a[0],n[3]=n[2]+1;for(var c=0;c<4;++c)r[c]=u[n[c]]},e.getPixelPoints=function(e,t,n,r,o,a){i[0]=o[0]+e*a[0],i[1]=o[1]+t*a[1],i[2]=i[0]+a[0],i[3]=i[1],i[4]=i[0],i[5]=i[1]+a[1],i[6]=i[2],i[7]=i[5]},e.produceLines=function(a,s,l,u,c,d,p,f,h,m,g){var v,y,b=[1,2,8,4],w=[],x=[];e.getPixelScalars(s,l,u,c,d,p,f,h);for(var S=0,C=0;C<4;C++)r[C]>=a&&(S|=b[C]);var A=Ed.getCase(S);if(!(A[0]<0)){e.getPixelPoints(s,l,u,d,p,f);for(var P=p[2]+u*f[2],_=0;A[_]>=0;_+=3){g.push(2);for(var O=0;O<2;O++){var T=Ed.getEdge(A[_+O]);if(v=void 0,t.mergePoints&&(x[0]=n[T[0]],x[1]=n[T[1]],x[0]>x[1]&&(y=x[0],x[0]=x[1],x[1]=y),v=o.get(x)),void 0===v){var D=(a-r[T[0]])/(r[T[1]]-r[T[0]]),E=i.slice(2*T[0],2*(T[0]+1)),I=i.slice(2*T[1],2*(T[1]+1));w[0]=E[0]+D*(I[0]-E[0]),w[1]=E[1]+D*(I[1]-E[1]),v=m.length/3,m.push(w[0],w[1],P),t.mergePoints&&(x[0]=n[T[0]],x[1]=n[T[1]],x[0]>x[1]&&(y=x[0],x[0]=x[1],x[1]=y),o[x]=v)}g.push(v)}}}},e.requestData=function(n,r){var i=n[0];if(i){console.time("msquares");var a=i.getOrigin(),s=i.getSpacing(),l=i.getDimensions(),u=i.getPointData().getScalars().getData(),c=[],d=[],p=l[0]*l[1],f=Math.round(t.slice);f>=l[2]&&(f=0);for(var h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nd,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["slice","mergePoints"]),Ae.algo(e,t,1,1),Md(e,t)}var Fd={newInstance:Ae.newInstance(Rd,"vtkImageMarchingSquares"),extend:Rd},Bd=Ae.vtkErrorMacro;function Ld(e,t){t.classHierarchy.push("vtkImageOutlineFilter"),e.requestData=function(e,n){var r=e[0];if(r&&"vtkImageData"===r.getClassName()){var i=fs.newInstance(r.get("spacing","origin","direction")),o=function(e,t){return e[0]+e[1]*t[0]+e[2]*t[0]*t[1]},a=r.getDimensions();i.setDimensions(a),i.computeTransforms();var s=new Uint8Array(r.getNumberOfPoints()),l=r.getPointData().getScalars().getData(),u=0,c=1;1===t.slicingMode?(u=0,c=2):0===t.slicingMode&&(u=1,c=2),l.forEach((function(e,n){if(e!==t.background){for(var r=function(e,t){var n=[0,0,0];return n[0]=e%t[0],n[1]=Math.floor(e/t[0])%t[1],n[2]=Math.floor(e/(t[0]*t[1])),n}(n,a),i=!1,d=-1;d<=1&&!i;d++)for(var p=-1;p<=1&&!i;p++){var f=d,h=p,m=0;1===t.slicingMode?(f=d,h=0,m=p):0===t.slicingMode&&(f=0,h=p,m=d);var g=r[u]+f,v=r[c]+h;if(g>=0&&g=0&&v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vd,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["slicingMode","background"]),Ld(e,t)}var Gd={newInstance:Ae.newInstance(jd,"vtkImageOutlineFilter"),extend:jd},Ud=Ae.vtkErrorMacro;function zd(e,t){t.classHierarchy.push("vtkImageSliceFilter"),e.requestData=function(e,n){var r=e[0];if(r){var i=r.getPointData().getScalars();if(i){var o=r.get("extent","spacing","origin");o.extent[4]=t.sliceIndex,o.extent[5]=o.extent[4];var a=i.getNumberOfComponents(),s=(o.extent[1]-o.extent[0]+1)*(o.extent[3]-o.extent[2]+1)*a,l=s*t.sliceIndex,u=i.getData().slice(l,l+s),c=Jn.newInstance({name:i.getName(),numberOfComponents:a,values:u}),d=fs.newInstance(o);d.getPointData().setScalars(c),n[0]=d}else Ud("No scalars from input")}else Ud("Invalid or missing input")}}var Wd={sliceIndex:0};function Hd(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wd,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["sliceIndex","orientation"]),zd(e,t)}var Kd={newInstance:Ae.newInstance(Hd,"vtkImageSliceFilter"),extend:Hd},Xd=Ae.vtkErrorMacro;function qd(e,t){t.classHierarchy.push("vtkImageStreamline");var n=new Int32Array(3),r=new Float32Array(3),i=new Float32Array(8),o=new Uint32Array(8),a=new Uint32Array(3),s=new Float32Array(3),l=new Float32Array(3);e.interpolationFunctions=function(e,t){var n=e[0],r=e[1],i=e[2],o=1-n,a=1-r,s=1-i;t[0]=o*a*s,t[1]=n*a*s,t[2]=o*r*s,t[3]=n*r*s,t[4]=o*a*i,t[5]=n*a*i,t[6]=o*r*i,t[7]=n*r*i},e.computeStructuredCoordinates=function(e,t,n,r,i,o,a){for(var s=!0,l=0;l<3;l++){var u=(e[l]-o[l])/i[l];t[l]=Math.floor(u),n[l]=u-t[l];var c=!1,d=r[2*l],p=r[2*l+1];if(d===p){var f=e[l]-a[2*l];f*f<=i[l]*i[l]*1e-12&&(n[l]=0,t[l]=d,c=!0)}else t[l]=0&&e[l]>=a[2*l]||i[l]<0&&e[l]<=a[2*l+1])&&(n[l]=0,t[l]=d,c=!0):t[l]>=p?(i[l]>=0&&e[l]<=a[2*l+1]||i[l]<0&&e[l]>=a[2*l])&&(n[l]=1,t[l]=p-1,c=!0):c=!0;s=s&&c}return s},e.getVoxelIndices=function(e,t,n){n[0]=e[2]*t[0]*t[1]+e[1]*t[0]+e[0],n[1]=n[0]+1,n[2]=n[0]+t[0],n[3]=n[2]+1,n[4]=n[0]+t[0]*t[1],n[5]=n[4]+1,n[6]=n[4]+t[0],n[7]=n[6]+1},e.vectorAt=function(t,s,l,u){if(!e.computeStructuredCoordinates(t,n,r,l.getExtent(),l.getSpacing(),l.getOrigin(),l.getBounds()))return!1;e.interpolationFunctions(r,i);var c=l.getExtent();a[0]=c[1]-c[0]+1,a[1]=c[3]-c[2]+1,a[2]=c[5]-c[4]+1,e.getVoxelIndices(n,a,o),u[0]=0,u[1]=0,u[2]=0;for(var d=0;d<8;d++)for(var p=s.getTuple(o[d]),f=0;f<3;f++)u[f]+=i[d]*p[f];return!0},e.computeNextStep=function(t,n,r,i){if(!e.vectorAt(i,t,n,s))return!1;for(var o=0;o<3;o++)l[o]=i[o]+r/2*s[o];if(!e.vectorAt(l,t,n,s))return!1;for(var a=0;a<3;a++)i[a]+=r*s[a];return!!e.vectorAt(i,t,n,s)},e.streamIntegrate=function(n,r,i,o){var a=[],s=t.maximumNumberOfSteps,l=t.integrationStep,u=new Float32Array(3);u[0]=i[0],u[1]=i[1],u[2]=i[2];var c=[],d=0;for(d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yd,n),Ae.obj(e,t),Ae.algo(e,t,2,1),Ae.setGet(e,t,["integrationStep","maximumNumberOfSteps"]),qd(e,t)}var Jd={newInstance:Ae.newInstance(Zd,"vtkImageStreamline"),extend:Zd},Qd=JSON.parse('{"H":[{"id":"Xx","atomicNumber":0,"mass":0,"exactMass":0,"radiusCovalent":0,"radiusVDW":0,"symbol":"Xx","name":"Dummy","elementColor":[0.07,0.5,0.7]},{"id":"H","atomicNumber":1,"mass":1.00794,"exactMass":1.007825032,"ionization":13.5984,"electronAffinity":0.75420375,"electronegativityPauling":2.2,"nameOrigin":"Greek \'hydro\' and \'gennao\' for \'forms water\'","radiusCovalent":0.37,"radiusVDW":1.2,"boilingpoint":20.28,"meltingpoint":14.01,"periodTableBlock":"s","discoveryDate":"1766","period":"1","group":"1","electronicConfiguration":"1s1","family":"Non-Metal","symbol":"H","name":"Hydrogen","elementColor":[1,1,1],"discoveryCountry":["uk"],"discoverers":["C.","Cavendish"]},{"id":"He","atomicNumber":2,"mass":4.002602,"exactMass":4.002603254,"ionization":24.5874,"electronAffinity":0,"nameOrigin":"The Greek word for the sun was \'helios\'","radiusCovalent":0.32,"radiusVDW":1.4,"boilingpoint":4.216,"meltingpoint":0.95,"periodTableBlock":"p","discoveryDate":"1895","period":"1","group":"8","electronicConfiguration":"1s2","family":"Noblegas","symbol":"He","name":"Helium","elementColor":[0.85,1,1],"discoveryCountry":["se","uk"],"discoverers":["P. J. Janssen","J. N. Lockyer"]},{"id":"Li","atomicNumber":3,"mass":6.941,"exactMass":7.01600455,"ionization":5.3917,"electronAffinity":0.618049,"electronegativityPauling":0.98,"nameOrigin":"Greek \'lithos\' means \'stone\'","radiusCovalent":1.34,"radiusVDW":2.2,"boilingpoint":1615,"meltingpoint":453.7,"periodTableBlock":"s","discoveryDate":"1817","period":"2","group":"1","electronicConfiguration":"He 2s1","family":"Alkali_Earth","symbol":"Li","name":"Lithium","elementColor":[0.8,0.5,1],"discoveryCountry":["se"],"discoverers":["A.","Arfvedson"]},{"id":"Be","atomicNumber":4,"mass":9.012182,"exactMass":9.0121822,"ionization":9.3227,"electronAffinity":0,"electronegativityPauling":1.57,"nameOrigin":"Greek \'beryllos\' for \'light-green stone\'","radiusCovalent":0.9,"radiusVDW":1.9,"boilingpoint":3243,"meltingpoint":1560,"periodTableBlock":"s","discoveryDate":"1797","period":"2","group":"2","electronicConfiguration":"He 2s2","family":"Alkaline_Earth","symbol":"Be","name":"Beryllium","elementColor":[0.76,1,0],"discoveryCountry":["fr"],"discoverers":["Nicholas","Louis","Vauquelin"]},{"id":"B","atomicNumber":5,"mass":10.811,"exactMass":11.0093054,"ionization":8.298,"electronAffinity":0.279723,"electronegativityPauling":2.04,"nameOrigin":"Boron means \'Bor(ax) + (carb)on\'. It is found in borax and behaves a lot like carbon","radiusCovalent":0.82,"radiusVDW":1.8,"boilingpoint":4275,"meltingpoint":2365,"periodTableBlock":"p","discoveryDate":"1808","period":"2","group":"3","electronicConfiguration":"He 2s2 2p1","family":"Metalloids","symbol":"B","name":"Boron","elementColor":[1,0.71,0.71],"discoveryCountry":["uk","fr"],"discoverers":["Louis Joseph Gay-Lussac","Louis Jacques Thenard"]},{"id":"C","atomicNumber":6,"mass":12.0107,"exactMass":12,"ionization":11.2603,"electronAffinity":1.262118,"electronegativityPauling":2.55,"nameOrigin":"Latin \'carboneum\' for carbon","radiusCovalent":0.77,"radiusVDW":1.7,"boilingpoint":5100,"meltingpoint":3825,"periodTableBlock":"p","discoveryDate":"0","period":"2","group":"4","electronicConfiguration":"He 2s2 2p2","family":"Non-Metal","symbol":"C","name":"Carbon","elementColor":[0.5,0.5,0.5],"discoveryCountry":["ancient"]},{"id":"N","atomicNumber":7,"mass":14.0067,"exactMass":14.003074,"ionization":14.5341,"electronAffinity":-0.07,"electronegativityPauling":3.04,"nameOrigin":"Latin \'nitrogenium\' (\'forms saltpeter\')","radiusCovalent":0.75,"radiusVDW":1.6,"boilingpoint":77.344,"meltingpoint":63.15,"periodTableBlock":"p","discoveryDate":"1772","period":"2","group":"5","electronicConfiguration":"He 2s2 2p3","family":"Non-Metal","symbol":"N","name":"Nitrogen","elementColor":[0.05,0.05,1],"discoveryCountry":["uk"],"discoverers":["D.","Rutherford"]},{"id":"O","atomicNumber":8,"mass":15.9994,"exactMass":15.99491462,"ionization":13.6181,"electronAffinity":1.461112,"electronegativityPauling":3.44,"nameOrigin":"Latin \'oxygenium\' (forms acids)","radiusCovalent":0.73,"radiusVDW":1.55,"boilingpoint":90.188,"meltingpoint":54.8,"periodTableBlock":"p","discoveryDate":"1774","period":"2","group":"6","electronicConfiguration":"He 2s2 2p4","family":"Non-Metal","symbol":"O","name":"Oxygen","elementColor":[1,0.05,0.05],"discoveryCountry":["se","uk"],"discoverers":["J.","Priestley"]},{"id":"F","atomicNumber":9,"mass":18.9984032,"exactMass":18.99840322,"ionization":17.4228,"electronAffinity":3.4011887,"electronegativityPauling":3.98,"nameOrigin":"Latin \'fluere\' (\'floats\')","radiusCovalent":0.71,"radiusVDW":1.5,"boilingpoint":85,"meltingpoint":53.55,"periodTableBlock":"p","discoveryDate":"1886","period":"2","group":"7","electronicConfiguration":"He 2s2 2p5","family":"Halogen","symbol":"F","name":"Fluorine","elementColor":[0.7,1,1],"discoveryCountry":["fr"],"discoverers":["H.","F.","Moissan"]},{"id":"Ne","atomicNumber":10,"mass":20.1797,"exactMass":19.99244018,"ionization":21.5645,"electronAffinity":0,"nameOrigin":"Greek \'neo\'. meaning \'new\'","radiusCovalent":0.69,"radiusVDW":1.54,"boilingpoint":27.1,"meltingpoint":24.55,"periodTableBlock":"p","discoveryDate":"1898","period":"2","group":"8","electronicConfiguration":"He 2s2 2p6","family":"Noblegas","symbol":"Ne","name":"Neon","elementColor":[0.7,0.89,0.96],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","M.W. Travers"]},{"id":"Na","atomicNumber":11,"mass":22.98976928,"exactMass":22.98976928,"ionization":5.1391,"electronAffinity":0.547926,"electronegativityPauling":0.93,"nameOrigin":"Arabic \'natrun\' for \'soda\'","radiusCovalent":1.54,"radiusVDW":2.4,"boilingpoint":1156,"meltingpoint":371,"periodTableBlock":"s","discoveryDate":"1807","period":"3","group":"1","electronicConfiguration":"Ne 3s1","family":"Alkali_Earth","symbol":"Na","name":"Sodium","elementColor":[0.67,0.36,0.95],"discoveryCountry":["uk"],"discoverers":["Sir","Humphrey","Davy"]},{"id":"Mg","atomicNumber":12,"mass":24.305,"exactMass":23.9850417,"ionization":7.6462,"electronAffinity":0,"electronegativityPauling":1.31,"nameOrigin":"Named after the city of Magnesia","radiusCovalent":1.3,"radiusVDW":2.2,"boilingpoint":1380,"meltingpoint":922,"periodTableBlock":"s","discoveryDate":"1808","period":"3","group":"2","electronicConfiguration":"Ne 3s2","family":"Alkaline_Earth","symbol":"Mg","name":"Magnesium","elementColor":[0.54,1,0],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Al","atomicNumber":13,"mass":26.9815386,"exactMass":26.98153863,"ionization":5.9858,"electronAffinity":0.43283,"electronegativityPauling":1.61,"nameOrigin":"Latin \'alumen\'","radiusCovalent":1.18,"radiusVDW":2.1,"boilingpoint":2740,"meltingpoint":933.5,"periodTableBlock":"p","discoveryDate":"1825","period":"3","group":"3","electronicConfiguration":"Ne 3s2 3p1","family":"Other_Metal","symbol":"Al","name":"Aluminium","elementColor":[0.75,0.65,0.65],"discoveryCountry":["dk"],"discoverers":["H.","Ch.","Oersted"]},{"id":"Si","atomicNumber":14,"mass":28.0855,"exactMass":27.97692653,"ionization":8.1517,"electronAffinity":1.389521,"electronegativityPauling":1.9,"nameOrigin":"Latin \'silex\'","radiusCovalent":1.11,"radiusVDW":2.1,"boilingpoint":2630,"meltingpoint":1683,"periodTableBlock":"p","discoveryDate":"1823","period":"3","group":"4","electronicConfiguration":"Ne 3s2 3p2","family":"Metalloids","symbol":"Si","name":"Silicon","elementColor":[0.5,0.6,0.6],"discoveryCountry":["se"],"discoverers":["J.","J.","Berzelius"]},{"id":"P","atomicNumber":15,"mass":30.973762,"exactMass":30.97376163,"ionization":10.4867,"electronAffinity":0.7465,"electronegativityPauling":2.19,"nameOrigin":"Greek \'phosphoros\' for \'carries light\'","radiusCovalent":1.06,"radiusVDW":1.95,"boilingpoint":553,"meltingpoint":317.3,"periodTableBlock":"p","discoveryDate":"1669","period":"3","group":"5","electronicConfiguration":"Ne 3s2 3p3","family":"Non-Metal","symbol":"P","name":"Phosphorus","elementColor":[1,0.5,0],"discoveryCountry":["de"],"discoverers":["H.","Brandt"]},{"id":"S","atomicNumber":16,"mass":32.065,"exactMass":31.972071,"ionization":10.36,"electronAffinity":2.0771029,"electronegativityPauling":2.58,"nameOrigin":"In sanskrit \'sweb\' means \'to sleep\'","radiusCovalent":1.02,"radiusVDW":1.8,"boilingpoint":717.82,"meltingpoint":392.2,"periodTableBlock":"p","discoveryDate":"0","period":"3","group":"6","electronicConfiguration":"Ne 3s2 3p4","family":"Non-Metal","symbol":"S","name":"Sulfur","elementColor":[1,1,0.19],"discoveryCountry":["ancient"]},{"id":"Cl","atomicNumber":17,"mass":35.453,"exactMass":34.96885268,"ionization":12.9676,"electronAffinity":3.612724,"electronegativityPauling":3.16,"nameOrigin":"Greek \'chloros\' for \'yellow-green\'","radiusCovalent":0.99,"radiusVDW":1.8,"boilingpoint":239.18,"meltingpoint":172.17,"periodTableBlock":"p","discoveryDate":"1774","period":"3","group":"7","electronicConfiguration":"Ne 3s2 3p5","family":"Halogen","symbol":"Cl","name":"Chlorine","elementColor":[0.12,0.94,0.12],"discoveryCountry":["se"],"discoverers":["C.","W.","Scheele"]},{"id":"Ar","atomicNumber":18,"mass":39.948,"exactMass":39.96238312,"ionization":15.7596,"electronAffinity":0,"nameOrigin":"Greek \'aergon\' for \'inactive\'","radiusCovalent":0.97,"radiusVDW":1.88,"boilingpoint":87.45,"meltingpoint":83.95,"periodTableBlock":"p","discoveryDate":"1894","period":"3","group":"8","electronicConfiguration":"Ne 3s2 3p6","family":"Noblegas","symbol":"Ar","name":"Argon","elementColor":[0.5,0.82,0.89],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","J. Rayleigh"]},{"id":"K","atomicNumber":19,"mass":39.0983,"exactMass":38.96370668,"ionization":4.3407,"electronAffinity":0.501459,"electronegativityPauling":0.82,"nameOrigin":"Arabic \'al qaliy\' for potash","radiusCovalent":1.96,"radiusVDW":2.8,"boilingpoint":1033,"meltingpoint":336.8,"periodTableBlock":"s","discoveryDate":"1807","period":"4","group":"1","electronicConfiguration":"Ar 4s1","family":"Alkali_Earth","symbol":"K","name":"Potassium","elementColor":[0.56,0.25,0.83],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Ca","atomicNumber":20,"mass":40.078,"exactMass":39.96259098,"ionization":6.1132,"electronAffinity":0.02455,"electronegativityPauling":1,"nameOrigin":"Latin \'calx\' for \'lime\'","radiusCovalent":1.74,"radiusVDW":2.4,"boilingpoint":1757,"meltingpoint":1112,"periodTableBlock":"s","discoveryDate":"1808","period":"4","group":"2","electronicConfiguration":"Ar 4s2","family":"Alkaline_Earth","symbol":"Ca","name":"Calcium","elementColor":[0.24,1,0],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Sc","atomicNumber":21,"mass":44.955912,"exactMass":44.9559119,"ionization":6.5615,"electronAffinity":0.188,"electronegativityPauling":1.36,"nameOrigin":"Named because it was found in Scandinavia","radiusCovalent":1.44,"radiusVDW":2.3,"boilingpoint":3109,"meltingpoint":1814,"periodTableBlock":"d","discoveryDate":"1879","period":"4","group":"3","electronicConfiguration":"Ar 3d1 4s2","family":"Transition","symbol":"Sc","name":"Scandium","elementColor":[0.9,0.9,0.9],"discoveryCountry":["se"],"discoverers":["L.","Nilson"]},{"id":"Ti","atomicNumber":22,"mass":47.867,"exactMass":47.9479463,"ionization":6.8281,"electronAffinity":0.084,"electronegativityPauling":1.54,"nameOrigin":"The Titans were giants in Greek mythology","radiusCovalent":1.36,"radiusVDW":2.15,"boilingpoint":3560,"meltingpoint":1935,"periodTableBlock":"d","discoveryDate":"1791","period":"4","group":"4","electronicConfiguration":"Ar 3d2 4s2","family":"Transition","symbol":"Ti","name":"Titanium","elementColor":[0.75,0.76,0.78],"discoveryCountry":["uk"],"discoverers":["W.","Gregor"]},{"id":"V","atomicNumber":23,"mass":50.9415,"exactMass":50.9439595,"ionization":6.7462,"electronAffinity":0.525,"electronegativityPauling":1.63,"nameOrigin":"\'Vanadis\' is another name for the Nordic goddess Freyja","radiusCovalent":1.25,"radiusVDW":2.05,"boilingpoint":3650,"meltingpoint":2163,"periodTableBlock":"d","discoveryDate":"1830","period":"4","group":"5","electronicConfiguration":"Ar 3d3 4s2","family":"Transition","symbol":"V","name":"Vanadium","elementColor":[0.65,0.65,0.67],"discoveryCountry":["se"],"discoverers":["N.","Sefström"]},{"id":"Cr","atomicNumber":24,"mass":51.9961,"exactMass":51.9405075,"ionization":6.7665,"electronAffinity":0.67584,"electronegativityPauling":1.66,"nameOrigin":"Greek \'chroma\' means \'color\'","radiusCovalent":1.27,"radiusVDW":2.05,"boilingpoint":2945,"meltingpoint":2130,"periodTableBlock":"d","discoveryDate":"1797","period":"4","group":"6","electronicConfiguration":"Ar 3d5 4s1","family":"Transition","symbol":"Cr","name":"Chromium","elementColor":[0.54,0.6,0.78],"discoveryCountry":["fr"],"discoverers":["Nicholas","Louis","Vauquelin"]},{"id":"Mn","atomicNumber":25,"mass":54.938045,"exactMass":54.9380451,"ionization":7.434,"electronAffinity":0,"electronegativityPauling":1.55,"nameOrigin":"It was discovered near a town named Magnesia in black earth. Thus, it was named \'magnesia nigra\', or for short, Manganese.","radiusCovalent":1.39,"radiusVDW":2.05,"boilingpoint":2235,"meltingpoint":1518,"periodTableBlock":"d","discoveryDate":"1774","period":"4","group":"7","electronicConfiguration":"Ar 3d5 4s2","family":"Transition","symbol":"Mn","name":"Manganese","elementColor":[0.61,0.48,0.78],"discoveryCountry":["se"],"discoverers":["C.","W.","Scheele"]},{"id":"Fe","atomicNumber":26,"mass":55.845,"exactMass":55.9349375,"ionization":7.9024,"electronAffinity":0.151,"electronegativityPauling":1.83,"nameOrigin":"Latin \'ferrum\'","radiusCovalent":1.25,"radiusVDW":2.05,"boilingpoint":3023,"meltingpoint":1808,"periodTableBlock":"d","discoveryDate":"0","period":"4","group":"8","electronicConfiguration":"Ar 3d6 4s2","family":"Transition","symbol":"Fe","name":"Iron","elementColor":[0.5,0.48,0.78],"discoveryCountry":["ancient"]},{"id":"Co","atomicNumber":27,"mass":58.933195,"exactMass":58.933195,"ionization":7.881,"electronAffinity":0.6633,"electronegativityPauling":1.88,"nameOrigin":"Named after the German word \'Kobold\' for \'goblin\'","radiusCovalent":1.26,"radiusVDW":2,"boilingpoint":3143,"meltingpoint":1768,"periodTableBlock":"d","discoveryDate":"1737","period":"4","group":"8","electronicConfiguration":"Ar 3d7 4s2","family":"Transition","symbol":"Co","name":"Cobalt","elementColor":[0.44,0.48,0.78],"discoveryCountry":["se"],"discoverers":["G.","Brandt"]},{"id":"Ni","atomicNumber":28,"mass":58.6934,"exactMass":57.9353429,"ionization":7.6398,"electronAffinity":1.15716,"electronegativityPauling":1.91,"nameOrigin":"\'Nickel\' was the name of a mountain goblin","radiusCovalent":1.21,"radiusVDW":2,"boilingpoint":3005,"meltingpoint":1726,"periodTableBlock":"d","discoveryDate":"1751","period":"4","group":"8","electronicConfiguration":"Ar 3d8 4s2","family":"Transition","symbol":"Ni","name":"Nickel","elementColor":[0.36,0.48,0.76],"discoveryCountry":["se"],"discoverers":["A.","F.","Cronstedt"]},{"id":"Cu","atomicNumber":29,"mass":63.546,"exactMass":62.9295975,"ionization":7.7264,"electronAffinity":1.23578,"electronegativityPauling":1.9,"nameOrigin":"Greek \'cuprum\' for Cypres","radiusCovalent":1.38,"radiusVDW":2,"boilingpoint":2840,"meltingpoint":1356.6,"periodTableBlock":"d","discoveryDate":"0","period":"4","group":"1","electronicConfiguration":"Ar 3d10 4s1","family":"Transition","symbol":"Cu","name":"Copper","elementColor":[1,0.48,0.38],"discoveryCountry":["ancient"]},{"id":"Zn","atomicNumber":30,"mass":65.38,"exactMass":63.9291422,"ionization":9.3942,"electronAffinity":0,"electronegativityPauling":1.65,"nameOrigin":"German \'zinking\' for \'rough\', because zinc ore is very rough","radiusCovalent":1.31,"radiusVDW":2.1,"boilingpoint":1180,"meltingpoint":692.73,"periodTableBlock":"d","discoveryDate":"1746","period":"4","group":"2","electronicConfiguration":"Ar 3d10 4s2","family":"Transition","symbol":"Zn","name":"Zinc","elementColor":[0.49,0.5,0.69],"discoveryCountry":["de"],"discoverers":["Andreas","Marggraf"]},{"id":"Ga","atomicNumber":31,"mass":69.723,"exactMass":68.9255736,"ionization":5.9993,"electronAffinity":0.41,"electronegativityPauling":1.81,"nameOrigin":"\'Gallia\' is an old name for France","radiusCovalent":1.26,"radiusVDW":2.1,"boilingpoint":2478,"meltingpoint":302.92,"periodTableBlock":"p","discoveryDate":"1875","period":"4","group":"3","electronicConfiguration":"Ar 3d10 4s2 4p1","family":"Other_Metal","symbol":"Ga","name":"Gallium","elementColor":[0.76,0.56,0.56],"discoveryCountry":["fr"],"discoverers":["P.","E.","Lecoq","de","Boisbaudran"]},{"id":"Ge","atomicNumber":32,"mass":72.64,"exactMass":73.9211778,"ionization":7.8994,"electronAffinity":1.232712,"electronegativityPauling":2.01,"nameOrigin":"Latin \'germania\' is an old name for Germany","radiusCovalent":1.22,"radiusVDW":2.1,"boilingpoint":3107,"meltingpoint":1211.5,"periodTableBlock":"p","discoveryDate":"1886","period":"4","group":"4","electronicConfiguration":"Ar 3d10 4s2 4p2","family":"Metalloids","symbol":"Ge","name":"Germanium","elementColor":[0.4,0.56,0.56],"discoveryCountry":["de"],"discoverers":["C.","A.","Winkler"]},{"id":"As","atomicNumber":33,"mass":74.9216,"exactMass":74.9215965,"ionization":9.7886,"electronAffinity":0.814,"electronegativityPauling":2.18,"nameOrigin":"Greek \'arsenikos\' for \'male\' or \'bold\'","radiusCovalent":1.19,"radiusVDW":2.05,"boilingpoint":876,"meltingpoint":1090,"periodTableBlock":"p","discoveryDate":"0","period":"4","group":"5","electronicConfiguration":"Ar 3d10 4s2 4p3","family":"Metalloids","symbol":"As","name":"Arsenic","elementColor":[0.74,0.5,0.89],"discoveryCountry":["ancient"]},{"id":"Se","atomicNumber":34,"mass":78.96,"exactMass":79.9165213,"ionization":9.7524,"electronAffinity":2.02067,"electronegativityPauling":2.55,"nameOrigin":"Greek \'selena\' for \'moon\'","radiusCovalent":1.16,"radiusVDW":1.9,"boilingpoint":958,"meltingpoint":494,"periodTableBlock":"p","discoveryDate":"1817","period":"4","group":"6","electronicConfiguration":"Ar 3d10 4s2 4p4","family":"Non-Metal","symbol":"Se","name":"Selenium","elementColor":[1,0.63,0],"discoveryCountry":["se"],"discoverers":["J.","J.","Berzelius"]},{"id":"Br","atomicNumber":35,"mass":79.904,"exactMass":78.9183371,"ionization":11.8138,"electronAffinity":3.363588,"electronegativityPauling":2.96,"nameOrigin":"Greek \'bromos\' for \'smells badly\'","radiusCovalent":1.14,"radiusVDW":1.9,"boilingpoint":331.85,"meltingpoint":265.95,"periodTableBlock":"p","discoveryDate":"1826","period":"4","group":"7","electronicConfiguration":"Ar 3d10 4s2 4p5","family":"Halogen","symbol":"Br","name":"Bromine","elementColor":[0.65,0.16,0.16],"discoveryCountry":["fr"],"discoverers":["A.","J.","Balard"]},{"id":"Kr","atomicNumber":36,"mass":83.798,"exactMass":83.911507,"ionization":13.9996,"electronAffinity":0,"electronegativityPauling":3,"nameOrigin":"Greek \'kryptos\' for \'hidden\'","radiusCovalent":1.1,"radiusVDW":2.02,"boilingpoint":120.85,"meltingpoint":116,"periodTableBlock":"p","discoveryDate":"1898","period":"4","group":"8","electronicConfiguration":"Ar 3d10 4s2 4p6","family":"Noblegas","symbol":"Kr","name":"Krypton","elementColor":[0.36,0.72,0.82],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","M. W. Travers"]},{"id":"Rb","atomicNumber":37,"mass":85.4678,"exactMass":84.91178974,"ionization":4.1771,"electronAffinity":0.485916,"electronegativityPauling":0.82,"nameOrigin":"Latin \'rubidus\' for \'dark red\'","radiusCovalent":2.11,"radiusVDW":2.9,"boilingpoint":961,"meltingpoint":312.63,"periodTableBlock":"s","discoveryDate":"1861","period":"5","group":"1","electronicConfiguration":"Kr 5s1","family":"Alkali_Earth","symbol":"Rb","name":"Rubidium","elementColor":[0.44,0.18,0.69],"discoveryCountry":["de"],"discoverers":["Robert W. Bunsen","Gustav R. Kirchhoff"]},{"id":"Sr","atomicNumber":38,"mass":87.62,"exactMass":87.9056121,"ionization":5.6949,"electronAffinity":0.05206,"electronegativityPauling":0.95,"nameOrigin":"Named after the mineral Strontianit","radiusCovalent":1.92,"radiusVDW":2.55,"boilingpoint":1655,"meltingpoint":1042,"periodTableBlock":"s","discoveryDate":"1790","period":"5","group":"2","electronicConfiguration":"Kr 5s2","family":"Alkaline_Earth","symbol":"Sr","name":"Strontium","elementColor":[0,1,0],"discoveryCountry":["uk"],"discoverers":["H.","B.","Davy"]},{"id":"Y","atomicNumber":39,"mass":88.90585,"exactMass":88.9058483,"ionization":6.2173,"electronAffinity":0.307,"electronegativityPauling":1.22,"nameOrigin":"Named after the small town of Ytterby near Stockholm in Sweden. Terbium. Ytterbium and Gadolinium are also named after this town.","radiusCovalent":1.62,"radiusVDW":2.4,"boilingpoint":3611,"meltingpoint":1795,"periodTableBlock":"d","discoveryDate":"1794","period":"5","group":"3","electronicConfiguration":"Kr 4d1 5s2","family":"Transition","symbol":"Y","name":"Yttrium","elementColor":[0.58,1,1],"discoveryCountry":["fi"],"discoverers":["Johann","Gadolin"]},{"id":"Zr","atomicNumber":40,"mass":91.224,"exactMass":89.9047044,"ionization":6.6339,"electronAffinity":0.426,"electronegativityPauling":1.33,"nameOrigin":"Named after the mineral zircon","radiusCovalent":1.48,"radiusVDW":2.3,"boilingpoint":4682,"meltingpoint":2128,"periodTableBlock":"d","discoveryDate":"1789","period":"5","group":"4","electronicConfiguration":"Kr 4d2 5s2","family":"Transition","symbol":"Zr","name":"Zirconium","elementColor":[0.58,0.88,0.88],"discoveryCountry":["de"],"discoverers":["Martin","Heinrich","Klaproth"]},{"id":"Nb","atomicNumber":41,"mass":92.90638,"exactMass":92.9063781,"ionization":6.7589,"electronAffinity":0.893,"electronegativityPauling":1.6,"nameOrigin":"Named after Niobe, the daughter of the Greek god Tantalus.","radiusCovalent":1.37,"radiusVDW":2.15,"boilingpoint":5015,"meltingpoint":2742,"periodTableBlock":"d","discoveryDate":"1801","period":"5","group":"5","electronicConfiguration":"Kr 4d4","family":"Transition","symbol":"Nb","name":"Niobium","elementColor":[0.45,0.76,0.79],"discoveryCountry":["uk"],"discoverers":["Ch.","Hatchett"]},{"id":"Mo","atomicNumber":42,"mass":95.96,"exactMass":97.9054082,"ionization":7.0924,"electronAffinity":0.7472,"electronegativityPauling":2.16,"nameOrigin":"This name has Greek roots. It means \'like Platinum\' - it was difficult to distinguish Molybdenum from Platinum.","radiusCovalent":1.45,"radiusVDW":2.1,"boilingpoint":4912,"meltingpoint":2896,"periodTableBlock":"d","discoveryDate":"1778","period":"5","group":"6","electronicConfiguration":"Kr 4d5 5s1","family":"Transition","symbol":"Mo","name":"Molybdenum","elementColor":[0.33,0.71,0.71],"discoveryCountry":["se"],"discoverers":["C.","W.","Scheele"]},{"id":"Tc","atomicNumber":43,"mass":98,"exactMass":97.907216,"ionization":7.28,"electronAffinity":0.55,"electronegativityPauling":1.9,"nameOrigin":"Greek \'technetos\' for artificial","radiusCovalent":1.56,"radiusVDW":2.05,"boilingpoint":4538,"meltingpoint":2477,"periodTableBlock":"d","discoveryDate":"1937","period":"5","group":"7","electronicConfiguration":"Kr 4d6 5s1","family":"Transition","symbol":"Tc","name":"Technetium","elementColor":[0.23,0.62,0.62],"discoveryCountry":["it"],"discoverers":["C. Perrier","E. G. Segre"]},{"id":"Ru","atomicNumber":44,"mass":101.07,"exactMass":101.9043493,"ionization":7.3605,"electronAffinity":1.04638,"electronegativityPauling":2.2,"nameOrigin":"Ruthenia is the old name of Russia","radiusCovalent":1.26,"radiusVDW":2.05,"boilingpoint":4425,"meltingpoint":2610,"periodTableBlock":"d","discoveryDate":"1844","period":"5","group":"8","electronicConfiguration":"Kr 4d7 5s1","family":"Transition","symbol":"Ru","name":"Ruthenium","elementColor":[0.14,0.56,0.56],"discoveryCountry":["ru"],"discoverers":["K.","Klaus"]},{"id":"Rh","atomicNumber":45,"mass":102.9055,"exactMass":102.905504,"ionization":7.4589,"electronAffinity":1.14289,"electronegativityPauling":2.28,"nameOrigin":"Greek \'rhodeos\' means \'red like a rose\'","radiusCovalent":1.35,"radiusVDW":2,"boilingpoint":3970,"meltingpoint":2236,"periodTableBlock":"d","discoveryDate":"1803","period":"5","group":"8","electronicConfiguration":"Kr 4d8 5s1","family":"Transition","symbol":"Rh","name":"Rhodium","elementColor":[0.04,0.49,0.55],"discoveryCountry":["uk"],"discoverers":["W.","Wollaston"]},{"id":"Pd","atomicNumber":46,"mass":106.42,"exactMass":105.903486,"ionization":8.3369,"electronAffinity":0.56214,"electronegativityPauling":2.2,"nameOrigin":"Named after the asteroid Pallas","radiusCovalent":1.31,"radiusVDW":2.05,"boilingpoint":3240,"meltingpoint":1825,"periodTableBlock":"d","discoveryDate":"1803","period":"5","group":"8","electronicConfiguration":"Kr 4d10","family":"Transition","symbol":"Pd","name":"Palladium","elementColor":[0,0.41,0.52],"discoveryCountry":["uk"]},{"id":"Ag","atomicNumber":47,"mass":107.8682,"exactMass":106.905097,"ionization":7.5762,"electronAffinity":1.30447,"electronegativityPauling":1.93,"nameOrigin":"Latin \'argentum\' for silver","radiusCovalent":1.53,"radiusVDW":2.1,"boilingpoint":2436,"meltingpoint":1235.1,"periodTableBlock":"d","discoveryDate":"0","period":"5","group":"1","electronicConfiguration":"Kr 4d10 5s1","family":"Transition","symbol":"Ag","name":"Silver","elementColor":[0.88,0.88,1],"discoveryCountry":["ancient"]},{"id":"Cd","atomicNumber":48,"mass":112.411,"exactMass":113.9033585,"ionization":8.9938,"electronAffinity":0,"electronegativityPauling":1.69,"nameOrigin":"Greek \'kadmia\' (\'Galmei\' = Zinc carbonate)","radiusCovalent":1.48,"radiusVDW":2.2,"boilingpoint":1040,"meltingpoint":594.26,"periodTableBlock":"d","discoveryDate":"1817","period":"5","group":"2","electronicConfiguration":"Kr 4d10 5s2","family":"Transition","symbol":"Cd","name":"Cadmium","elementColor":[1,0.85,0.56],"discoveryCountry":["de"],"discoverers":["F.","Stromeyer"]},{"id":"In","atomicNumber":49,"mass":114.818,"exactMass":114.903878,"ionization":5.7864,"electronAffinity":0.404,"electronegativityPauling":1.78,"nameOrigin":"Named after \'Indigo\' because of its blue spectrum","radiusCovalent":1.44,"radiusVDW":2.2,"boilingpoint":2350,"meltingpoint":429.78,"periodTableBlock":"p","discoveryDate":"1863","period":"5","group":"3","electronicConfiguration":"Kr 4d10 5s2 5p1","family":"Other_Metal","symbol":"In","name":"Indium","elementColor":[0.65,0.46,0.45],"discoveryCountry":["de"],"discoverers":["F. Reich","H.T. Richter"]},{"id":"Sn","atomicNumber":50,"mass":118.71,"exactMass":119.9021947,"ionization":7.3439,"electronAffinity":1.112066,"electronegativityPauling":1.96,"nameOrigin":"Latin \'stannum\' for tin","radiusCovalent":1.41,"radiusVDW":2.25,"boilingpoint":2876,"meltingpoint":505.12,"periodTableBlock":"p","discoveryDate":"0","period":"5","group":"4","electronicConfiguration":"Kr 4d10 5s2 5p2","family":"Other_Metal","symbol":"Sn","name":"Tin","elementColor":[0.4,0.5,0.5],"discoveryCountry":["ancient"]},{"id":"Sb","atomicNumber":51,"mass":121.76,"exactMass":120.9038157,"ionization":8.6084,"electronAffinity":1.047401,"electronegativityPauling":2.05,"nameOrigin":"Arabic \'anthos ammonos\' for \'blossom of the god Ammon\'","radiusCovalent":1.38,"radiusVDW":2.2,"boilingpoint":1860,"meltingpoint":903.91,"periodTableBlock":"p","discoveryDate":"0","period":"5","group":"5","electronicConfiguration":"Kr 4d10 5s2 5p3","family":"Metalloids","symbol":"Sb","name":"Antimony","elementColor":[0.62,0.39,0.71],"discoveryCountry":["ancient"]},{"id":"Te","atomicNumber":52,"mass":127.6,"exactMass":129.9062244,"ionization":9.0096,"electronAffinity":1.970875,"electronegativityPauling":2.1,"nameOrigin":"Latin \'tellus\' or \'telluris\' for \'Planet Earth\'","radiusCovalent":1.35,"radiusVDW":2.1,"boilingpoint":1261,"meltingpoint":722.72,"periodTableBlock":"p","discoveryDate":"1782","period":"5","group":"6","electronicConfiguration":"Kr 4d10 5s2 5p4","family":"Metalloids","symbol":"Te","name":"Tellurium","elementColor":[0.83,0.48,0],"discoveryCountry":["de"],"discoverers":["Franz","Joseph","Muller","von","Reichstein"]},{"id":"I","atomicNumber":53,"mass":126.90447,"exactMass":126.904473,"ionization":10.4513,"electronAffinity":3.059038,"electronegativityPauling":2.66,"nameOrigin":"Greek \'ioeides\' for \'violet\'.","radiusCovalent":1.33,"radiusVDW":2.1,"boilingpoint":457.5,"meltingpoint":386.7,"periodTableBlock":"p","discoveryDate":"1811","period":"5","group":"7","electronicConfiguration":"Kr 4d10 5s2 5p5","family":"Halogen","symbol":"I","name":"Iodine","elementColor":[0.58,0,0.58],"discoveryCountry":["fr"],"discoverers":["Bernard","Courtois"]},{"id":"Xe","atomicNumber":54,"mass":131.293,"exactMass":131.9041535,"ionization":12.1298,"electronAffinity":0,"electronegativityPauling":2.6,"nameOrigin":"Greek \'xenos\' for \'foreigner\'","radiusCovalent":1.3,"radiusVDW":2.16,"boilingpoint":165.1,"meltingpoint":161.39,"periodTableBlock":"p","discoveryDate":"1898","period":"5","group":"8","electronicConfiguration":"Kr 4d10 5s2 5p6","family":"Noblegas","symbol":"Xe","name":"Xenon","elementColor":[0.26,0.62,0.69],"discoveryCountry":["uk"],"discoverers":["W. Ramsay","M. W. Travers"]},{"id":"Cs","atomicNumber":55,"mass":132.9054519,"exactMass":132.9054519,"ionization":3.8939,"electronAffinity":0.471626,"electronegativityPauling":0.79,"nameOrigin":"Latin \'caesius\' for \'heaven blue\'.","radiusCovalent":2.25,"radiusVDW":3,"boilingpoint":944,"meltingpoint":301.54,"periodTableBlock":"s","discoveryDate":"1860","period":"6","group":"1","electronicConfiguration":"Xe 6s1","family":"Alkali_Earth","symbol":"Cs","name":"Caesium","elementColor":[0.34,0.09,0.56],"discoveryCountry":["de"],"discoverers":["Robert Wilhelm Bunsen","Gustav Robert Kirchhoff"]},{"id":"Ba","atomicNumber":56,"mass":137.327,"exactMass":137.9052472,"ionization":5.2117,"electronAffinity":0.14462,"electronegativityPauling":0.89,"nameOrigin":"Greek \'barys\' for \'heavy\'","radiusCovalent":1.98,"radiusVDW":2.7,"boilingpoint":2078,"meltingpoint":1002,"periodTableBlock":"s","discoveryDate":"1808","period":"6","group":"2","electronicConfiguration":"Xe 6s2","family":"Alkaline_Earth","symbol":"Ba","name":"Barium","elementColor":[0,0.79,0],"discoveryCountry":["uk"],"discoverers":["Humphry","Bartholomew","Davy"]},{"id":"La","atomicNumber":57,"mass":138.90547,"exactMass":138.9063533,"ionization":5.5769,"electronAffinity":0.47,"electronegativityPauling":1.1,"nameOrigin":"Greek \'lanthanein\' for \'hidden\'. The Lanthanoids are also called the \'rare earth\' elements.","radiusCovalent":1.69,"radiusVDW":2.5,"boilingpoint":3737,"meltingpoint":1191,"periodTableBlock":"f","discoveryDate":"1839","period":"6","group":"3","electronicConfiguration":"Xe 5d1 6s2","family":"Rare_Earth","symbol":"La","name":"Lanthanum","elementColor":[0.44,0.83,1],"discoveryCountry":["se"],"discoverers":["K.","G.","Mosander"]},{"id":"Ce","atomicNumber":58,"mass":140.116,"exactMass":139.9054387,"ionization":5.5387,"electronAffinity":0.5,"electronegativityPauling":1.12,"nameOrigin":"Named after the planetoid Ceres","radiusVDW":2.48,"boilingpoint":3715,"meltingpoint":1071,"periodTableBlock":"f","discoveryDate":"1803","period":"6","group":"4","electronicConfiguration":"Xe 4f1 5d1 6s2","family":"Rare_Earth","symbol":"Ce","name":"Cerium","elementColor":[1,1,0.78],"discoverers":["Jöns Jacob Berzelius","W. Hisinger","M. Klaproth"]},{"id":"Pr","atomicNumber":59,"mass":140.90765,"exactMass":140.9076528,"ionization":5.473,"electronAffinity":0.5,"electronegativityPauling":1.13,"nameOrigin":"Greek \'prasinos didymos\' for \'green twin\'","radiusVDW":2.47,"boilingpoint":3785,"meltingpoint":1204,"periodTableBlock":"f","discoveryDate":"1885","period":"6","group":"5","electronicConfiguration":"Xe 4f3 6s2","family":"Rare_Earth","symbol":"Pr","name":"Praseodymium","elementColor":[0.85,1,0.78],"discoverers":["Carl","F.","Auer","von","Welsbach"]},{"id":"Nd","atomicNumber":60,"mass":144.242,"exactMass":141.9077233,"ionization":5.525,"electronAffinity":0.5,"electronegativityPauling":1.14,"nameOrigin":"Greek \'neos didymos\' for \'new twin\'","radiusVDW":2.45,"boilingpoint":3347,"meltingpoint":1294,"periodTableBlock":"f","discoveryDate":"1885","period":"6","group":"6","electronicConfiguration":"Xe 4f4 6s2","family":"Rare_Earth","symbol":"Nd","name":"Neodymium","elementColor":[0.78,1,0.78],"discoverers":["Carl","F.","Auer","von","Welsbach"]},{"id":"Pm","atomicNumber":61,"mass":145,"exactMass":144.912749,"ionization":5.582,"electronAffinity":0.5,"nameOrigin":"Named after the Greek Prometheus. Prometheus stole the fire from the gods and gave it to mankind.","radiusVDW":2.43,"boilingpoint":3273,"meltingpoint":1315,"periodTableBlock":"f","discoveryDate":"1945","period":"6","group":"7","electronicConfiguration":"Xe 4f5 6s2","family":"Rare_Earth","symbol":"Pm","name":"Promethium","elementColor":[0.64,1,0.78],"discoverers":["J. A. Marinsky","C. D. Coryell","L. E. Glendenin"]},{"id":"Sm","atomicNumber":62,"mass":150.36,"exactMass":151.9197324,"ionization":5.6437,"electronAffinity":0.5,"electronegativityPauling":1.17,"nameOrigin":"Named after the mineral Samarskit","radiusVDW":2.42,"boilingpoint":2067,"meltingpoint":1347,"periodTableBlock":"f","discoveryDate":"1879","period":"6","group":"8","electronicConfiguration":"Xe 4f6 6s2","family":"Rare_Earth","symbol":"Sm","name":"Samarium","elementColor":[0.56,1,0.78],"discoverers":["P.","Lecoq","de","Boisbaudran"]},{"id":"Eu","atomicNumber":63,"mass":151.964,"exactMass":152.9212303,"ionization":5.6704,"electronAffinity":0.5,"nameOrigin":"Named after Europe","radiusVDW":2.4,"boilingpoint":1800,"meltingpoint":1095,"periodTableBlock":"f","discoveryDate":"1901","period":"6","group":"8","electronicConfiguration":"Xe 4f7 6s2","family":"Rare_Earth","symbol":"Eu","name":"Europium","elementColor":[0.38,1,0.78],"discoverers":["E.","A.","Demarcay"]},{"id":"Gd","atomicNumber":64,"mass":157.25,"exactMass":157.9241039,"ionization":6.1498,"electronAffinity":0.5,"electronegativityPauling":1.2,"nameOrigin":"Named after the Finnish chemist Johan Gadolin","radiusVDW":2.38,"boilingpoint":3545,"meltingpoint":1585,"periodTableBlock":"f","discoveryDate":"1880","period":"6","group":"8","electronicConfiguration":"Xe 4f7 5d1 6s2","family":"Rare_Earth","symbol":"Gd","name":"Gadolinium","elementColor":[0.27,1,0.78],"discoverers":["Jean","de","Marignac"]},{"id":"Tb","atomicNumber":65,"mass":158.92535,"exactMass":158.9253468,"ionization":5.8638,"electronAffinity":0.5,"nameOrigin":"Named after the Swedish town of Ytterby","radiusVDW":2.37,"boilingpoint":3500,"meltingpoint":1629,"periodTableBlock":"f","discoveryDate":"1843","period":"6","group":"1","electronicConfiguration":"Xe 4f9 6s2","family":"Rare_Earth","symbol":"Tb","name":"Terbium","elementColor":[0.19,1,0.78],"discoverers":["K.","G.","Mosander"]},{"id":"Dy","atomicNumber":66,"mass":162.5,"exactMass":163.9291748,"ionization":5.9389,"electronAffinity":0.5,"electronegativityPauling":1.22,"nameOrigin":"Greek \'dysprositor\' for \'difficult to reach\'","radiusVDW":2.35,"boilingpoint":2840,"meltingpoint":1685,"periodTableBlock":"f","discoveryDate":"1886","period":"6","group":"2","electronicConfiguration":"Xe 4f10 6s2","family":"Rare_Earth","symbol":"Dy","name":"Dysprosium","elementColor":[0.12,1,0.78],"discoverers":["F.","E.","Lecoq","de","Boisbaudran"]},{"id":"Ho","atomicNumber":67,"mass":164.93032,"exactMass":164.9303221,"ionization":6.0215,"electronAffinity":0.5,"electronegativityPauling":1.23,"nameOrigin":"Latin \'holmia\' for the old name of Stockholm","radiusVDW":2.33,"boilingpoint":2968,"meltingpoint":1747,"periodTableBlock":"f","discoveryDate":"1878","period":"6","group":"3","electronicConfiguration":"Xe 4f11 6s2","family":"Rare_Earth","symbol":"Ho","name":"Holmium","elementColor":[0,1,0.61],"discoverers":["J. L. Soret","P.T. Cleve"]},{"id":"Er","atomicNumber":68,"mass":167.259,"exactMass":165.9302931,"ionization":6.1077,"electronAffinity":0.5,"electronegativityPauling":1.24,"nameOrigin":"Named ofter the Swedish town of Ytterby. Terbium and Ytterbium are also named after this town.","radiusVDW":2.32,"boilingpoint":3140,"meltingpoint":1802,"periodTableBlock":"f","discoveryDate":"1843","period":"6","group":"4","electronicConfiguration":"Xe 4f12 6s2","family":"Rare_Earth","symbol":"Er","name":"Erbium","elementColor":[0,0.9,0.46],"discoverers":["K.","G.","Mosander"]},{"id":"Tm","atomicNumber":69,"mass":168.93421,"exactMass":168.9342133,"ionization":6.1843,"electronAffinity":0.5,"electronegativityPauling":1.25,"nameOrigin":"Named after the old name of Scandinavia, \'Thule\'.","radiusVDW":2.3,"boilingpoint":2223,"meltingpoint":1818,"periodTableBlock":"f","discoveryDate":"1879","period":"6","group":"5","electronicConfiguration":"Xe 4f13 6s2","family":"Rare_Earth","symbol":"Tm","name":"Thulium","elementColor":[0,0.83,0.32],"discoverers":["P.","T.","Cleve"]},{"id":"Yb","atomicNumber":70,"mass":173.054,"exactMass":173.9388621,"ionization":6.2542,"electronAffinity":0.5,"nameOrigin":"Like Terbium and Gadolinium, this is named after the Swedish town of Ytterby.","radiusVDW":2.28,"boilingpoint":1469,"meltingpoint":1092,"periodTableBlock":"f","discoveryDate":"1878","period":"6","group":"6","electronicConfiguration":"Xe 4f14 6s2","family":"Rare_Earth","symbol":"Yb","name":"Ytterbium","elementColor":[0,0.75,0.22],"discoverers":["J.","Ch.","Marignac"]},{"id":"Lu","atomicNumber":71,"mass":174.9668,"exactMass":174.9407718,"ionization":5.4259,"electronAffinity":0.5,"electronegativityPauling":1.27,"nameOrigin":"Named after the Roman name \'Lutetia\' for Paris","radiusCovalent":1.6,"radiusVDW":2.27,"boilingpoint":3668,"meltingpoint":1936,"periodTableBlock":"f","discoveryDate":"1907","period":"6","group":"7","electronicConfiguration":"Xe 4f14 5d1 6s2","family":"Rare_Earth","symbol":"Lu","name":"Lutetium","elementColor":[0,0.67,0.14],"discoverers":["Carl F. Auer von Welsbach","G. Urbain"]},{"id":"Hf","atomicNumber":72,"mass":178.49,"exactMass":179.94655,"ionization":6.8251,"electronAffinity":0,"electronegativityPauling":1.3,"nameOrigin":"\'Hafnia\' is the old name of Kopenhagen (Denmark)","radiusCovalent":1.5,"radiusVDW":2.25,"boilingpoint":4875,"meltingpoint":2504,"periodTableBlock":"d","discoveryDate":"1923","period":"6","group":"4","electronicConfiguration":"Xe 4f14 5d2 6s2","family":"Transition","symbol":"Hf","name":"Hafnium","elementColor":[0.3,0.76,1],"discoveryCountry":["dk"],"discoverers":["D. Coster","G. Hevesy"]},{"id":"Ta","atomicNumber":73,"mass":180.94788,"exactMass":180.9479958,"ionization":7.5496,"electronAffinity":0.322,"electronegativityPauling":1.5,"nameOrigin":"Named after the Greek myth of Tantalos","radiusCovalent":1.38,"radiusVDW":2.2,"boilingpoint":5730,"meltingpoint":3293,"periodTableBlock":"d","discoveryDate":"1802","period":"6","group":"5","electronicConfiguration":"Xe 4f14 5d3 6s2","family":"Transition","symbol":"Ta","name":"Tantalum","elementColor":[0.3,0.65,1],"discoveryCountry":["se"],"discoverers":["A.","Ekeberg"]},{"id":"W","atomicNumber":74,"mass":183.84,"exactMass":183.9509312,"ionization":7.864,"electronAffinity":0.815,"electronegativityPauling":2.36,"nameOrigin":"\'tung sten\' means \'heavy stone\' in Swedish. The old name (and thus the symbol \'W\') was Wolfram, named after a mineral.","radiusCovalent":1.46,"radiusVDW":2.1,"boilingpoint":5825,"meltingpoint":3695,"periodTableBlock":"d","discoveryDate":"1783","period":"6","group":"6","electronicConfiguration":"Xe 4f14 5d4 6s2","family":"Transition","symbol":"W","name":"Tungsten","elementColor":[0.13,0.58,0.84],"discoveryCountry":["es"],"discoverers":["C.","W.","Scheele"]},{"id":"Re","atomicNumber":75,"mass":186.207,"exactMass":186.9557531,"ionization":7.8335,"electronAffinity":0.15,"electronegativityPauling":1.9,"nameOrigin":"Named after the German river Rhine (latin \'Rhenium\').","radiusCovalent":1.59,"radiusVDW":2.05,"boilingpoint":5870,"meltingpoint":3455,"periodTableBlock":"d","discoveryDate":"1925","period":"6","group":"7","electronicConfiguration":"Xe 4f14 5d5 6s2","family":"Transition","symbol":"Re","name":"Rhenium","elementColor":[0.15,0.49,0.67],"discoveryCountry":["de"],"discoverers":["Walter Noddack","Ida Tacke-Noddack","Otto Berg"]},{"id":"Os","atomicNumber":76,"mass":190.23,"exactMass":191.9614807,"ionization":8.4382,"electronAffinity":1.0778,"electronegativityPauling":2.2,"nameOrigin":"Greek for \'smell\'. Its oxides smell strongly like radishes.","radiusCovalent":1.28,"radiusVDW":2,"boilingpoint":5300,"meltingpoint":3300,"periodTableBlock":"d","discoveryDate":"1804","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d6 6s2","family":"Transition","symbol":"Os","name":"Osmium","elementColor":[0.15,0.4,0.59],"discoveryCountry":["uk"],"discoverers":["S.","Tennant"]},{"id":"Ir","atomicNumber":77,"mass":192.217,"exactMass":192.9629264,"ionization":8.967,"electronAffinity":1.56436,"electronegativityPauling":2.2,"nameOrigin":"Greek \'iris\' for \'rainbow\'","radiusCovalent":1.37,"radiusVDW":2,"boilingpoint":4700,"meltingpoint":2720,"periodTableBlock":"d","discoveryDate":"1804","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d7 6s2","family":"Transition","symbol":"Ir","name":"Iridium","elementColor":[0.09,0.33,0.53],"discoveryCountry":["uk"],"discoverers":["S.","Tennant"]},{"id":"Pt","atomicNumber":78,"mass":195.084,"exactMass":194.9647911,"ionization":8.9588,"electronAffinity":2.1251,"electronegativityPauling":2.28,"nameOrigin":"Spanish \'platina\' means \'small silver\'","radiusCovalent":1.28,"radiusVDW":2.05,"boilingpoint":4100,"meltingpoint":2042.1,"periodTableBlock":"d","discoveryDate":"1735","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d9 6s1","family":"Transition","symbol":"Pt","name":"Platinum","elementColor":[0.96,0.93,0.82],"discoveryCountry":["uk"],"discoverers":["A.","de","Ulloa"]},{"id":"Au","atomicNumber":79,"mass":196.966569,"exactMass":196.9665687,"ionization":9.2255,"electronAffinity":2.30861,"electronegativityPauling":2.54,"nameOrigin":"Latin \'aurum\'. Named after Aurora, the goddess of sunrise","radiusCovalent":1.44,"radiusVDW":2.1,"boilingpoint":3130,"meltingpoint":1337.58,"periodTableBlock":"d","discoveryDate":"0","period":"6","group":"1","electronicConfiguration":"Xe 4f14 5d10 6s1","family":"Transition","symbol":"Au","name":"Gold","elementColor":[0.8,0.82,0.12],"discoveryCountry":["ancient"]},{"id":"Hg","atomicNumber":80,"mass":200.59,"exactMass":201.970643,"ionization":10.4375,"electronAffinity":0,"electronegativityPauling":2,"nameOrigin":"Graeco-Latin \'hydrargyrum\' for \'liquid silver\'","radiusCovalent":1.49,"radiusVDW":2.05,"boilingpoint":629.88,"meltingpoint":234.31,"periodTableBlock":"d","discoveryDate":"0","period":"6","group":"2","electronicConfiguration":"Xe 4f14 5d10 6s2","family":"Transition","symbol":"Hg","name":"Mercury","elementColor":[0.71,0.71,0.76],"discoveryCountry":["ancient"]},{"id":"Tl","atomicNumber":81,"mass":204.3833,"exactMass":204.9744275,"ionization":6.1082,"electronAffinity":0.377,"electronegativityPauling":1.62,"nameOrigin":"Greek \'tallos\' for \'young twig\'","radiusCovalent":1.48,"radiusVDW":2.2,"boilingpoint":1746,"meltingpoint":577,"periodTableBlock":"p","discoveryDate":"1861","period":"6","group":"3","electronicConfiguration":"Xe 4f14 5d10 6s2 6p1","family":"Other_Metal","symbol":"Tl","name":"Thallium","elementColor":[0.65,0.33,0.3],"discoveryCountry":["uk"],"discoverers":["W.","Crookes"]},{"id":"Pb","atomicNumber":82,"mass":207.2,"exactMass":207.9766521,"ionization":7.4167,"electronAffinity":0.364,"electronegativityPauling":2.33,"nameOrigin":"Latin \'plumbum\' for Lead","radiusCovalent":1.47,"radiusVDW":2.3,"boilingpoint":2023,"meltingpoint":600.65,"periodTableBlock":"p","discoveryDate":"0","period":"6","group":"4","electronicConfiguration":"Xe 4f14 5d10 6s2 6p2","family":"Other_Metal","symbol":"Pb","name":"Lead","elementColor":[0.34,0.35,0.38],"discoveryCountry":["ancient"]},{"id":"Bi","atomicNumber":83,"mass":208.9804,"exactMass":208.9803987,"ionization":7.2855,"electronAffinity":0.942363,"electronegativityPauling":2.02,"nameOrigin":"The old name of Bismuth is \'Wismut\', which stood for \'white mass\'.","radiusCovalent":1.46,"radiusVDW":2.3,"boilingpoint":1837,"meltingpoint":544.59,"periodTableBlock":"p","discoveryDate":"0","period":"6","group":"5","electronicConfiguration":"Xe 4f14 5d10 6s2 6p3","family":"Other_Metal","symbol":"Bi","name":"Bismuth","elementColor":[0.62,0.31,0.71],"discoveryCountry":["ancient"]},{"id":"Po","atomicNumber":84,"mass":209,"exactMass":208.9824304,"ionization":8.414,"electronAffinity":1.9,"electronegativityPauling":2,"nameOrigin":"Named after Poland to honor Marie Curie","radiusVDW":2,"meltingpoint":527,"periodTableBlock":"p","discoveryDate":"1898","period":"6","group":"6","electronicConfiguration":"Xe 4f14 5d10 6s2 6p4","family":"Metalloids","symbol":"Po","name":"Polonium","elementColor":[0.67,0.36,0],"discoveryCountry":["fr"],"discoverers":["M. Sklodowska-Curie","P. Curie"]},{"id":"At","atomicNumber":85,"mass":210,"exactMass":209.987148,"ionization":0,"electronAffinity":2.8,"electronegativityPauling":2.2,"nameOrigin":"Greek \'astator\' for \'changing\'","radiusVDW":2,"boilingpoint":610,"meltingpoint":575,"periodTableBlock":"p","discoveryDate":"1940","period":"6","group":"7","electronicConfiguration":"Xe 4f14 5d10 6s2 6p5","family":"Halogen","symbol":"At","name":"Astatine","elementColor":[0.46,0.31,0.27],"discoveryCountry":["us"],"discoverers":["D. R. Corson","K. R. McKenzie","E. Segre"]},{"id":"Rn","atomicNumber":86,"mass":222,"exactMass":222.0175777,"ionization":10.7485,"electronAffinity":0,"nameOrigin":"Named after Radium. It ends with \'on\' to make it clear that it is a noble gas.","radiusCovalent":1.45,"radiusVDW":2,"boilingpoint":211.4,"meltingpoint":202,"periodTableBlock":"p","discoveryDate":"1898","period":"6","group":"8","electronicConfiguration":"Xe 4f14 5d10 6s2 6p6","family":"Noblegas","symbol":"Rn","name":"Radon","elementColor":[0.26,0.51,0.59],"discoveryCountry":["de"],"discoverers":["E.","Dorn"]},{"id":"Fr","atomicNumber":87,"mass":223,"exactMass":223.0197359,"ionization":4.0727,"electronegativityPauling":0.7,"nameOrigin":"Named after France to honor Marguerite Perey","radiusVDW":2,"boilingpoint":950,"meltingpoint":300,"periodTableBlock":"s","discoveryDate":"1939","period":"7","group":"1","electronicConfiguration":"Rn 7s1","family":"Alkali_Earth","symbol":"Fr","name":"Francium","elementColor":[0.26,0,0.4],"discoveryCountry":["fr"],"discoverers":["M.","Perey"]},{"id":"Ra","atomicNumber":88,"mass":226,"exactMass":226.0254098,"ionization":5.2784,"electronegativityPauling":0.9,"nameOrigin":"Latin \'radius\' for \'beam\', as it is radioactive","radiusVDW":2,"boilingpoint":1413,"meltingpoint":973,"periodTableBlock":"s","discoveryDate":"1898","period":"7","group":"2","electronicConfiguration":"Rn 7s2","family":"Alkaline_Earth","symbol":"Ra","name":"Radium","elementColor":[0,0.49,0],"discoveryCountry":["fr"],"discoverers":["M. Sklodowska-Curie","P. Curie"]},{"id":"Ac","atomicNumber":89,"mass":227,"exactMass":227.0277521,"ionization":5.17,"electronegativityPauling":1.1,"nameOrigin":"Greek \'aktis\' for \'beam\' - actinium is radioactive","radiusVDW":2,"boilingpoint":3470,"meltingpoint":1324,"periodTableBlock":"f","discoveryDate":"1899","period":"7","group":"3","electronicConfiguration":"Rn 6d1 7s2","family":"Other_Metal","symbol":"Ac","name":"Actinium","elementColor":[0.44,0.67,0.98],"discoveryCountry":["fr"],"discoverers":["A.","L.","Debierne"]},{"id":"Th","atomicNumber":90,"mass":232.03806,"exactMass":232.0380553,"ionization":6.3067,"electronegativityPauling":1.3,"nameOrigin":"Named after the German god of thunder: Thor","radiusVDW":2.4,"boilingpoint":5060,"meltingpoint":2028,"periodTableBlock":"f","discoveryDate":"1828","period":"7","group":"4","electronicConfiguration":"Rn 6d2 7s2","family":"Other_Metal","symbol":"Th","name":"Thorium","elementColor":[0,0.73,1],"discoverers":["J.","J.","Berzelius"]},{"id":"Pa","atomicNumber":91,"mass":231.03588,"exactMass":231.035884,"ionization":5.89,"electronegativityPauling":1.5,"nameOrigin":"Greek \'protos\' for \'ancester\'. Protactinium is before Actinium in the periodic table.","radiusVDW":2,"boilingpoint":4300,"meltingpoint":1845,"periodTableBlock":"f","discoveryDate":"1917","period":"7","group":"5","electronicConfiguration":"Rn 5f2 6d1 7s2","family":"Other_Metal","symbol":"Pa","name":"Protactinium","elementColor":[0,0.63,1],"discoverers":["O. Hahn","L. Meitern","W. Wollaston"]},{"id":"U","atomicNumber":92,"mass":238.02891,"exactMass":238.0507882,"ionization":6.1941,"electronegativityPauling":1.38,"nameOrigin":"Greek \'ouranos\' for \'heaven\'. Named after the planet Uranus.","radiusVDW":2.3,"boilingpoint":4407,"meltingpoint":1408,"periodTableBlock":"f","discoveryDate":"1789","period":"7","group":"6","electronicConfiguration":"Rn 5f3 6d1 7s2","family":"Other_Metal","symbol":"U","name":"Uranium","elementColor":[0,0.56,1],"discoverers":["M.","M.","Klaproth"]},{"id":"Np","atomicNumber":93,"mass":237,"exactMass":237.0481734,"ionization":6.2657,"electronegativityPauling":1.36,"nameOrigin":"Named after the planet Neptune.","radiusVDW":2,"boilingpoint":4175,"meltingpoint":912,"periodTableBlock":"f","discoveryDate":"1940","period":"7","group":"7","electronicConfiguration":"Rn 5f4 6d1 7s2","family":"Other_Metal","symbol":"Np","name":"Neptunium","elementColor":[0,0.5,1],"discoverers":["E. M. McMillan","P. Aberson"]},{"id":"Pu","atomicNumber":94,"mass":244,"exactMass":244.064204,"ionization":6.026,"electronegativityPauling":1.28,"nameOrigin":"Named after the planet Pluto.","radiusVDW":2,"boilingpoint":3505,"meltingpoint":913,"periodTableBlock":"f","discoveryDate":"1940","period":"7","group":"8","electronicConfiguration":"Rn 5f6 7s2","family":"Other_Metal","symbol":"Pu","name":"Plutonium","elementColor":[0,0.42,1],"discoverers":["Glenn T. Seaborg","E. M. McMillan","J. W. Kennedy","A.C. Wahl"]},{"id":"Am","atomicNumber":95,"mass":243,"exactMass":243.0613811,"ionization":5.9738,"electronegativityPauling":1.3,"nameOrigin":"Named after America.","radiusVDW":2,"boilingpoint":2880,"meltingpoint":1449,"periodTableBlock":"f","discoveryDate":"1945","period":"7","group":"8","electronicConfiguration":"Rn 5f7 7s2","family":"Other_Metal","symbol":"Am","name":"Americium","elementColor":[0.33,0.36,0.95],"discoverers":["Glenn T. Seaborg","L. O. Morgan","R. A. James","A. Ghiors"]},{"id":"Cm","atomicNumber":96,"mass":247,"exactMass":247.070354,"ionization":5.9914,"electronegativityPauling":1.3,"nameOrigin":"Named after Marie Curie.","radiusVDW":2,"boilingpoint":3383,"meltingpoint":1620,"periodTableBlock":"f","discoveryDate":"1944","period":"7","group":"8","electronicConfiguration":"Rn 5f7 6d1 7s2","family":"Other_Metal","symbol":"Cm","name":"Curium","elementColor":[0.47,0.36,0.89],"discoverers":["Glenn T. Seaborg","R. A. James","A. Ghiors"]},{"id":"Bk","atomicNumber":97,"mass":247,"exactMass":247.070307,"ionization":6.1979,"electronegativityPauling":1.3,"nameOrigin":"Named after the town Berkeley where it was discovered.","radiusVDW":2,"boilingpoint":983,"meltingpoint":1258,"periodTableBlock":"f","discoveryDate":"1949","period":"7","group":"1","electronicConfiguration":"Rn 5f9 7s2","family":"Other_Metal","symbol":"Bk","name":"Berkelium","elementColor":[0.54,0.31,0.89],"discoverers":["Glenn T. Seaborg","A. Ghiors","S. G. Thompson"]},{"id":"Cf","atomicNumber":98,"mass":251,"exactMass":251.079587,"ionization":6.2817,"electronegativityPauling":1.3,"nameOrigin":"Named after the US-State of California.","radiusVDW":2,"boilingpoint":1173,"meltingpoint":1172,"periodTableBlock":"f","discoveryDate":"1950","period":"7","group":"2","electronicConfiguration":"Rn 5f10 7s2","family":"Other_Metal","symbol":"Cf","name":"Californium","elementColor":[0.63,0.21,0.83],"discoverers":["Glenn T. Seaborg","A. Ghiors","S. G. Thompson"]},{"id":"Es","atomicNumber":99,"mass":252,"exactMass":252.08298,"ionization":6.42,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist Albert Einstein.","radiusVDW":2,"meltingpoint":1130,"periodTableBlock":"f","discoveryDate":"1952","period":"7","group":"3","electronicConfiguration":"Rn 5f11 7s2","family":"Other_Metal","symbol":"Es","name":"Einsteinium","elementColor":[0.7,0.12,0.83],"discoverers":["Glenn T. Seaborg","et al."]},{"id":"Fm","atomicNumber":100,"mass":257,"exactMass":257.095105,"ionization":6.5,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist Enrico Fermi.","radiusVDW":2,"meltingpoint":1800,"periodTableBlock":"f","discoveryDate":"1953","period":"7","group":"4","electronicConfiguration":"Rn 5f12 7s2","family":"Other_Metal","symbol":"Fm","name":"Fermium","elementColor":[0.7,0.12,0.73],"discoverers":["Glenn T. Seaborg","et al."]},{"id":"Md","atomicNumber":101,"mass":258,"exactMass":258.098431,"ionization":6.58,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist D.I. Mendeleev.","radiusVDW":2,"meltingpoint":1100,"periodTableBlock":"f","discoveryDate":"1955","period":"7","group":"5","electronicConfiguration":"Rn 5f13 7s2","family":"Other_Metal","symbol":"Md","name":"Mendelevium","elementColor":[0.7,0.05,0.65],"discoverers":["Glenn T. Seaborg","Albert Ghiorso","Bernard Harvey","Gregory Choppin","Stanley G. Thompson"]},{"id":"No","atomicNumber":102,"mass":259,"exactMass":259.10103,"ionization":6.65,"electronegativityPauling":1.3,"nameOrigin":"Named after the scientist Alfred Nobel.","radiusVDW":2,"meltingpoint":1100,"periodTableBlock":"f","discoveryDate":"1958","period":"7","group":"6","electronicConfiguration":"Rn 5f14 7s2","family":"Other_Metal","symbol":"No","name":"Nobelium","elementColor":[0.74,0.05,0.53]},{"id":"Lr","atomicNumber":103,"mass":262,"exactMass":262.10963,"ionization":4.9,"nameOrigin":"Named after the scientist Ernest Orlando Lawrence.","radiusVDW":2,"meltingpoint":1900,"periodTableBlock":"f","discoveryDate":"1961","period":"7","group":"7","electronicConfiguration":"Rn 5f14 7s2 7p1","family":"Other_Metal","symbol":"Lr","name":"Lawrencium","elementColor":[0.78,0,0.4],"discoverers":["Albert Ghiorso","Torbjorn Sikkeland","Almon Larsh","Robert M. Latimer"]},{"id":"Rf","atomicNumber":104,"mass":267,"exactMass":261.10877,"ionization":6,"nameOrigin":"Named after the scientist Ernest Rutherford","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1964","period":"7","group":"4","electronicConfiguration":"Rn 5f14 6d2 7s2","family":"Transition","symbol":"Rf","name":"Rutherfordium","elementColor":[0.8,0,0.35],"discoveryCountry":["ru","us"]},{"id":"Db","atomicNumber":105,"mass":268,"exactMass":262.11408,"nameOrigin":"Named after the science-town Dubna in Russia","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1967","period":"7","group":"5","electronicConfiguration":"Rn 5f14 6d3 7s2","family":"Transition","symbol":"Db","name":"Dubnium","elementColor":[0.82,0,0.31],"discoveryCountry":["ru","us"]},{"id":"Sg","atomicNumber":106,"mass":271,"exactMass":263.11832,"nameOrigin":"Named after the scientist G. Theodore Seaborg.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1974","period":"7","group":"6","family":"Transition","symbol":"Sg","name":"Seaborgium","elementColor":[0.85,0,0.27],"discoveryCountry":["ru","us"],"discoverers":["Albert Ghiorso","et al."]},{"id":"Bh","atomicNumber":107,"mass":272,"exactMass":264.1246,"nameOrigin":"Named after the scientist Niels Bohr.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1981","period":"7","group":"7","family":"Transition","symbol":"Bh","name":"Bohrium","elementColor":[0.88,0,0.22],"discoveryCountry":["ru"],"discoverers":["Peter Armbruster","Gottfried Münzenber","et al."]},{"id":"Hs","atomicNumber":108,"mass":270,"exactMass":265.13009,"nameOrigin":"Latin \'hassia\' for the German county Hessen. In Hessen a lot elements have been discovered.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1984","period":"7","group":"8","family":"Transition","symbol":"Hs","name":"Hassium","elementColor":[0.9,0,0.18],"discoveryCountry":["de"],"discoverers":["Peter Armbruster","Gottfried Münzenber","et al."]},{"id":"Mt","atomicNumber":109,"mass":276,"exactMass":268.13873,"nameOrigin":"Named after the scientist Lise Meitner.","radiusVDW":2,"periodTableBlock":"d","discoveryDate":"1982","period":"7","group":"8","family":"Transition","symbol":"Mt","name":"Meitnerium","elementColor":[0.91,0,0.15],"discoveryCountry":["de"],"discoverers":["Peter Armbruster","Gottfried Münzenber","et al."]},{"id":"Ds","atomicNumber":110,"mass":281,"exactMass":271.14606,"nameOrigin":"Named after the German city Darmstadt where many elements have been discovered.","periodTableBlock":"d","discoveryDate":"1994","period":"7","group":"8","family":"Transition","symbol":"Ds","name":"Darmstadtium","elementColor":[0.92,0,0.14],"discoveryCountry":["de"],"discoverers":["S. Hofmann","V. Ninov","F. P. Hessberger","P. Armbruster","H. Folger","G. Münzenberg","H. J. Schött","et al."]},{"id":"Rg","atomicNumber":111,"mass":280,"exactMass":272.15362,"nameOrigin":"Named after Wilhelm Conrad Röntgen.","periodTableBlock":"d","discoveryDate":"1994","period":"7","group":"1","family":"Transition","symbol":"Rg","name":"Roentgenium","elementColor":[0.93,0,0.13],"discoveryCountry":["de"],"discoverers":["S. Hofmann","V. Ninov","F. P. Hessberger","P. Armbruster","H. Folger","G. Münzenberg","et al."]},{"id":"Cn","atomicNumber":112,"mass":285,"exactMass":285.17411,"nameOrigin":"Historically known as eka-mercury. Ununbium is a temporary IUPAC systematic element name.","periodTableBlock":"d","discoveryDate":"1996","period":"7","family":"Transition","symbol":"Cn","name":"Copernicium","elementColor":[0.94,0,0.12],"discoveryCountry":["de"],"discoverers":["First","created","at","the","Gesellschaft","für","Schwerionenforschung"]},{"id":"Uut","atomicNumber":113,"mass":284,"exactMass":284.17808,"nameOrigin":"Historically known as eka-thallium. Ununtrium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2003","period":"7","family":"Other_Metal","symbol":"Uut","name":"Ununtrium","elementColor":[0.95,0,0.11],"discoveryCountry":["ru","us"],"discoverers":["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]},{"id":"Uuq","atomicNumber":114,"mass":289,"exactMass":289.18728,"nameOrigin":"Historically known as eka-lead. Ununquadium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"1998","period":"7","family":"Other_Metal","symbol":"Uuq","name":"Ununquadium","elementColor":[0.96,0,0.1],"discoveryCountry":["ru","us"],"discoverers":["Joint","Institute","for","Nuclear","Research"]},{"id":"Uup","atomicNumber":115,"mass":288,"exactMass":288.19249,"nameOrigin":"Historically known as eka-bismuth. Ununpentium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2004","period":"7","family":"Other_Metal","symbol":"Uup","name":"Ununpentium","elementColor":[0.97,0,0.09],"discoveryCountry":["ru","us"],"discoverers":["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]},{"id":"Uuh","atomicNumber":116,"mass":293,"exactMass":292.19979,"nameOrigin":"Historically known as eka-polonium. Ununhexium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2000","period":"7","family":"Other_Metal","symbol":"Uuh","name":"Ununhexium","elementColor":[0.98,0,0.08],"discoveryCountry":["ru"],"discoverers":["Joint","Institute","for","Nuclear","Research"]},{"id":"Uus","atomicNumber":117,"nameOrigin":"Temporary symbol and name. Can also be referred to as eka-astatine.","periodTableBlock":"p","discoveryDate":"0","period":"7","family":"Halogen","symbol":"Uus","name":"Ununseptium","elementColor":[0.99,0,0.07]},{"id":"Uuo","atomicNumber":118,"mass":294,"nameOrigin":"Historically known as eka-radon, eka-emanation before 1960. Ununoctium is a temporary IUPAC systematic element name.","periodTableBlock":"p","discoveryDate":"2002","period":"7","family":"Noblegas","symbol":"Uuo","name":"Ununoctium","elementColor":[1,0,0.06],"discoveryCountry":["ru","us"],"discoverers":["Russian scientists at Dubna (JINR)","American scientists at the Lawrence Livermore National Laboratory."]}]}'),$d=Ae.vtkErrorMacro,ep=Ae.vtkDebugMacro,tp={};function np(e,t){var n=[],r=[],i=[],o=[];function a(e,a,s){var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.bondRadius;r.push(s),r.push(u),i.push(a[0]),i.push(a[1]),i.push(a[2]),n.push(e[0]),n.push(e[1]),n.push(e[2]);for(var c=0;c0&&b.push(x[P]*t.atomicRadiusScaleFactor),C.length>0&&(A=3*P,w.push(255*C[A]),w.push(255*C[A+1]),w.push(255*C[A+2])));if(!g){g=[],v=[];for(var _=0;_T||Math.abs(I[1])>T||Math.abs(I[2])>T)){var k=T*T,M=I[0]*I[0]+I[1]*I[1]+I[2]*I[2];M.1&&(g.push(_),g.push(O),v.push(1))}}f=g.length/2}for(var N=0;N2*U*.6&&(t.bondRadius*=2*U*.6/z,G=(2+t.deltaBondFactor)*t.bondRadius);for(var W=v[N]%2,H=W;H0){var J=Math.sqrt(j)/2;a(Z=[h[B]-J*X[0]/2+K*q[0],h[B+1]-J*X[1]/2+K*q[1],h[B+2]-J*X[2]/2+K*q[2]],X,J,C.slice(B,B+3)),a(Z=[h[L]+J*X[0]/2+K*q[0],h[L+1]+J*X[1]/2+K*q[1],h[L+2]+J*X[2]/2+K*q[2]],X,J,C.slice(L,L+3))}else{var Q=Math.sqrt(j);Z=[h[B]-V[0]/2+K*q[0],h[B+1]-V[1]/2+K*q[1],h[B+2]-V[2]/2+K*q[2]],C.length>0?a(Z,X,Q,C.slice(L,L+3)):a(Z,X,Q)}}}}if(c.getPoints().setData(y,3),x){var $=Jn.newInstance({numberOfComponents:1,values:b,name:e.getSphereScaleArrayName()});c.getPointData().addArray($)}if(C.length>0){var ee=Jn.newInstance({numberOfComponents:3,values:Uint8Array.from(w),name:"colors"});c.getPointData().setScalars(ee)}d.getPoints().setData(n,3);var te=Jn.newInstance({numberOfComponents:2,values:r,name:"stickScales"});d.getPointData().addArray(te);var ne=Jn.newInstance({numberOfComponents:3,values:i,name:"orientation"});if(d.getPointData().addArray(ne),C.length>0){var re=Jn.newInstance({numberOfComponents:3,values:Uint8Array.from(o),name:"colors"});d.getPointData().setScalars(re)}return l[0]=c,l[1]=d,1}}Qd.H.forEach((function(e){tp[e.atomicNumber]=e}));var rp={sphereScaleArrayName:"radius",tolerance:.45,atomicRadiusScaleFactor:.3,bondRadius:.075,deltaBondFactor:.6,radiusType:"radiusVDW",hideElements:""};function ip(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rp,n),Ae.obj(e,t),Ae.setGet(e,t,["atomicRadiusScaleFactor","bondRadius","deltaBondFactor","hideElements","radiusType","sphereScaleArrayName","tolerance"]),Ae.algo(e,t,1,2),np(e,t)}var op={newInstance:Ae.newInstance(ip,"vtkMoleculeToRepresentation"),extend:ip},ap=Ae.vtkErrorMacro,sp=[0,2,4,1,2,4,0,3,4,1,3,4,0,2,5,1,2,5,0,3,5,1,3,5],lp=[2,0,1,2,2,3,2,4,5,2,6,7,2,0,2,2,1,3,2,4,6,2,5,7,2,0,4,2,1,5,2,2,6,2,3,7];function up(e,t){t.classHierarchy.push("vtkOutlineFilter"),e.requestData=function(e,t){var n=e[0];if(n){var r=n.getBounds(),i=rc.newInstance();i.getPoints().setData(Float32Array.from(sp.map((function(e){return r[e]}))),3),i.getLines().setData(Uint16Array.from(lp)),t[0]=i}else ap("Invalid or missing input")}}var cp={};function dp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cp,n),Ae.obj(e,t),Ae.algo(e,t,1,1),up(e,t)}var pp={newInstance:Ae.newInstance(dp,"vtkOutlineFilter"),extend:dp,BOUNDS_MAP:sp,LINE_ARRAY:lp},fp=n(146),hp=n.n(fp);function mp(e,t){t.classHierarchy.push("vtkPriorityQueue"),e.push=function(e,n){var r=t.elements.findIndex((function(t){return t.priority>e}));t.elements.splice(r,0,{priority:e,element:n})},e.pop=function(){return t.elements.length>0?t.elements.shift().element:null},e.deleteById=function(e){t.elements=t.elements.filter((function(t){return t.element.id!==e}))},e.length=function(){return t.elements.length}}var gp={elements:[]};function vp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gp,n),Ae.obj(e,t),mp(e,t)}var yp={newInstance:Ae.newInstance(vp,"vtkPriorityQueue"),extend:vp},bp=1e-6;function wp(e,t){function n(e){var n=[0,0,0],r=[0,0,0],i=[0,0,0],o=[0,0,0];at(e.point,e.previous.point,n),at(e.next.point,e.point,r),at(e.previous.point,e.next.point,i),ft(n,r,o);var a=dt(o,t.normal);if(a<=0)return-1;var s=ht(n)+ht(r)+ht(i);return s*s/a}function r(e){if(t.pointCount<=3)return!0;var n=e.previous,r=e.next,i=[0,0,0];at(r.point,n.point,i);var o=[0,0,0];if(ft(i,t.normal,o),mt(o),0===ht(o))return!1;for(var a=Pr.evaluate(o,n.point,r.next.point),s=a>bp?1:a<-1e-6?-1:0,l=s<0?1:0,u=r.next.next;u.id!==n.id;u=u.next){var c=u.previous,d=(a=Pr.evaluate(o,n.point,u.point))>bp?1:a<-1e-6?-1:0;if(d!==s){if(l||(l=d<=0?1:0),mu.intersection(n.point,r.point,u.point,c.point,[0],[0])===iu.YES_INTERSECTION)return!1;s=d}}return 1===l}function i(e,r){t.pointCount-=1;var i=e.previous,o=e.next;t.tris=t.tris.concat(e.point),t.tris=t.tris.concat(o.point),t.tris=t.tris.concat(i.point),i.next=o,o.previous=i,r.deleteById(i.id),r.deleteById(o.id);var a=n(i);a>0&&r.push(a,i);var s=n(o);s>0&&r.push(s,o),e.id===t.firstPoint.id&&(t.firstPoint=o)}function o(){!function(){var e=[0,0,0],n=[0,0,0];t.normal=[0,0,0];for(var r=w(t.firstPoint.point),i=t.firstPoint,o=0;o0&&e.push(s,o),o=o.next}for(;t.pointCount>2&&e.length()>0;)if(t.pointCount===e.length()){i(e.pop(),e)}else{var l=e.pop();r(l)&&i(l,e)}return t.pointCount<=2}t.classHierarchy.push("vtkPolygon"),e.triangulate=function(){return t.firstPoint?o():null},e.setPoints=function(e){t.pointCount=e.length,t.firstPoint={id:0,point:e[0],next:null,previous:null};for(var n=t.firstPoint,r=1;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xp,n),Ae.obj(e,t),wp(e,t)}var Cp={newInstance:Ae.newInstance(Sp,"vtkPolygon"),extend:Sp},Ap=n(477),Pp=n.n(Ap);function _p(){return Pp()('/*! For license information please see PaintFilter.worker.worker.js.LICENSE.txt */\n!function(){"use strict";var t={666:function(t,n,e){var r=function(){function t(t,n){for(var e=0;e1?n-1:0),r=1;r1?r-1:0),a=1;a3&&void 0!==arguments[3]?arguments[3]:[];y([0,t,n,e],r)},M=function(t,n,e){if(!n)throw new Error("eventName is required");if("string"!=typeof n)throw new Error("eventName should be string");y([1,t,n,e])};return self.addEventListener("message",(function(t){var n=t.data;Array.isArray(n)?m.apply(void 0,a(n)):n&&n.eventName&&d.emitLocally.apply(d,[n.eventName].concat(a(n.args)))})),d},t.exports.TransferableResponse=c},197:function(t){var n=function(){function t(t,n){for(var e=0;e1?n-1:0),r=1;rMath.round(t)));let i=-1;null!=l.slicingMode&&l.slicingMode!==r.NONE&&(i=l.slicingMode%3);const a=l.dimensions[0],s=l.dimensions[0]*l.dimensions[1];let[f,u,c]=o,[h,p,y]=o;2!==i&&(c=Math.round(Math.max(o[2]-e[2],0)),y=Math.round(Math.min(o[2]+e[2],l.dimensions[2]-1)));for(let t=c;t<=y;t++){let n=0;2!==i&&(n=(o[2]-t)/e[2]);const r=n*n;if(r<=1){const n=e[1]*Math.sqrt(1-r);1!==i&&(u=Math.round(Math.max(o[1]-n,0)),p=Math.round(Math.min(o[1]+n,l.dimensions[1]-1)));for(let n=u;n<=p;n++){let u=0;1!==i&&(u=(o[1]-n)/e[1]);const c=u*u;if(c+r<=1){if(0!==i){const t=e[0]*Math.sqrt(1-c-r);f=Math.round(Math.max(o[0]-t,0)),h=Math.round(Math.min(o[0]+t,l.dimensions[0]-1))}if(f<=h){const e=n*a+t*s;l.buffer.fill(1,e+f,e+h+1)}}}}}}n()().operation("start",(({bufferType:t,dimensions:n,slicingMode:e})=>{if(!l.buffer){const r=n[0]*n[1]*n[2];l.buffer=new self[t](r),l.dimensions=n,l.prevPoint=null,l.slicingMode=e}})).operation("paint",(function({point:t,radius:n}){l.prevPoint||(l.prevPoint=t);const e=[t[0]-l.prevPoint[0],t[1]-l.prevPoint[1],t[2]-l.prevPoint[2]],r=[1,1,1];for(let t=0;t<3;t++)e[t]<0&&(e[t]=-e[t],r[t]=-1);const o=Math.max(...e),i=[o,o,o],a=[...l.prevPoint];for(let t=0;t<=o;t++){c({center:a,scale3:n});for(let t=0;t<3;t++)i[t]-=e[t],i[t]<=0&&(i[t]+=o,a[t]+=r[t])}l.prevPoint=t})).operation("paintRectangle",(function({point1:t,point2:n}){const[e,r,o]=t,[i,a,s]=n,f=Math.max(Math.min(e,i),0),u=Math.min(Math.max(e,i),l.dimensions[0]-1);if(f<=u){const t=Math.max(Math.min(r,a),0),n=Math.min(Math.max(r,a),l.dimensions[1]-1),e=Math.max(Math.min(o,s),0),i=Math.min(Math.max(o,s),l.dimensions[2]-1),c=l.dimensions[0],h=l.dimensions[0]*l.dimensions[1];for(let r=e;r<=i;r++)for(let e=t;e<=n;e++){const t=e*c+r*h;l.buffer.fill(1,t+f,t+u+1)}}})).operation("paintEllipse",c).operation("paintTriangles",(function({triangleList:t}){const n=Math.floor(t.length/9);for(let e=0;e=0&&e[0]=0&&e[1]=0&&e[2]{const t=new(n().TransferableResponse)(l.buffer.buffer,[l.buffer.buffer]);return l.buffer=null,t}))}()}();\n',"Worker",void 0,void 0)}var Op=Ae.vtkErrorMacro;function Tp(e,t){t.classHierarchy.push("vtkPaintFilter");var n=null,r=null,i={};function o(){i.index=-1,i.snapshots=[],i.labels=[]}function a(e,t){var n=i.index+1,r=i.snapshots.length-i.index;i.snapshots.splice(n,r),i.labels.splice(n,r),i.snapshots.push(e),i.labels.push(t),i.index++}e.startStroke=function(){t.labelMap&&(r||(n=new _p,r=new(hp())(n)),r.exec("start",{bufferType:"Uint8Array",dimensions:t.labelMap.getDimensions(),slicingMode:t.slicingMode}))},e.endStroke=function(){var t;return r&&(t=r.exec("end")).then((function(t){e.applyBinaryMask(t),n.terminate(),n=null,r=null})),t},e.applyBinaryMask=function(n){for(var r=t.labelMap.getPointData().getScalars(),i=r.getData(),o=new Uint8Array(n),s=0,l=0;l-1},e.paintPolygon=function(e){if(r&&e.length>0){for(var n=Cp.newInstance(),i=[],o=0;o-1){for(var n=t.labelMap.getPointData().getScalars(),r=n.getData(),o=i.snapshots[i.index],a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dp,n),Ae.obj(e,t),Ae.algo(e,t,0,1),Ae.setGet(e,t,["backgroundImage","labelMap","maskWorldToIndex","voxelFunc","label","radius","slicingMode"]),Tp(e,t)}var Ip={newInstance:Ae.newInstance(Ep,"vtkPaintFilter"),extend:Ep},kp=Ae.vtkErrorMacro;function Mp(e,t){t.classHierarchy.push("vtkScalarToRGBA"),e.requestData=function(e,n){var r=e[0];if(r){var i=r.getPointData().getScalars();if(i)if(t.lookupTable)if(t.piecewiseFunction){for(var o=[0,0,0,0],a=i.getData(),s=new Uint8Array(4*a.length),l=0,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Np,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["lookupTable","piecewiseFunction"]),Mp(e,t)}var Fp={newInstance:Ae.newInstance(Rp,"vtkScalarToRGBA"),extend:Rp},Bp={VARY_RADIUS_OFF:0,VARY_RADIUS_BY_SCALAR:1,VARY_RADIUS_BY_VECTOR:2,VARY_RADIUS_BY_ABSOLUTE_SCALAR:3},Lp={TCOORDS_OFF:0,TCOORDS_FROM_NORMALIZED_LENGTH:1,TCOORDS_FROM_LENGTH:2,TCOORDS_FROM_SCALARS:3},Vp=Ae.vtkDebugMacro,jp=Ae.vtkErrorMacro,Gp=Ae.vtkWarningMacro;function Up(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],i=e.slice(3*r,3*(r+1)),o=n+1;o3&&void 0!==arguments[3]?arguments[3]:null,o=[0,0,1],a=t,s=a[0],l=0;l1){var u=0,c=[0,0,0],d=[0,0,0],p=a.slice(l+1,l+1+s);if((u=r(e,p,0))!==s)!function(){var t=p[u],a=e.slice(3*t,3*(t+1)),l=p[u+1],f=e.slice(3*l,3*(l+1));if(mt(c=f.map((function(e,t){return e-a[t]}))),i)o=i;else{for(;++u.001){o=m,c=d;break}}if(u>=s)for(var g=0;g<3;++g)if(0!==c[g]){o[(g+2)%3]=0,o[(g+1)%3]=1,o[g]=-c[(g+1)%3]/c[g];break}}mt(o);for(var v=0;++u0?Math.sqrt(S):0;for(var C=[0,0,0],A=0;A<3;++A)C[A]=d[A]+c[A];mt(C),ft(C,w,b),ft(c,w,C),dt(o,C)*dt(b,C)<0&&(S*=-1);for(var P=v;Pt.radiusFactor&&(_=t.radiusFactor);else if(u&&t.varyRadius===Bp.VARY_RADIUS_BY_ABSOLUTE_SCALAR&&(_=u.getComponent(r[T],0))<0)return Gp("Scalar value less than zero, skipping line"),0;if(t.sidesShareVertices)for(var R=0;R1&&E){var Q=g.slice(Z,Z+v+1);i(d.getData(),Q,T)}o(q,v,J,d.getData(),x.getData(),c.getPointData(),W,C,L,j,G,U,D,X)?(O=a(q,v,Y,O,c.getCellData(),z,_),H&&s(q,v,J,d.getData(),L,H.getData())):Gp("Could not generate points"),q=n(q,v),Y++}u.setPoints(x),u.setStrips(_),u.setPointData(W),W.setNormals(A),l[0]=u}}}}else jp("Invalid or missing input")}}var zp={outputPointsPrecision:fi.DEFAULT,radius:.5,varyRadius:Bp.VARY_RADIUS_OFF,numberOfSides:3,radiusFactor:10,defaultNormal:[0,0,1],useDefaultNormal:!1,sidesShareVertices:!0,capping:!1,onRatio:1,offset:0,generateTCoords:Lp.TCOORDS_OFF,textureLength:1};function Wp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zp,n),Ae.setGet(e,t,["outputPointsPrecision","radius","varyRadius","numberOfSides","radiusFactor","defaultNormal","useDefaultNormal","sidesShareVertices","capping","onRatio","offset","generateTCoords","textureLength"]),Ae.obj(e,t),Ae.algo(e,t,1,1),Up(e,t)}var Hp={newInstance:Ae.newInstance(Wp,"vtkTubeFilter"),extend:Wp},Kp=Ae.vtkDebugMacro,Xp=Ae.vtkErrorMacro;function qp(e,t){t.classHierarchy.push("vtkWarpScalar"),e.requestData=function(n,r){var i=n[0];if(!i)return Xp("Invalid or missing input"),1;var o=i.getPoints(),a=i.getPointData().getNormals(),s=e.getInputArrayToProcess(0);if(!o||!s)return Kp("No data to warp",!!o,!!s),r[0]=n[0],1;var l=o.getNumberOfPoints(),u=null,c=[0,0,1];a&&!t.useNormal?(u=function(e,t){return[t.getData()[3*e],t.getData()[3*e+1],t.getData()[3*e+2]]},Kp("Using data normals")):e.getXyPlane()?(u=function(e,t){return c},Kp("Using x-y plane normal")):(u=function(e,n){return t.normal},Kp("Using Normal instance variable"));for(var d=new Float32Array(3*l),p=o.getData(),f=0,h=[0,0,1],m=1,g=s.getData(),v=s.getNumberOfComponents(),y=0;y2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yp,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["scaleFactor","useNormal","xyPlane"]),Ae.setGetArray(e,t,["normal"],3),qp(e,t)}var Jp={newInstance:Ae.newInstance(Zp,"vtkWarpScalar"),extend:Zp},Qp=0,$p=1,ef=2,tf=3;function nf(e,t){t.classHierarchy.push("vtkWindowedSincPolyDataFilter"),e.vtkWindowedSincPolyDataFilterExecute=function(e,n,r){if(!e||t.numberOfIterations<=0)return e;for(var i=e.getData(),o=n.getVerts().getData(),a=n.getLines().getData(),s=n.getPolys().getData(),l=n.getStrips().getData(),u=Math.cos(Ln.radiansFromDegrees(t.featureAngle)),c=Math.cos(Ln.radiansFromDegrees(t.edgeAngle)),d=e.getNumberOfPoints(),p=new Array(d),f=0;f3,S=0;S0||A>0){var P=rc.newInstance();P.setPoints(n.getPoints()),P.setPolys(n.getPolys());var _=P,O=[],T=0,D=[],E=[];_.buildLinks();for(var I=_.getPolys().getData(),k=0,M=0;M=2){if(!t.nonManifoldSmoothing){for(var j=0;j=L&&(V=ef)}}else{if(!(1===L&&(T=O[0])>k))continue;if(t.featureEdgeSmoothing){Zu.computeNormal(w(e.getPoint(N[0])),w(e.getPoint(N[1])),w(e.getPoint(N[2])),D);var G=_.getCellPoints(T).cellPointIds;Zu.computeNormal(w(e.getPoint(G[0])),w(e.getPoint(G[1])),w(e.getPoint(G[2])),E),Ln.dot(D,E)<=u&&(V=ef)}}V&&p[F].type===Qp?(p[F].edges=[B],p[F].type=V):(V&&p[F].type===tf||V&&p[F].type===ef||!V&&p[F].type===Qp)&&(p[F].edges.push(B),p[F].type&&V===tf&&(p[F].type=tf)),V&&p[B].type===Qp?(p[B].edges=[F],p[B].type=V):(V&&p[B].type===tf||V&&p[B].type===ef||!V&&p[B].type===Qp)&&(p[B].edges.push(F),p[B].type&&V===tf&&(p[B].type=tf))}}}for(var U=0;U=0&&Ln.normalize(X)>=0&&Ln.dot(K,X)1&&(ue[t.numberOfIterations-2]=2*(t.numberOfIterations-1)*le[t.numberOfIterations-1]);for(var ye=t.numberOfIterations-3;ye>=0;--ye)ue[ye]=ue[ye+2]+2*(ye+1)*le[ye+1];pe=0,fe=0,pe+=le[0],fe+=ue[0];for(var be=1;be<=t.numberOfIterations;++be)1===be?(pe+=le[be]*(1-.5*oe),fe+=ue[be]*(1-.5*oe)):(pe+=le[be]*Math.cos(be*Math.acos(1-.5*oe)),fe+=ue[be]*Math.cos(be*Math.acos(1-.5*oe)));t.numberOfIterations>1?Math.abs(pe-1)>=.001?me-=(pe-1)/fe:he=!0:(he=!0,me=0)}Math.abs(pe-1)>=.001&&console.log("An optimal offset for the smoothing filter could not be found. Unpredictable smoothing/shrinkage may result.");for(var we=[0,0,0],xe=[0,0,0],Se=[0,0,0],Ce=[0,0,0],Pe=[0,0,0],_e=[0,0,0],Oe=0;Oe0){var Te,De;Q[Y].getPoint(Oe,we),Se[0]=0,Se[1]=0,Se[2]=0;for(var Ee=0;Ee0){var Ge,Ue;Q[Y].getPoint(je,Fe),Q[Z].getPoint(je,Be),Se[0]=0,Se[1]=0,Se[2]=0;for(var ze=0;ze2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rf,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["numberOfIterations","passBand","featureAngle","edgeAngle","featureEdgeSmoothing","boundarySmoothing","nonManifoldSmoothing","generateErrorScalars","generateErrorVectors","normalizeCoordinates"]),nf(e,t)}var af=Ae.newInstance(of,"vtkWindowedSincPolyDataFilter"),sf={vtkAppendPolyData:td,vtkCalculator:sd,vtkClosedPolyLineToSurfaceFilter:fd,vtkImageCropFilter:yd,vtkImageMarchingCubes:Od,vtkImageMarchingSquares:Fd,vtkImageOutlineFilter:Gd,vtkImageSliceFilter:Kd,vtkImageStreamline:Jd,vtkMoleculeToRepresentation:op,vtkOutlineFilter:pp,vtkPaintFilter:Ip,vtkScalarToRGBA:Fp,vtkTubeFilter:Hp,vtkWarpScalar:Jp,vtkWindowedSincPolyDataFilter:{newInstance:af,extend:of}};function lf(e,t){t.classHierarchy.push("vtkConeSource"),e.requestData=function(e,n){var r;if(!t.deleted){var i=n[0],o=2*Math.PI/t.resolution,a=-t.height/2,s=t.resolution+1,l=4*t.resolution+1+t.resolution,u=0,c=Ae.newTypedArray(t.pointType,3*s),d=0,p=new Uint32Array(l);c[0]=t.height/2,c[1]=0,c[2]=0,t.capping&&(p[d++]=t.resolution);for(var f=0;ft.resolution?1:h+2;(r=Gs.buildFromRadian()).translate.apply(r,w(t.center)).rotateFromDirections([1,0,0],t.direction).apply(c),(i=rc.newInstance()).getPoints().setData(c,3),i.getPolys().setData(p,1),n[0]=i}}}var uf={height:1,radius:.5,resolution:6,center:[0,0,0],direction:[1,0,0],capping:!0,pointType:"Float32Array"};function cf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uf,n),Ae.obj(e,t),Ae.setGet(e,t,["height","radius","resolution","capping"]),Ae.setGetArray(e,t,["center","direction"],3),Ae.algo(e,t,0,1),lf(e,t)}var df={newInstance:Ae.newInstance(cf,"vtkConeSource"),extend:cf};function pf(e,t){t.classHierarchy.push("vtkCylinderSource"),e.requestData=function(e,n){var r,i;if(!t.deleted){var o=n[0],a=2*Math.PI/t.resolution,s=2*t.resolution,l=5*t.resolution;t.capping&&(s=4*t.resolution,l=7*t.resolution+2);for(var u=Ae.newTypedArray(t.pointType,3*s),c=0,d=new Uint32Array(l),p=new Float32Array(3*s),f=Jn.newInstance({numberOfComponents:3,values:p,name:"Normals"}),h=new Float32Array(2*s),m=Jn.newInstance({numberOfComponents:2,values:h,name:"TCoords"}),g=[0,0,0],v=[0,0,0],y=[0,0,0],b=[0,0,0],x=[0,0],S=[0,0],C=null==t.otherRadius?t.radius:t.otherRadius,A=0;A2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ff,n),Ae.obj(e,t),Ae.setGet(e,t,["height","initAngle","otherRadius","radius","resolution","capping"]),Ae.setGetArray(e,t,["center","direction"],3),Ae.algo(e,t,0,1),pf(e,t)}var mf={newInstance:Ae.newInstance(hf,"vtkCylinderSource"),extend:hf};function gf(e,t){t.classHierarchy.push("vtkArrowSource"),e.requestData=function(e,n){if(!t.deleted){var r=mf.newInstance({capping:!0});r.setResolution(t.shaftResolution),r.setRadius(t.shaftRadius),r.setHeight(1-t.tipLength),r.setCenter(0,.5*(1-t.tipLength),0);var i=r.getOutputData(),o=i.getPoints().getData(),a=i.getPointData().getNormals().getData();Gs.buildFromDegree().rotateZ(-90).apply(o).apply(a);var s=df.newInstance();s.setResolution(t.tipResolution),s.setHeight(t.tipLength),s.setRadius(t.tipRadius);var l=s.getOutputData(),u=l.getPoints().getData();Gs.buildFromRadian().translate(1-.5*t.tipLength,0,0).apply(u);var c=td.newInstance();c.setInputData(i),c.addInputData(l);var d=c.getOutputData(),p=d.getPoints().getData();Gs.buildFromRadian().translate(.5*t.tipLength-.5,0,0).apply(p),t.invert?(Gs.buildFromRadian().rotateFromDirections([1,0,0],t.direction).scale(-1,-1,-1).apply(p),n[0]=d):(Gs.buildFromRadian().rotateFromDirections([1,0,0],t.direction).scale(1,1,1).apply(p),n[0]=c.getOutputData())}}}var vf={tipResolution:6,tipRadius:.1,tipLength:.35,shaftResolution:6,shaftRadius:.03,invert:!1,direction:[1,0,0],pointType:"Float32Array"};function yf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vf,n),Ae.obj(e,t),Ae.setGet(e,t,["tipResolution","tipRadius","tipLength","shaftResolution","shaftRadius","invert"]),Ae.setGetArray(e,t,["direction"],3),Ae.algo(e,t,0,1),gf(e,t)}var bf={newInstance:Ae.newInstance(yf,"vtkArrowSource"),extend:yf};function wf(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 xf(e,t){t.classHierarchy.push("vtkCircleSource"),e.requestData=function(e,n){var r,i;if(!t.deleted){var o=n[0],a=Ae.newTypedArray(t.pointType,3*t.resolution),s=new Uint32Array(t.resolution+2);s[0]=t.resolution+1;for(var l=2*Math.PI/t.resolution,u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Sf(n)),Ae.obj(e,t),Ae.setGet(e,t,["radius","resolution","lines","face"]),Ae.setGetArray(e,t,["center","direction"],3),Ae.algo(e,t,0,1),xf(e,t)}var Af={newInstance:Ae.newInstance(Cf,"vtkCircleSource"),extend:Cf};function Pf(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 i=!1;!t.mask&&r&&(i=!0,t.mask=[]),t.mask&&(!t.mask[n]!=!r&&(i=!0),t.mask[n]=r),i&&e.modified()},e.getMaskLayer=function(e){return void 0===e?t.mask:t.mask[e]},e.requestData=function(e,r){var i;if(!t.deleted&&t.radius.length){n();var o=r[0],a=t.radius.length,s=t.height/2,l=0,u=0,c=t.startThetat.startTheta?t.endTheta:t.startTheta;d*=Math.PI/180;var p=t.resolution,f=!1;d>=c+2*Math.PI?d=c+2*Math.PI:(++p,f=!0);var h=(d-c)/t.resolution,m=p*a*2+2;if(t.skipInnerFaces||t.mask)if(!t.skipInnerFaces&&t.mask){t.mask[0]||(l+=2*(p+1)+5*p+(f?10:0),u+=2+p+(f?2:0));for(var g=1;g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_f,n),Ae.obj(e,t),Ae.setGet(e,t,["height","resolution","startTheta","endTheta","skipInnerFaces"]),Ae.setGetArray(e,t,["center","direction"],3),Ae.getArray(e,t,["cellFields"]),Ae.algo(e,t,0,1),Pf(e,t)}var Tf={newInstance:Ae.newInstance(Of,"vtkConcentricCylinderSource"),extend:Of};function Df(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,Ef,n),Ae.obj(e,t),Ae.setGet(e,t,["xLength","yLength","zLength","generate3DTextureCoordinates"]),Ae.setGetArray(e,t,["center","rotations"],3),Ae.algo(e,t,0,1),Df(e,t)}var kf={newInstance:Ae.newInstance(If,"vtkCubeSource"),extend:If};function Mf(e,t){t.classHierarchy.push("vtkCursor3D"),e.setModelBounds=function(n){if(Array.isArray(n)&&!(n.length<6)&&(t.modelBounds[0]!==n[0]||t.modelBounds[1]!==n[1]||t.modelBounds[2]!==n[2]||t.modelBounds[3]!==n[3]||t.modelBounds[4]!==n[4]||t.modelBounds[5]!==n[5])){e.modified(),t.modelBounds=n.map((function(e){return Number(e)}));for(var r=0;r<3;++r)t.modelBounds[2*r]=Math.min(t.modelBounds[2*r],t.modelBounds[2*r+1])}},e.setFocalPoint=function(n){if(Array.isArray(n)&&!(n.length<3)&&(n[0]!==t.focalPoint[0]||n[1]!==t.focalPoint[1]||n[2]!==t.focalPoint[2])){e.modified();for(var r=[],i=0;i<3;i++)r[i]=n[i]-t.focalPoint[i],t.focalPoint[i]=Number(n[i]),t.translationMode?(t.modelBounds[2*i]+=r[i],t.modelBounds[2*i+1]+=r[i]):t.wrap?t.focalPoint[i]=t.modelBounds[2*i]+1*(t.focalPoint[i]-t.modelBounds[2*i])%(1*(t.modelBounds[2*i+1]-t.modelBounds[2*i])):(n[i]t.modelBounds[2*i+1]&&(t.focalPoint[i]=t.modelBounds[2*i+1]))}},e.setAll=function(t){e.setOutline(t),e.setAxes(t),e.setXShadows(t),e.setYShadows(t),e.setZShadows(t)},e.allOn=function(){e.setAll(!0)},e.allOff=function(){e.setAll(!1)},e.requestData=function(e,n){if(!t.deleted){var r=0,i=0;if(t.wrap)for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nf,n),Ae.obj(e,t),Ae.get(e,t,["focus"]),Ae.getArray(e,t,["modelBounds"],6),Ae.getArray(e,t,["focalPoint"],3),Ae.setGet(e,t,["outline"]),Ae.setGet(e,t,["axes"]),Ae.setGet(e,t,["xShadows"]),Ae.setGet(e,t,["yShadows"]),Ae.setGet(e,t,["zShadows"]),Ae.setGet(e,t,["wrap"]),Ae.setGet(e,t,["translationMode"]),Ae.algo(e,t,0,1),Mf(e,t)}var Ff={newInstance:Ae.newInstance(Rf,"vtkCursor3D"),extend:Rf};function Bf(e,t){var n=this;t.classHierarchy.push("vtkImageGridSource"),e.requestData=function(e,r){if(!t.deleted){var i={},o={type:"vtkImageData",mtime:t.mtime,metadata:{source:"vtkImageGridSource",state:i}};["gridSpacing","gridOrigin","dataSpacing","dataOrigin"].forEach((function(e){i[e]=[].concat(t[e])}));var a=fs.newInstance(o);a.setOrigin(t.dataOrigin[0],t.dataOrigin[1],t.dataOrigin[2]),a.setSpacing(t.dataSpacing[0],t.dataSpacing[1],t.dataSpacing[2]),a.setExtent.apply(n,t.dataExtent),a.setDirection(t.dataDirection);var s=[0,0,0];s=s.map((function(e,n){return t.dataExtent[2*n+1]-t.dataExtent[2*n]+1}));for(var l=new Uint8Array(s[0]*s[1]*s[2]),u=0,c=0,d=0,p=0,f=t.dataExtent[4];f<=t.dataExtent[5];f++){d=t.gridSpacing[2]?f%t.gridSpacing[2]===t.gridOrigin[2]:0;for(var h=t.dataExtent[2];h<=t.dataExtent[3];h++){c=t.gridSpacing[1]?h%t.gridSpacing[1]===t.gridOrigin[1]:0;for(var m=t.dataExtent[0];m<=t.dataExtent[1];m++)u=t.gridSpacing[0]?m%t.gridSpacing[0]===t.gridOrigin[0]:0,l[p]=d||c||u?t.lineValue:t.fillValue,p++}}var g=Jn.newInstance({numberOfComponents:1,values:l});g.setName("scalars"),a.getPointData().setScalars(g),r[0]=a}}}var Lf={lineValue:0,fillValue:255,gridSpacing:[10,10,0],gridOrigin:[0,0,0],dataSpacing:[1,1,1],dataOrigin:[0,0,0],dataExtent:[0,255,0,255,0,0],dataDirection:[1,0,0,0,1,0,0,0,1]};function Vf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lf,n),Ae.obj(e,t),Ae.setGet(e,t,["lineValue","fillValue"]),Ae.setGetArray(e,t,["gridOrigin","gridSpacing","dataOrigin","dataSpacing"],3),Ae.setGetArray(e,t,["dataExtent"],6),Ae.setGetArray(e,t,["dataDirection"],9),Ae.algo(e,t,0,1),Bf(e,t)}var jf={newInstance:Ae.newInstance(Vf,"vtkImageGridSource"),extend:Vf},Gf=Ae.vtkWarningMacro;function Uf(e,t){t.classHierarchy.push("vtkLineSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],i=r?r.getPoints().getDataType():"Float32Array",o=rc.newInstance(),a=new Float32Array(3);if(at(t.point2,t.point1,a),ht(a)<=0)Gf("Zero-length line definition");else{var s=t.resolution,l=s+1,u=Ae.newTypedArray(i,3*l);o.getPoints().setData(u,3);var c=new Uint32Array(l+1);o.getLines().setData(c,1);for(var d=0,p=0,f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zf,n),Ae.obj(e,t),Ae.setGet(e,t,["resolution"]),Ae.setGetArray(e,t,["point1","point2"],3),Ae.algo(e,t,0,1),Uf(e,t)}var Hf={newInstance:Ae.newInstance(Wf,"vtkLineSource"),extend:Wf},Kf=Ae.vtkWarningMacro;function Xf(e,t){t.classHierarchy.push("vtkPlaneSource"),e.requestData=function(n,r){if(!t.deleted){var i=r[0],o=i?i.getPoints().getDataType():"Float32Array",a=rc.newInstance(),s=new Float32Array(3),l=new Float32Array(3);if(at(t.point1,t.origin,s),at(t.point2,t.origin,l),e.updatePlane(s,l)){var u=t.xResolution,c=t.yResolution,d=(u+1)*(c+1),p=u*c,f=Ae.newTypedArray(o,3*d);a.getPoints().setData(f,3);var h=new Uint32Array(5*p);a.getPolys().setData(h,1);var m=new Float32Array(3*d),g=Jn.newInstance({numberOfComponents:3,values:m,name:"Normals"});a.getPointData().setNormals(g);var v=new Float32Array(2*d),y=Jn.newInstance({numberOfComponents:2,values:v,name:"TextureCoordinates"});a.getPointData().setTCoords(y);for(var b=new Float32Array(2),w=0,x=0;x2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qf,n),t.normal=[0,0,1],t.center=[0,0,0],Ae.obj(e,t),Ae.setGet(e,t,["xResolution","yResolution"]),Ae.setGetArray(e,t,["origin"],3),Ae.getArray(e,t,["point1","point2","normal","center"],3),Ae.algo(e,t,0,1),Xf(e,t),e.setPoint1(t.point1),e.setPoint2(t.point2)}var Zf={newInstance:Ae.newInstance(Yf,"vtkPlaneSource"),extend:Yf};function Jf(e,t){t.classHierarchy.push("vtkPointSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],i=r?r.getPoints().getDataType():"Float32Array",o=rc.newInstance(),a=t.numberOfPoints,s=Ae.newTypedArray(i,3*a);o.getPoints().setData(s,3);var l,u,c,d,p,f=new Uint32Array(a+1);o.getVerts().setData(f,1);for(var h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qf,n),Ae.obj(e,t),Ae.setGet(e,t,["numberOfPoints","radius"]),Ae.setGetArray(e,t,["center"],3),Ae.algo(e,t,0,1),Jf(e,t)}var eh={newInstance:Ae.newInstance($f,"vtkPointSource"),extend:$f};function th(e,t){var n=this;t.classHierarchy.push("vtkRTAnalyticSource"),e.requestData=function(e,r){if(!t.deleted){var i={},o={type:"vtkImageData",mtime:t.mtime,metadata:{source:"vtkRTAnalyticSource",state:i}};["standardDeviation","center","frequency","magnitude","maximum"].forEach((function(e){i[e]=[].concat(t[e])}));var a=fs.newInstance(o);a.setSpacing(1,1,1),a.setExtent.apply(n,t.wholeExtent),a.setOrigin(0,0,0),a.setDirection(t.dataDirection);var s=[0,0,0];s=s.map((function(e,n){return t.wholeExtent[2*n+1]-t.wholeExtent[2*n]+1}));for(var l=new Uint8Array(s[0]*s[1]*s[2]),u=1/(2*t.standardDeviation*t.standardDeviation),c=0,d=0,p=0,f=[1/(t.wholeExtent[1]-t.wholeExtent[0]),1/(t.wholeExtent[3]-t.wholeExtent[2]),1/(t.wholeExtent[5]-t.wholeExtent[4])],h=0,m=t.wholeExtent[4];m<=t.wholeExtent[5];m++){p=(t.center[2]-m)*f[2];var g=t.magnitude[2]*Math.cos(t.frequency[2]*p);p*=p;for(var v=t.wholeExtent[2];v<=t.wholeExtent[3];v++){d=(t.center[1]-v)*f[1];var y=t.magnitude[1]*Math.sin(t.frequency[1]*d);d*=d;for(var b=t.wholeExtent[0];b<=t.wholeExtent[1];b++){var w=p+d+(c=(t.center[0]-b)*f[0])*c,x=t.magnitude[0]*Math.sin(t.frequency[0]*c);l[h]=t.maximum*Math.exp(-w*u)+x+y+g+t.offset,h++}}}var S=Jn.newInstance({numberOfComponents:1,values:l});S.setName("scalars"),a.getPointData().setScalars(S),r[0]=a}}}var nh={offset:40,maximum:120,center:[0,0,0],frequency:[60,30,40],magnitude:[10,18,5],standardDeviation:.5,wholeExtent:[-10,10,-10,10,-10,10],dataDirection:[1,0,0,0,1,0,0,0,1]};function rh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nh,n),Ae.obj(e,t),Ae.setGet(e,t,["offset","maximum","standardDeviation"]),Ae.setGetArray(e,t,["center","frequency","magnitude"],3),Ae.setGetArray(e,t,["wholeExtent"],6),Ae.setGetArray(e,t,["dataDirection"],9),Ae.algo(e,t,0,1),th(e,t)}var ih={newInstance:Ae.newInstance(rh,"vtkRTAnalyticSource"),extend:rh};function oh(e,t){t.classHierarchy.push("vtkSLICSource"),e.addCluster=function(n,r,i,o,a,s,l){var u=t.clusters.length;return t.clusters.push(new Float32Array([n,r,i,o,a,s,l])),e.modified(),u},e.removeCluster=function(n){t.clusters.splice(n,1),e.modified()},e.removeAllClusters=function(){t.clusters=[],e.modified()},e.updateCluster=function(n,r,i,o,a,s,l,u){t.clusters[n]||(t.clusters[n]=new Float32Array(7)),t.clusters[n][0]=r,t.clusters[n][1]=i,t.clusters[n][2]=o,t.clusters[n][3]=a,t.clusters[n][4]=s,t.clusters[n][5]=l,t.clusters[n][6]=u,e.modified()},e.getNumberOfClusters=function(){return t.clusters.length},e.requestData=function(e,n){if(!t.deleted){var r=t.dimensions[0]*t.dimensions[1]*t.dimensions[2],i=fs.newInstance();i.setSpacing.apply(i,w(t.spacing)),i.setExtent(0,t.dimensions[0]-1,0,t.dimensions[1]-1,0,t.dimensions[2]-1),i.setOrigin.apply(i,w(t.origin));for(var o=function(e,t,n){for(var r=new Float32Array(t[0]*t[1]*t[2]*3),i=0,o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ah,n),Ae.obj(e,t),Ae.setGet(e,t,["clusterArrayName","scalarArrayName"]),Ae.setGetArray(e,t,["origin","spacing","dimensions"],3),Ae.algo(e,t,0,1),oh(e,t)}var lh={newInstance:Ae.newInstance(sh,"vtkSLICSource"),extend:sh};function uh(e,t){t.classHierarchy.push("vtkSphereSource"),e.requestData=function(e,n){if(!t.deleted){var r=n[0],i=r?r.getPoints().getDataType():"Float32Array";r=rc.newInstance();var o=0,a=t.thetaResolution,s=t.startThetat.startTheta?t.endTheta:t.startTheta;l*=Math.PI/180;var u=t.startPhit.startPhi?t.endPhi:t.startPhi;c*=Math.PI/180,Math.abs(s-l)<2*Math.PI&&++a;var d=(l-s)/t.thetaResolution,p=t.startPhi<=0?1:0,f=t.phiResolution+(t.endPhi>=180?-1:0),h=t.phiResolution*a+2,m=2*t.phiResolution*t.thetaResolution,g=0,v=Ae.newTypedArray(i,3*h),y=new Float32Array(3*h),b=0,w=new Uint32Array(5*m);t.startPhi<=0&&(v[3*g+0]=t.center[0],v[3*g+1]=t.center[1],v[3*g+2]=t.center[2]+t.radius,y[3*g+0]=0,y[3*g+1]=0,y[3*g+2]=1,g++,o++),t.endPhi>=180&&(v[3*g+0]=t.center[0],v[3*g+1]=t.center[1],v[3*g+2]=t.center[2]-t.radius,y[3*g+0]=0,y[3*g+1]=0,y[3*g+2]=-1,g++,o++);for(var x=t.phiResolution-o,S=(c-u)/(t.phiResolution-1),C=0;C=180)for(var I=x-1+o,k=0;k2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ch,n),Ae.obj(e,t),Ae.setGet(e,t,["radius","latLongTessellation","thetaResolution","startTheta","endTheta","phiResolution","startPhi","endPhi"]),Ae.setGetArray(e,t,["center"],3),Ae.algo(e,t,0,1),uh(e,t)}var ph={newInstance:Ae.newInstance(dh,"vtkSphereSource"),extend:dh},fh={vtkArrowSource:bf,vtkCircleSource:Af,vtkConcentricCylinderSource:Tf,vtkConeSource:df,vtkCubeSource:kf,vtkCursor3D:Ff,vtkCylinderSource:mf,vtkImageGridSource:jf,vtkLineSource:Hf,vtkPlaneSource:Zf,vtkPointSource:eh,vtkRTAnalyticSource:ih,vtkSLICSource:lh,vtkSphereSource:ph},hh=Ae.vtkErrorMacro;function mh(e,t){t.classHierarchy.push("vtkTextureMapToSphere"),e.requestData=function(e,n){if(!t.deleted){var r=e[0],i=r.getPoints().getNumberOfPoints();if(i<=1)hh("Can't generate texture coordinates without points");else{var o=Math.PI/2,a=[],s=r.getPoints();if(t.automaticSphereGeneration){t.center=[0,0,0];for(var l=0;lu?(d=0,p[1]=c>0?0:1):(d=Math.acos(c/u),p[1]=d/Math.PI)):p[1]=0,0!==(f=u*Math.sin(d))?(c=a[0]-t.center[0],h=Math.abs(c)>f?c>0?0:Math.PI:Math.acos(c/f),c=a[1]-t.center[1],m=Math.abs(c)>f?c>0?o:-o:Math.asin(c/f)):(h=0,m=0),t.preventSeam?p[0]=h/Math.PI:(p[0]=h/(2*Math.PI),m<0&&(p[0]=1-p[0])),g.push.apply(g,p);var y=Jn.newInstance({name:"Texture Coordinates",numberOfComponents:2,size:i,values:g}),b=rc.newInstance();b.getPoints().setData(new Float32Array(r.getPoints().getData()),3),b.getPolys().setData(new Uint32Array(r.getPolys().getData())),b.getPointData().setTCoords(y),n[0]=b}}}}var gh={center:[0,0,0],automaticSphereGeneration:1,preventSeam:1};function vh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gh,n),Ae.obj(e,t),Ae.setGetArray(e,t,["center"],3),Ae.setGet(e,t,["automaticSphereGeneration","preventSeam"]),Ae.algo(e,t,1,1),mh(e,t)}var yh={newInstance:Ae.newInstance(vh,"vtkTextureMapToSphere"),extend:vh},bh=Ae.vtkErrorMacro;function wh(e,t){t.classHierarchy.push("vtkTextureMapToPlane"),e.requestData=function(e,n){if(!t.deleted){var r=e[0],i=r.getPoints().getNumberOfPoints();if(i<3&&t.automaticPlaneGeneration)bh("Can't generate texture coordinates without points");else{var o=rc.newInstance();o.getPoints().setData(new Float32Array(r.getPoints().getData()),3),o.getPolys().setData(new Uint32Array(r.getPolys().getData()));var a=[],s=0,l=0,u=0,c=0,d=[0,0,0],p=0,f=[0,0,0],h=[0,0,0],m=0,g=0,v=0,y=0,b=[0,0,0];if(t.automaticPlaneGeneration&&0===t.origin[0]&&0===t.origin[1]&&0===t.origin[2]&&0===t.point1[0]&&0===t.point1[1]&&0===t.point2[0]&&0===t.point2[1]){for(t.automaticPlaneGeneration&&function(e){for(var n=e.getPoints().getNumberOfPoints(),r=0,i=[0,0,0,0,0,0,0,0,0],o=[0,0,0],a=[0,0,0],s=e.getBounds(),l=[s[0],s[2],s[4]],u=[s[1],s[3],s[5]],c=Math.sqrt(wt(l,u)),d=c,p=0;p<3;p++)t.normal[p]=0,s[2*p+1]-s[2*p]2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xh,n),Ae.obj(e,t),Ae.setGetArray(e,t,["origin","point1","point2","normal"],3),Ae.setGetArray(e,t,["sRange","tRange"],2),Ae.setGet(e,t,["automaticPlaneGeneration"]),Ae.algo(e,t,1,1),wh(e,t)}var Ch={Cornerstone:Uc,Core:Yc,General:sf,Sources:fh,Texture:{vtkTextureMapToPlane:{newInstance:Ae.newInstance(Sh,"vtkTextureMapToPlane"),extend:Sh},vtkTextureMapToSphere:yh}},Ah={CLAMP:0,REPEAT:1,MIRROR:2},Ph={NEAREST:0,LINEAR:1,CUBIC:2},_h={ImageBorderMode:Ah,InterpolationMode:Ph};function Oh(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 Th(e){for(var t=1;t=0?r:0}function Nh(e,t,n){var r=n-t+1,i=e-t;return i=(i%=r)>=0?i:i+r}function Rh(e,t,n){var r=n-t,i=2*r+(0===r?1:0),o=e-t;return o=o>=0?o:-o,o=(o%=i)<=r?o:i-o}function Fh(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 Bh(e){for(var t=1;t0?d:0)0?o:0;d=d0?r:e-n},e.getNumberOfComponents=function(){return t.interpolationInfo.numberOfComponents},e.interpolateIJK=function(n,r){e.interpolatePoint(t.interpolationInfo,n,r)},e.checkBoundsIJK=function(e){return!(e[0]t.structuredBounds[1]||e[1]t.structuredBounds[3]||e[2]t.structuredBounds[5])},e.computeSupportSize=null,e.isSeparable=null,e.precomputeWeightsForExtent=function(e,t,n){},e.FreePrecomputedWeights=function(e){},e.interpolatePoint=function(e,t,n){},e.interpolateRow=function(e,t,n,r,i,o){}}var jh={outValue:0,tolerance:Number.EPSILON,componentOffset:0,componentCount:-1,borderMode:Lh.CLAMP,slidingWindow:!1,scalars:null,interpolationInfo:Bh({},Dh),interpolationFunc:null,rowInterpolationFunc:null,structuredBounds:[0,-1,0,-1,0,-1],spacing:null,origin:null,extent:null};function Gh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jh,n),Ae.obj(e,t),Ae.setGet(e,t,["outValue","tolerance","componentOffset","componentCount","borderMode","slidingWindow"]),Ae.get(e,t,["origin","spacing"]),Vh(e,t)}var Uh=Bh({newInstance:Ae.newInstance(Gh,"vtkAbstractImageInterpolator"),extend:Gh},_h);function zh(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 Wh(e){for(var t=1;t1)if(a===Ph.LINEAR)v[h*x+1-y]=O[1]*D,b[h*x-y]=1-P,b[h*x+1-y]=P;else if(a===Ph.CUBIC){var E=e.vtkTricubicInterpWeights(P);if(4===h)for(var I=0;I<4;I++)v[h*x+I-y]=O[I]*D,b[h*x+I-y]=E[I];else{for(var k=[0,0,0,0],M=0;M<4;M++){k[O[M]-c]+=E[M]}for(var N=0;N=p&&S<=f?0===w&&(w=1,i[2*l]=x):1===w&&(w=2,i[2*l+1]=x-1)}(0===w||i[2*l]>i[2*l+1])&&(s=!1)}if(!s)for(var R=0;R<3;R++)i[2*R]=r[2*R],i[2*R+1]=r[2*R]-1}}var Kh={interpolationMode:Ph.NEAREST};function Xh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kh,n),Uh.extend(e,t,n),Ae.setGet(e,t,["interpolationMode"]),Hh(e,t)}var qh={newInstance:Ae.newInstance(Xh,"vtkImageInterpolator"),extend:Xh};function Yh(e,t){t.classHierarchy.push("vtkImagePointDataIterator"),e.initialize=function(e,n,r,i){var o=e.getExtent(),a=n;null==a&&(a=o);for(var s,l,u,c=!1,d=0;d<6;d+=2)t.extent[d]=Math.max(a[d],o[d]),t.extent[d+1]=Math.min(a[d+1],o[d+1]),t.extent[d]>t.extent[d+1]&&(c=!0);if(t.rowIncrement=o[1]-o[0]+1,t.sliceIncrement=t.rowIncrement*(o[3]-o[2]+1),c){s=0,l=0,u=0,t.id=0,t.rowEndIncrement=0,t.sliceEndIncrement=0;for(var p=0;p<6;p+=2)t.extent[p]=o[p],t.extent[p+1]=o[p]-1}else s=t.extent[1]-t.extent[0]+1,l=t.extent[3]-t.extent[2]+1,u=t.extent[5]-t.extent[4]+1,t.id=t.extent[0]-o[0]+(t.extent[2]-o[2])*t.rowIncrement+(t.extent[4]-o[4])*t.sliceIncrement,t.rowEndIncrement=t.rowIncrement-s,t.sliceEndIncrement=t.rowEndIncrement+t.sliceIncrement-t.rowIncrement*l;if(t.spanEnd=t.id+s,t.rowEnd=t.id+s,t.sliceEnd=t.id+(t.rowIncrement*l-t.rowEndIncrement),t.end=t.id+(t.sliceIncrement*u-t.sliceEndIncrement),t.index[0]=t.extent[0],t.index[1]=t.extent[2],t.index[2]=t.extent[4],t.startY=t.index[1],r){t.hasStencil=!0,t.inStencil=!1,t.spanIndex=0;var f=r.getExtent();if(t.spanSliceIncrement=0,t.spanSliceEndIncrement=0,f[3]>=f[2]&&f[5]>=f[4]){t.spanSliceIncrement=f[3]-f[2]+1;var h=t.extent[2]-f[2];h>=0&&(t.spanSliceEndIncrement+=h);var m=f[3]-t.extent[3];m>=0&&(t.spanSliceEndIncrement+=m)}var g=0,v=t.extent[2]-f[2];v<0?(t.extent[2]=f[2],g-=1):g+=v,f[3]<=t.extent[3]&&(t.extent[3]=f[3]);var y=t.extent[4]-f[4];y<0?(t.extent[4]=f[4],v>=0&&(g-=1+t.spanSliceEndIncrement)):g+=y*t.spanSliceIncrement,f[5]<=t.extent[5]&&(t.extent[5]=f[5]),t.extent[2]<=t.extent[3]&&t.extent[4]<=t.extent[5]?(t.spanCountPointer=r.extentListLengths.subarray(g),t.spanListPointer=r.extentLists.subarray(g),v>=0&&y>=0&&(t.inStencil=!0,t.setSpanState(t.extent[0]))):(t.spanCountPointer=null,t.spanListPointer=null,t.inStencil=!1)}else t.hasStencil=!1,t.inStencil=!0,t.spanSliceEndIncrement=0,t.spanSliceIncrement=0,t.spanIndex=0,t.spanCountPointer=null,t.spanListPointer=null;if(i){t.algorithm=i;var b=l*u;t.target=b/50+1,t.count=50*t.target-b/t.target*t.target+1}else t.algorithm=null,t.target=0,t.count=0},e.setSpanState=function(e){var n,r=!1,i=t.spanListPointer,o=t.spanCountPointer[0];for(n=0;ne);++n)r=!r;t.spanIndex=n,t.inStencil=r;var a=t.extent[1]+1;n=t.extent[2]&&t.index[1]<=t.extent[3]&&t.index[2]>=t.extent[4]&&t.index[2]<=t.extent[5]?(t.spanCountPointer=t.spanCountPointer.subarray(n),t.spanListPointer=t.spanListPointer.subarray(n),e.setSpanState(t.extent[0])):t.inStencil=!1),t.algorithm&&e.reportProgress()}else{t.id=t.spanEnd;var r=t.spanCountPointer[0],i=t.extent[1]+1;if(t.index[0]=i,t.spanIndex1&&void 0!==arguments[1]?arguments[1]:0;return e.getArray(t.getPointData().getScalars(),n)}}var Zh={spanState:0,extent:[0,-1,0,-1,0,-1],end:0,spanEnd:0,rowEnd:0,sliceEnd:0,rowIncrement:0,rowEndIncrement:0,sliceIncrement:0,sliceEndIncrement:0,id:0,index:[0,0,0],startY:0,hasStencil:!1,inStencil:!0,spanIndex:0,spanSliceIncrement:0,spanSliceEndIncrement:0,spanCountPointer:null,spanListPointer:null,algorithm:null,target:0,count:0};function Jh(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Zh,n),Ae.obj(e,t),Ae.get(e,t,["id","index"]),Yh(e,t)}var Qh={newInstance:Ae.newInstance(Jh,"vtkImagePointDataIterator"),extend:Jh};function $h(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}!function(){var e,t=(e=new Li(4),Li!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e)}();var em={SlabMode:{MIN:0,MAX:1,MEAN:2,SUM:3}};function tm(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 nm=em.SlabMode,rm=Ae.capitalize,im=Ae.vtkErrorMacro;function om(e,t){t.classHierarchy.push("vtkImageReslice");var n=null,r=null;function i(e,t,n,r){for(var i=n-1,o=0;o=t.outputDimensionality?(h[2*w]=0,h[2*w+1]=0):null==t.outputExtent?(t.autoCropOutput&&(S=b[2*w+1]-b[2*w]),h[2*w]=Math.round(C),h[2*w+1]=Math.round(h[2*w]+Math.abs(S/f[w]))):(h[2*w]=t.outputExtent[2*w],h[2*w+1]=t.outputExtent[2*w+1]),w>=t.outputDimensionality?p[w]=0:null==t.outputOrigin?t.autoCropOutput?p[w]=b[2*w]-h[2*w]*f[w]:p[w]=A-.5*(h[2*w]+h[2*w+1])*f[w]:p[w]=t.outputOrigin[w],m[w]=h[2*w+1]-h[2*w]+1}var T=c.getDataType();t.outputScalarType&&(T=t.outputScalarType);var D=a.getPointData().getScalars().getNumberOfComponents(),E=Ae.newTypedArray(T,m[0]*m[1]*m[2]*D),I=Jn.newInstance({name:"Scalars",values:E,numberOfComponents:D}),k=fs.newInstance();k.setDimensions(m),k.setOrigin(p),k.setSpacing(f),k.getPointData().setScalars(I),e.getIndexMatrix(a,k);var M=t.interpolationMode;t.usePermuteExecute=!1,t.optimization&&null==r&&1===t.slabSliceSpacingFraction&&t.interpolator.isSeparable()&&e.isPermutationMatrix(n)&&(t.usePermuteExecute=!0,e.canUseNearestNeighbor(n,h)&&(M=Ph.NEAREST)),t.interpolator.setInterpolationMode(M);var N=Ah.CLAMP;N=t.wrap?Ah.REPEAT:N,N=t.mirror?Ah.MIRROR:N,t.interpolator.setBorderMode(N);var R=762939453125e-17,F=.5*t.border;F=(F=N===Ah.CLAMP?F:4294967294)>R?F:R,t.interpolator.setTolerance(F),t.interpolator.initialize(a),e.vtkImageResliceExecute(a,k),t.interpolator.releaseData(),o[0]=k}else im("Invalid or missing input")},e.vtkImageResliceExecute=function(i,o){var a=i.getPointData().getScalars(),s=o.getPointData().getScalars(),l=s.getData(),u=o.getExtent(),c=n,d=null,p=Math.max(t.slabNumberOfSlices,1),f=t.slabSliceSpacingFraction,h=e.isPerspectiveMatrix(c),m=a.getData(),g=a.getDataType(),v=a.getNumberOfComponents(),y=t.interpolator.getComponentOffset(),b=t.interpolator.getBorderMode(),w=i.getDimensions(),x=[0,w[0]-1,0,w[1]-1,0,w[2]-1],S=[0,0,0];S[0]=a.getNumberOfComponents(),S[1]=S[0]*w[0],S[2]=S[1]*w[1];var C=w[0]*w[1]*w[2];y>0&&y+vPh.LINEAR||p>1&&t.slabMode===nm.SUM,j=e.getConversionFunc(g,O,t.scalarShift,t.scalarScale,V),G=e.getSetPixelsFunc(O,1,T,l),U=e.getCompositeFunc(t.slabMode,t.slabTrapezoidIntegration),z=u[2]-1,W=u[4]-1,H=[0,0,0,0],K=[0,0,0,0],X=Qh.newInstance();X.initialize(o,u,t.stencil,null);for(var q=X.getScalars(o,0),Y=0,Z=Ae.newTypedArray(O,si.getDiagonalLength(u)*T*2),J=new Float64Array(v*p),Q=new Float64Array(v);!X.isAtEnd();X.nextSpan()){var $=X.spanEndId()-X.getId();if(Y=1*X.getId()*T,X.isInStencil()){var ee=X.getIndex();ee[2]>W&&(W=ee[2],H[0]=k[0]+W*I[0],H[1]=k[1]+W*I[1],H[2]=k[2]+W*I[2],H[3]=k[3]+W*I[3],z=u[2]-1),ee[1]>z&&(z=ee[1],K[0]=H[0]+z*E[0],K[1]=H[1]+z*E[1],K[2]=H[2]+z*E[2],K[3]=H[3]+z*E[3]);var te=ee[0],ne=te+$-1;if(_){for(var re=m,ie=l,oe=1*S[0],ae=1*S[1],se=1*S[2],le=x[1]-x[0]+1,ue=x[3]-x[2]+1,ce=x[5]-x[4]+1,de=te-1,pe=!1,fe=1*v,he=te;he<=ne;he++){var me=[K[0]+he*D[0],K[1]+he*D[1],K[2]+he*D[2]],ge=kh(me[0])-x[0],ve=kh(me[1])-x[2],ye=kh(me[2])-x[4];if(ge>=0&&ge=0&&ve=0&&ye1){var Le=Be-.5*(p-1);Le*=f,Ne[0]=Me[0]+Le*I[0],Ne[1]=Me[1]+Le*I[1],Ne[2]=Me[2]+Le*I[2],Ne[3]=Me[3]+Le*I[3],Re=Ne}if(h){var Ve=1/Re[3];Re[0]*=Ve,Re[1]*=Ve,Re[2]*=Ve}if(null!==r&&e.applyTransform(r,Re,N,F),t.interpolator.checkBoundsIJK(Re)){Te=1,t.interpolator.interpolateIJK(Re,Q);for(var je=0;jev&&U(J,v,Fe/v);for(var Ge=0;Gete?Oe:Te}var Ue=Ee-1-(Te!==Oe),ze=Ue-De+1,We=0;Oe?(P&&e.rescaleScalars(B,v,ne-te+1,t.scalarShift,t.scalarScale),We=j(Z,B.subarray(De*v),T,ze)):We=G(Z,L,T,ze);for(var He=0;Hes[2*d+1]&&(s[2*d+1]=l[d]),l[d]u){var f=u;u=l,l=f}a=lp}if(a&&n!==_e.FLOAT&&n!==_e.DOUBLE){var h=e.getDataTypeMinMax(n);return function(t,n,r,i){return e.clamp(t,n,r,i,h.min,h.max)}}return e.convert},e.set=function(e,t,n,r){for(var i=n*r,o=0;o=3)return 0;var i=e[4*r+n],o=e[12+n];t[2*r]===t[2*r+1]&&(o+=i*t[2*n],i=0);var a=Ih(i).error,s=Ih(o).error;if(0!==a||0!==s)return 0}return 1}}function am(e,t,n){n.forEach((function(n){var r="set".concat(rm(n)),i=e[r];e[r]=function(){return 1===arguments.length&&null==(arguments.length<=0?void 0:arguments[0])||null==t[n]?(arguments.length<=0?void 0:arguments[0])!==t[n]?(t[n]=arguments.length<=0?void 0:arguments[0],e.modified(),!0):null:i.apply(void 0,arguments)}}))}var sm={transformInputSampling:!0,autoCropOutput:!1,outputDimensionality:3,outputSpacing:null,outputOrigin:null,outputExtent:null,outputScalarType:null,wrap:!1,mirror:!1,border:!0,interpolationMode:Ph.NEAREST,slabMode:nm.MIN,slabTrapezoidIntegration:!1,slabNumberOfSlices:1,slabSliceSpacingFraction:1,optimization:!1,scalarShift:0,scalarScale:1,backgroundColor:[0,0,0,0],resliceAxes:null,resliceTransform:null,interpolator:qh.newInstance(),usePermuteExecute:!1};function lm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sm,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["outputDimensionality","outputScalarType","scalarShift","scalarScale","transformInputSampling","autoCropOutput","wrap","mirror","border","backgroundColor","slabMode","slabTrapezoidIntegration","slabNumberOfSlices","slabSliceSpacingFraction"]),Ae.setGetArray(e,t,["outputOrigin","outputSpacing"],3),Ae.setGetArray(e,t,["outputExtent"],6),am(e,t,["outputOrigin","outputSpacing","outputExtent"]),Ae.get(e,t,["resliceAxes"]),Ae.algo(e,t,1,1),om(e,t)}var um=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hm,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGetArray(e,t,["sampleDimensions"],3),Ae.setGetArray(e,t,["modelBounds"],6),fm(e,t)}var gm={Core:cm,Hybrid:{vtkSampleFunction:{newInstance:Ae.newInstance(mm,"vtkSampleFunction"),extend:mm}}};function vm(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 ym={center:[0,0,0],rotationFactor:1,displayCenter:[0,0]};var bm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ym,n),Ae.setGet(e,t,["rotationFactor"]),Ae.setGetArray(e,t,["displayCenter"],2),Ae.setGetArray(e,t,["center"],3),vm(e,t)}};function wm(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 xm={pinchEnabled:!0,panEnabled:!0,rotateEnabled:!0};var Sm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xm,n),Ae.set(e,t,["pinchEnabled","panEnabled","rotateEnabled"]),Ae.setGet(e,t,["interactorStyle"]),wm(e,t)}};function Cm(e,t){t.classHierarchy.push("vtkCompositeKeyboardManipulator"),e.onKeyPress=function(e,t,n){},e.onKeyDown=function(e,t,n){},e.onKeyUp=function(e,t,n){}}var Am={};var Pm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Am,n),Cm(e,t)}};function _m(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 Om={button:1,shift:!1,control:!1,alt:!1,dragEnabled:!0,scrollEnabled:!1};var Tm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Om,n),Ae.setGet(e,t,["button","shift","control","alt"]),Ae.set(e,t,["dragEnabled","scrollEnabled"]),_m(e,t)}},Dm={Unknown:0,LeftController:1,RightController:2},Em={Unknown:0,Trigger:1,TrackPad:2,Grip:3,ApplicationMenu:4},Im={Device:Dm,Input:Em};function km(e,t){t.classHierarchy.push("vtkCompositeVRManipulator"),e.onButton3D=function(e,t,n,r,i,o){},e.onMove3D=function(e,t,n,r,i,o){}}var Mm={};var Nm={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mm,n),Ae.setGet(e,t,["device","input"]),km(e,t)},Device:Dm,Input:Em};function Rm(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 Fm(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],o=document,a=n?"addEventListener":"removeEventListener",s=n?"removeEventListener":"addEventListener";!i&&!n&&r>0&&--r,r&&!i||(r=0,t.container&&t.container[s]("mousemove",e.handleMouseMove),o[a]("mouseup",e.handleMouseUp),o[a]("mousemove",e.handleMouseMove),o[a]("touchend",e.handleTouchEnd,!1),o[a]("touchcancel",e.handleTouchEnd,!1),o[a]("touchmove",e.handleTouchMove,!1)),!i&&n&&++r}function c(){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){jm("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 Vm("empty event loop")},e.getCurrentRenderer=function(){return t.currentRenderer||i(0,0),t.currentRenderer},e.bindEvents=function(n){t.container=n,n.addEventListener("contextmenu",Hm),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.addEventListener("keypress",e.handleKeyPress),document.addEventListener("keydown",e.handleKeyDown),document.addEventListener("keyup",e.handleKeyUp),document.addEventListener("pointerlockchange",e.handlePointerLockChange),n.addEventListener("touchstart",e.handleTouchStart,!1)},e.unbindEvents=function(){u(!1,!0),t.container.removeEventListener("contextmenu",Hm),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.removeEventListener("keypress",e.handleKeyPress),document.removeEventListener("keydown",e.handleKeyDown),document.removeEventListener("keyup",e.handleKeyUp),document.removeEventListener("pointerlockchange",e.handlePointerLockChange),t.container.removeEventListener("touchstart",e.handleTouchStart),t.container=null},e.handleKeyPress=function(t){var n=l(t);e.keyPressEvent(n)},e.handleKeyDown=function(t){var n=l(t);e.keyDownEvent(n)},e.handleKeyUp=function(t){var n=l(t);e.keyUpEvent(n)},e.handleMouseDown=function(t){if(!(t.button>2)){u(!0),Hm(t);var n=Fm(Fm({},s(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:jm("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)?Vm("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())):jm("undefined requester, can not start animating")},e.isAnimating=function(){return t.vrAnimation||null!==t.animationRequest},e.cancelAnimation=function(r){var i=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(!i){var o=r&&r.getClassName?r.getClassName():r;Vm("".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(),i=0;i1){var r=a(n.touches);if(2===n.touches.length){var i={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(i)}e.recognizeGesture("TouchStart",r)}else{var s={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(s)}},e.handleTouchMove=function(n){if(Hm(n),t.recognizeGestures&&n.touches.length>1){var r=a(n.touches);e.recognizeGesture("TouchMove",r)}else{var i={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.mouseMoveEvent(i)}},e.handleTouchEnd=function(n){if(Hm(n),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),u(!1)}else{var i=a(n.changedTouches);e.recognizeGesture("TouchEnd",i),u(!1)}else if(1===n.touches.length){var s=a(n.changedTouches);e.recognizeGesture("TouchEnd",s);var l={position:o(n.touches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonPressEvent(l)}else{var c=a(n.touches);e.recognizeGesture("TouchMove",c)}else{var d={position:o(n.changedTouches[0]),shiftKey:!1,altKey:!1,controlKey:!1};e.leftButtonReleaseEvent(d),u(!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 i=null,o=null,a=null,s=r.length;s--;){var l=r[s];if(t.view.isInViewport(e,n,l)&&l.getInteractive()){a=l;break}null===i&&l.getInteractive()&&(i=l),null===o&&t.view.isInViewport(e,n,l)&&(o=l)}return null===a&&(a=i),null===a&&(a=o),null==a&&(a=r[0]),a},e.render=function(){null!==t.animationRequest||t.inRender||c()},Wm.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 i=Fm({type:n,pokedRenderer:t.currentRenderer,firstRenderer:e.getFirstRenderer()},r);e["invoke".concat(n)](i)}else Um("\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 i=0,o=[],a=[];Object.keys(r).forEach((function(e){o[i]=r[e],a[i]=t.startingEventPositions[e],i++}));var s=Math.sqrt((a[0].x-a[1].x)*(a[0].x-a[1].x)+(a[0].y-a[1].y)*(a[0].y-a[1].y)),l=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)),u=Ve(Math.atan2(a[1].y-a[0].y,a[1].x-a[0].x)),c=Ve(Math.atan2(o[1].y-o[0].y,o[1].x-o[0].x)),d=c-u;c=c+180>=360?c-180:c+180,u=u+180>=360?u-180:u+180,Math.abs(c-u)f&&h>m&&h>g){t.currentGesture="Pinch";var v={scale:1,touches:r};e.startPinchEvent(v)}else if(m>f&&m>g){t.currentGesture="Rotate";var y={rotation:0,touches:r};e.startRotateEvent(y)}else if(g>f){t.currentGesture="Pan";var b={translation:[0,0],touches:r};e.startPanEvent(b)}}else{if("Rotate"===t.currentGesture){var w={rotation:d,touches:r};e.rotateEvent(w)}if("Pinch"===t.currentGesture){var x={scale:l/s,touches:r};e.pinchEvent(x)}if("Pan"===t.currentGesture){var S={translation:p,touches:r};e.panEvent(S)}}}},e.handleVisibilityChange=function(){t.lastFrameStart=Date.now()},e.setCurrentRenderer=function(e){t._forcedRenderer=!!e,t.currentRenderer=e};var d=e.delete;e.delete=function(){for(;n.size;)e.cancelAnimation(n.values().next().value);void 0!==document.hidden&&document.removeEventListener("visibilitychange",e.handleVisibilityChange),d()},void 0!==document.hidden&&document.addEventListener("visibilitychange",e.handleVisibilityChange,!1)}var Xm={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 qm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xm,n),Ae.obj(e,t),Ae.event(e,t,"RenderEvent"),Wm.forEach((function(n){return Ae.event(e,t,n)})),Ae.get(e,t,["initialized","container","interactorStyle","lastFrameTime","view"]),Ae.setGet(e,t,["lightFollowCamera","enabled","enableRender","recognizeGestures","desiredUpdateRate","stillUpdateRate","picker"]),Km(e,t)}var Ym=Fm({newInstance:Ae.newInstance(qm,"vtkRenderWindowInteractor"),extend:qm,handledEvents:Wm},Im);function Zm(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 Jm(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ng,n),Ae.obj(e,t),Ae.event(e,t,"InteractionEvent"),Ae.event(e,t,"StartInteractionEvent"),Ae.event(e,t,"EndInteractionEvent"),Ae.get(e,t,["interactor","enabled"]),Ae.setGet(e,t,["priority","processEvents"]),tg(e,t)}var ig=Jm({newInstance:Ae.newInstance(rg,"vtkInteractorObserver"),extend:rg},eg),og={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},ag={States:og};function sg(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 lg=ag.States,ug={Rotate:lg.IS_ROTATE,Pan:lg.IS_PAN,Spin:lg.IS_SPIN,Dolly:lg.IS_DOLLY,CameraPose:lg.IS_CAMERA_POSE,WindowLevel:lg.IS_WINDOW_LEVEL,Slice:lg.IS_SLICE};function cg(e,t){t.classHierarchy.push("vtkInteractorStyle"),Object.keys(ug).forEach((function(n){Ae.event(e,t,"Start".concat(n,"Event")),e["start".concat(n)]=function(){t.state===lg.IS_NONE&&(t.state=ug[n],t.interactor.requestAnimation(e),e.invokeStartInteractionEvent({type:"StartInteractionEvent"}),e["invokeStart".concat(n,"Event")]({type:"Start".concat(n,"Event")}))},Ae.event(e,t,"End".concat(n,"Event")),e["end".concat(n)]=function(){t.state===ug[n]&&(t.state=lg.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 dg={state:lg.IS_NONE,handleObservers:1,autoAdjustCameraClippingRange:1};function pg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dg,n),ig.extend(e,t,n),cg(e,t)}var fg=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Cg,n),fg.extend(e,t,n),Ae.setGet(e,t,["rotationFactor"]),Ae.get(e,t,["mouseManipulators","keyboardManipulators","vrManipulators","gestureManipulators"]),Ae.setGetArray(e,t,["centerOfRotation"],3),Sg(e,t)}var Pg=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Og,n),Ae.obj(e,t),Sm.extend(e,t,n),bm.extend(e,t,n),_g(e,t)}var Dg={newInstance:Ae.newInstance(Tg,"vtkGestureCameraManipulator"),extend:Tg},Eg=Ae.vtkErrorMacro,Ig="vtkKeyboardCameraManipulator";function kg(e,t){t.classHierarchy.push("vtkKeyboardCameraManipulator");var n={keysDown:[],direction:[0,0,0],skipUpdateDirection:!1,animationSub:null,cameraModifiedSub:null};e.inMotion=function(){return null!==n.animationSub},e.resetMovementSpeed=function(){var e=t.renderer.computeVisiblePropBounds();t.movementSpeed=si.getMaxLength(e)/500},e.startMovement=function(){if(e.inMotion())Eg("Camera is already in motion!");else{null===t.movementSpeed&&e.resetMovementSpeed();var r=t.interactor,i=t.renderer;e.calculateCurrentDirection();var o=i.getActiveCamera();n.cameraModifiedSub=o.onModified(e.calculateCurrentDirection),r.requestAnimation(Ig),n.animationSub=r.onAnimation((function(){0!==n.keysDown.length&&(n.skipUpdateDirection=!0,e.moveCamera(i.getActiveCamera(),n.direction,t.movementSpeed),i.resetCameraClippingRange(),r.getLightFollowCamera()&&i.updateLightsGeometryToFollowCamera(),n.skipUpdateDirection=!1)}))}},e.endMovement=function(){n.animationSub&&(n.animationSub.unsubscribe(),n.animationSub=null),t.interactor.cancelAnimation(Ig),n.cameraModifiedSub&&(n.cameraModifiedSub.unsubscribe(),n.cameraModifiedSub=null)},e.calculateCurrentDirection=function(){if(!n.skipUpdateDirection){n.direction=[0,0,0];var r=t.renderer;if(r){var i=r.getActiveCamera();if(i&&0!==n.keysDown.length){var o=n.keysDown.map((function(t){return e.getDirectionFromKey(t,i)}));if(0!==(o=o.filter((function(e){return e}))).length){var a=o.reduce((function(e,t){return ot(e,t,t),t}));mt(a),n.direction=a}}}}},e.getDirectionFromKey=function(e,n){var r;if(t.moveForwardKeys.includes(e))r=n.getDirectionOfProjection();else if(t.moveLeftKeys.includes(e)){var i=n.getDirectionOfProjection();r=[0,0,0],ft(n.getViewUp(),i,r)}else if(t.moveBackwardKeys.includes(e))r=n.getDirectionOfProjection().map((function(e){return-e}));else if(t.moveRightKeys.includes(e)){r=[0,0,0],ft(n.getDirectionOfProjection(),n.getViewUp(),r)}else if(t.moveUpKeys.includes(e))r=n.getViewUp();else{if(!t.moveDownKeys.includes(e))return;r=n.getViewUp().map((function(e){return-e}))}return mt(r),r},e.moveCamera=function(e,t,n){var r=e.getPosition(),i=e.getFocalPoint();e.setFocalPoint(i[0]+t[0]*n,i[1]+t[1]*n,i[2]+t[2]*n),e.setPosition(r[0]+t[0]*n,r[1]+t[1]*n,r[2]+t[2]*n)},e.onKeyPress=function(e,t,n){},e.onKeyDown=function(r,i,o){n.keysDown.includes(o)||(n.keysDown.push(o),e.calculateCurrentDirection()),e.inMotion()||(Object.assign(t,{interactor:r,renderer:i}),e.startMovement())},e.onKeyUp=function(t,r,i){n.keysDown=n.keysDown.filter((function(e){return e.toUpperCase()!==i.toUpperCase()})),e.calculateCurrentDirection(),0===n.keysDown.length&&e.endMovement()}}var Mg={movementSpeed:null,moveForwardKeys:["w","W","ArrowUp"],moveLeftKeys:["a","A","ArrowLeft"],moveBackwardKeys:["s","S","ArrowDown"],moveRightKeys:["d","D","ArrowRight"],moveUpKeys:[" "],moveDownKeys:["Shift"],interactor:null,renderer:null};function Ng(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mg,n),Ae.obj(e,t),Pm.extend(e,t,n),Ae.setGet(e,t,["movementSpeed","moveForwardKeys","moveLeftKeys","moveBackwardKeys","moveRightKeys","moveUpKeys","moveDownKeys","interactor","renderer"]),kg(e,t)}var Rg={newInstance:Ae.newInstance(Ng,"vtkKeyboardCameraManipulator"),extend:Ng};function Fg(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 Bg(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gg(n)),re(e,t),Tm.extend(e,t,n),he(e,t,"BoxSelectChange"),he(e,t,"BoxSelectInput"),le(e,t,["renderSelection","selectionStyle"]),jg(e,t)}var zg={newInstance:me(Ug,"vtkMouseBoxSelectionManipulator"),extend:Ug};function Wg(e,t){t.classHierarchy.push("vtkMouseCameraAxisRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(16),o=new Float64Array(3),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,u,c){if(c){var d=u.getActiveCamera(),p=d.getPosition(),f=d.getFocalPoint(),h=d.getViewUp(),m=d.getDirectionOfProjection();zo(i);var g=t.center,v=t.rotationFactor,y=t.rotationAxis;Yo(i,i,g);var b=t.previousPosition.x-c.x,x=t.previousPosition.y-c.y,S=e.getView().getSize();if(Jo(i,i,Le(360*b/S[0]*v),y),ft(m,h,o),Jo(i,i,Le(-360*x/S[1]*v),o),a[0]=-g[0],a[1]=-g[1],a[2]=-g[2],Yo(i,i,a),yo(n,p,i),yo(r,f,i),Yi(l,n,r),co(l,l),Math.abs(po(l,y))>.95)t.previousPosition=c;else{if(t.useHalfAxis){var C=oo(n,g);Yi(s,n,g),co(s,s);var A=po(y,s);if(A<0){io(n,n,y,-A*C),Yi(s,n,g),co(s,s),io(n,g,s,C),Yi(o,p,g),co(o,o);var P=Math.min(1,Math.max(-1,po(s,o))),_=Math.acos(P);fo(o,o,s),co(o,o),Yi(r,f,g);var O=Wi(r),T=w(r);Gs.buildFromRadian().rotate(_,o).apply(T),io(r,g,T,O)}}d.setPosition(n[0],n[1],n[2]),d.setFocalPoint(r[0],r[1],r[2]),d.setViewUp(y),u.resetCameraClippingRange(),e.getLightFollowCamera()&&u.updateLightsGeometryToFollowCamera(),t.previousPosition=c}}}}var Hg={rotationAxis:[0,0,1],useHalfAxis:!0};function Kg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hg,n),Ae.obj(e,t),Ae.setGet(e,t,["rotationAxis","useHalfAxis"]),Tm.extend(e,t,n),bm.extend(e,t,n),Wg(e,t)}var Xg={newInstance:Ae.newInstance(Kg,"vtkMouseCameraAxisRotateManipulator"),extend:Kg};function qg(e,t){t.classHierarchy.push("vtkMouseCameraSliceManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var i=r.y-t.previousPosition.y,o=n.getActiveCamera(),a=o.getClippingRange(),s=o.getDistance(),l=0;if(o.getParallelProjection())l=2*o.getParallelScale();else{var u=Le(o.getViewAngle());l=2*s*Math.tan(.5*u)}(s+=i*l/e.getView().getViewportSize(n)[1])a[1]&&(s=a[1]-.001*l),o.setDistance(s),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=1-n;r*=25;var i=t.getActiveCamera(),o=i.getClippingRange(),a=i.getDistance();(a+=r)o[1]&&(a=o[1]),i.setDistance(a)}}}var Yg={};function Zg(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yg,n),Ae.obj(e,t),bm.extend(e,t,n),Tm.extend(e,t,n),qg(e,t)}var Jg={newInstance:Ae.newInstance(Zg,"vtkMouseCameraSliceManipulator"),extend:Zg};function Qg(){var e=new Li(4);return Li!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function $g(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function ev(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=n[0],l=n[1],u=n[2],c=n[3];return e[0]=r*c+a*s+i*u-o*l,e[1]=i*c+a*l+o*s-r*u,e[2]=o*c+a*u+r*l-i*s,e[3]=a*c-r*s-i*l-o*u,e}function tv(e,t,n,r){var i,o,a,s,l,u=t[0],c=t[1],d=t[2],p=t[3],f=n[0],h=n[1],m=n[2],g=n[3];return u*f+c*h+d*m+p*g<0&&(-o,-f,-h,-m,-g),1-o>Bi?(Math.acos(o),Math.sin(i),Math.sin((1-r)*i)/a,Math.sin(r*i)/a):(1-r,r),e[0]=s*u+l*f,e[1]=s*c+l*h,e[2]=s*d+l*m,e[3]=s*p+l*g,e}var nv,rv,iv,ov,av,sv,lv=function(e,t,n,r){var i=new Li(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i},uv=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a,e};nv=Ui(),rv=Hi(1,0,0),iv=Hi(0,1,0),ov=Qg(),av=Qg(),sv=Ia();function cv(e){return function(){return Ae.vtkErrorMacro("vtkProp::".concat(e," - NOT IMPLEMENTED"))}}function dv(e,t){t.classHierarchy.push("vtkProp"),e.getMTime=function(){for(var e=t.mtime,n=0;ne&&(e=r)}return e},e.getNestedProps=function(){return null},e.getActors=function(){return[]},e.getActors2D=function(){return[]},e.getVolumes=function(){return[]},e.pick=cv("pick"),e.hasKey=cv("hasKey"),e.getNestedVisibility=function(){return t.visibility&&(!t.parentProp||t.parentProp.getNestedVisibility())},e.getNestedPickable=function(){return t.pickable&&(!t.parentProp||t.parentProp.getNestedPickable())},e.getNestedDragable=function(){return t.dragable&&(!t.parentProp||t.parentProp.getNestedDragable())},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 pv={visibility:!0,pickable:!0,dragable:!0,useBounds:!0,allocatedRenderTime:10,estimatedRenderTime:0,savedEstimatedRenderTime:0,renderTimeMultiplier:1,paths:null,textures:[]};function fv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pv,n),Ae.obj(e,t),Ae.get(e,t,["estimatedRenderTime","allocatedRenderTime"]),Ae.setGet(e,t,["visibility","pickable","dragable","useBounds","renderTimeMultiplier","parentProp"]),dv(e,t)}var hv={newInstance:Ae.newInstance(fv,"vtkProp"),extend:fv};function mv(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=Qg();da(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>Bi?(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[Ve(r),n[0],n[1],n[2]]},e.rotateX=function(n){0!==n&&(Qo(t.rotation,t.rotation,Le(n)),e.modified())},e.rotateY=function(n){0!==n&&($o(t.rotation,t.rotation,Le(n)),e.modified())},e.rotateZ=function(n){0!==n&&(ea(t.rotation,t.rotation,Le(n)),e.modified())},e.rotateWXYZ=function(n,r,i,o){if(0!==n&&(0!==r||0!==i||0!==o)){var a=Le(n),s=Qg();$g(s,[r,i,o],a);var l=new Float64Array(16);ha(l,s),qo(t.rotation,t.rotation,l),e.modified()}},e.setOrientation=function(n,r,i){return(n!==t.orientation[0]||r!==t.orientation[1]||i!==t.orientation[2])&&(t.orientation=[n,r,i],zo(t.rotation),e.rotateZ(i),e.rotateX(n),e.rotateY(r),e.modified(),!0)},e.setUserMatrix=function(n){jo(t.userMatrix,n),e.modified()},e.getMatrix=function(){return e.computeMatrix(),t.matrix},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){zo(t.matrix),t.userMatrix&&qo(t.matrix,t.matrix,t.userMatrix),Yo(t.matrix,t.matrix,t.origin),Yo(t.matrix,t.matrix,t.position),qo(t.matrix,t.matrix,t.rotation),Zo(t.matrix,t.matrix,t.scale),Yo(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Wo(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 si.getCenter(t.bounds)},e.getLength=function(){return si.getLength(t.bounds)},e.getXRange=function(){return si.getXRange(t.bounds)},e.getYRange=function(){return si.getYRange(t.bounds)},e.getZRange=function(){return si.getZRange(t.bounds)},e.getUserMatrix=function(){return t.userMatrix},e.onModified((function(){e.computeMatrix()}))}var gv={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 vv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gv,n),hv.extend(e,t,n),t.matrixMTime={},Ae.obj(t.matrixMTime),Ae.get(e,t,["bounds","isIdentity"]),Ae.getArray(e,t,["orientation"]),Ae.setGetArray(e,t,["origin","position","scale"],3),t.matrix=zo(new Float64Array(16)),t.rotation=zo(new Float64Array(16)),t.userMatrix=zo(new Float64Array(16)),t.transform=null,mv(e,t)}var yv={newInstance:Ae.newInstance(vv,"vtkProp3D"),extend:vv},bv={FLAT:0,GOURAUD:1,PHONG:2},wv={POINTS:0,WIREFRAME:1,SURFACE:2},xv={Shading:bv,Representation:wv,Interpolation:bv};function Sv(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 Cv=xv.Representation,Av=xv.Interpolation;function Pv(e){return function(){return Ae.vtkErrorMacro("vtkProperty::".concat(e," - NOT IMPLEMENTED"))}}function _v(e,t){t.classHierarchy.push("vtkProperty"),e.setColor=function(n,r,i){Array.isArray(n)?t.color[0]===n[0]&&t.color[1]===n[1]&&t.color[2]===n[2]||(t.color[0]=n[0],t.color[1]=n[1],t.color[2]=n[2],e.modified()):t.color[0]===n&&t.color[1]===r&&t.color[2]===i||(t.color[0]=n,t.color[1]=r,t.color[2]=i,e.modified()),e.setDiffuseColor(t.color),e.setAmbientColor(t.color),e.setSpecularColor(t.color)},e.computeCompositeColor=Pv("ComputeCompositeColor"),e.getColor=function(){var e=0;t.ambient+t.diffuse+t.specular>0&&(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=Pv("AddShaderVariable"),e.setInterpolationToFlat=function(){return e.setInterpolation(Av.FLAT)},e.setInterpolationToGouraud=function(){return e.setInterpolation(Av.GOURAUD)},e.setInterpolationToPhong=function(){return e.setInterpolation(Av.PHONG)},e.getInterpolationAsString=function(){return Ae.enumToString(Av,t.interpolation)},e.setRepresentationToWireframe=function(){return e.setRepresentation(Cv.WIREFRAME)},e.setRepresentationToSurface=function(){return e.setRepresentation(Cv.SURFACE)},e.setRepresentationToPoints=function(){return e.setRepresentation(Cv.POINTS)},e.getRepresentationAsString=function(){return Ae.enumToString(Cv,t.representation)}}var Ov={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:Av.GOURAUD,representation:Cv.SURFACE,edgeVisibility:!1,backfaceCulling:!1,frontfaceCulling:!1,pointSize:1,lineWidth:1,lighting:!0,shading:!1,materialName:null};function Tv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ov,n),Ae.obj(e,t),Ae.setGet(e,t,["lighting","interpolation","ambient","diffuse","specular","specularPower","opacity","edgeVisibility","lineWidth","pointSize","backfaceCulling","frontfaceCulling","representation"]),Ae.setGetArray(e,t,["ambientColor","specularColor","diffuseColor","edgeColor"],3),_v(e,t)}var Dv=function(e){for(var t=1;t=1;return n=(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=Dv.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()){Iv("Recomputing bounds..."),t.mapperBounds=n.concat();var r=[];si.getCorners(n,r),e.computeMatrix();var i=new Float64Array(16);Wo(i,t.matrix),r.forEach((function(e){return yo(e,e,i)})),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 i=t.backfaceProperty.getMTime();e=i>e?i: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 Mv={mapper:null,property:null,backfaceProperty:null,forceOpaque:!1,forceTranslucent:!1,bounds:[1,-1,1,-1,1,-1]};function Nv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mv,n),yv.extend(e,t,n),t.boundsMTime={},Ae.obj(t.boundsMTime),Ae.set(e,t,["property"]),Ae.setGet(e,t,["backfaceProperty","forceOpaque","forceTranslucent","mapper"]),kv(e,t)}var Rv={newInstance:Ae.newInstance(Nv,"vtkActor"),extend:Nv};function Fv(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;r=0&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Bv,n),Ae.obj(e,t),Ae.algo(e,t,1,0),t.clippingPlanes||(t.clippingPlanes=[]),Fv(e,t)}};function Vv(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 i=0;i<3;i++)r+=(n=t.bounds[2*i+1]-t.bounds[2*i])*n;return Math.sqrt(r)}}var jv={bounds:[1,-1,1,-1,1,-1],center:[0,0,0]};var Gv={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jv,n),Lv.extend(e,t,n),t.bounds||hn(t.bounds),t.center||(t.center=[0,0,0]),Vv(e,t)}},Uv=1,zv=0,Wv=["VTK_RESOLVE_OFF","VTK_RESOLVE_POLYGON_OFFSET"];function Hv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;zv=e}var Kv={getResolveCoincidentTopologyAsString:function(){return Wv[zv]},getResolveCoincidentTopologyPolygonOffsetFaces:function(){return Uv},getResolveCoincidentTopology:function(){return zv},setResolveCoincidentTopology:Hv,setResolveCoincidentTopologyPolygonOffsetFaces:function(e){Uv=e},setResolveCoincidentTopologyToDefault:function(){Hv(0)},setResolveCoincidentTopologyToOff:function(){Hv(0)},setResolveCoincidentTopologyToPolygonOffset:function(){Hv(1)}};function Xv(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 qv=["Polygon","Line","Point"],Yv={};Xv(Yv,{Polygon:{factor:2,offset:0},Line:{factor:1,offset:-1},Point:{factor:0,offset:-2}},qv.map((function(e){return{key:e,method:"ResolveCoincidentTopology".concat(e,"OffsetParameters")}})));var Zv={implementCoincidentTopologyMethods:function(e,t){void 0===t.resolveCoincidentTopology&&(t.resolveCoincidentTopology=!1),Ae.setGet(e,t,["resolveCoincidentTopology"]),t.topologyOffset={Polygon:{factor:0,offset:0},Line:{factor:0,offset:0},Point:{factor:0,offset:0}},Object.keys(Kv).forEach((function(t){e[t]=Kv[t]})),Object.keys(Yv).forEach((function(t){e[t]=Yv[t]})),Xv(e,t.topologyOffset,qv.map((function(e){return{key:e,method:"RelativeCoincidentTopology".concat(e,"OffsetParameters")}}))),e.getCoincidentTopologyPolygonOffsetParameters=function(){var t=Yv.getResolveCoincidentTopologyPolygonOffsetParameters(),n=e.getRelativeCoincidentTopologyPolygonOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyLineOffsetParameters=function(){var t=Yv.getResolveCoincidentTopologyLineOffsetParameters(),n=e.getRelativeCoincidentTopologyLineOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}},e.getCoincidentTopologyPointOffsetParameter=function(){var t=Yv.getResolveCoincidentTopologyPointOffsetParameters(),n=e.getRelativeCoincidentTopologyPointOffsetParameters();return{factor:t.factor+n.factor,offset:t.offset+n.offset}}},staticOffsetAPI:Yv,otherStaticMethods:Kv,CATEGORIES:qv};function Jv(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 Qv(e){for(var t=1;t1e3?r=1e3:r<-1e3&&(r=-1e3)),{texCoordS:r,texCoordT:i}},e.createColorTextureCoordinates=function(t,n,r,i,o,a,s,l,u){var c=(a[1]-a[0])/l,d=[];d[0]=a[0]-c,d[1]=a[1]+c;var p=1/(d[1]-d[0]),f=n.getData(),h=t.getData(),m=0,g=0;if(o<0||o>=i)for(var v=0;vt.colorTextureMap.getMTime()||t.lookupTable.getMTime()>t.colorTextureMap.getMTime()||t.lookupTable.getAlpha()!==r){t.lookupTable.setAlpha(r),t.colorTextureMap=null,t.lookupTable.build();var s=t.lookupTable.getNumberOfAvailableColors();s>4094&&(s=4094),s+=2;for(var l=(i[1]-i[0])/(s-1-2),u=new Float64Array(2*s),c=0;ct.colorCoordinates.getMTime()||e.getInputData(0).getMTime()>t.colorCoordinates.getMTime()||t.lookupTable.getMTime()>t.colorCoordinates.getMTime()){t.colorCoordinates=null;var f=n.getNumberOfComponents(),h=n.getNumberOfTuples();t.colorCoordinates=Jn.newInstance({numberOfComponents:2,values:new Float32Array(2*h)});var m=t.lookupTable.getVectorComponent();t.lookupTable.getVectorMode()===iy.MAGNITUDE&&n.getNumberOfComponents()>1&&(m=-1),e.createColorTextureCoordinates(n,t.colorCoordinates,h,f,m,i,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),i=r.scalars;return!!i&&(!r.cellFlag&&((t.colorMode!==ty.DEFAULT||i.getDataType()!==oy.UNSIGNED_CHAR)&&t.colorMode!==ty.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=ay("AcquireInvertibleLookupTable"),e.valueToColor=ay("ValueToColor"),e.colorToValue=ay("ColorToValue"),e.useInvertibleColorFor=ay("UseInvertibleColorFor"),e.clearInvertibleColor=ay("ClearInvertibleColor")}var ly={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 uy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ly,n),Gv.extend(e,t,n),Ae.get(e,t,["colorCoordinates","colorMapColors","colorTextureMap"]),Ae.setGet(e,t,["colorByArrayName","arrayAccessMode","colorMode","fieldDataTupleId","interpolateScalarsBeforeMapping","lookupTable","renderTime","scalarMode","scalarVisibility","static","useLookupTableScalarRange","viewSpecificProperties","customShaderAttributes"]),Ae.setGetArray(e,t,["scalarRange"],2),t.viewSpecificProperties||(t.viewSpecificProperties={}),Zv.implementCoincidentTopologyMethods(e,t),sy(e,t)}var cy=Qv(Qv(Qv({newInstance:Ae.newInstance(uy,"vtkMapper"),extend:uy},$v),ey),bs);function dy(e,t){t.classHierarchy.push("vtkAbstractPicker"),e.initialize=function(){t.renderer=null,t.selectionPoint[0]=0,t.selectionPoint[1]=0,t.selectionPoint[2]=0,t.pickPosition[0]=0,t.pickPosition[1]=0,t.pickPosition[2]=0},e.initializePickList=function(){t.pickList=[]},e.addPickList=function(e){t.pickList.push(e)},e.deletePickList=function(e){var n=t.pickList.indexOf(e);-1!==n&&t.pickList.splice(n,1)}}var py={renderer:null,selectionPoint:[0,0,0],pickPosition:[0,0,0],pickFromList:0,pickList:[]};function fy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,py,n),Ae.obj(e,t),Ae.get(e,t,["renderer"]),Ae.getArray(e,t,["selectionPoint","pickPosition"]),Ae.setGet(e,t,["pickFromList","pickList"]),dy(e,t)}var hy={newInstance:Ae.newInstance(fy,"vtkAbstractPicker"),extend:fy};function my(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 gy=Ae.vtkErrorMacro,vy=Ae.vtkWarningMacro;function yy(e,t){t.classHierarchy.push("vtkPicker");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,by,n),hy.extend(e,t,n),Ae.setGet(e,t,["tolerance"]),Ae.setGetArray(e,t,["mapperPosition"],3),Ae.get(e,t,["mapper","dataSet","actors","pickedPositions"]),Ae.event(e,t,"pickChange"),yy(e,t)}var xy={newInstance:Ae.newInstance(wy,"vtkPicker"),extend:wy},Sy=Ae.vtkErrorMacro;function Cy(e,t){t.classHierarchy.push("vtkPointPicker"),e.intersectWithLine=function(n,r,i,o){var a=Number.MAX_VALUE;if(o.isA("vtkImageMapper")){var s=o.intersectWithLineForPointPicking(n,r);s&&(a=s.t,t.pointIJK=s.ijk)}else o.isA("vtkMapper")&&(a=e.intersectActorWithLine(n,r,i,o));return a},e.intersectActorWithLine=function(e,n,r,i){var o=i.getInputData(),a=0,s=o.getPoints().getNumberOfPoints();if(s<=a)return 2;for(var l=[],u=0;u<3;u++)l[u]=n[u]-e[u];var c,d=dt(l,l);if(0===d)return Sy("Cannot process points"),2;var p=-1,f=Number.MAX_VALUE,h=Number.MAX_VALUE,m=[],g=[],v=[],y=o.getPoints();if(t.useCells)for(var b=o.getPolys().getData(),w=b[0],x=o.getPolys().getNumberOfCells(),S=0;S=0&&c<=1&&c<=f+t.tolerance){for(var O=0,T=0;T<3;T++){m[T]=e[T]+c*l[T];var D=Math.abs(v[T]-m[T]);D>O&&(O=D)}O<=r&&O=0&&c<=1&&c<=f+t.tolerance){for(var E=0,I=0;I<3;I++){m[I]=e[I]+c*l[I];var k=Math.abs(v[I]-m[I]);k>E&&(E=k)}E<=r&&E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ay,n),xy.extend(e,t,n),Ae.getArray(e,t,["pointIJK"]),Ae.get(e,t,["pointId"]),Ae.setGet(e,t,["useCells"]),Cy(e,t)}var _y={newInstance:Ae.newInstance(Py,"vtkPointPicker"),extend:Py},Oy=ag.States;function Ty(e,t){t.classHierarchy.push("vtkMouseCameraUnicamRotateManipulator"),t.picker=_y.newInstance(),t.downPoint=[0,0,0],t.isDot=!1,t.state=Oy.IS_NONE;var n=ph.newInstance();n.setThetaResolution(6),n.setPhiResolution(6);var r=cy.newInstance();r.setInputConnection(n.getOutputPort()),t.focusSphere=Rv.newInstance(),t.focusSphere.setMapper(r),t.focusSphere.getProperty().setColor(.89,.66,.41),t.focusSphere.getProperty().setAmbient(1),t.focusSphere.getProperty().setDiffuse(0),t.focusSphere.getProperty().setRepresentationToWireframe();var i=function(e){if(e){if(t.useWorldUpVec){var n=e.findPokedRenderer().getActiveCamera();jt(t.worldUpVec,n.getViewPlaneNormal())||n.setViewUp(t.worldUpVec)}e.render()}},o=function(e,t){var n=y(t.getView().getSize(),2),r=n[0],i=n[1];return{x:2*e.x/r-1,y:2*e.y/i-1}},a=function(e,t,n,r,i,o,a,s){var l=e.getPosition(),u=e.getFocalPoint(),c=e.getViewUp();l[3]=1,u[3]=1,c[3]=0;var d=zo(new Float64Array(16));Yo(d,d,[t,n,r]),Jo(d,d,s,[i,o,a]),Yo(d,d,[-t,-n,-r]);var p=[],f=[];yo(p,l,d),yo(f,u,d),zo(d),Jo(d,d,s,[i,o,a]);var h=[];yo(h,c,d),e.setPosition.apply(e,p),e.setFocalPoint.apply(e,f),e.setViewUp.apply(e,h)},s=function(e){!function(e){var n,r=e.findPokedRenderer();(n=t.focusSphere).setPosition.apply(n,w(t.downPoint));var i=r.getActiveCamera(),o=i.getPosition(),a=[];at(t.downPoint,o,a),i.getParallelProjection()&&st(a,i.getParallelScale());var s=i.getDirectionOfProjection();mt(s);var l=.02*dt(s,a)*t.focusSphereRadiusFactor;t.focusSphere.setScale(l,l,l)}(e),e.findPokedRenderer().addActor(t.focusSphere),t.isDot=!0},l=function(e,n){var r=e.findPokedRenderer(),i=null;if(t.useHardwareSelector){var o=e.getView().getSelector();o.setCaptureZValues(!0),o.setFieldAssociation(Ai.FIELD_ASSOCIATION_POINTS),o.attach(e.getView(),r),o.setArea(n.x,n.y,n.x,n.y),i=o.select()}return i&&0!==i.length?Array.from(i[0].getProperties().worldPosition):function(e,n){var r=e.findPokedRenderer();t.picker.pick([n.x,n.y,n.z],r);var i=t.picker.getPickedPositions();if(0===i.length)return t.picker.getPickPosition();var o=r.getActiveCamera().getPosition();return i.sort((function(e,t){return wt(e,o)-wt(t,o)})),i[0]}(e,n)};e.onButtonDown=function(e,n,r){t.buttonPressed=!0,t.startPosition=r,t.previousPosition=r;var i=o(r,e);if(Math.abs(i.x)>.9||Math.abs(i.y)>.9)return t.state=Oy.IS_ROTATE,void s(e);t.downPoint=l(e,r),t.isDot?t.state=Oy.IS_ROTATE:(t.state=Oy.IS_NONE,t.displayFocusSphereOnButtonDown&&s(e))},e.onMouseMove=function(n,r,s){t.buttonPressed&&(t.state=Oy.IS_ROTATE,function(n,r){var s,l=n.findPokedRenderer(),u=o(r,n),c=o(t.previousPosition,n),d=t.focusSphere.getPosition(),p=(s=n.getView()).worldToDisplay.apply(s,w(d).concat([l]));p=[(p=o({x:d[0],y:d[1]},n)).x,p.y,d[2]];var f=Math.pow(1+Math.abs(p[0]),2),h=[c.x,0,0],m=[u.x,0,0],g=Math.pow(h[0],2),v=Math.pow(m[0],2),y=g>f?0:Math.sqrt(f-g),b=v>f?0:Math.sqrt(f-v),x=[h[0],0,y];mt(x);var S=[m[0],0,b];mt(S);var C=dt(x,S);if(Math.abs(C)>1e-4){var A=-2*Math.acos(vn(C,-1,1))*Math.sign(u.x-c.x)*e.getRotationFactor(),P=l.getActiveCamera(),_=t.useWorldUpVec?t.worldUpVec:P.getViewUp();mt(_),a.apply(void 0,[P].concat(w(d),w(_),[A]));var O=[];at(P.getPosition(),r,O);var T=(u.y-c.y)*e.getRotationFactor();mt(O);var D=P.getViewPlaneNormal(),E=[];ft(P.getViewUp(),D,E),mt(E),t.useWorldUpVec&&(dt(_,D)>.99&&T<0&&(T=0),dt(_,D)<-.99&&T>0&&(T=0)),a.apply(void 0,[P].concat(w(d),E,[T])),t.useWorldUpVec&&!jt(_,P.getViewPlaneNormal())&&P.setViewUp.apply(P,w(_)),t.previousPosition=r,l.resetCameraClippingRange(),i(n)}}(n,s),t.previousPosition=s)},e.onButtonUp=function(e){var n=e.findPokedRenderer();t.buttonPressed=!1,(t.state!==Oy.IS_ROTATE||t.isDot)&&(t.state===Oy.IS_ROTATE?function(e){e.findPokedRenderer().removeActor(t.focusSphere),t.isDot=!1}(e):t.state===Oy.IS_NONE&&s(e),n.resetCameraClippingRange(),i(e))},e.getFocusSphereColor=function(){t.focusSphere.getProperty().getColor()},e.setFocusSphereColor=function(e,n,r){t.focusSphere.getProperty().setColor(e,n,r)}}var Dy={focusSphereRadiusFactor:1,displayFocusSphereOnButtonDown:!0,useHardwareSelector:!0,useWorldUpVec:!0,worldUpVec:[0,0,1]};function Ey(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Dy,n),Ae.obj(e,t),bm.extend(e,t,n),Tm.extend(e,t,n),Ae.setGet(e,t,["focusSphereRadiusFactor","displayFocusSphereOnButtonDown","useHardwareSelector","useWorldUpVec"]),Ae.get(e,t,["state"]),Ae.getArray(e,t,["downPoint"],3),Ae.setGetArray(e,t,["worldUpVec"],3),Ty(e,t)}var Iy={newInstance:Ae.newInstance(Ey,"vtkMouseCameraUnicamRotateManipulator"),extend:Ey},ky=ag.States;function My(e,t){t.classHierarchy.push("vtkMouseCameraUnicamManipulator"),t.state=ky.IS_NONE,t.rotateManipulator=Iy.newInstance({button:t.button,shift:t.shift,control:t.control,alt:t.alt,dragEnabled:t.dragEnabled,scrollEnabled:t.scrollEnabled,displayFocusSphereOnButtonDown:!1});var n=function(e,t){var n=y(t.getView().getSize(),2),r=n[0],i=n[1];return{x:2*e.x/r-1,y:2*e.y/i-1}},r=function(e,t){var n=t.findPokedRenderer().getActiveCamera(),r=[0,0,0];at(e,n.getPosition(),r),n.getParallelProjection()&&st(r,n.getParallelScale());var i=n.getViewPlaneNormal();mt(i);var o=dt(r,i),a=Le(n.getViewAngle()),s=y(t.getView().getSize(),2),l=s[0]/s[1]*(2*o*Math.tan(a/2)/2),u=2*o*Math.tan(a/2)/2,c=n.getViewUp(),d=[];return ft(c,i,d),ft(i,d,c),mt(d),mt(c),st(d,l),st(c,u),{rightV:d,upV:c}};e.onButtonDown=function(e,n,r){t.buttonPressed=!0,t.startPosition=r,t.previousPosition=r,t.time=Date.now()/1e3,t.dist=0,t.rotateManipulator.onButtonDown(e,n,r),t.downPoint=t.rotateManipulator.getDownPoint()},e.onMouseMove=function(e,i,o){if(t.buttonPressed){if(t.rotateManipulator.getState()===ky.IS_ROTATE)t.rotateManipulator.onMouseMove(e,i,o);else switch(t.state){case ky.IS_NONE:!function(e,r){var i=n(r,e),o=n(t.previousPosition,e),a={x:i.x-o.x,y:i.y-o.y};t.previousPosition=r;var s=Date.now()/1e3-t.time;t.dist+=Math.sqrt(Math.pow(a.x,2)+Math.pow(a.y,2));var l={x:r.x-t.startPosition.x,y:r.y-t.startPosition.y},u=Math.sqrt(Math.pow(l.x,2)+Math.pow(l.y,2));Math.abs(l.y)/u>.9&&s>.05?t.state=ky.IS_DOLLY:(s>=.1||t.dist>=.03)&&(Math.abs(l.x)/u>.6?t.state=ky.IS_PAN:t.state=ky.IS_DOLLY)}(e,o);break;case ky.IS_PAN:!function(e,i){var o=e.findPokedRenderer(),a=n(i,e),s=n(t.previousPosition,e),l=a.x-s.x,u=a.y-s.y,c=o.getActiveCamera();t.previousPosition=i;for(var d=r(t.downPoint,e),p=d.rightV,f=d.upV,h=[],m=0;m<3;m++)h[m]=l*p[m]+u*f[m];c.translate.apply(c,h),o.resetCameraClippingRange(),e.render()}(e,o);break;case ky.IS_DOLLY:!function(e,i){var o=e.findPokedRenderer(),a=n(i,e),s=n(t.previousPosition,e),l={x:a.x-s.x,y:a.y-s.y},u=o.getActiveCamera(),c=u.getPosition();if(u.getParallelProjection())u.zoom(1-l.y);else{var d=[];at(t.downPoint,c,d),st(d,-4*l.y),u.translate.apply(u,d)}var p=r(t.downPoint,e).rightV;st(p,l.x),u.translate.apply(u,w(p)),o.resetCameraClippingRange(),e.render()}(e,o)}t.previousPosition=o}},e.onButtonUp=function(e){t.buttonPressed=!1,t.state===ky.IS_NONE&&t.rotateManipulator.onButtonUp(e),t.state=ky.IS_NONE},e.getUseWorldUpVec=function(){return t.rotateManipulator.getUseWorldUpVec()},e.setUseWorldUpVec=function(e){t.rotateManipulator.setUseWorldUpVec(e)},e.getWorldUpVec=function(){return t.rotateManipulator.getWorldUpVec()},e.setWorldUpVec=function(e,n,r){t.rotateManipulator.setWorldUpVec(e,n,r)},e.getUseHardwareSelector=function(){return t.rotateManipulator.getUseHardwareSelector()},e.setUseHardwareSelector=function(e){t.rotateManipulator.setUseHardwareSelector(e)},e.getFocusSphereColor=function(){t.rotateManipulator.getFocusSphereColor()},e.setFocusSphereColor=function(e,n,r){t.rotateManipulator.setFocusSphereColor(e,n,r)},e.getFocusSphereRadiusFactor=function(){return t.rotateManipulator.getFocusSphereRadiusFactor()},e.setFocusSphereRadiusFactor=function(e){t.rotateManipulator.setFocusSphereRadiusFactor(e)}}var Ny={};function Ry(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ny,n),Ae.obj(e,t),bm.extend(e,t,n),Tm.extend(e,t,n),My(e,t)}var Fy={newInstance:Ae.newInstance(Ry,"vtkMouseCameraUnicamManipulator"),extend:Ry};function By(e,t){t.classHierarchy.push("vtkMouseCameraTrackballFirstPersonManipulator");var n={interactor:null,renderer:null,previousPosition:null};e.onButtonDown=function(r,i,o){n.previousPosition=o,t.usePointerLock&&!r.isPointerLocked()&&(Object.assign(n,{interactor:r,renderer:i}),r.requestPointerLock(),e.startPointerLockInteraction())},e.startPointerLockInteraction=function(){var t=n.interactor;document.addEventListener("mousemove",e.onPointerLockMove);var r=null;r=t.onEndPointerLock((function(){document.removeEventListener("mousemove",e.onPointerLockMove),r.unsubscribe()}))},e.onPointerLockMove=function(n){var r=t.sensitivity,i=-1*n.movementX*r,o=-1*n.movementY*r;e.moveCamera(i,o)},e.onMouseMove=function(r,i,o){if(o){var a=n.previousPosition,s=t.sensitivity,l=(a.x-o.x)*s,u=(o.y-a.y)*s;Object.assign(n,{interactor:r,renderer:i}),e.moveCamera(l,u),n.previousPosition=o}},e.moveCamera=function(e,r){var i=n.renderer,o=n.interactor,a=i.getActiveCamera(),s=t.numAnimationSteps,l=e/s,u=r/s,c=performance.now().toString(),d="".concat("vtkMouseCameraTrackballFirstPersonManipulator",".").concat(c),p=0,f=null;o.requestAnimation(d),f=o.onAnimation((function(){return a.yaw(l),a.pitch(u),a.orthogonalizeViewUp(),void((p+=1)===s&&(f.unsubscribe(),i.resetCameraClippingRange(),o.getLightFollowCamera()&&i.updateLightsGeometryToFollowCamera(),setTimeout((function(){n.interactor.cancelAnimation(d)}),0)))}))}}var Ly={numAnimationSteps:5,sensitivity:.05,usePointerLock:!0};function Vy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ly,n),Ae.obj(e,t),bm.extend(e,t,n),Tm.extend(e,t,n),Ae.setGet(e,t,["numAnimationSteps","sensitivity","usePointerLock"]),By(e,t)}var jy={newInstance:Ae.newInstance(Vy,"vtkMouseCameraTrackballFirstPersonManipulator"),extend:Vy};function Gy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRotateManipulator");var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(16),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,u,c){if(c){var d=u.getActiveCamera(),p=d.getPosition(),f=d.getFocalPoint();zo(o);var h=t.center,m=t.rotationFactor;t.useFocalPointAsCenterOfRotation&&(h[0]=f[0],h[1]=f[1],h[2]=f[2]);var g=t.previousPosition.x-c.x,v=t.previousPosition.y-c.y,y=e.getView().getSize(),b=d.getViewUp();if(t.useWorldUpVec){var w=new Float64Array(3);Ki(w,t.worldUpVec),st(w,dt(p,t.worldUpVec)/dt(t.worldUpVec,t.worldUpVec)),ot(h,w,w),Yo(o,o,w),Jo(o,o,Le(360*g/y[0]*m),t.worldUpVec),w[0]=-w[0],w[1]=-w[1],w[2]=-w[2],Yo(o,o,w),Yo(o,o,h)}else Yo(o,o,h),Jo(o,o,Le(360*g/y[0]*m),b);ft(d.getDirectionOfProjection(),b,a),Jo(o,o,Le(-360*v/y[1]*m),a),s[0]=-h[0],s[1]=-h[1],s[2]=-h[2],Yo(o,o,s),yo(n,p,o),yo(r,f,o),l[0]=b[0]+p[0],l[1]=b[1]+p[1],l[2]=b[2]+p[2],yo(i,l,o),d.setPosition(n[0],n[1],n[2]),d.setFocalPoint(r[0],r[1],r[2]),d.setViewUp(i[0]-n[0],i[1]-n[1],i[2]-n[2]),d.orthogonalizeViewUp(),u.resetCameraClippingRange(),e.getLightFollowCamera()&&u.updateLightsGeometryToFollowCamera(),t.previousPosition=c}}}var Uy={useWorldUpVec:!1,worldUpVec:[0,1,0],useFocalPointAsCenterOfRotation:!1};function zy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uy,n),Ae.obj(e,t),Tm.extend(e,t,n),bm.extend(e,t,n),Ae.setGet(e,t,["useWorldUpVec"]),Ae.setGetArray(e,t,["worldUpVec"],3),Ae.setGet(e,t,["useFocalPointAsCenterOfRotation"]),Gy(e,t)}var Wy={newInstance:Ae.newInstance(zy,"vtkMouseCameraTrackballRotateManipulator"),extend:zy};function Hy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballRollManipulator");var n=new Float64Array(3),r=new Float64Array(3),i=new Float64Array(3),o=new Float64Array(16),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3);e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(u,c,d){if(d){var p=c.getActiveCamera(),f=p.getPosition(),h=p.getFocalPoint(),m=p.getViewUp();n[0]=h[0]-f[0],n[1]=h[1]-f[1],n[2]=h[2]-f[2],e.computeDisplayCenter(u.getInteractorStyle(),c);var g=t.previousPosition.x-t.displayCenter[0],v=d.x-t.displayCenter[0],y=t.previousPosition.y-t.displayCenter[1],b=d.y-t.displayCenter[1];if(!(0===v&&0===b||0===g&&0===y)){var w=Ve((g*b-y*v)/(Math.sqrt(g*g+y*y)*Math.sqrt(v*v+b*b))),x=t.center;zo(o),i[0]=-x[0],i[1]=-x[1],i[2]=-x[2],Yo(o,o,x),Jo(o,o,Le(w),n),Yo(o,o,i),yo(a,f,o),yo(s,h,o),r[0]=m[0]+f[0],r[1]=m[1]+f[1],r[2]=m[2]+f[2],yo(l,r,o),p.setPosition(a[0],a[1],a[2]),p.setFocalPoint(s[0],s[1],s[2]),p.setViewUp(l[0]-a[0],l[1]-a[1],l[2]-a[2]),p.orthogonalizeViewUp(),c.resetCameraClippingRange(),u.getLightFollowCamera()&&c.updateLightsGeometryToFollowCamera(),t.previousPosition=d}}}}var Ky={};function Xy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ky,n),Ae.obj(e,t),bm.extend(e,t,n),Tm.extend(e,t,n),Hy(e,t)}var qy={newInstance:Ae.newInstance(Xy,"vtkMouseCameraTrackballRollManipulator"),extend:Xy};function Yy(e){return e*e}function Zy(e,t){t.classHierarchy.push("vtkMouseCameraTrackballMultiRotateManipulator");var n=Wy.newInstance(),r=qy.newInstance(),i=null;e.onButtonDown=function(t,o,a){var s,l,u=t.getView().getSize(),c=[.5*u[0],.5*u[1]],d=.9*((s=c[0])<(l=c[1])?l:s),p=Yy(c[0]-a.x)+Yy(c[1]-a.y);(i=d*d>p?n:r).setButton(e.getButton()),i.setShift(e.getShift()),i.setControl(e.getControl()),i.setCenter(e.getCenter()),i.onButtonDown(t,a)},e.onButtonUp=function(e){i&&i.onButtonUp(e)},e.onMouseMove=function(e,t,n){i&&i.onMouseMove(e,t,n)}}var Jy={};function Qy(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Jy,n),Ae.obj(e,t),Tm.extend(e,t,n),bm.extend(e,t,n),Zy(e,t)}var $y={newInstance:Ae.newInstance(Qy,"vtkMouseCameraTrackballMultiRotateManipulator"),extend:Qy};function eb(e,t){t.classHierarchy.push("vtkMouseCameraTrackballPanManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r},e.onMouseMove=function(e,n,r){if(r){var i=r,o=t.previousPosition;t.previousPosition=r;var a=n.getActiveCamera(),s=a.getPosition(),l=a.getFocalPoint();if(a.getParallelProjection()){a.orthogonalizeViewUp();var u=a.getViewUp(),c=[0,0,0];ft(a.getViewPlaneNormal(),u,c);var d=e.getView().getSize()[1],p=(i.x-o.x)/d,f=(o.y-i.y)/d,h=a.getParallelScale();f*=2*h;var m=c[0]*(p*=2*h)+u[0]*f;s[0]+=m,l[0]+=m,m=c[1]*p+u[1]*f,s[1]+=m,l[1]+=m,m=c[2]*p+u[2]*f,s[2]+=m,l[2]+=m,a.setPosition(s[0],s[1],s[2]),a.setFocalPoint(l[0],l[1],l[2])}else{var g=t.center,v=e.getInteractorStyle(),y=v.computeWorldToDisplay(n,g[0],g[1],g[2])[2],b=v.computeDisplayToWorld(n,i.x,i.y,y),w=v.computeDisplayToWorld(n,o.x,o.y,y),x=[s[0]+(w[0]-b[0]),s[1]+(w[1]-b[1]),s[2]+(w[2]-b[2])],S=[l[0]+(w[0]-b[0]),l[1]+(w[1]-b[1]),l[2]+(w[2]-b[2])];a.setPosition(x[0],x[1],x[2]),a.setFocalPoint(S[0],S[1],S[2])}n.resetCameraClippingRange(),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()}}}var tb={};function nb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tb,n),Ae.obj(e,t),bm.extend(e,t,n),Tm.extend(e,t,n),eb(e,t)}var rb={newInstance:Ae.newInstance(nb,"vtkMouseCameraTrackballPanManipulator"),extend:nb};function ib(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomManipulator"),e.onButtonDown=function(e,n,r){t.previousPosition=r;var i=e.getView().getSize(),o=n.getActiveCamera(),a=t.flipDirection?-1:1;if(o.getParallelProjection())t.zoomScale=1.5/i[1]*a;else{var s=o.getClippingRange();t.zoomScale=s[1]/i[1]*1.5*a}},e.onMouseMove=function(e,n,r){if(r){var i=t.previousPosition.y-r.y,o=n.getActiveCamera();if(o.getParallelProjection()){var a=i*t.zoomScale;o.setParallelScale((1-a)*o.getParallelScale())}else{var s=o.getPosition(),l=o.getFocalPoint(),u=o.getDirectionOfProjection(),c=i*t.zoomScale,d=c*u[0];s[0]+=d,l[0]+=d,d=c*u[1],s[1]+=d,l[1]+=d,d=c*u[2],s[2]+=d,l[2]+=d,o.getFreezeFocalPoint()||o.setFocalPoint(l[0],l[1],l[2]),o.setPosition(s[0],s[1],s[2]),n.resetCameraClippingRange()}e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n){if(n){var r=t.getActiveCamera(),i=1-n/10;r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/i):(r.dolly(i),t.resetCameraClippingRange()),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var ob={zoomScale:0,flipDirection:!1};function ab(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ob,n),Ae.obj(e,t),Tm.extend(e,t,n),bm.extend(e,t,n),Ae.setGet(e,t,["flipDirection"]),ib(e,t)}var sb={newInstance:Ae.newInstance(ab,"vtkMouseCameraTrackballZoomManipulator"),extend:ab};function lb(e,t){t.classHierarchy.push("vtkMouseCameraTrackballZoomToMouseManipulator");var n=e.onButtonDown;e.onButtonDown=function(e,r,i){n(e,r,i),t.zoomPosition=i},e.onMouseMove=function(e,n,r){if(r){var i=(t.previousPosition.y-r.y)*t.zoomScale;Pg.dollyToPosition(1-i,t.zoomPosition,n,e),e.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera(),t.previousPosition=r}},e.onScroll=function(e,t,n,r){if(n&&r){var i=1-.1*n;Pg.dollyToPosition(i,r,t,e),e.getLightFollowCamera()&&t.updateLightsGeometryToFollowCamera()}}}var ub={zoomPosition:null};function cb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ub,n),sb.extend(e,t,n),lb(e,t)}var db={newInstance:Ae.newInstance(cb,"vtkMouseCameraTrackballZoomToMouseManipulator"),extend:cb};function pb(e,t){t.classHierarchy.push("vtkMouseRangeManipulator");var n=new Map;function r(e,t){return t*((e.max-e.min)/(e.step+1))}function i(e,t){var r=e.getValue(),i=t*e.scale+n.get(e),o=r+i,a=o-e.min,s=Math.round(a/e.step);o=e.min+e.step*s,o=Math.max(o,e.min),(o=Math.min(o,e.max))!==r?(e.setValue(o),n.set(e,0)):o===e.min&&i<0||o===e.max&&i>0?n.set(e,0):n.set(e,i)}e.setHorizontalListener=function(r,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=Number.isFinite(a)?function(){return a}:a;t.horizontalListener={min:r,max:i,step:o,getValue:u,setValue:s,scale:l},n.set(t.horizontalListener,0),e.modified()},e.setVerticalListener=function(r,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=Number.isFinite(a)?function(){return a}:a;t.verticalListener={min:r,max:i,step:o,getValue:u,setValue:s,scale:l},n.set(t.verticalListener,0),e.modified()},e.setScrollListener=function(r,i,o,a,s){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,u=Number.isFinite(a)?function(){return a}:a;t.scrollListener={min:r,max:i,step:o,getValue:u,setValue:s,scale:l},n.set(t.scrollListener,0),e.modified()},e.removeHorizontalListener=function(){t.verticalListener&&(n.delete(t.verticalListener),delete t.verticalListener,e.modified())},e.removeVerticalListener=function(){t.horizontalListener&&(n.delete(t.horizontalListener),delete t.horizontalListener,e.modified())},e.removeScrollListener=function(){t.scrollListener&&(n.delete(t.scrollListener),delete t.scrollListener,e.modified())},e.removeAllListeners=function(){e.removeHorizontalListener(),e.removeVerticalListener(),e.removeScrollListener()},e.onButtonDown=function(e,n,r){t.previousPosition=r;var i=e.getView(),o=i.getContainerSize()[0]/i.getSize()[0],a=i.getViewportSize(n);t.containerSize=a.map((function(e){return e*o}))},e.onMouseMove=function(e,n,o){if((t.verticalListener||t.horizontalListener)&&o){if(t.horizontalListener){var a=(o.x-t.previousPosition.x)/t.containerSize[0],s=r(t.horizontalListener,a);i(t.horizontalListener,s)}if(t.verticalListener){var l=(o.y-t.previousPosition.y)/t.containerSize[1],u=r(t.verticalListener,l);i(t.verticalListener,u)}t.previousPosition=o}},e.onScroll=function(e,n,r){t.scrollListener&&r&&i(t.scrollListener,r*t.scrollListener.step)},e.onStartScroll=e.onScroll}var fb={horizontalListener:null,verticalListener:null,scrollListener:null};function hb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fb,n),Ae.obj(e,t),Tm.extend(e,t,n),pb(e,t)}var mb={newInstance:Ae.newInstance(hb,"vtkMouseRangeManipulator"),extend:hb};function gb(e,t){t.classHierarchy.push("vtkVRButtonPanManipulator"),e.onButton3D=function(e,t,n,r,i,o){o?e.startCameraPose():n===og.IS_CAMERA_POSE&&e.endCameraPose()},e.onMove3D=function(e,t,n,r){if(n===og.IS_CAMERA_POSE){var i=t.getActiveCamera(),o=i.getPhysicalTranslation(),a=.05*r.gamepad.axes[1]/i.getPhysicalScale(),s=i.physicalOrientationToWorldDirection(r.orientation);i.setPhysicalTranslation(o[0]+s[0]*a,o[1]+s[1]*a,o[2]+s[2]*a)}}}var vb={device:Dm.RightController,input:Em.TrackPad};function yb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vb,n),Ae.obj(e,t),Nm.extend(e,t,n),gb(e,t)}var bb=Ae.newInstance(yb,"vtkVRButtonPanManipulator"),wb={vtkCompositeCameraManipulator:bm,vtkCompositeGestureManipulator:Sm,vtkCompositeKeyboardManipulator:Pm,vtkCompositeMouseManipulator:Tm,vtkCompositeVRManipulator:Nm,vtkGestureCameraManipulator:Dg,vtkKeyboardCameraManipulator:Rg,vtkMouseBoxSelectorManipulator:zg,vtkMouseCameraAxisRotateManipulator:Xg,vtkMouseCameraSliceManipulator:Jg,vtkMouseCameraUnicamManipulator:Fy,vtkMouseCameraUnicamRotateManipulator:Iy,vtkMouseCameraTrackballFirstPersonManipulator:jy,vtkMouseCameraTrackballMultiRotateManipulator:$y,vtkMouseCameraTrackballPanManipulator:rb,vtkMouseCameraTrackballRollManipulator:qy,vtkMouseCameraTrackballRotateManipulator:Wy,vtkMouseCameraTrackballZoomManipulator:sb,vtkMouseCameraTrackballZoomToMouseManipulator:db,vtkMouseRangeManipulator:mb,vtkVRButtonPanManipulator:{newInstance:bb,extend:yb}},xb=[],Sb={device:{},screen:window.orientation||0,supported:!!window.DeviceMotionEvent,update:!1},Cb={"landscape-primary":90,"landscape-secondary":-90,"portrait-secondary":180,"portrait-primary":0};function Ab(e){Sb.device=e,Number.isFinite(e.alpha)||(Sb.supported=!1)}function Pb(){Sb.screen=Cb[window.screen.orientation||window.screen.mozOrientation]||window.orientation||0}var _b={addCameraToSynchronize:function(e,t,n){var r=e.onAnimation((function(){if(Sb.update&&(s=Sb.device,Number.isFinite(s.alpha))){var e=Sb.device,r=e.alpha,i=e.beta,o=e.gamma,a=Sb.screen;t.setDeviceAngles(r,i,o,a),n&&n()}var s})),i={subscription:r,renderWindowInteractor:e},o=xb.length;return xb.push(i),Sb.update&&i.renderWindowInteractor.requestAnimation(i),o},addWindowListeners:function(){window.addEventListener("orientationchange",Pb,!1),window.addEventListener("deviceorientation",Ab,!1),Sb.update=!0,xb.filter((function(e){return!!e})).forEach((function(e){return e.renderWindowInteractor.requestAnimation(e)}))},isDeviceOrientationSupported:function(){return Sb.supported},removeCameraToSynchronize:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=xb[e];n&&(n.subscription.unsubscribe(),t&&n.renderWindowInteractor.cancelAnimation(n)),xb[e]=null},removeWindowListeners:function(){window.removeEventListener("orientationchange",Pb,!1),window.removeEventListener("deviceorientation",Ab,!1),Sb.update=!1,xb.filter((function(e){return!!e})).forEach((function(e){return e.renderWindowInteractor.cancelAnimation(e)}))}},Ob={vtkDeviceOrientationToCamera:_b},Tb=ag.States;function Db(e,t){t.classHierarchy.push("vtkInteractorStyleTrackballCamera"),e.handleMouseMove=function(n){var r=n.position,i=n.pokedRenderer;switch(t.state){case Tb.IS_ROTATE:e.handleMouseRotate(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case Tb.IS_PAN:e.handleMousePan(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case Tb.IS_DOLLY:e.handleMouseDolly(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case Tb.IS_SPIN:e.handleMouseSpin(i,r),e.invokeInteractionEvent({type:"InteractionEvent"})}t.previousPosition=r},e.handleButton3D=function(n){n&&n.pressed&&n.device===Dm.RightController&&n.input===Em.TrackPad?e.startCameraPose():n&&!n.pressed&&n.device===Dm.RightController&&n.input===Em.TrackPad&&t.state===Tb.IS_CAMERA_POSE&&e.endCameraPose()},e.handleMove3D=function(n){if(t.state===Tb.IS_CAMERA_POSE)e.updateCameraPose(n)},e.updateCameraPose=function(e){var t=e.pokedRenderer.getActiveCamera(),n=t.getPhysicalTranslation(),r=.05*e.gamepad.axes[1]/t.getPhysicalScale(),i=t.physicalOrientationToWorldDirection(e.orientation);t.setPhysicalTranslation(n[0]+i[0]*r,n[1]+i[1]*r,n[2]+i[2]*r)},e.handleLeftButtonPress=function(n){var r=n.position;t.previousPosition=r,n.shiftKey?n.controlKey||n.altKey?e.startDolly():e.startPan():n.controlKey||n.altKey?e.startSpin():e.startRotate()},e.handleLeftButtonRelease=function(){switch(t.state){case Tb.IS_DOLLY:e.endDolly();break;case Tb.IS_PAN:e.endPan();break;case Tb.IS_SPIN:e.endSpin();break;case Tb.IS_ROTATE:e.endRotate()}},e.handleStartMouseWheel=function(t){e.startDolly(),e.handleMouseWheel(t)},e.handleEndMouseWheel=function(){e.endDolly()},e.handleStartPinch=function(n){t.previousScale=n.scale,e.startDolly()},e.handleEndPinch=function(){e.endDolly()},e.handleStartRotate=function(n){t.previousRotation=n.rotation,e.startRotate()},e.handleEndRotate=function(){e.endRotate()},e.handleStartPan=function(n){t.previousTranslation=n.translation,e.startPan()},e.handleEndPan=function(){e.endPan()},e.handlePinch=function(n){e.dollyByFactor(n.pokedRenderer,n.scale/t.previousScale),t.previousScale=n.scale},e.handlePan=function(n){var r=n.pokedRenderer.getActiveCamera(),i=r.getFocalPoint(),o=(i=e.computeWorldToDisplay(n.pokedRenderer,i[0],i[1],i[2]))[2],a=n.translation,s=t.previousTranslation,l=e.computeDisplayToWorld(n.pokedRenderer,i[0]+a[0]-s[0],i[1]+a[1]-s[1],o),u=e.computeDisplayToWorld(n.pokedRenderer,i[0],i[1],o),c=[];c[0]=u[0]-l[0],c[1]=u[1]-l[1],c[2]=u[2]-l[2],i=r.getFocalPoint();var d=r.getPosition();r.setFocalPoint(c[0]+i[0],c[1]+i[1],c[2]+i[2]),r.setPosition(c[0]+d[0],c[1]+d[1],c[2]+d[2]),t.interactor.getLightFollowCamera()&&n.pokedRenderer.updateLightsGeometryToFollowCamera(),r.orthogonalizeViewUp(),t.previousTranslation=n.translation},e.handleRotate=function(e){var n=e.pokedRenderer.getActiveCamera();n.roll(e.rotation-t.previousRotation),n.orthogonalizeViewUp(),t.previousRotation=e.rotation},e.handleMouseRotate=function(e,n){var r=t.interactor,i=n.x-t.previousPosition.x,o=n.y-t.previousPosition.y,a=r.getView().getViewportSize(e),s=-.1,l=-.1;a[0]&&a[1]&&(s=-20/a[1],l=-20/a[0]);var u=i*l*t.motionFactor,c=o*s*t.motionFactor,d=e.getActiveCamera();Number.isNaN(u)||Number.isNaN(c)||(d.azimuth(u),d.elevation(c),d.orthogonalizeViewUp()),t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange(),r.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()},e.handleMouseSpin=function(e,n){var r=t.interactor,i=e.getActiveCamera(),o=r.getView().getViewportCenter(e),a=Ve(Math.atan2(t.previousPosition.y-o[1],t.previousPosition.x-o[0])),s=Ve(Math.atan2(n.y-o[1],n.x-o[0]))-a;Number.isNaN(s)||(i.roll(s),i.orthogonalizeViewUp())},e.handleMousePan=function(n,r){var i=n.getActiveCamera(),o=i.getFocalPoint(),a=(o=e.computeWorldToDisplay(n,o[0],o[1],o[2]))[2],s=e.computeDisplayToWorld(n,r.x,r.y,a),l=e.computeDisplayToWorld(n,t.previousPosition.x,t.previousPosition.y,a),u=[];u[0]=l[0]-s[0],u[1]=l[1]-s[1],u[2]=l[2]-s[2],o=i.getFocalPoint();var c=i.getPosition();i.setFocalPoint(u[0]+o[0],u[1]+o[1],u[2]+o[2]),i.setPosition(u[0]+c[0],u[1]+c[1],u[2]+c[2]),t.interactor.getLightFollowCamera()&&n.updateLightsGeometryToFollowCamera()},e.handleMouseDolly=function(n,r){var i=r.y-t.previousPosition.y,o=t.interactor.getView().getViewportCenter(n),a=t.motionFactor*i/o[1];e.dollyByFactor(n,Math.pow(1.1,a))},e.handleMouseWheel=function(n){var r=1-n.spinY/t.zoomFactor;e.dollyByFactor(n.pokedRenderer,r)},e.dollyByFactor=function(e,n){if(!Number.isNaN(n)){var r=e.getActiveCamera();r.getParallelProjection()?r.setParallelScale(r.getParallelScale()/n):(r.dolly(n),t.autoAdjustCameraClippingRange&&e.resetCameraClippingRange()),t.interactor.getLightFollowCamera()&&e.updateLightsGeometryToFollowCamera()}}}var Eb={motionFactor:10,zoomFactor:10};function Ib(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Eb,n),fg.extend(e,t,n),Ae.setGet(e,t,["motionFactor","zoomFactor"]),Db(e,t)}var kb={newInstance:Ae.newInstance(Ib,"vtkInteractorStyleTrackballCamera"),extend:Ib};function Mb(e,t){t.classHierarchy.push("vtkInteractorStyleImage"),e.superHandleMouseMove=e.handleMouseMove,e.handleMouseMove=function(n){var r=n.position,i=n.pokedRenderer;switch(t.state){case og.IS_WINDOW_LEVEL:e.windowLevel(i,r),e.invokeInteractionEvent({type:"InteractionEvent"});break;case og.IS_SLICE:e.slice(i,r),e.invokeInteractionEvent({type:"InteractionEvent"})}e.superHandleMouseMove(n)},e.superHandleLeftButtonPress=e.handleLeftButtonPress,e.handleLeftButtonPress=function(n){var r=n.position;if(n.shiftKey||n.controlKey)"IMAGE3D"===t.interactionMode&&n.shiftKey?e.startRotate():"IMAGE_SLICING"===t.interactionMode&&n.controlKey?(t.lastSlicePosition=r.y,e.startSlice()):e.superHandleLeftButtonPress(n);else{t.windowLevelStartPosition[0]=r.x,t.windowLevelStartPosition[1]=r.y,e.setCurrentImageNumber(t.currentImageNumber);var i=t.currentImageProperty;i&&(t.windowLevelInitial[0]=i.getColorWindow(),t.windowLevelInitial[1]=i.getColorLevel()),e.startWindowLevel()}},e.superHandleLeftButtonRelease=e.handleLeftButtonRelease,e.handleLeftButtonRelease=function(){switch(t.state){case og.IS_WINDOW_LEVEL:e.endWindowLevel();break;case og.IS_SLICE:e.endSlice();break;default:e.superHandleLeftButtonRelease()}},e.handleStartMouseWheel=function(t){e.startSlice(),e.handleMouseWheel(t)},e.handleEndMouseWheel=function(){e.endSlice()},e.handleMouseWheel=function(e){var t=e.pokedRenderer.getActiveCamera(),n=t.getDistance();n+=e.spinY;var r=t.getClippingRange();nr[1]&&(n=r[1]),t.setDistance(n)},e.windowLevel=function(e,n){t.windowLevelCurrentPosition[0]=n.x,t.windowLevelCurrentPosition[1]=n.y;var r=t.interactor;if(t.currentImageProperty){var i=r.getView().getViewportSize(e),o=t.windowLevelInitial[0],a=t.windowLevelInitial[1],s=4*(t.windowLevelCurrentPosition[0]-t.windowLevelStartPosition[0])/i[0],l=4*(t.windowLevelStartPosition[1]-t.windowLevelCurrentPosition[1])/i[1];Math.abs(o)>.01?s*=o:s*=o<0?-.01:.01,Math.abs(a)>.01?l*=a:l*=a<0?-.01:.01,o<0&&(s*=-1),a<0&&(l*=-1);var u=s+o,c=a-l;u<.01&&(u=.01),t.currentImageProperty.setColorWindow(u),t.currentImageProperty.setColorLevel(c)}},e.slice=function(e,n){var r=t.interactor,i=n.y-t.lastSlicePosition,o=e.getActiveCamera(),a=o.getClippingRange(),s=o.getDistance(),l=0;if(o.getParallelProjection())l=2*o.getParallelScale();else{var u=Le(o.getViewAngle());l=2*s*Math.tan(.5*u)}(s+=i*l/r.getView().getViewportSize(e)[1])a[1]&&(s=a[1]-.001*l),o.setDistance(s),t.lastSlicePosition=n.y},e.setCurrentImageNumber=function(n){if(null!==n){var r=t.interactor.getCurrentRenderer();if(r){t.currentImageNumber=n;var i=r.getViewProps().filter((function(e){return e.isA("vtkImageSlice")})),o=n;n<0&&(o+=i.length);var a=i.find((function(e,t){return function(e,t,n){return e===n&&t.getNestedPickable()}(t,e,o)}));a&&e.setCurrentImageProperty(a.getProperty())}}},e.setCurrentImageProperty=function(e){t.currentImageProperty=e}}var Nb={windowLevelStartPosition:[0,0],windowLevelCurrentPosition:[0,0],lastSlicePosition:0,windowLevelInitial:[1,.5],currentImageNumber:-1,interactionMode:"IMAGE2D",xViewRightVector:[0,1,0],xViewUpVector:[0,0,-1],yViewRightVector:[1,0,0],yViewUpVector:[0,0,-1],zViewRightVector:[1,0,0],zViewUpVector:[0,1,0]};function Rb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nb,n),kb.extend(e,t,n),Ae.setGet(e,t,["interactionMode"]),Ae.get(e,t,["currentImageProperty"]),Mb(e,t)}var Fb={newInstance:Ae.newInstance(Rb,"vtkInteractorStyleImage"),extend:Rb};function Bb(e,t,n){return en?n:e}function Lb(e,t){t.classHierarchy.push("vtkInteractorStyleMPRSlice"),t.trackballManipulator=Wy.newInstance({button:1}),t.panManipulator=rb.newInstance({button:1,shift:!0}),t.zoomManipulator=sb.newInstance({button:3}),t.scrollManipulator=mb.newInstance({scrollEnabled:!0,dragEnabled:!1});var n={sliceNormal:[0,0,0],sliceRange:[0,0]},r=null;function i(){var n=e.getSliceRange();t.scrollManipulator.removeScrollListener(),t.scrollManipulator.setScrollListener(n[0],n[1],1,e.getSlice,e.setSlice)}var o=e.setInteractor;e.setInteractor=function(t){if(o(t),r&&(r.unsubscribe(),r=null),t){var n=t.getCurrentRenderer().getActiveCamera();r=n.onModified((function(){i(),e.modified()}))}},e.handleMouseMove=Ae.chain(e.handleMouseMove,(function(){var e=t.interactor.getCurrentRenderer().getActiveCamera(),n=e.getDistance();e.setClippingRange(n,n+.1)}));var a=e.setVolumeMapper;e.setVolumeMapper=function(n){if(a(n)){var r=t.interactor.getCurrentRenderer().getActiveCamera();n?(r.setFreezeFocalPoint(!0),e.setSliceNormal.apply(e,w(e.getSliceNormal()))):r.setFreezeFocalPoint(!1)}},e.getSlice=function(){var n=t.interactor.getCurrentRenderer().getActiveCamera(),r=e.getSliceNormal(),i=Gs.buildFromDegree().identity().rotateFromDirections(r,[1,0,0]),o=n.getFocalPoint();return i.apply(o),o[0]},e.setSlice=function(n){var r=t.interactor.getCurrentRenderer().getActiveCamera();if(t.volumeMapper){var i=e.getSliceRange(),o=t.volumeMapper.getBounds(),a=Bb.apply(void 0,[n].concat(w(i))),s=[(o[0]+o[1])/2,(o[2]+o[3])/2,(o[4]+o[5])/2],l=r.getDistance(),u=r.getDirectionOfProjection();mt(u);var c=(i[1]+i[0])/2,d=[s[0]-u[0]*c,s[1]-u[1]*c,s[2]-u[2]*c],p=[d[0]+u[0]*a,d[1]+u[1]*a,d[2]+u[2]*a],f=[p[0]-u[0]*l,p[1]-u[1]*l,p[2]-u[2]*l];r.setPosition.apply(r,f),r.setFocalPoint.apply(r,p)}},e.getSliceRange=function(){if(t.volumeMapper){var r=e.getSliceNormal();if(r[0]===n.sliceNormal[0]&&r[1]===n.sliceNormal[1]&&r[2]===n.sliceNormal[2])return n.sliceRange;var i=function(e){return[[e[0],e[2],e[4]],[e[0],e[2],e[5]],[e[0],e[3],e[4]],[e[0],e[3],e[5]],[e[1],e[2],e[4]],[e[1],e[2],e[5]],[e[1],e[3],e[4]],[e[1],e[3],e[5]]]}(t.volumeMapper.getBounds()),o=Gs.buildFromDegree().identity().rotateFromDirections(r,[1,0,0]);i.forEach((function(e){return o.apply(e)}));for(var a=1/0,s=-1/0,l=0;l<8;l++){var u=i[l][0];u>s&&(s=u),u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vb,n),Pg.extend(e,t,n),Ae.setGet(e,t,["volumeMapper"]),Lb(e,t)}var Gb={newInstance:Ae.newInstance(jb,"vtkInteractorStyleMPRSlice"),extend:jb};function Ub(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 zb(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qb,n),fg.extend(e,t,n),Ae.setGet(e,t,["sendMouseMove","remoteEventAddOn","throttleDelay"]),Ae.event(e,t,"RemoteMouseEvent"),Ae.event(e,t,"RemoteWheelEvent"),Ae.event(e,t,"RemoteGestureEvent"),Xb(e,t)}var Zb={newInstance:Ae.newInstance(Yb,"vtkInteractorStyleRemoteMouse"),extend:Yb},Jb={vtkInteractorStyleImage:Fb,vtkInteractorStyleManipulator:Pg,vtkInteractorStyleMPRSlice:Gb,vtkInteractorStyleRemoteMouse:Zb,vtkInteractorStyleTrackballCamera:kb},Qb=n(379),$b=n.n(Qb),ew=n(795),tw=n.n(ew),nw=n(569),rw=n.n(nw),iw=n(565),ow=n.n(iw),aw=n(216),sw=n.n(aw),lw=n(589),uw=n.n(lw),cw=n(71),dw={};dw.styleTagTransform=uw(),dw.setAttributes=ow(),dw.insert=rw().bind(null,"head"),dw.domAPI=tw(),dw.insertStyleElement=sw();$b()(cw.Z,dw);var pw=cw.Z&&cw.Z.locals?cw.Z.locals:void 0;function fw(){}var hw={nw:"northWestContainer",n:"northContainer",ne:"northEastContainer",w:"westContainer",e:"eastContainer",sw:"southWestContainer",s:"southContainer",se:"southEastContainer"};function mw(e,t){function n(){for(var e=Object.keys(t.templates),n=e.length;n--;){var r=t[hw[e[n]]],i=t.templates[e[n]];r&&i&&(r.innerHTML=i(t.metadata))}}t.classHierarchy.push("vtkCornerAnnotation"),t.templates||(t.templates={}),t.metadata||(t.metadata={}),t.annotationContainer=document.createElement("div"),t.annotationContainer.setAttribute("class",pw.container),t.annotationContainer.innerHTML='\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),t.northWestContainer=t.annotationContainer.querySelector(".js-nw"),t.northContainer=t.annotationContainer.querySelector(".js-n"),t.northEastContainer=t.annotationContainer.querySelector(".js-ne"),t.westContainer=t.annotationContainer.querySelector(".js-w"),t.eastContainer=t.annotationContainer.querySelector(".js-e"),t.southWestContainer=t.annotationContainer.querySelector(".js-sw"),t.southContainer=t.annotationContainer.querySelector(".js-s"),t.southEastContainer=t.annotationContainer.querySelector(".js-se"),e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.annotationContainer),t.container!==n&&(t.container=n,t.container&&(t.container.appendChild(t.annotationContainer),e.resize()),e.modified())},e.resize=fw,e.updateTemplates=function(r){t.templates=Object.assign(t.templates,r),n(),e.modified()},e.updateMetadata=function(r){t.metadata=Object.assign(t.metadata,r),n(),e.modified()}}var gw={templates:null,metadata:null};function vw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gw,n),Ae.obj(e,t),Ae.get(e,t,["annotationContainer","northWestContainer","northContainer","northEastContainer","westContainer","eastContainer","southWestContainer","southContainer","southEastContainer","metadata"]),mw(e,t)}var yw={newInstance:Ae.newInstance(vw,"vtkCornerAnnotation"),extend:vw,applyTemplate:function(e,t,n){return e.replace(/\${([^{]+)}/g,(function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"${".concat(e,"}");return e.split(".").reduce((function(e,t){return void 0!==e[t]?e[t]:n}),t)}(e.substr(2,e.length-3).trim(),t,n)}))}},bw=n(631),ww={};ww.styleTagTransform=uw(),ww.setAttributes=ow(),ww.insert=rw().bind(null,"head"),ww.domAPI=tw(),ww.insertStyleElement=sw();$b()(bw.Z,ww);var xw=bw.Z&&bw.Z.locals?bw.Z.locals:void 0;function Sw(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 Cw(e){for(var t=1;t1e3;)t.push("000".concat(n%1e3).slice(-3)),n=Math.floor(n/1e3);return n>0&&t.push(n),t.reverse(),t.join("'")}function _w(e,t){function n(){if(t.title.style.display=t.titleVisibility?"block":"none",t.titleVisibility){var e=t.buffer[t.buffer.length-1],n="Mean: ".concat(Math.round(t.fpsSum/t.buffer.length)," - Current: ").concat(Math.round(e));n!==t.lastText&&(t.lastText=n,t.title.innerHTML=n)}}function r(){if(t.info.style.display=t.infoVisibility?"grid":"none",t.infoVisibility){var e=[];if(t.renderWindow){var n=t.renderWindow.getViews()[0];n&&n.getSize&&e.push('').concat(n.getSize().join("x"),""));var r=Cw(Cw({},t.renderWindow.getStatistics()),t.addOnStats),i=Object.keys(r);i.sort();for(var o=0;o').concat(i[o],'').concat(Pw(r[i[o]]),""))}t.info.innerHTML=e.join("")}}function i(){if(t.canvas.style.display=t.canvasVisibility?"block":"none",t.canvasVisibility){t.canvas.setAttribute("width",t.bufferSize),t.canvas.setAttribute("height",t.graphHeight);var e=t.canvas.getContext("2d"),n=t.canvas,r=n.width,i=n.height;e.clearRect(0,0,r,i),e.strokeStyle="green",e.beginPath(),e.moveTo(0,i-t.buffer[0]);for(var o=1;ot.bufferSize;)t.fpsSum-=t.buffer.shift();n(),i()}}t.classHierarchy.push("vtkFPSMonitor"),t.fpsMonitorContainer=document.createElement("div"),t.fpsMonitorContainer.setAttribute("class",t.orientationClass),t.fpsMonitorContainer.innerHTML='\n
\n
Mean N/A - Current N/A
\n \n
\n
\n
'),t.canvas=t.fpsMonitorContainer.querySelector(".js-graph"),t.title=t.fpsMonitorContainer.querySelector(".js-title"),t.info=t.fpsMonitorContainer.querySelector(".js-info"),e.update=function(){e.render()},e.setRenderWindow=function(e){for(;t.subscriptions.length;)t.subscriptions.pop().unsubscribe();t.renderWindow=e,t.interactor=e?e.getInteractor():null,t.interactor&&t.subscriptions.push(t.interactor.onAnimation(o))},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.fpsMonitorContainer),t.container!==n&&(t.container=n,t.container&&(t.container.appendChild(t.fpsMonitorContainer),e.resize()),e.modified())},e.render=function(){n(),r(),i()},e.resize=Aw,e.setOrientationToHorizontal=function(){t.fpsMonitorContainer.classList.remove(t.orientationClass),t.orientationClass=xw.horizontalContainer,t.fpsMonitorContainer.classList.add(t.orientationClass)},e.setOrientationToVertical=function(){t.fpsMonitorContainer.classList.remove(t.orientationClass),t.orientationClass=xw.verticalContainer,t.fpsMonitorContainer.classList.add(t.orientationClass)},e.setOrientation=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"horizontal";"horizontal"===t?e.setOrientationToHorizontal():e.setOrientationToVertical()},e.setAddOnStats=function(e){t.addOnStats||(t.addOnStats={}),Object.assign(t.addOnStats,e),r()},e.setMonitorVisibility=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e.setCanvasVisibility(n),e.setInfoVisibility(r),e.setTitleVisibility(t)};var a=e.delete;e.delete=function(){e.setRenderWindow(null),e.setContainer(null),a()},t.subscriptions.push(e.onModified(e.update))}var Ow={bufferSize:200,graphHeight:120,buffer:[60],subscriptions:[],fpsSum:0,orientationClass:xw.horizontalContainer,canvasVisibility:!0,titleVisibility:!0,infoVisibility:!0};function Tw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ow,n),Ae.obj(e,t),Ae.get(e,t,["fpsMonitorContainer","renderWindow","addOnStats"]),Ae.setGet(e,t,["bufferSize","canvasVisibility","infoVisibility","titleVisibility"]),_w(e,t)}var Dw={newInstance:Ae.newInstance(Tw,"vtkFPSMonitor"),extend:Tw},Ew=n(911),Iw=n(428),kw=n(338),Mw=n(964),Nw={Contrast:Ew,Logo:Iw,Spacing:kw,Tint:Mw},Rw={SliderOrientation:{VERTICAL:0,HORIZONTAL:1}},Fw=n(995),Bw={};Bw.styleTagTransform=uw(),Bw.setAttributes=ow(),Bw.insert=rw().bind(null,"head"),Bw.domAPI=tw(),Bw.insertStyleElement=sw();$b()(Fw.Z,Bw);var Lw=Fw.Z&&Fw.Z.locals?Fw.Z.locals:void 0;function Vw(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 jw(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zw,n),Ae.obj(e,t),Ae.get(e,t,["orientation","value","values"]),Ae.set(e,t,["orientation"]),Ae.event(e,t,"ValueChange"),Uw(e,t)}var Hw=jw({newInstance:Ae.newInstance(Ww,"vtkSlider"),extend:Ww},Rw),Kw=JSON.parse('[{"ColorSpace":"Diverging","Name":"Cool to Warm","NanColor":[1,1,0],"RGBPoints":[0,0.23137254902,0.298039215686,0.752941176471,0.5,0.865,0.865,0.865,1,0.705882352941,0.0156862745098,0.149019607843]},{"ColorSpace":"Diverging","Name":"Warm to Cool","NanColor":[1,1,0],"RGBPoints":[0,0.705882352941,0.0156862745098,0.149019607843,0.5,0.865,0.865,0.865,1,0.23137254902,0.298039215686,0.752941176471]},{"ColorSpace":"RGB","Name":"Rainbow Desaturated","NanColor":[1,1,0],"RGBPoints":[0,0.278431372549,0.278431372549,0.858823529412,0.143,0,0,0.360784313725,0.285,0,1,1,0.429,0,0.501960784314,0,0.571,1,1,0,0.714,1,0.380392156863,0,0.857,0.419607843137,0,0,1,0.878431372549,0.301960784314,0.301960784314]},{"ColorSpace":"RGB","Name":"Cold and Hot","NanColor":[1,1,0],"RGBPoints":[0,0,1,1,0.45,0,0,1,0.5,0,0,0.501960784314,0.55,1,0,0,1,1,1,0]},{"ColorSpace":"RGB","Name":"Black-Body Radiation","NanColor":[0,0.498039215686,1],"RGBPoints":[0,0,0,0,0.4,0.901960784314,0,0,0.8,0.901960784314,0.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,0.333,0,0,0.501960784314,0.666,0,0.501960784314,1,1,1,1,1]},{"ColorSpace":"RGB","Name":"Black, Orange and White","NanColor":[1,1,0],"RGBPoints":[0,0,0,0,0.333,0.501960784314,0,0,0.666,1,0.501960784314,0,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_rainbow_bright","RGBPoints":[-1,0.32549,0.14902,0.960784,-0.866221,0.297047,0.375586,0.963836,-0.732441,0.180302,0.536818,0.964627,-0.598662,0.1302,0.649207,0.929647,-0.464883,0.0445143,0.749654,0.855998,-0.331104,0.0271325,0.830713,0.721527,-0.197324,0.259504,0.866145,0.543555,-0.0635452,0.428364,0.890725,0.329819,0.0702341,0.568503,0.898508,0.187623,0.204013,0.738259,0.890317,0.0825461,0.337793,0.84546,0.86136,0.0147555,0.471572,0.912191,0.808018,0,0.605351,0.962848,0.710445,0,0.73913,0.999469,0.600258,0.0176284,0.87291,0.994156,0.445975,0.193912,1,0.980407,0.247105,0.262699]},{"ColorSpace":"Lab","Name":"erdc_rainbow_dark","RGBPoints":[-1,0,0,0.423499,-0.866221,0,0.119346,0.529237,-0.732441,0,0.238691,0.634976,-0.598662,0,0.346852,0.68788,-0.464883,0,0.45022,0.718141,-0.331104,0,0.553554,0.664839,-0.197324,0,0.651082,0.519303,-0.0635452,0.115841,0.72479,0.352857,0.0702341,0.326771,0.781195,0.140187,0.204013,0.522765,0.798524,0.0284624,0.337793,0.703162,0.788685,0.00885756,0.471572,0.845118,0.751133,0,0.605351,0.955734,0.690825,0,0.73913,0.995402,0.567916,0.0618524,0.87291,0.987712,0.403398,0.164851,1,0.980407,0.247105,0.262699]}]'),Xw=Object.create(null);Kw.filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){Xw[e.Name]=e}));var qw=Object.keys(Xw);qw.sort();var Yw={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(Xw[e.Name]||(qw.push(e.Name),qw.sort()),Xw[e.Name]=e)},removePresetByName:function(e){var t=qw.indexOf(e);t>-1&&qw.splice(t,1),delete Xw[e]},getPresetByName:function(e){return Xw[e]},rgbPresetNames:qw};function Zw(){return Pp()('/*! For license information please see ComputeHistogram.worker.worker.js.LICENSE.txt */\n!function(){"use strict";var e,t,r={666:function(e,t,r){var n=function(){function e(e,t){for(var r=0;r1?t-1:0),n=1;n1?n-1:0),a=1;a3&&void 0!==arguments[3]?arguments[3]:[];v([0,e,t,r],n)},_=function(e,t,r){if(!t)throw new Error("eventName is required");if("string"!=typeof t)throw new Error("eventName should be string");v([1,e,t,r])};return self.addEventListener("message",(function(e){var t=e.data;Array.isArray(t)?b.apply(void 0,a(t)):t&&t.eventName&&h.emitLocally.apply(h,[t.eventName].concat(a(t.args)))})),h},e.exports.TransferableResponse=c},197:function(e){var t=function(){function e(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:256,n=[];n.lengtho+s||do+l?p===l?o:o+p/(p-l)*(d-o-l):-p===l?o:o-p/(p+l)*(d-o-l))-o)/p,h=Math.exp(-4*f*f),m=1-f*f,g=1,v=a*(u<1?u*m+(1-u)*h:(2-u)*m+(u-1)*g);v>n[c]&&(n[c]=v)}}return n}function ix(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{lineWidth:1,strokeStyle:"#000"},i=t[3],o=t[2]/(n.length-1),a=!!r.fillStyle,s=i+t[1];e.lineWidth=r.lineWidth,e.strokeStyle=r.strokeStyle,e.beginPath(),e.moveTo(t[0],t[1]+t[3]);for(var l=0;l3&&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 ax(e,t){var n=t.map((function(t){return Math.abs(t.position-e)})),r=Math.min.apply(Math,w(n));return n.indexOf(r)}function sx(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return function(n){var r=n.offsetX,i=n.offsetY;t&&n.preventDefault(),e(r,i)}}function lx(){tx.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,w(e.singleTouche))})),e.ts=0,e.count=0,e.touches=0,e.ready=!1}))}function ux(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(i){var o=i.target.getBoundingClientRect(),a=Array.prototype.map.call(i.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/i.touches.length}));"touchstart"===i.type?(clearTimeout(tx[e].timeout),tx[e].ts=i.timeStamp,tx[e].singleTouche=a,tx[e].touches=i.touches.length):"touchmove"===i.type?(tx[e].ts=0,tx[e].count=0,tx[e].ready=!1):"touchend"===i.type&&(i.timeStamp-tx[e].ts1&&void 0!==arguments[1]?arguments[1]:{},i=r.numberOfBinToConsiders,o=void 0===i?1:i,a=r.numberOfBinsToSkip,s=void 0===a?1:a,l=r.numberOfComponents,u=void 0===l?1:l,c=r.component,d=void 0===c?0:c;t.histogram=null,t.histogramArray=n,t.dataRange=Xe(n,d,u);var p=y(t.dataRange,2),f=p[0],h=p[1],m=4,g=Math.floor(n.length/m)||1;g+=g%u;for(var v=0,b=[],w=[];vr;)i.shift();for(var l=i.reduce((function(e,t){return e+t}),0)/r,u=0,c=t.histogram.length;u1){for(var s=t.style.iconSize+t.style.padding,l=s,u=0;r>l;)u+=1,l+=s;switch(u){case 0:var c=e.addGaussian(0,1,.1,0,0),d=t.gaussians[c],p=Qw({},d),f=nx.adjustPosition;t.activeGaussian=c,t.selectedGaussian=c,Ae.setImmediate((function(){e.onDown(n,r),t.dragAction={originalXY:[0,0],action:f,gaussian:d,originalGaussian:p}}));break;case 1:-1!==t.selectedGaussian&&e.removeGaussian(t.selectedGaussian);break;default:t.selectedGaussian=-1,t.dragAction=null}}else if(o<0||o>1||a<0||a>1)t.selectedGaussian=-1,t.dragAction=null;else{var h=ax(o,t.gaussians);h!==t.selectedGaussian&&(t.selectedGaussian=h,e.modified())}return!0},e.onHover=function(n,r){var i=20/t.canvas.height,o=y(ox(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),2),a=o[0],s=o[1],l=y(ox(n,r,t.graphArea),1)[0],u=a<0?t.selectedGaussian:ax(a,t.gaussians);t.canvas.style.cursor="default";var c=t.gaussians[u];if(t.enableRangeZoom&&l>=0&&rt.rangeZoom[1]-d?t.canvas.style.cursor=ex.adjustZoom:t.canvas.style.cursor=ex.adjustPosition,t.dragAction={rangeZoom:t.rangeZoom,action:nx.adjustZoom}}else if(c&&l>=0){var p=1-s,f=null;f=p>c.height+i?"adjustPosition":p>c.height-i?Math.abs(a-c.position).5*c.height+i?"adjustPosition":p>.5*c.height-i?Math.abs(a-c.position)i?"adjustPosition":"adjustWidth",t.canvas.style.cursor=ex[f];var h=nx[f],m=Qw({},c);t.dragAction={originalXY:[a,s],action:h,gaussian:c,originalGaussian:m}}return u!==t.activeGaussian&&(t.activeGaussian=u,e.modified()),!0},e.onDown=function(n,r){t.mouseIsDown||e.invokeAnimation(!0),t.mouseIsDown=!0;var i=ox(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=ax(i,t.gaussians);t.gaussianSide=0;var a=t.gaussians[o];return a&&(t.gaussianSide=a.position-i),o!==t.selectedGaussian&&i>0&&(t.selectedGaussian=o,e.modified()),!0},e.onDrag=function(n,r){if(t.dragAction){var i=y(ox(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),2),o=i[0],a=i[1];(0,t.dragAction.action)(o,a,Qw({gaussianSide:t.gaussianSide,model:t,publicAPI:e},t.dragAction))&&(t.opacities=rx(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 i=y(ox(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null),2),o=i[0],a=i[1];return o>=0&&e.addGaussian(o,1-a,.1,0,0),!0},e.onRemoveGaussian=function(n,r){var i=ox(n,r,t.graphArea,t.enableRangeZoom?t.rangeZoom:null)[0],o=ax(i,t.gaussians);return i>=0&&-1!==o&&e.removeGaussian(o),!0},e.bindMouseListeners=function(){if(!t.listeners){var n=function(){return!!t.mouseIsDown},r=function(){for(var e=tx.length,t=arguments.length,n=new Array(t),r=0;r1){var l=Math.round(t.style.iconSize/2-t.style.strokeWidth),u=Math.round(l+o+t.style.strokeWidth);e.beginPath(),e.lineWidth=t.style.buttonStrokeWidth,e.strokeStyle=t.style.buttonStrokeColor,e.arc(u-o/2,u,l,0,2*Math.PI,!1),e.fillStyle=t.style.buttonFillColor,e.fill(),e.stroke(),e.moveTo(u-l+t.style.strokeWidth+2-o/2,u),e.lineTo(u+l-t.style.strokeWidth-2-o/2,u),e.stroke(),e.moveTo(u-o/2,u-l+t.style.strokeWidth+2),e.lineTo(u-o/2,u+l-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(u-o/2,u+o/2+t.style.iconSize,l,0,2*Math.PI,!1),e.fill(),e.stroke(),e.moveTo(u-l+t.style.strokeWidth+2-o/2,u+o/2+t.style.iconSize),e.lineTo(u+l-t.style.strokeWidth-2-o/2,u+o/2+t.style.iconSize),e.stroke()}if(t.histogram&&ix(e,a,dx(t.histogram,t.rangeZoom),{lineWidth:1,strokeStyle:t.style.histogramColor,fillStyle:t.style.histogramColor}),ix(e,a,dx(t.opacities,t.enableRangeZoom&&t.rangeZoom),{lineWidth:t.style.strokeWidth,strokeStyle:t.style.strokeColor}),t.colorTransferFunction&&t.colorTransferFunction.getSize()){var c=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 i=r||document.createElement("canvas");i.setAttribute("width",t),i.setAttribute("height",256);for(var o=i.getContext("2d"),a=e.getUint8Table(n[0],n[1],t,4),s=o.getImageData(0,0,t,256),l=0;l<256;l++)s.data.set(a,4*l*t);for(var u=256*t*4,c=4*t,d=3;d0&&(i=Math.min(i,a)),t.opacities[a]>0&&(o=Math.max(o,a));return[n[0]+i*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,w(t.size))}var hx={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 mx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hx,n),Ae.obj(e,t),Ae.setGet(e,t,["piecewiseSize","numberOfBins","colorTransferFunction","backgroundImage","enableRangeZoom","gaussianMinimumHeight"]),Ae.setGetArray(e,t,["rangeZoom"],2),Ae.get(e,t,["size","canvas","gaussians"]),Ae.event(e,t,"opacityChange"),Ae.event(e,t,"animation"),Ae.event(e,t,"zoomChange"),fx(e,t)}var gx=Qw({newInstance:Ae.newInstance(mx,"vtkPiecewiseGaussianWidget"),extend:mx},px),vx=n(734),yx={};yx.styleTagTransform=uw(),yx.setAttributes=ow(),yx.insert=rw().bind(null,"head"),yx.domAPI=tw(),yx.insertStyleElement=sw();$b()(vx.Z,yx);var bx=vx.Z&&vx.Z.locals?vx.Z.locals:void 0,wx=Yw.rgbPresetNames.map((function(e){return'")}));function xx(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(),i=Yw.getPresetByName(t.el.querySelector(".js-color-preset").value),o=t.actor.getProperty().getRGBTransferFunction(0);o.applyColorMap(i),o.setMappingRange.apply(o,w(r)),o.updateRange(),t.renderWindow.render()}}function i(){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 i=Math.max(0,e-.3)/.7;t.actor.getProperty().setGradientOpacityMinimumValue(0,.2*(r[1]-r[0])*i*i),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",bx.container),t.widget=gx.newInstance({numberOfBins:256,size:t.size}),e.setupContent=function(a,s,l){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"1",c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"erdc_rainbow_bright";e.setActor(s),e.setRenderWindow(a);var d=t.actor.getMapper().getInputData(),p=d.getPointData().getScalars()||d.getPointData().getArrays()[0],f=t.actor.getProperty().getRGBTransferFunction(0),h=t.actor.getProperty().getScalarOpacity(0),m=l?"DarkBG":"BrightBG",g={};["button","presets","shadow"].forEach((function(e){g[e]=bx["".concat(e).concat(m)]})),t.el.innerHTML='\n
\n
').concat(Iw,'
\n \n \n
\n
\n
\n
').concat(kw,'
\n \n
\n
\n
').concat(Ew,'
\n \n
\n
\n
\n ');var v=t.el.querySelector(".js-button"),y=t.el.querySelector(".js-shadow"),b=t.el.querySelector(".js-color-preset"),w=t.el.querySelector(".js-spacing"),x=t.el.querySelector(".js-edge"),S=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(p.getData()),t.widget.setColorTransferFunction(f),t.widget.applyOpacity(h),t.widget.setContainer(S),t.widget.bindMouseListeners(),t.colorDataRange=t.widget.getOpacityRange(),v.addEventListener("click",e.toggleVisibility),y.addEventListener("change",n),b.addEventListener("change",r),w.addEventListener("input",i),x.addEventListener("input",o),t.widget.onOpacityChange((function(){t.widget.applyOpacity(h),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())})),f.onModified((function(){t.widget.render(),t.renderWindow.getInteractor().isAnimating()||t.renderWindow.render()})),y.value=Number(u)?"1":"0",b.value=c,n(),r(),i(),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 a=e.setRescaleColorMap;e.setRescaleColorMap=function(e){return!!a(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,w(t.size))}var Sx={size:[600,300],expanded:!0,rescaleColorMap:!1};function Cx(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Sx,n),Ae.obj(e,t),Ae.setGet(e,t,["actor","renderWindow","rescaleColorMap"]),Ae.get(e,t,["widget"]),xx(e,t)}var Ax=Ae.newInstance(Cx,"vtkVolumeController"),Px={vtkCornerAnnotation:yw,vtkFPSMonitor:Dw,vtkIcons:Nw,vtkSlider:Hw,vtkVolumeController:{newInstance:Ax,extend:Cx}};function _x(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 Ox(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=Ox(Ox({},Dx),n);ig.extend(e,t,r),Ae.setGet(e,t,["widgetRep","parent","dragable"]),Tx(e,t)}var Ix={newInstance:Ae.newInstance(Ex,"vtkAbstractWidget"),extend:Ex};function kx(e,t){t.classHierarchy.push("vtkPixelSpaceCallbackMapper"),t.callback||(t.callback=function(){}),e.invokeCallback=function(e,n,r,i,o){if(t.callback){var a=n.getCompositeProjectionMatrix(r,-1,1);Wo(a,a);for(var s=e.getPoints(),l=new Float64Array(3),u=i.usize,c=i.vsize,d=u/2,p=c/2,f=[],h=0;h2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Mx,n),cy.extend(e,t,n),Ae.setGet(e,t,["callback","useZValues"]),kx(e,t)}var Rx={newInstance:Ae.newInstance(Nx,"vtkPixelSpaceCallbackMapper"),extend:Nx},Fx={OUTSIDE:0,NEARBY:1,SELECTING:2,TRANSLATING:3,SCALING:4},Bx={InteractionState:Fx},Lx={DISPLAY:0,NORMALIZED_DISPLAY:1,VIEWPORT:2,NORMALIZED_VIEWPORT:3,PROJECTION:4,VIEW:5,WORLD:6},Vx={Coordinate:Lx};function jx(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 Gx=Vx.Coordinate,Ux=Ae.vtkErrorMacro;function zx(e,t){t.classHierarchy.push("vtkCoordinate"),e.setValue=function(){if(t.deleted)return Ux("instance deleted - cannot call any method"),!1;for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Wx,n),Ae.obj(e,t),Ae.set(e,t,["property"]),Ae.get(e,t,["value"]),Ae.setGet(e,t,["coordinateSystem","referenceCoordinate","renderer"]),Ae.getArray(e,t,["value"],3),zx(e,t)}var Kx=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qx,n),Ae.obj(e,t),Ae.setGet(e,t,["pixelTolerance","worldTolerance"]),Xx(e,t)}var Zx={newInstance:Ae.newInstance(Yx,"vtkPointPlacer"),extend:Yx},Jx=Ae.vtkErrorMacro;function Qx(e,t){t.classHierarchy.push("vtkWidgetRepresentation"),e.getPickedActor=function(e,n,r,i){return i.pick(e,n,r,t.renderer),i.getActors[0]},e.adjustBounds=function(e,n,r){6===e.length?(r[0]=(e[0]+e[1])/2,r[1]=(e[2]+e[3])/2,r[2]=(e[4]+e[5])/2,n[0]=r[0]+t.placeFactor*(e[0]-r[0]),n[1]=r[0]+t.placeFactor*(e[1]-r[0]),n[2]=r[1]+t.placeFactor*(e[2]-r[1]),n[3]=r[1]+t.placeFactor*(e[3]-r[1]),n[4]=r[2]+t.placeFactor*(e[4]-r[2]),n[5]=r[2]+t.placeFactor*(e[5]-r[2])):Jx("vtkWidgetRepresentation::adjustBounds Can't process bounds, not enough values...")},e.sizeHandlesInPixels=function(e,n){var r=t.renderer;if(!t.validPick||!r||!r.getActiveCamera())return t.handleSize*e*t.initialLength;var i=ig.computeWorldToDisplay(r,n[0],n[1],n[2]),o=i[2],a=i[0]-t.handleSize/2,s=i[1]-t.handleSize/2,l=ig.computeDisplayToWorld(r,a,s,o);a=i[0]+t.handleSize/2,s=i[1]+t.handleSize/2;for(var u=ig.computeDisplayToWorld(r,a,s,o),c=0,d=0;d<3;d++)c+=(u[d]-l[d])*(u[d]-l[d]);return e*(Math.sqrt(c)/2)},e.sizeHandlesRelativeToViewport=function(e,n){var r=t.renderer;if(!t.validPick||!r||!r.getActiveCamera())return t.handleSize*e*t.initialLength;var i=r.getViewport(),o=r.getRenderWindow().getViews()[0].getViewportSize(r),a=ig.computeWorldToDisplay(r,n[0],n[1],n[2])[2],s=o[0]*i[0],l=o[1]*i[1],u=ig.computeDisplayToWorld(r,s,l,a);s=o[0]*i[2],l=o[1]*i[3];for(var c=ig.computeDisplayToWorld(r,s,l,a),d=0,p=0;p<3;p++)d+=(c[p]-u[p])*(c[p]-u[p]);return e*(Math.sqrt(d)/2)}}var $x={renderer:null,interactionState:0,startEventPosition:[0,0,0],lastEventPosition:[0,0,0],placeFactor:.5,placed:0,handleSize:.05,validPick:0,initialBounds:[0,1,0,1,0,1],initialLength:0,needToRender:0};function eS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$x,n),hv.extend(e,t,n),Ae.setGet(e,t,["renderer","handleSize","placeFactor","needToRender","interactionState"]),Qx(e,t)}var tS={newInstance:Ae.newInstance(eS,"vtkWidgetRepresentation"),extend:eS};function nS(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 rS=Bx.InteractionState;function iS(e,t){t.classHierarchy.push("vtkHandleRepresentation"),e.setDisplayPosition=function(e){if(t.renderer&&t.pointPlacer){var n=[];t.pointPlacer.computeWorldPosition(t.renderer,e,n)&&(t.displayPosition.setValue(e),t.worldPosition.setValue(n))}else t.displayPosition.setValue(e)},e.getDisplayPosition=function(e){if(t.renderer){var n=t.worldPosition.getComputedDisplayValue(t.renderer);t.displayPosition.setValue(n[0],n[1],0)}e[0]=t.displayPosition.getValue()[0],e[1]=t.displayPosition.getValue()[1],e[2]=t.displayPosition.getValue()[2]},e.getDisplayPosition=function(){if(t.renderer){var e=t.worldPosition.getComputedDisplayValue(t.renderer);t.displayPosition.setValue(e[0],e[1],0)}return t.displayPosition.getValue()},e.setWorldPosition=function(e){t.worldPosition.setValue(e)},e.getWorldPosition=function(e){t.worldPosition.getValue(e)},e.getWorldPosition=function(){return t.worldPosition.getValue()}}var oS={displayPosition:null,worldPosition:null,tolerance:15,activeRepresentation:0,constrained:0,pointPlacer:null};function aS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oS,n),tS.extend(e,t,n),t.displayPosition=Kx.newInstance(),t.displayPosition.setCoordinateSystemToDisplay(),t.worldPosition=Kx.newInstance(),t.worldPosition.setCoordinateSystemToWorld(),t.pointPlacer=Zx.newInstance(),t.interactionState=rS.OUTSIDE,Ae.setGet(e,t,["activeRepresentation","tolerance"]),iS(e,t)}var sS=function(e){for(var t=1;t=o.left&&e[0]<=o.left+i&&e[1]>=o.bottom&&e[1]<=o.bottom+r?t.interactionState=Fx.SELECTING:t.interactionState=Fx.OUTSIDE}return t.interactionState},e.startComplexWidgetInteraction=function(e){t.startEventPosition[0]=e[0],t.startEventPosition[1]=e[1],t.startEventPosition[2]=0,t.lastEventPosition[0]=e[0],t.lastEventPosition[1]=e[1]},e.complexWidgetInteraction=function(n){if(t.interactionState===Fx.SELECTING){var r=t.point.getCenter(),i=ig.computeWorldToDisplay(t.renderer,r[0],r[1],r[2])[2],o=ig.computeDisplayToWorld(t.renderer,t.lastEventPosition[0],t.lastEventPosition[1],i),a=ig.computeDisplayToWorld(t.renderer,n[0],n[1],i);e.moveFocus(o,a),t.lastEventPosition[0]=n[0],t.lastEventPosition[1]=n[1],e.modified()}},e.setWorldPosition=function(r){t.point.setCenter(r),n.setWorldPosition(t.point.getCenter()),e.modified()},e.setDisplayPosition=function(r){n.setDisplayPosition(r),e.setWorldPosition(t.worldPosition.getValue())},e.moveFocus=function(n,r){var i=[];at(r,n,i);var o=t.point.getCenter();ot(o,i,o),e.setWorldPosition(o)},e.getBounds=function(){var e=t.point.getCenter(),n=[];return n[0]=t.placeFactor*(e[0]-1),n[1]=t.placeFactor*(e[0]+1),n[2]=t.placeFactor*(e[1]-1),n[3]=t.placeFactor*(e[1]+1),n[4]=t.placeFactor*(e[2]-1),n[5]=t.placeFactor*(e[2]+1),n},e.setContainer=function(n){t.container&&t.container!==n&&t.container.removeChild(t.canvas),t.container!==n&&(t.container=n,t.container&&t.container.appendChild(t.canvas),e.modified())},e.setLabelStyle=function(n){t.labelStyle=dS(dS({},t.labelStyle),n),e.modified()},e.setSelectLabelStyle=function(n){t.selectLabelStyle=dS(dS({},t.selectLabelStyle),n),e.modified()},e.computeTextDimensions=function(e){var n=t.highlight?t.selectLabelStyle:t.labelStyle,r=/\r?\n/.exec(e),i=null!==r?r[0]:null,o=e.split(i),a=n.fontSize*(1+n.lineSpace),s=n.fontSize/4,l=2*s+n.fontSize+(o.length-1)*a;return{width:o.reduce((function(e,n){return Math.max(e,Math.round(t.context.measureText(n).width))}),0),height:l,lineSpace:a,padding:s,lines:o}},e.updateLabel=function(){if(t.context&&t.canvas&&(t.context.clearRect(0,0,t.canvas.width,t.canvas.height),t.canvas.hidden=!t.actor.getVisibility(),t.actor.getVisibility())){var n=t.highlight?t.selectLabelStyle:t.labelStyle,r=e.computeTextDimensions(t.labelText),i=r.width,o=r.height,a=r.lineSpace,s=r.padding,l=r.lines;t.canvas.height=Math.round(o),t.canvas.width=i+2*s,t.context.strokeStyle=n.strokeColor,t.context.lineWidth=n.strokeSize,t.context.fillStyle=n.fontColor,t.context.font="".concat(n.fontStyle," ").concat(n.fontSize,"px ").concat(n.fontFamily);var u=s,c=n.fontSize;l.forEach((function(e){var n=0;t.textAlign===lS.RIGHT?n=i-Math.round(t.context.measureText(e).width):t.textAlign===lS.CENTER&&(n=.5*(i-Math.round(t.context.measureText(e).width))),t.context.strokeText(e,u+n,c),t.context.fillText(e,u+n,c),c+=a}))}},e.highlight=function(n){t.highlight=n,e.modified()},e.getCanvasSize=function(){return t.canvas?{height:t.canvas.height,width:t.canvas.width}:null}}function fS(e){return dS({container:null,labelStyle:{fontColor:"white",fontStyle:"normal",fontSize:15,fontFamily:"Arial",strokeColor:"black",strokeSize:1,lineSpace:.2},labelText:"",textAlign:lS.LEFT,verticalAlign:uS.BOTTOM,selectLabelStyle:{fontColor:"rgb(0, 255, 0)",fontStyle:"normal",fontSize:15,fontFamily:"Arial",strokeColor:"black",strokeSize:1,lineSpace:.2}},e)}function hS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fS(n)),sS.extend(e,t,n),e.setPlaceFactor(1),t.canvas=document.createElement("canvas"),t.canvas.style.position="absolute",t.context=t.canvas.getContext("2d"),t.point=eh.newInstance(),t.point.setNumberOfPoints(1),t.point.setRadius(0),t.mapper=Rx.newInstance(),t.mapper.setInputConnection(t.point.getOutputPort()),t.mapper.setCallback((function(n){if(t.canvas){var r=0;t.verticalAlign===uS.BOTTOM?r=-t.canvas.height:t.verticalAlign===uS.CENTER&&(r=-.5*t.canvas.height);var i=window.devicePixelRatio;t.canvas.style.left="".concat(Math.round(n[0][0])/i,"px"),t.canvas.style.bottom="".concat(Math.round(n[0][1]/i+r),"px"),e.modified()}})),t.actor=Rv.newInstance({parentProp:e}),t.actor.setMapper(t.mapper),t.actorVisibility=!0,t.highlight=!1,t.actor.onModified((function(){t.actorVisibility!==t.actor.getVisibility()&&(t.actorVisibility=t.actor.getVisibility(),e.modified())})),e.onModified((function(){e.updateLabel()})),Ae.setGet(e,t,["labelText","textAlign","verticalAlign"]),Ae.get(e,t,["container","labelStyle"]),pS(e,t)}var mS={newInstance:Ae.newInstance(hS,"vtkLabelRepresentation"),extend:hS},gS={OUTSIDE:0,ONP1:1,ONP2:2,TRANSLATINGP1:3,TRANSLATINGP2:4,ONLINE:5,SCALING:6},vS=gS,yS={NONE:0,X:1,Y:2,Z:3};function bS(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 wS(e){for(var t=1;t=i.t1&&(i.t1=c,i.planeId=s):c<=i.t2&&(i.t2=c),i.t1>i.t2)return i.intersect=0,i}}return i.intersect=1,i}var SS={clipLineWithPlane:xS};function CS(e,t){t.classHierarchy.push("vtkCellPicker");var n=wS({},e);function r(){t.dataSet=null,t.mapper=null,t.cellId=-1,t.pCoords[0]=0,t.pCoords[1]=0,t.pCoords[2]=0,t.cellIJK[0]=0,t.cellIJK[1]=0,t.cellIJK[2]=0,t.mapperNormal[0]=0,t.mapperNormal[1]=0,t.mapperNormal[2]=1,t.pickNormal[0]=0,t.pickNormal[1]=0,t.pickNormal[2]=1}e.initialize=function(){r(),n.initialize()},e.computeSurfaceNormal=function(e,t,n,r){var i=e.getPointData().getNormals();if(!i)return 0;r[0]=0,r[1]=0,r[2]=0;for(var o=[],a=0;a<3;a++)i.getTuple(t.getPointsIds()[a],o),r[0]+=o[0]*n[a],r[1]+=o[1]*n[a],r[2]+=o[2]*n[a];return mt(r),1},e.pick=function(r,i){e.initialize();var o=n.pick(r,i);if(o){var a=i.getActiveCamera(),s=[];if(a.getPosition(s),a.getParallelProjection()){var l=[];a.getFocalPoint(l),t.pickNormal[0]=s[0]-l[0],t.pickNormal[1]=s[1]-l[1],t.pickNormal[2]=s[2]-l[2]}else t.pickNormal[0]=s[0]-t.pickPosition[0],t.pickNormal[1]=s[1]-t.pickPosition[1],t.pickNormal[2]=s[2]-t.pickPosition[2];mt(t.pickNormal)}return o},e.intersectWithLine=function(n,r,i,o){var a=Number.MAX_VALUE,s=xS(o,t.transformMatrix,n,r);if(o&&!s.intersect)return Number.MAX_VALUE;if(o.isA("vtkImageMapper")){var l=o.intersectWithLineForCellPicking(n,r);l&&(a=l.t,t.cellIJK=l.ijk,t.pCoords=l.pCoords)}else o.isA("vtkMapper")&&(a=e.intersectActorWithLine(n,r,0,1,i,o));if(a=0){t.mapperPosition[0]=1*n[0]+0*r[0],t.mapperPosition[1]=1*n[1]+0*r[1],t.mapperPosition[2]=1*n[2]+0*r[2];var u=[];o.getClippingPlaneInDataCoords(t.transformMatrix,s.clippingPlaneId,u),mt(u),t.mapperNormal[0]=-u[0],t.mapperNormal[1]=-u[1],t.mapperNormal[2]=-u[2]}yo(t.pickPosition,t.mapperPosition,t.transformMatrix);var c=t.transformMatrix;t.mapperNormal[0]=c[0]*t.pickNormal[0]+c[4]*t.pickNormal[1]+c[8]*t.pickNormal[2],t.mapperNormal[1]=c[1]*t.pickNormal[0]+c[5]*t.pickNormal[1]+c[9]*t.pickNormal[2],t.mapperNormal[2]=c[2]*t.pickNormal[0]+c[6]*t.pickNormal[1]+c[10]*t.pickNormal[2]}return a},e.intersectActorWithLine=function(n,i,o,a,s,l){var u=Number.MAX_VALUE,c=[0,0,0],d=Number.MAX_VALUE,p=[0,0,0],f=-1,h=Zu.newInstance(),m=[],g=l.getInputData(),v=[0,0,0],y=[0,0,0];if(v[0]=n[0],v[1]=n[1],v[2]=n[2],y[0]=i[0],y[1]=i[1],y[2]=i[2],0!==o||1!==a)for(var b=0;b<3;b++)v[b]=n[b]*(1-o)+i[b]*o,y[b]=n[b]*(1-a)+i[b]*a;if(g.getPolys)for(var w=g.getPolys(),x=g.getPoints(),S=w.getData(),C=0,A=[-1,-1,-1],P=Zu.newInstance(),_=Xs.newInstance(),O=0;O=o&&I.t<=a){var k=P.getParametricDistance(T);if(k=0&&uB&&(L=V,B=R[V]);-1!==L&&(t.pointId=h.getPointsIds()[L]),t.mapperPosition[0]=c[0],t.mapperPosition[1]=c[1],t.mapperPosition[2]=c[2],e.computeSurfaceNormal(g,h,R,t.mapperNormal)||(t.mapperNormal[0]=n[0]-i[0],t.mapperNormal[1]=n[1]-i[1],t.mapperNormal[2]=n[2]-i[2],mt(t.mapperNormal))}return u}}var AS={cellId:-1,pCoords:[],cellIJK:[],pickNormal:[],mapperNormal:[]};function PS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AS,n),xy.extend(e,t,n),Ae.getArray(e,t,["pickNormal","mapperNormal","pCoords","cellIJK"]),Ae.get(e,t,["cellId"]),CS(e,t)}var _S=wS({newInstance:Ae.newInstance(PS,"vtkCellPicker"),extend:PS},SS);function OS(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 TS(e,t){t.classHierarchy.push("vtkSphereHandleRepresentation");var n=function(e){for(var t=1;t=0&&e<3)return e;if(!t.waitingForMotion){var r=wt(t.cursorPicker.getPickPosition(),t.startEventPosition),i=t.hotSpotSize*t.initialLength;return r>i*i?(t.waitingForMotion=0,t.cursorPicker.getCellId()):(t.waitingForMotion=1,t.waitCount=0,-1)}if(t.waitingForMotion&&n){t.waitingForMotion=0;var o=[];return o[0]=Math.abs(n[0]-t.startEventPosition[0]),o[1]=Math.abs(n[1]-t.startEventPosition[1]),o[2]=Math.abs(n[2]-t.startEventPosition[2]),o[0]>o[1]?o[0]>o[2]?0:2:o[1]>o[2]?1:2}return-1},e.startComplexWidgetInteraction=function(n){t.startEventPosition[0]=n[0],t.startEventPosition[1]=n[1],t.startEventPosition[2]=0,t.lastEventPosition[0]=n[0],t.lastEventPosition[1]=n[1];var r=[n[0],n[1],0];t.cursorPicker.pick(r,t.renderer),t.cursorPicker.getDataSet()?(t.interactionState=Fx.SELECTING,t.constraintAxis=e.determineConstraintAxis(-1,null),t.lastPickPosition=t.cursorPicker.getPickPosition()):(t.interactionState=Fx.OUTSIDE,t.constraintAxis=-1)},e.displayToWorld=function(e,n){return ig.computeDisplayToWorld(t.renderer,e[0],e[1],n)},e.complexWidgetInteraction=function(n){var r=ig.computeWorldToDisplay(t.renderer,t.lastPickPosition[0],t.lastPickPosition[1],t.lastPickPosition[2])[2],i=e.displayToWorld(t.lastEventPosition,r),o=e.displayToWorld(n,r);t.interactionState===Fx.SELECTING||t.interactionState===Fx.TRANSLATING?(!t.waitingForMotion||t.waitCount++>3)&&(t.constraintAxis=e.determineConstraintAxis(t.constraintAxis,o),t.interactionState!==Fx.SELECTING||t.translationMode?e.translate(i,o):e.moveFocus(i,o)):t.interactionState===Fx.SCALING&&e.scale(i,o,n),t.lastEventPosition[0]=n[0],t.lastEventPosition[1]=n[1],e.modified()},e.moveFocus=function(n,r){var i=[];i[0]=r[0]-n[0],i[1]=r[1]-n[1],i[2]=r[2]-n[2];var o=t.sphere.getCenter();t.constraintAxis>=0?o[t.constraintAxis]+=i[t.constraintAxis]:(o[0]+=i[0],o[1]+=i[1],o[2]+=i[2]),e.setWorldPosition(o)},e.translate=function(n,r){var i=[];i[0]=r[0]-n[0],i[1]=r[1]-n[1],i[2]=r[2]-n[2];var o=t.sphere.getCenter();if(t.constraintAxis>=0)for(var a=0;a<3;a++)a!==t.constraintAxis&&(i[a]=0);for(var s=[],l=0;l<3;l++)s[l]=o[l]+i[l];e.setWorldPosition(s);var u=e.sizeHandlesInPixels(1,s);u*=t.currentHandleSize/t.handleSize,t.sphere.setRadius(u)},e.sizeBounds=function(){var n=t.sphere.getCenter(),r=e.sizeHandlesInPixels(1,n);r*=t.currentHandleSize/t.handleSize,t.sphere.setRadius(r)},e.scale=function(n,r,i){var o=[];o[0]=r[0]-n[0],o[1]=r[1]-n[1],o[2]=r[2]-n[2];var a=e.getBounds(),s=ht(o)/Math.sqrt((a[1]-a[0])*(a[1]-a[0])+(a[3]-a[2])*(a[3]-a[2])+(a[5]-a[4])*(a[5]-a[4]));i[1]>t.lastEventPosition[1]?s+=1:s=1-s,t.currentHandleSize*=s,t.currentHandleSize=t.currentHandleSize<.001?.001:t.currentHandleSize,e.sizeBounds()},e.highlight=function(n){n?e.applyProperty(t.selectProperty):e.applyProperty(t.property)},e.buildRepresentation=function(){t.renderer&&(t.placed||(t.validPick=1,t.placed=1),e.sizeBounds(),t.sphere.update(),e.modified())},e.applyProperty=function(e){t.actor.setProperty(e)}}var DS={actor:null,mapper:null,sphere:null,cursorPicker:null,lastPickPosition:[0,0,0],lastEventPosition:[0,0],constraintAxis:-1,translationMode:1,property:null,selectProperty:null,placeFactor:1,waitingForMotion:0,hotSpotSize:.05};function ES(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DS,n),sS.extend(e,t,n),Ae.setGet(e,t,["glyphResolution","defaultScale"]),Ae.setGet(e,t,["translationMode","property","selectProperty"]),Ae.get(e,t,["actor"]),t.sphere=ph.newInstance(),t.sphere.setThetaResolution(16),t.sphere.setPhiResolution(8),t.mapper=cy.newInstance(),t.mapper.setInputConnection(t.sphere.getOutputPort()),t.actor=Rv.newInstance({parentProp:e}),t.actor.setMapper(t.mapper),e.setHandleSize(15),t.currentHandleSize=t.handleSize,t.cursorPicker=_S.newInstance(),t.cursorPicker.setPickFromList(1),t.cursorPicker.initializePickList(),t.cursorPicker.addPickList(t.actor),t.property=Dv.newInstance(),t.property.setColor(1,1,1),t.selectProperty=Dv.newInstance(),t.selectProperty.setColor(0,1,0),t.actor.setProperty(t.property),TS(e,t)}var IS={newInstance:Ae.newInstance(ES,"vtkSphereHandleRepresentation"),extend:ES};function kS(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 MS=vS,NS=yS;function RS(e,t){t.classHierarchy.push("vtkLineRepresentation");var n=function(e){for(var t=1;t0?(t.interactionState=MS.ONLINE,e.setRepresentationState(MS.ONLINE),o=e.getPoint1WorldPosition(),a=e.getPoint2WorldPosition()):(t.interactionState=MS.OUTSIDE,e.setRepresentationState(MS.OUTSIDE)),t.interactionState},e.setRepresentationState=function(n){t.representationState!==n&&(t.representationState=n,e.modified(),n===MS.OUTSIDE?(e.highlightPoint(0,0),e.highlightPoint(1,0),e.highlightLine(0)):n===MS.ONP1?(e.highlightPoint(0,1),e.highlightPoint(1,0),e.highlightLine(0)):n===MS.ONP2?(e.highlightPoint(0,0),e.highlightPoint(1,1),e.highlightLine(0)):n===MS.ONLINE?(e.highlightPoint(0,0),e.highlightPoint(1,0),e.highlightLine(1)):(e.highlightPoint(0,1),e.highlightPoint(1,1),e.highlightLine(1)))},e.sizeHandles=function(){},e.buildRepresentation=function(){var n,r;t.point1Representation.buildRepresentation(),t.point2Representation.buildRepresentation(),0===t.initializeDisplayPosition&&t.renderer&&(e.setPoint1WorldPosition(t.lineSource.getPoint1()),e.setPoint2WorldPosition(t.lineSource.getPoint2()),t.validPick=1,t.initializeDisplayPosition=1),t.point1Representation.setTolerance(t.tolerance),t.point2Representation.setTolerance(t.tolerance);var i=e.getPoint1WorldPosition();(n=t.lineSource).setPoint1.apply(n,w(i)),t.point1Representation.setWorldPosition(i);var o=e.getPoint2WorldPosition();(r=t.lineSource).setPoint2.apply(r,w(o)),t.point2Representation.setWorldPosition(o),e.sizeHandles(),e.modified()},e.highlightPoint=function(e,n){0===e?n?t.point1Representation.applyProperty(t.selectedEndPointProperty):t.point1Representation.applyProperty(t.endPointProperty):1===e&&(n?t.point2Representation.applyProperty(t.selectedEndPoint2Property):t.point2Representation.applyProperty(t.endPoint2Property))},e.highlightLine=function(e){e?t.lineActor.setProperty(t.selectedLineProperty):t.lineActor.setProperty(t.lineProperty)},e.setLineColor=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;nt.initialBounds[2*n+1]&&(e[n]=t.initialBounds[2*n+1])},e.getBounds=function(){return t.boundingBox.setBounds(t.lineActor.getBounds()),t.boundingBox.addBounds(t.point1Representation.getBounds()),t.boundingBox.addBounds(t.point2Representation.getBounds()),t.boundingBox.getBounds()},e.getActors=function(){var e=[];return e.push.apply(e,w(t.point1Representation.getActors())),e.push.apply(e,w(t.point2Representation.getActors())),e.push(t.lineActor),e},e.getNestedProps=function(){return e.getActors()}}var FS={point1Representation:null,point2Representation:null,lineSource:null,lineMapper:null,lineActor:null,endPointProperty:null,selectedEndPointProperty:null,endPoint2Property:null,selectedEndPoint2Property:null,lineProperty:null,selectedLineProperty:null,tolerance:5,placed:0,representationState:MS.OUTSIDE,startP1:[0,0,0],startP2:[0,0,0],length:0,restrictFlag:NS.NONE,initializeDisplayPosition:0,boundingBox:null};function BS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FS,n),tS.extend(e,t,n),Ae.get(e,t,["point1Representation","point2Representation","endPointProperty","selectedEndPointProperty","endPoint2Property","selectedEndPoint2Property","lineProperty","selectedLineProperty"]),e.setHandleSize(5),t.boundingBox=vl.newInstance(),t.point1Representation=IS.newInstance(),t.point2Representation=IS.newInstance();var r=10;t.point1Representation.setHandleSize(r),t.point2Representation.setHandleSize(r),t.lineSource=Hf.newInstance({point1:[-.5,0,0],point2:[.5,0,0],resolution:5}),t.lineSource.setResolution(5),t.lineMapper=cy.newInstance(),t.lineMapper.setInputConnection(t.lineSource.getOutputPort()),t.lineActor=Rv.newInstance({parentProp:e}),t.lineActor.setMapper(t.lineMapper),t.endPointProperty=Dv.newInstance(),t.endPointProperty.setColor(1,1,1),t.selectedEndPointProperty=Dv.newInstance(),t.selectedEndPointProperty.setColor(0,1,0),t.endPoint2Property=Dv.newInstance(),t.endPoint2Property.setColor(1,1,1),t.selectedEndPoint2Property=Dv.newInstance(),t.selectedEndPoint2Property.setColor(0,1,0),t.lineProperty=Dv.newInstance(),t.lineProperty.setAmbient(1),t.lineProperty.setAmbientColor(1,1,1),t.lineProperty.setLineWidth(2),t.selectedLineProperty=Dv.newInstance(),t.selectedLineProperty.setAmbient(1),t.selectedLineProperty.setColor(0,1,0),t.selectedLineProperty.setLineWidth(2),t.point1Representation.applyProperty(t.endPointProperty),t.point2Representation.applyProperty(t.endPoint2Property),t.point1Representation.setWorldPosition(t.lineSource.getPoint1()),t.point2Representation.setWorldPosition(t.lineSource.getPoint2()),t.lineActor.setProperty(t.lineProperty),RS(e,t)}var LS={newInstance:Ae.newInstance(BS,"vtkLineRepresentation"),extend:BS};function VS(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 jS(e,t){t.classHierarchy.push("vtkDistanceRepresentation");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,GS,n),LS.extend(e,t,n),t.labelRepresentation=mS.newInstance(),Ae.setGet(e,t,["numberOfDecimals","labelPosition"]),Ae.get(e,t,["labelRepresentation"]),jS(e,t)}var zS={newInstance:Ae.newInstance(US,"vtkDistanceRepresentation"),extend:US},WS={WidgetState:{START:0,ACTIVE:1}};function HS(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 KS=Ae.VOID,XS=Ae.EVENT_ABORT,qS=sS.InteractionState,YS=WS.WidgetState;function ZS(e,t){function n(){e.setCursor(t.widgetRep.getInteractionState()),t.widgetRep.highlight(1),e.invokeStartInteractionEvent(),e.render()}t.classHierarchy.push("vtkHandleWidget"),e.createDefaultRepresentation=function(){t.widgetRep||(t.widgetRep=IS.newInstance())},e.handleMouseMove=function(t){return e.moveAction(t)},e.handleLeftButtonPress=function(t){return e.selectAction(t)},e.handleLeftButtonRelease=function(t){return e.endSelectAction(t)},e.handleMiddleButtonPress=function(t){return e.translateAction(t)},e.handleMiddleButtonRelease=function(t){return e.endSelectAction(t)},e.handleRightButtonPress=function(t){return e.scaleAction(t)},e.handleRightButtonRelease=function(t){return e.endSelectAction(t)},e.setCursor=function(e){if(e===qS.OUTSIDE)t.interactor.getView().setCursor("default");else t.interactor.getView().setCursor("pointer")},e.selectAction=function(e){var r=[e.position.x,e.position.y];return t.widgetRep.computeInteractionState(r),t.widgetRep.getInteractionState()===qS.OUTSIDE?KS:(t.widgetRep.startComplexWidgetInteraction(r),t.widgetState=YS.ACTIVE,t.widgetRep.setInteractionState(qS.SELECTING),n(),XS)},e.translateAction=function(e){var r=[e.position.x,e.position.y];return t.widgetRep.computeInteractionState(r),t.widgetRep.getInteractionState()===qS.OUTSIDE?KS:(t.widgetRep.startComplexWidgetInteraction(r),t.widgetState=YS.ACTIVE,t.widgetRep.setInteractionState(qS.TRANSLATING),n(),XS)},e.scaleAction=function(e){if(!t.allowHandleResize)return KS;var r=[e.position.x,e.position.y];return t.widgetRep.computeInteractionState(r),t.widgetRep.getInteractionState()===qS.OUTSIDE?KS:(t.widgetRep.startComplexWidgetInteraction(r),t.widgetState=YS.ACTIVE,t.widgetRep.setInteractionState(qS.SCALING),n(),XS)},e.endSelectAction=function(){return t.widgetState!==YS.ACTIVE?KS:(t.widgetState=YS.START,t.widgetRep.highlight(0),e.invokeEndInteractionEvent(),e.render(),XS)},e.moveAction=function(n){var r=[n.position.x,n.position.y],i=t.widgetRep.getInteractionState();return t.widgetState===YS.START?(t.widgetRep.computeInteractionState(r),i=t.widgetRep.getInteractionState(),e.setCursor(i),t.widgetRep.getActiveRepresentation()&&i!==t.widgetRep.getInteractionState()&&e.render(),i===qS.OUTSIDE?KS:XS):e.isDragable()?(e.setCursor(i),t.widgetRep.complexWidgetInteraction(r),e.invokeInteractionEvent(),e.render(),XS):KS}}var JS={allowHandleResize:1,widgetState:YS.START};function QS(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,JS,n),Ix.extend(e,t,n),Ae.setGet(e,t,["allowHandleResize"]),ZS(e,t)}var $S=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rC,n),$S.extend(e,t,n),nC(e,t)}var oC={newInstance:Ae.newInstance(iC,"vtkLabelWidget"),extend:iC};function aC(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 sC={START:0,DEFINE:1,MANIPULATE:2,ACTIVE:3},lC=Bx.InteractionState;function uC(e,t){t.classHierarchy.push("vtkLineWidget");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cC,n),Ix.extend(e,t,n),t.point1Widget=$S.newInstance(),t.point1Widget.setParent(e),t.point1Widget.createDefaultRepresentation(),t.point2Widget=$S.newInstance(),t.point2Widget.setParent(e),t.point2Widget.createDefaultRepresentation(),uC(e,t)}var pC={newInstance:Ae.newInstance(dC,"vtkLineWidget"),extend:dC};function fC(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,t){t.classHierarchy.push("vtkDistanceWidget");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mC,n),pC.extend(e,t,n),t.labelWidget=oC.newInstance(),t.labelWidget.setProcessEvents(!1),hC(e,t)}var vC={newInstance:Ae.newInstance(gC,"vtkDistanceWidget"),extend:gC},yC=26,bC={IDLE:0,CROPPING:1},wC=["CroppingPlanesChanged"],xC=yC,SC=[2,0,1,2,2,3,2,4,5,2,6,7,2,0,2,2,1,3,2,4,6,2,5,7,2,0,4,2,1,5,2,2,6,2,3,7];function CC(e){for(var t=0;t<6;t+=2)if(e[t]>e[t+1]){var n=e[t+1];e[t+1]=e[t],e[t]=n}}function AC(e,t){t.classHierarchy.push("vtkImageCroppingRegionsRepresentation"),t.placeFactor=1,t.picker=_S.newInstance(),t.picker.setPickFromList(1),t.picker.initializePickList(),t.handles=Array(xC).fill(null).map((function(){var e=ph.newInstance(),n=cy.newInstance(),r=Rv.newInstance();return n.setInputConnection(e.getOutputPort()),r.setMapper(n),t.picker.addPickList(r),{source:e,mapper:n,actor:r}})),t.outline={polydata:rc.newInstance(),mapper:cy.newInstance(),actor:Rv.newInstance()},t.outline.polydata.getPoints().setData(new Float32Array(24),3),t.outline.polydata.getLines().setData(Uint16Array.from(SC)),t.outline.mapper.setInputData(t.outline.polydata),t.outline.actor.setMapper(t.outline.mapper),e.getActors=function(){for(var e=[t.outline.actor],n=0;n1){var l=t.picker.getPickedPositions().map((function(t){return wt(e.pokedRenderer.getActiveCamera().getPosition(),t)})),u=1/0;l.forEach((function(e,t){u>e&&(s=t,u=e)}))}var c=a[s];return t.handles.findIndex((function(e){return e.actor===c}))}return-1},e.placeWidget=function(){for(var n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PC,n),tS.extend(e,t,n),Ae.setGet(e,t,["activeHandleIndex"]),Ae.setGetArray(e,t,["edgeColor"],3),Ae.setGetArray(e,t,["handlePositions"],xC),Ae.setGetArray(e,t,["handleSizes"],xC),Ae.setGetArray(e,t,["bboxCorners"],8),AC(e,t)}var OC={newInstance:Ae.newInstance(_C,"vtkImageCroppingRegionsRepresentation"),extend:_C};function TC(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 DC(e){for(var t=1;t>2&1)],e[2+(p>>1&1)],e[4+(p>>0&1)]];for(var f=0;f-1)return t.activeHandleIndex=r,e.updateWidgetState({activeHandleIndex:r,controlState:NC.CROPPING}),kC}return IC},e.moveAction=function(n){var r=t.widgetState,o=r.controlState,a=r.planes,s=r.activeHandleIndex;if(o===NC.IDLE||-1===s)return IC;var l=e.planesToHandles(a),u=[n.position.x,n.position.y],c=l[s],d=e.getInteractor().getCurrentRenderer().getActiveCamera().getDirectionOfProjection(),p=e.displayToPlane(u,c,d);if(!p)return kC;var f=a.slice();if(s<6){var h=Math.floor(s/2),m=3*h,g=t.volumeMapper.getInputData().getDirection().slice(m,m+3),v=[0,0,0],y=[0,0,0],b=[0,0,0];at(p,c,y),vt(y,g,b),ot(c,b,v);var x=i(v);f[s]=x[h]}else if(s<18){var S=s-6,C=Math.floor(S/4),A=3*C,P=t.volumeMapper.getInputData().getDirection().slice(A,A+3),_=[0,0,0],O=[0,0,0],T=[0,0,0];at(p,c,O),Pr.projectVector(O,P,T),ot(c,T,_);for(var D=i(_),E=FC[S%4].slice(),I=[],k=0;k<3;++k)k!==C&&I.push(2*k+E.shift());I.forEach((function(e){f[e]=D[Math.floor(e/2)]}))}else{var M=s-18,N=i(p);[0+(M>>2&1),2+(M>>1&1),4+(M>>0&1)].forEach((function(e){f[e]=N[Math.floor(e/2)]}))}return e.setCroppingPlanes.apply(e,w(f)),kC},e.endMoveAction=function(){t.widgetState.activeHandleIndex>-1&&e.updateWidgetState({activeHandleIndex:-1,controlState:NC.IDLE})}}var LC={handleSize:5,faceHandlesEnabled:!1,edgeHandlesEnabled:!1,cornerHandlesEnabled:!0};function VC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,LC,n),Ix.extend(e,t,LC,n),RC.forEach((function(n){return Ae.event(e,t,n)})),Ae.get(e,t,["volumeMapper","handleSize","faceHandlesEnabled","edgeHandlesEnabled","cornerHandlesEnabled"]),BC(e,t)}var jC={newInstance:Ae.newInstance(VC,"vtkImageCroppingRegionsWidget"),extend:VC},GC=Ae.vtkDebugMacro;function UC(e,t){t.classHierarchy.push("vtkCamera");var n=new Float64Array(3),r=new Float64Array([0,0,-1]),i=new Float64Array([0,1,0]),o=zo(new Float64Array(16)),a=new Float64Array(3),s=new Float64Array(3),l=new Float64Array(3),u=zo(new Float64Array(16)),c=zo(new Float64Array(16)),d=new Float64Array(3),p=new Float64Array(3);function f(){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,i){n===t.position[0]&&r===t.position[1]&&i===t.position[2]||(t.position[0]=n,t.position[1]=r,t.position[2]=i,e.computeDistance(),e.modified())},e.setFocalPoint=function(n,r,i){n===t.focalPoint[0]&&r===t.focalPoint[1]&&i===t.focalPoint[2]||(t.focalPoint[0]=n,t.focalPoint[1]=r,t.focalPoint[2]=i,e.computeDistance(),e.modified())},e.setDistance=function(n){if(t.distance!==n){t.distance=n,t.distance<1e-20&&(t.distance=1e-20,GC("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,GC("Distance is set to minimum.");var i=t.directionOfProjection;t.focalPoint[0]=t.position[0]+i[0]*t.distance,t.focalPoint[1]=t.position[1]+i[1]*t.distance,t.focalPoint[2]=t.position[2]+i[2]*t.distance}t.directionOfProjection[0]=e/t.distance,t.directionOfProjection[1]=n/t.distance,t.directionOfProjection[2]=r/t.distance,f()},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,i=t.focalPoint,o=t.viewUp,a=new Float64Array([o[0],o[1],o[2],0]);zo(u);var s=new Float64Array([i[0]-r[0],i[1]-r[1],i[2]-r[2]]);Jo(u,u,Le(n),s),$h(a,a,u),t.viewUp[0]=a[0],t.viewUp[1]=a[1],t.viewUp[2]=a[2],e.modified()},e.azimuth=function(n){var r=t.focalPoint;zo(c),Yo(c,c,r),Jo(c,c,Le(n),t.viewUp),Yo(c,c,[-r[0],-r[1],-r[2]]),yo(d,t.position,c),e.setPosition(d[0],d[1],d[2])},e.yaw=function(n){var r=t.position;zo(c),Yo(c,c,r),Jo(c,c,Le(n),t.viewUp),Yo(c,c,[-r[0],-r[1],-r[2]]),yo(p,t.focalPoint,c),e.setFocalPoint(p[0],p[1],p[2])},e.elevation=function(n){var r=t.focalPoint,i=e.getViewMatrix(),o=[-i[0],-i[1],-i[2]];zo(c),Yo(c,c,r),Jo(c,c,Le(n),o),Yo(c,c,[-r[0],-r[1],-r[2]]),yo(d,t.position,c),e.setPosition(d[0],d[1],d[2])},e.pitch=function(n){var r=t.position,i=e.getViewMatrix(),o=[i[0],i[1],i[2]];zo(c),Yo(c,c,r),Jo(c,c,Le(n),o),Yo(c,c,[-r[0],-r[1],-r[2]]),yo(p,t.focalPoint,c),e.setFocalPoint.apply(e,w(p))},e.zoom=function(n){n<=0||(t.parallelProjection?t.parallelScale/=n:t.viewAngle/=n,e.modified())},e.translate=function(n,r,i){var o=[n,r,i];ot(t.position,o,t.position),ot(t.focalPoint,o,t.focalPoint),e.computeDistance(),e.modified()},e.applyTransform=function(n){var r=[].concat(w(t.viewUp),[1]),i=[],o=[],a=[];r[0]+=t.position[0],r[1]+=t.position[1],r[2]+=t.position[2],$h(i,[].concat(w(t.position),[1]),n),$h(o,[].concat(w(t.focalPoint),[1]),n),$h(a,r,n),a[0]-=i[0],a[1]-=i[1],a[2]-=i[2],e.setPosition.apply(e,w(i.slice(0,3))),e.setFocalPoint.apply(e,w(o.slice(0,3))),e.setViewUp.apply(e,w(a.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,GC("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,GC("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=lv(e[0],e[1],e[2],e[3]),i=Qg(),o=lv(0,0,1,0);return n=r,(t=i)[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],ev(o,r,o),ev(o,o,i),[o[0],o[1],o[2]]},e.getPhysicalToWorldMatrix=function(t){e.getWorldToPhysicalMatrix(t),Ho(t,t)},e.getWorldToPhysicalMatrix=function(e){zo(e);var n=[3];ft(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],Wo(e,e),Xi(a,1/t.physicalScale,1/t.physicalScale,1/t.physicalScale),Zo(e,e,a),Yo(e,e,t.physicalTranslation)},e.computeViewParametersFromViewMatrix=function(u){Ho(o,u),yo(a,n,o),e.computeDistance();var c=t.distance;e.setPosition(a[0],a[1],a[2]),yo(s,r,o),Yi(s,s,a),co(s,s),e.setDirectionOfProjection(s[0],s[1],s[2]),yo(l,i,o),Yi(l,l,a),co(l,l),e.setViewUp(l[0],l[1],l[2]),e.setDistance(c)},e.computeViewParametersFromPhysicalMatrix=function(t){e.getWorldToPhysicalMatrix(o),qo(o,t,o),e.computeViewParametersFromViewMatrix(o)},e.setViewMatrix=function(n){t.viewMatrix=n,t.viewMatrix&&(jo(o,t.viewMatrix),e.computeViewParametersFromViewMatrix(o),Wo(t.viewMatrix,t.viewMatrix))},e.getViewMatrix=function(){if(t.viewMatrix)return t.viewMatrix;ba(o,t.position,t.focalPoint,t.viewUp),Wo(o,o);var e=new Float64Array(16);return jo(e,o),e},e.setProjectionMatrix=function(e){t.projectionMatrix=e},e.getProjectionMatrix=function(e,n,r){var i=new Float64Array(16);if(zo(i),t.projectionMatrix){var s=1/t.physicalScale;return Xi(a,s,s,s),jo(i,t.projectionMatrix),Zo(i,i,a),Wo(i,i),i}zo(o);var l=t.clippingRange[1]-t.clippingRange[0],u=[t.clippingRange[0]+(n+1)*l/2,t.clippingRange[0]+(r+1)*l/2];if(t.parallelProjection){var c=t.parallelScale*e,d=t.parallelScale,p=(t.windowCenter[0]-1)*c,f=(t.windowCenter[0]+1)*c,h=(t.windowCenter[1]-1)*d,m=(t.windowCenter[1]+1)*d;ya(o,p,f,h,m,u[0],u[1]),Wo(o,o)}else{if(t.useOffAxisProjection)throw new Error("Off-Axis projection is not supported at this time");var g,v,y=Math.tan(Le(t.viewAngle)/2);!0===t.useHorizontalViewAngle?(g=t.clippingRange[0]*y,v=t.clippingRange[0]*y/e):(g=t.clippingRange[0]*y*e,v=t.clippingRange[0]*y);var b=(t.windowCenter[0]-1)*g,w=(t.windowCenter[0]+1)*g,x=(t.windowCenter[1]-1)*v,S=(t.windowCenter[1]+1)*v,C=u[0],A=u[1];o[0]=2*C/(w-b),o[5]=2*C/(S-x),o[2]=(b+w)/(w-b),o[6]=(x+S)/(S-x),o[10]=-(C+A)/(A-C),o[14]=-1,o[11]=-2*C*A/(A-C),o[15]=0}return jo(i,o),i},e.getCompositeProjectionMatrix=function(t,n,r){var i=e.getViewMatrix(),o=e.getProjectionMatrix(t,n,r);return qo(o,i,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 i=t.directionOfProjection;t.focalPoint[0]=t.position[0]+i[0]*t.distance,t.focalPoint[1]=t.position[1]+i[1]*t.distance,t.focalPoint[2]=t.position[2]+i[2]*t.distance,f()}},e.setDeviceAngles=function(n,r,i,o){var a=[3];ft(t.physicalViewNorth,t.physicalViewUp,a);var s=zo(new Float64Array(16));Jo(s,s,Le(n),t.physicalViewUp),Jo(s,s,Le(r),a),Jo(s,s,Le(i),t.physicalViewNorth),Jo(s,s,Le(-o),t.physicalViewUp);var l=new Float64Array([-t.physicalViewUp[0],-t.physicalViewUp[1],-t.physicalViewUp[2]]),u=new Float64Array(t.physicalViewNorth);yo(l,l,s),yo(u,u,s),e.setDirectionOfProjection(l[0],l[1],l[2]),e.setViewUp(u[0],u[1],u[2]),e.modified()},e.setOrientationWXYZ=function(t,n,r,i){var o=zo(new Float64Array(16));if(0!==t&&(0!==n||0!==r||0!==i)){var a=Le(t),s=Qg();$g(s,[n,r,i],a),ha(o,s)}var l=new Float64Array(3);yo(l,[0,0,-1],o);var u=new Float64Array(3);yo(u,[0,1,0],o),e.setDirectionOfProjection.apply(e,w(l)),e.setViewUp.apply(e,w(u)),e.modified()},e.computeClippingRange=function(e){var n,r;n=t.viewPlaneNormal,r=t.position;for(var i=-n[0],o=-n[1],a=-n[2],s=-(i*r[0]+o*r[1]+a*r[2]),l=[i*e[0]+o*e[2]+a*e[4]+s,1e-18],u=0;u<2;u++)for(var c=0;c<2;c++)for(var d=0;d<2;d++){var p=i*e[d]+o*e[2+c]+a*e[4+u]+s;l[0]=pl[1]?p:l[1]}return l}}var zC={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 WC(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zC,n),Ae.obj(e,t),Ae.get(e,t,["distance"]),Ae.setGet(e,t,["parallelProjection","useHorizontalViewAngle","viewAngle","parallelScale","useOffAxisProjection","freezeFocalPoint","physicalScale"]),Ae.getArray(e,t,["directionOfProjection","viewPlaneNormal","position","focalPoint"]),Ae.setGetArray(e,t,["clippingRange","windowCenter"],2),Ae.setGetArray(e,t,["viewUp","screenBottomLeft","screenBottomRight","screenTopRight","physicalTranslation","physicalViewUp","physicalViewNorth"],3),UC(e,t)}var HC={newInstance:Ae.newInstance(WC,"vtkCamera"),extend:WC};function KC(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,XC,n),Ae.obj(e,t),Ae.setGet(e,t,["intensity","switch","positional","exponent","coneAngle","transformMatrix","lightType","shadowAttenuation"]),Ae.setGetArray(e,t,["color","position","focalPoint","attenuationValues"],3),KC(e,t)}var YC={newInstance:Ae.newInstance(qC,"vtkLight"),extend:qC,LIGHT_TYPES:["HeadLight","CameraLight","SceneLight"]},ZC=Ae.vtkErrorMacro;function JC(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 i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QC,n),Ae.obj(e,t),Ae.event(e,t,"event"),Ae.setGetArray(e,t,["viewport"],4),Ae.setGetArray(e,t,["background","background2"],3),JC(e,t)}var eA={newInstance:Ae.newInstance($C,"vtkViewport"),extend:$C},tA=H,nA=K,rA=X;function iA(e){return function(){return nA("vtkRenderer::".concat(e," - NOT IMPLEMENTED"))}}function oA(e,t){t.classHierarchy.push("vtkRenderer");var n={type:"ComputeVisiblePropBoundsEvent",renderer:e},r={type:"ResetCameraClippingRangeEvent",renderer:e},i={type:"ResetCameraEvent",renderer:e};e.updateCamera=function(){return t.activeCamera||(tA("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())):nA("light has unknown light type",e.get()))}))},e.updateLightGeometry=function(){return!t.lightFollowCamera||e.updateLightsGeometryToFollowCamera()},e.allocateTime=iA("allocateTime"),e.updateGeometry=iA("updateGeometry"),e.getVTKWindow=function(){return t.renderWindow},e.setLayer=function(n){tA(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=HC.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=YC.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,i){var o=e.normalizedDisplayToProjection(t,n,r);return o=e.projectionToView(o[0],o[1],o[2],i),e.viewToWorld(o[0],o[1],o[2])},e.worldToNormalizedDisplay=function(t,n,r,i){var o=e.worldToView(t,n,r);return o=e.viewToProjection(o[0],o[1],o[2],i),e.projectionToNormalizedDisplay(o[0],o[1],o[2])},e.viewToWorld=function(e,n,r){if(null===t.activeCamera)return nA("ViewToWorld: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var i=t.activeCamera.getViewMatrix();Ho(i,i),Wo(i,i);var o=new Float64Array([e,n,r]);return yo(o,o,i),o},e.projectionToView=function(e,n,r,i){if(null===t.activeCamera)return nA("ProjectionToView: no active camera, cannot compute projection to view, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(i,-1,1);Ho(o,o),Wo(o,o);var a=new Float64Array([e,n,r]);return yo(a,a,o),a},e.worldToView=function(e,n,r){if(null===t.activeCamera)return nA("WorldToView: no active camera, cannot compute view to world, returning 0,0,0"),[0,0,0];var i=t.activeCamera.getViewMatrix();Wo(i,i);var o=new Float64Array([e,n,r]);return yo(o,o,i),o},e.viewToProjection=function(e,n,r,i){if(null===t.activeCamera)return nA("ViewToProjection: no active camera, cannot compute view to projection, returning 0,0,0"),[0,0,0];var o=t.activeCamera.getProjectionMatrix(i,-1,1);Wo(o,o);var a=new Float64Array([e,n,r]);return yo(a,a,o),a},e.computeVisiblePropBounds=function(){t.allBounds[0]=si.INIT_BOUNDS[0],t.allBounds[1]=si.INIT_BOUNDS[1],t.allBounds[2]=si.INIT_BOUNDS[2],t.allBounds[3]=si.INIT_BOUNDS[3],t.allBounds[4]=si.INIT_BOUNDS[4],t.allBounds[5]=si.INIT_BOUNDS[5];var r=!0;e.invokeEvent(n);for(var i=0;it.allBounds[1]&&(t.allBounds[1]=a[1]),a[2]t.allBounds[3]&&(t.allBounds[3]=a[3]),a[4]t.allBounds[5]&&(t.allBounds[5]=a[5]))}}return r&&(hn(t.allBounds),tA("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(!mn(r))return tA("Cannot reset camera!"),!1;var a=null;if(!e.getActiveCamera())return nA("Trying to reset non-existent camera"),!1;a=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 s=r[1]-r[0],l=r[3]-r[2],u=r[5]-r[4],c=(s*=s)+(l*=l)+(u*=u);c=0===c?1:c,c=.5*Math.sqrt(c);var d=Le(t.activeCamera.getViewAngle()),p=c,f=c/Math.sin(.5*d),h=t.activeCamera.getViewUp();return Math.abs(dt(h,a))>.999&&(rA("Resetting view-up since view plane normal is parallel"),t.activeCamera.setViewUp(-h[2],h[0],h[1])),t.activeCamera.setFocalPoint(o[0],o[1],o[2]),t.activeCamera.setPosition(o[0]+f*a[0],o[1]+f*a[1],o[2]+f*a[2]),e.resetCameraClippingRange(r),t.activeCamera.setParallelScale(p),t.activeCamera.setPhysicalScale(c),t.activeCamera.setPhysicalTranslation(-o[0],-o[1],-o[2]),e.invokeEvent(i),!0},e.resetCameraClippingRange=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=n||e.computeVisiblePropBounds();if(!mn(i))return tA("Cannot reset camera clipping range!"),!1;if(e.getActiveCameraAndResetIfCreated(),!t.activeCamera)return nA("Trying to reset clipping range of non-existent camera"),!1;var o=t.activeCamera.computeClippingRange(i),a=0;if(t.activeCamera.getParallelProjection())a=.2*t.activeCamera.getParallelScale();else{var s=Le(t.activeCamera.getViewAngle());a=.2*Math.tan(s/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 aA={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:kn(),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 sA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(Object.assign(t,aA,n),eA.extend(e,t,n),t.background||(t.background=[0,0,0,1]);t.background.length<3;)t.background.push(0);3===t.background.length&&t.background.push(1),ie(e,t,["renderWindow","allocatedRenderTime","timeFactor","lastRenderTimeInSeconds","numberOfPropsRendered","lastRenderingUsedDepthPeeling","selector"]),le(e,t,["twoSidedLighting","lightFollowCamera","automaticLightCreation","erase","draw","nearClippingPlaneTolerance","clippingRangeExpansion","backingStore","interactive","layer","preserveColorBuffer","preserveDepthBuffer","useDepthPeeling","occlusionRatio","maximumNumberOfPeels","delegate","backgroundTexture","texturedBackground","useShadows","pass"]),ue(e,t,["actors","volumes","lights"]),de(e,t,["background"],4,1),oA(e,t)}var lA={newInstance:me(sA,"vtkRenderer"),extend:sA},uA={Corners:{TOP_LEFT:"TOP_LEFT",TOP_RIGHT:"TOP_RIGHT",BOTTOM_LEFT:"BOTTOM_LEFT",BOTTOM_RIGHT:"BOTTOM_RIGHT"}};function cA(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 dA(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mA,n),Ae.obj(e,t),Ae.get(e,t,["enabled","viewportCorner","viewportSize"]),Ae.setGet(e,t,["interactor","minPixelSize","maxPixelSize"]),Ae.get(e,t,["actor"]),hA(e,t)}var vA=dA({newInstance:Ae.newInstance(gA,"vtkOrientationMarkerWidget"),extend:gA},uA),yA={INSIDE_BOUNDS:0,IGNORE_BOUNDS:1,FIT_BOUNDS:2};function bA(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 wA=Ae.vtkErrorMacro;function xA(e,t){t.classHierarchy.push("vtkResliceCursor");var n=function(e){for(var t=1;t=t[0]&&e[0]<=t[1]&&e[1]>=t[2]&&e[1]<=t[3]&&e[2]>=t[4]&&e[2]<=t[5]||(e[0]=vn(e[0],t[0],t[1]),e[1]=vn(e[1],t[2],t[3]),e[2]=vn(e[2],t[4],t[5])),e}e.buildCursorTopology=function(){for(var e=0;e<3;++e){t.centerlinesAxis[e].getPoints().setNumberOfPoints(2);var n=new Float32Array(3),r=or.newInstance({values:n});n[0]=2,n[1]=0,n[2]=1,t.centerlinesAxis[e].setLines(r)}},e.buildCursorGeometry=function(){e.computeAxes();for(var n=t.image.getBounds(),r=10*Math.sqrt((n[1]-n[0])*(n[1]-n[0])+(n[3]-n[2])*(n[3]-n[2])+(n[5]-n[4])*(n[5]-n[4])),i=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],o=0;o<3;o++)i[0][o]=t.center[o]-r*t.xAxis[o],i[1][o]=t.center[o]+r*t.xAxis[o],i[2][o]=t.center[o]-r*t.yAxis[o],i[3][o]=t.center[o]+r*t.yAxis[o],i[4][o]=t.center[o]-r*t.zAxis[o],i[5][o]=t.center[o]+r*t.zAxis[o];for(var a=0;a<3;a++){var s=t.centerlinesAxis[a].getPoints().getData();s[0]=i[2*a][0],s[1]=i[2*a][1],s[2]=i[2*a][2],s[3]=i[2*a+1][0],s[4]=i[2*a+1][1],s[5]=i[2*a+1][2],t.centerlinesAxis[a].modified()}t.polyDataBuildTime.modified()},e.computeAxes=function(){for(var n=[],r=0;r<3;++r)n[r]=e.getPlane(r).getNormal();ft(n[0],n[1],t.zAxis),ft(n[1],n[2],t.xAxis),ft(n[2],n[0],t.yAxis),mt(t.xAxis),mt(t.yAxis),mt(t.zAxis)},e.reset=function(){t.xAxis=[1,0,0],t.yAxis=[0,1,0],t.zAxis=[0,0,1],t.xViewUp=[0,0,1],t.yViewUp=[0,0,1],t.zViewUp=[0,-1,0],e.getImage()?t.center=e.getImage().getCenter():t.center=[0,0,0];for(var n=0;n<3;++n)e.getPlane(n).setOrigin(t.center);t.reslicePlanes[0].setNormal([1,0,0]),t.reslicePlanes[1].setNormal([0,-1,0]),t.reslicePlanes[2].setNormal([0,0,1]),e.buildCursorTopology(),e.buildCursorGeometry()},e.getPlane=function(e){return t.reslicePlanes[e]},e.update=function(){e.getImage()?e.getMTime()>t.polyDataBuildTime.getMTime()&&(e.buildCursorTopology(),e.buildCursorGeometry()):wA("Image not set! ")},e.getPolyData=function(){return e.update(),t.polyData},e.setCenter=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yA.INSIDE_BOUNDS;if((t.center[0]!==n[0]||t.center[1]!==n[1]||t.center[2]!==n[2])&&t.image){var o=t.image.getBounds(),a=w(n);if(i===yA.INSIDE_BOUNDS&&(a[0]o[1]||a[1]o[3]||a[2]o[5]))return;if(i===yA.FIT_BOUNDS&&3!==(a=r(a,o)).length)return;t.center=a,e.getPlane(0).setOrigin(t.center),e.getPlane(1).setOrigin(t.center),e.getPlane(2).setOrigin(t.center),e.modified()}},e.getCenterlineAxisPolyData=function(n){return e.update(),t.centerlinesAxis[n]},e.getAxis=function(e){return 0===e?t.xAxis:1===e?t.yAxis:t.zAxis},e.getViewUp=function(e){return 0===e?t.xViewUp:1===e?t.yViewUp:t.zViewUp},e.getMTime=function(){for(var t=n.getMTime(),r=0;r<3;++r){var i=e.getPlane(r).getMTime();i>t&&(t=i)}return t}}var SA={image:null,center:[0,0,0],xAxis:[1,0,0],yAxis:[0,1,0],zAxis:[0,0,1],xViewUp:[0,0,1],yViewUp:[0,0,1],zViewUp:[0,-1,0]};function CA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,SA,n),Ae.obj(e,t),Ae.setGet(e,t,["image"]),Ae.setGetArray(e,t,["xAxis","yAxis","zAxis","xViewUp","yViewUp","zViewUp"],3),Ae.getArray(e,t,["center"],3),t.reslicePlanes=[],t.centerlinesAxis=[],t.polyDataBuildTime={},Ae.obj(t.polyDataBuildTime),xA(e,t);for(var r=0;r<3;++r)t.reslicePlanes.push(Pr.newInstance()),t.centerlinesAxis.push(rc.newInstance());t.reslicePlanes[0].setNormal([1,0,0]),t.reslicePlanes[1].setNormal([0,-1,0]),t.reslicePlanes[2].setNormal([0,0,-1]),e.buildCursorTopology()}var AA={newInstance:Ae.newInstance(CA,"vtkResliceCursor"),extend:CA},PA={XAxis:0,YAxis:1,ZAxis:2};function _A(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 OA(e,t){t.classHierarchy.push("vtkResliceCursorPolyDataAlgorithm");var n=function(e){for(var t=1;te&&(e=r)}return e},e.requestData=function(n,r){if(t.resliceCursor){var i=e.getAxis1();r[0]=t.resliceCursor.getCenterlineAxisPolyData(i);var o=e.getAxis2();r[1]=t.resliceCursor.getCenterlineAxisPolyData(o)}}}var TA={reslicePlaneNormal:PA.XAxis};function DA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,TA,n),t.resliceCursor=null,Ae.obj(e,t),Ae.algo(e,t,0,2),Ae.setGet(e,t,["reslicePlaneNormal","resliceCursor"]),OA(e,t)}var EA={newInstance:Ae.newInstance(DA,"vtkResliceCursorPolyDataAlgorithm"),extend:DA};function IA(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 kA(e,t){t.classHierarchy.push("vtkResliceCursorActor");var n=function(e){for(var t=1;te&&(e=r)}return e},e.getCenterlineProperty=function(e){return t.centerlineProperty[e]},e.getCenterlineActor=function(e){return t.cursorCenterlineActor[e]},e.setUserMatrix=function(e){t.cursorCenterlineActor[0].setUserMatrix(e),t.cursorCenterlineActor[1].setUserMatrix(e),t.cursorCenterlineActor[2].setUserMatrix(e),n.setUserMatrix(e)}}var MA={};function NA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MA,n),yv.extend(e,t,n),t.cursorAlgorithm=EA.newInstance(),t.cursorCenterlineMapper=[],t.cursorCenterlineActor=[],t.centerlineProperty=[];for(var r=0;r<3;r++)t.cursorCenterlineMapper[r]=cy.newInstance(),t.cursorCenterlineMapper[r].setScalarVisibility(!1),t.cursorCenterlineMapper[r].setResolveCoincidentTopologyToPolygonOffset(),t.cursorCenterlineMapper[r].setResolveCoincidentTopologyLineOffsetParameters(-1,-1),t.cursorCenterlineActor[r]=Rv.newInstance({parentProp:e}),t.cursorCenterlineActor[r].setMapper(t.cursorCenterlineMapper[r]),t.centerlineProperty[r]=Dv.newInstance(),t.cursorCenterlineActor[r].setProperty(t.centerlineProperty[r]);t.centerlineProperty[0].setColor(1,0,0),t.centerlineProperty[1].setColor(0,1,0),t.centerlineProperty[2].setColor(0,0,1),Ae.get(e,t,["cursorAlgorithm"]),kA(e,t)}var RA={newInstance:Ae.newInstance(NA,"vtkResliceCursorActor"),extend:NA},FA={SlicingMode:{NONE:-1,I:0,J:1,K:2,X:3,Y:4,Z:5}};function BA(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 LA(e){for(var t=1;to&&(o=u,s=r[l]<0,a=l)}if(1!==o){var c="IJKXYZ"[t.slicingMode],d="IJKXYZ"[a];GA("Unaccurate slicing along ".concat(c," axis which ")+"is not aligned with any IJK axis of the image data. "+"Using ".concat(d," axis as a fallback (").concat(o,"% 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:a,flip:s}}function r(n,r){var i=e.getInputData(),o=i.getExtent(),a=[o[0],o[2],o[4]],s=e.getClosestIJKAxis().ijkMode,l=t.slice;s!==t.slicingMode&&(l=e.getSliceAtPosition(l)),a[s]+=l;var u=[0,0,0];i.indexToWorld(a,u),a[s]+=1;var c=[0,0,0];i.indexToWorld(a,c),c[0]-=u[0],c[1]-=u[1],c[2]-=u[2],co(c,c);var d=Pr.intersectWithLine(n,r,u,c);if(d.intersection){var p=d.x,f=[0,0,0];return i.worldToIndex(p,f),{t:d.t,absoluteIJK:f}}return null}t.classHierarchy.push("vtkImageMapper"),e.getSliceAtPosition=function(n){var r,i=e.getInputData();if(3===n.length)r=n;else if(Number.isFinite(n)){var o=i.getBounds();switch(t.slicingMode){case UA.X:r=[n,(o[3]+o[2])/2,(o[5]+o[4])/2];break;case UA.Y:r=[(o[1]+o[0])/2,n,(o[5]+o[4])/2];break;case UA.Z:r=[(o[1]+o[0])/2,(o[3]+o[2])/2,n]}}var a=[0,0,0];i.worldToIndex(r,a);var s=i.getExtent(),l=0;switch(e.getClosestIJKAxis().ijkMode){case UA.I:l=vn(a[0],s[0],s[1]);break;case UA.J:l=vn(a[1],s[2],s[3]);break;case UA.K:l=vn(a[2],s[4],s[5]);break;default:return 0}return l},e.setSliceFromCamera=function(n){var r=n.getFocalPoint();switch(t.slicingMode){case UA.I:case UA.J:case UA.K:var i=e.getSliceAtPosition(r);e.setSlice(i);break;case UA.X:e.setSlice(r[0]);break;case UA.Y:e.setSlice(r[1]);break;case UA.Z:e.setSlice(r[2])}},e.setXSlice=function(t){e.setSlicingMode(UA.X),e.setSlice(t)},e.setYSlice=function(t){e.setSlicingMode(UA.Y),e.setSlice(t)},e.setZSlice=function(t){e.setSlicingMode(UA.Z),e.setSlice(t)},e.setISlice=function(t){e.setSlicingMode(UA.I),e.setSlice(t)},e.setJSlice=function(t){e.setSlicingMode(UA.J),e.setSlice(t)},e.setKSlice=function(t){e.setSlicingMode(UA.K),e.setSlice(t)},e.getSlicingModeNormal=function(){var n=[0,0,0],r=e.getInputData().getDirection(),i=[[r[0],r[1],r[2]],[r[3],r[4],r[5]],[r[6],r[7],r[8]]];switch(t.slicingMode){case UA.X:n[0]=1;break;case UA.Y:n[1]=1;break;case UA.Z:n[2]=1;break;case UA.I:kt(i,[1,0,0],n);break;case UA.J:kt(i,[0,1,0],n);break;case UA.K:kt(i,[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!==UA.NONE||!e.getInputData()||n(),t.closestIJKAxis},e.getBounds=function(){var n=e.getInputData();if(!n)return kn();if(!t.useCustomExtents)return n.getBounds();var r=t.customDisplayExtent.slice(),i=e.getClosestIJKAxis().ijkMode,o=t.slice;switch(i!==t.slicingMode&&(o=e.getSliceAtPosition(t.slice)),i){case UA.I:r[0]=o,r[1]=o;break;case UA.J:r[2]=o,r[3]=o;break;case UA.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,i=e.getInputData();if(!i)return kn();var o=i.getExtent(),a=e.getClosestIJKAxis(),s=a.ijkMode,l=n;switch(s!==t.slicingMode&&(l=e.getSliceAtPosition(n)),s){case UA.I:o[0]=l-r,o[1]=l+r;break;case UA.J:o[2]=l-r,o[3]=l+r;break;case UA.K:o[4]=l-r,o[5]=l+r}return i.extentToBounds(o)},e.getIsOpaque=function(){return!0},e.intersectWithLineForPointPicking=function(t,n){var i=r(t,n);if(i){var o=e.getInputData().getExtent(),a=[Math.round(i.absoluteIJK[0]),Math.round(i.absoluteIJK[1]),Math.round(i.absoluteIJK[2])];return a[0]o[1]||a[1]o[3]||a[2]o[5]?null:{t:i.t,ijk:a}}return null},e.intersectWithLineForCellPicking=function(t,n){var i=r(t,n);if(i){var o=e.getInputData().getExtent(),a=i.absoluteIJK,s=[Math.floor(a[0]),Math.floor(a[1]),Math.floor(a[2])];if(s[0]o[1]-1||s[1]o[3]-1||s[2]o[5]-1)return null;var l=[a[0]-s[0],a[1]-s[1],a[2]-s[2]];return{t:i.t,ijk:s,pCoords:l}}return null}}var WA={displayExtent:[0,0,0,0,0,0],customDisplayExtent:[0,0,0,0],useCustomExtents:!1,slice:0,slicingMode:UA.NONE,closestIJKAxis:{ijkMode:UA.NONE,flip:!1},renderToRectangle:!1,sliceAtFocalPoint:!1};function HA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,WA,n),Lv.extend(e,t,n),Ae.get(e,t,["slicingMode"]),Ae.setGet(e,t,["slice","closestIJKAxis","useCustomExtents","renderToRectangle","sliceAtFocalPoint"]),Ae.setGetArray(e,t,["customDisplayExtent"],4),Zv.implementCoincidentTopologyMethods(e,t),zA(e,t)}var KA=LA(LA(LA({newInstance:Ae.newInstance(HA,"vtkImageMapper"),extend:HA},VA),jA),FA),XA={NEAREST:0,LINEAR:1},qA=XA,YA=Ae.vtkErrorMacro;function ZA(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 i=n,o=r;return Number.isInteger(n)||(o=n,i=0),t.componentData[i].rGBTransferFunction!==o&&(t.componentData[i].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 i=n,o=r;return Number.isInteger(n)||(o=n,i=0),t.componentData[i].piecewiseFunction!==o&&(t.componentData[i].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,i=n;return Number.isInteger(t)||(i=t,r=0),e.setPiecewiseFunction(r,i)},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 YA("Invalid index"),!1;var i=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==i&&(t.componentData[n].componentWeight=i,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(YA("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(qA.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(qA.LINEAR)},e.getInterpolationTypeAsString=function(){return Ae.enumToString(qA,t.interpolationType)}}var JA={independentComponents:!1,interpolationType:qA.LINEAR,colorWindow:255,colorLevel:127.5,ambient:1,diffuse:0,opacity:1};function QA(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,JA,n),Ae.obj(e,t),!t.componentData){t.componentData=[];for(var r=0;r<4;r++)t.componentData.push({rGBTransferFunction:null,piecewiseFunction:null,componentWeight:1})}Ae.setGet(e,t,["independentComponents","interpolationType","colorWindow","colorLevel","ambient","diffuse","opacity"]),ZA(e,t)}var $A={newInstance:Ae.newInstance(QA,"vtkImageProperty"),extend:QA},eP=Ae.vtkDebugMacro;function tP(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=n&&(!t.mapper||t.mapper.getIsOpaque())},e.hasTranslucentPolygonalGeometry=function(){return!1},e.makeProperty=$A.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;var r;if(!t.mapperBounds||!(r=[n,t.mapperBounds],r[0].map((function(e,t){return r.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){eP("Recomputing bounds..."),t.mapperBounds=n.map((function(e){return e}));var i=[];si.getCorners(n,i),e.computeMatrix();var o=new Float64Array(16);Wo(o,t.matrix),i.forEach((function(e){return yo(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?i.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):i.reduce((function(e,n){return e1&&void 0!==arguments[1]?arguments[1]:0,i=t.mapper.getBoundsForSlice(n,r);if(!i||6!==i.length)return i;if(i[0]>i[1])return i;var o=[];si.getCorners(i,o),e.computeMatrix();var a=new Float64Array(16);Wo(a,t.matrix),o.forEach((function(e){return yo(e,e,a)}));var s=[Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE];return s=s.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 nP={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function rP(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,nP,n),yv.extend(e,t,n),t.boundsMTime={},Ae.obj(t.boundsMTime),Ae.set(e,t,["property"]),Ae.setGet(e,t,["mapper"]),Ae.getArray(e,t,["bounds"],6),tP(e,t)}var iP={newInstance:Ae.newInstance(rP,"vtkImageSlice"),extend:rP},oP={DEFAULT:0,GEOMETRY:1,SLICE:2,VOLUME:3,YZ_PLANE:4,XZ_PLANE:5,XY_PLANE:6},aP={PICKING_BUFFER:0,FRONT_BUFFER:1},sP={ViewTypes:oP,RenderingTypes:aP,CaptureOn:{MOUSE_MOVE:0,MOUSE_RELEASE:1}};function lP(e,t,n,r){var i=[];at(n,t,i),mt(i);var o=[];at(r,t,o),mt(o);var a=[0,0,1];ft(i,o,a),mt(a);var s=Pr.newInstance();s.setOrigin.apply(s,w(t)),s.setNormal.apply(s,a);var l=kf.newInstance();l.setBounds(e);var u=qc.newInstance();u.setCutFunction(s),u.setInputConnection(l.getOutputPort());var c=u.getOutputData();if(0!==c.getNumberOfPoints())for(var d=ai.computeLocalBounds(c.getPoints(),i,o,a),p=0;p<3;p+=1)t[p]=d[0]*i[p]+d[2]*o[p]+d[4]*a[p],n[p]=d[1]*i[p]+d[2]*o[p]+d[4]*a[p],r[p]=d[0]*i[p]+d[3]*o[p]+d[4]*a[p]}function uP(e,t,n){var r=w(e);return Gs.buildFromRadian().rotate(n,t).apply(r),r}function cP(e,t,n,r){var i=[t[0]-r*n[0],t[1]-r*n[1],t[2]-r*n[2]],o=[t[0]+r*n[0],t[1]+r*n[1],t[2]+r*n[2]];e.setPoint1(i),e.setPoint2(o)}function dP(e){var t=e.getPlanes()[oP.YZ_PLANE].normal,n=e.getPlanes()[oP.XZ_PLANE].normal,r=e.getPlanes()[oP.XY_PLANE].normal,i=ft(n,r,[]),o=ft(r,t,[]),a=ft(t,n,[]),s=e.getImage().getBounds(),l=e.getCenter(),u=.5*si.getDiagonalLength(s);cP(e.getAxisXinY(),l,a,u),cP(e.getAxisYinX(),l,a,u),cP(e.getAxisYinZ(),l,i,u),cP(e.getAxisZinY(),l,i,u),cP(e.getAxisXinZ(),l,o,u),cP(e.getAxisZinX(),l,o,u)}function pP(e,t,n,r){e.setNormal(n);var i=St(at(e.getPoint2(),e.getOrigin(),[]),r,n);e.rotate(i,n),e.setCenter(t)}function fP(e){switch(e){case"AxisXinY":return"AxisZinY";case"AxisXinZ":return"AxisYinZ";case"AxisYinX":return"AxisZinX";case"AxisYinZ":return"AxisXinZ";case"AxisZinX":return"AxisYinX";case"AxisZinY":return"AxisXinY";default:return""}}var hP=Ae.vtkErrorMacro;function mP(e,t){t.classHierarchy.push("vtkResliceCursorRepresentation");var n={};Ae.obj(n),e.getResliceCursor=function(){},e.getCursorAlgorithm=function(){},e.createDefaultResliceAlgorithm=function(){t.reslice||(t.reslice=um.newInstance(),t.reslice.setTransformInputSampling(!1),t.reslice.setAutoCropOutput(!0),t.reslice.setOutputDimensionality(2))},e.buildRepresentation=function(){if(e.getResliceCursor()){var r=e.getResliceCursor().getImage();if(r){t.reslice.setInputData(r),t.imageActor.setVisibility(t.showReslicedImage);var i=Math.max(e.getMTime(),e.getResliceCursor().getMTime());n.getMTime()P)hP("Invalid X extent: ",A),S=0;else for(S=1;SP)hP("Invalid Y extent:",_),C=0;else for(C=1;C<_;)C<<=1;for(var O=0===S?1:f/S,T=0===C?1:h/C,D=!1,E=0;E<4;E++)for(var I=0;I<4;I++){var k=4*I+E,M=t.newResliceAxes[k];M!==t.resliceAxes[k]&&(t.resliceAxes[k]=M,D=!0)}D&&(e.setResliceParameters(O,T,S,C),e.modified()),n.modified(),e.resetCamera()}},e.setResliceParameters=function(e,n,r,i){t.reslice&&(t.reslice.setResliceAxes(t.resliceAxes),t.reslice.setOutputSpacing([e,n,1]),t.reslice.setOutputOrigin([.5*e,.5*n,0]),t.reslice.setOutputExtent([0,r-1,0,i-1,0,0]),t.imageActor.setUserMatrix(t.resliceAxes),t.reslice.update())},e.computeOrigin=function(t){var n=e.getResliceCursor().getCenter(),r=[];$h(r,n,t);for(var i=0;i<3;i++)t[12+i]=t[12+i]+n[i]-r[i]},e.getActors=function(){return t.imageActor},e.getNestedProps=function(){return e.getActors()},e.boundPoint=function(t,n,r,i){if(e.getResliceCursor()){for(var o=e.getResliceCursor().getImage().getBounds(),a=n.map((function(e){return Math.abs(e)})),s=r.map((function(e){return Math.abs(e)})),l=1e-5,u=0,c=0,d=0;d<3;d++){var p=0,f=a[d]>s[d],h=f?n:r,m=f?a:s;t[d]l?(o[2*d]-t[d])/h[d]:0:t[d]>o[2*d+1]&&(p=m[d]!==l?(o[2*d+1]-t[d])/h[d]:0),f?Math.abs(p)>Math.abs(u)&&(u=p):Math.abs(p)>Math.abs(c)&&(c=p)}if(i[0]=t[0],i[1]=t[1],i[2]=t[2],0!==u){var g=[];g[0]=n[0]*u,g[1]=n[1]*u,g[2]=n[2]*u,ot(i,g,i)}if(0!==c){var v=[];v[0]=r[0]*c,v[1]=r[1]*c,v[2]=r[2]*c,ot(i,v,i)}}},e.getBounds=function(){return t.imageActor.getBounds()}}var gP={tolerance:5,showReslicedImage:!0};function vP(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gP,n),tS.extend(e,t,n),t.reslice=null,t.planeSource=Zf.newInstance(),t.resliceAxes=zo(new Float64Array(16)),t.newResliceAxes=zo(new Float64Array(16)),t.imageActor=iP.newInstance(),t.imageMapper=KA.newInstance(),t.imageMapper.setResolveCoincidentTopologyToPolygonOffset(),t.imageMapper.setRelativeCoincidentTopologyPolygonOffsetParameters(1,1),t.planeInitialized=!1,Ae.setGet(e,t,["tolerance","planeSource","showReslicedImage"]),Ae.get(e,t,["resliceAxes","reslice","imageActor"]),mP(e,t),e.createDefaultResliceAlgorithm(),t.imageMapper.setInputConnection(t.reslice.getOutputPort()),t.imageActor.setMapper(t.imageMapper)}var yP={newInstance:Ae.newInstance(vP,"vtkResliceCursorRepresentation"),extend:vP},bP=0,wP=4,xP=5,SP=6;function CP(e,t,n,r){var i=n.getPoints(),o=[];i.getPoint(0,o);var a=ig.computeWorldToDisplay(e,o[0],o[1],o[2]),s=[];i.getPoint(i.getNumberOfPoints()-1,s);var l=ig.computeWorldToDisplay(e,s[0],s[1],s[2]),u=[r[0],r[1],0],c=[a[0],a[1],0],d=[l[0],l[1],0],p=mu.distanceToLine(u,c,d);return p.distance<=t*t&&p.t<1&&p.t>0}function AP(e,t){t.classHierarchy.push("vtkResliceCursorLineRepresentation"),e.getResliceCursor=function(){return t.resliceCursorActor.getCursorAlgorithm().getResliceCursor()},e.getCursorAlgorithm=function(){return t.resliceCursorActor.getCursorAlgorithm()},e.displayToReslicePlaneIntersection=function(n){var r=t.renderer.getActiveCamera().getPosition(),i=e.getResliceCursor(),o=function(e,t){var n=t.getActiveCamera().getFocalPoint(),r=ig.computeWorldToDisplay(t,n[0],n[1],n[2]);return ig.computeDisplayToWorld(t,e[0],e[1],r[2])}(n,t.renderer);if(!i)return null;var a=t.resliceCursorActor.getCursorAlgorithm().getReslicePlaneNormal(),s=i.getPlane(a);return Pr.intersectWithLine(o,r,s.getOrigin(),s.getNormal()).x},e.computeInteractionState=function(n){if(t.interactionState=bP,!t.renderer||!t.resliceCursorActor.getVisibility())return t.interactionState;var r=e.getResliceCursor();if(!r)return t.interactionState;var i=t.resliceCursorActor.getCursorAlgorithm().getAxis1(),o=t.resliceCursorActor.getCenterlineActor(i).getBounds();if(o[1]0?1:-1)?0:(e.applyRotation(r,d),d)},e.applyRotation=function(n,r){var i=e.getResliceCursor(),o=t.resliceCursorActor.getCursorAlgorithm().getReslicePlaneNormal(),a=i.getPlane(n),s=i.getViewUp(n),l=a.getNormal(),u=i.getPlane(o).getNormal(),c=w(l);Gs.buildFromRadian().rotate(r,u).apply(c),Gs.buildFromRadian().rotate(r,u).apply(s),a.setNormal(c)},e.getBounds=function(){var t=[];hn(t);var n=e.getResliceCursor();return n&&n.getImage()&&(t=n.getImage().getBounds()),t},e.getActors=function(){return e.buildRepresentation(),e.updateCamera(),[t.imageActor].concat(w(t.resliceCursorActor.getActors()))},e.updateCamera=function(){var n=t.resliceCursorActor.getCursorAlgorithm().getReslicePlaneNormal(),r=t.renderer.getActiveCamera().getFocalPoint(),i=t.renderer.getActiveCamera().getPosition(),o=e.getResliceCursor().getPlane(n),a=o.getNormal(),s=Math.sqrt(wt(i,r)),l=[r[0]+s*a[0],r[1]+s*a[1],r[2]+s*a[2]],u=Pr.intersectWithLine(r,l,o.getOrigin(),o.getNormal()).x;t.renderer.getActiveCamera().setFocalPoint(u[0],u[1],u[2]);var c=[u[0]+s*a[0],u[1]+s*a[1],u[2]+s*a[2]];t.renderer.getActiveCamera().setPosition(c[0],c[1],c[2]);var d=t.renderer.computeVisiblePropBounds(),p=e.getBounds();d[0]=Math.min(p[0],d[0]),d[1]=Math.max(p[1],d[1]),d[2]=Math.min(p[2],d[2]),d[3]=Math.max(p[3],d[3]),d[4]=Math.min(p[4],d[4]),d[5]=Math.max(p[5],d[5]),t.renderer.resetCameraClippingRange(d)},e.resetCamera=function(){if(t.renderer){var n=e.getCursorAlgorithm().getReslicePlaneNormal(),r=e.getResliceCursor().getPlane(n).getNormal(),i=e.getResliceCursor().getViewUp(n),o=t.renderer.getActiveCamera().getFocalPoint(),a=t.renderer.getActiveCamera().getPosition(),s=Math.sqrt(wt(a,o)),l=[o[0]+s*r[0],o[1]+s*r[1],o[2]+s*r[2]];t.renderer.getActiveCamera().setPosition(l[0],l[1],l[2]),t.renderer.getActiveCamera().setViewUp(i[0],i[1],i[2])}}}var PP={};function _P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PP,n),yP.extend(e,t,PP,n),t.resliceCursorActor=RA.newInstance({parentProp:e}),t.startPickPosition=null,t.startCenterPosition=null,Ae.get(e,t,["resliceCursorActor"]),AP(e,t)}var OP={newInstance:Ae.newInstance(_P,"vtkResliceCursorLineRepresentation"),extend:_P},TP={START:0,ACTIVE:1,WINDOW_LEVEL:2};function DP(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 EP=Ae.VOID,IP=Ae.EVENT_ABORT;function kP(e,t){t.classHierarchy.push("vtkResliceCursorWidget");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MP,n),Ix.extend(e,t,MP,n),t.imageInteractorStyle=Fb.newInstance({currentImageNumber:null}),kP(e,t)}var RP=Ae.newInstance(NP,"vtkResliceCursorWidget"),FP={Manipulators:wb,Misc:Ob,Style:Jb,UI:Px,Widgets:{vtkAbstractWidget:Ix,vtkDistanceRepresentation:zS,vtkDistanceWidget:vC,vtkHandleRepresentation:sS,vtkHandleWidget:$S,vtkImageCroppingRegionsRepresentation:OC,vtkImageCroppingRegionsWidget:jC,vtkLabelRepresentation:mS,vtkLabelWidget:oC,vtkLineRepresentation:LS,vtkLineWidget:pC,vtkOrientationMarkerWidget:vA,vtkPiecewiseGaussianWidget:gx,vtkPointPlacer:Zx,vtkResliceCursor:AA,vtkResliceCursorLineRepresentation:OP,vtkResliceCursorWidget:{newInstance:RP,extend:NP},vtkSphereHandleRepresentation:IS,vtkWidgetRepresentation:tS}};function BP(e){let t=e.length;for(;--t>=0;)e[t]=0}const LP=256,VP=286,jP=30,GP=15,UP=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]),zP=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]),WP=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),HP=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),KP=new Array(576);BP(KP);const XP=new Array(60);BP(XP);const qP=new Array(512);BP(qP);const YP=new Array(256);BP(YP);const ZP=new Array(29);BP(ZP);const JP=new Array(jP);function QP(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let $P,e_,t_;function n_(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}BP(JP);const r_=e=>e<256?qP[e]:qP[256+(e>>>7)],i_=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},o_=(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<{o_(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},l_=(e,t,n)=>{const r=new Array(16);let i,o,a=0;for(i=1;i<=GP;i++)r[i]=a=a+n[i-1]<<1;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=s_(r[t]++,t))}},u_=e=>{let t;for(t=0;t{e.bi_valid>8?i_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},d_=(e,t,n,r)=>{const i=2*t,o=2*n;return e[i]{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o,a,s=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0===r?a_(e,i,t):(o=YP[i],a_(e,o+LP+1,t),a=UP[o],0!==a&&(i-=ZP[o],o_(e,i,a)),r--,o=r_(r),a_(e,o,n),a=zP[o],0!==a&&(r-=JP[o],o_(e,r,a)))}while(s{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let a,s,l,u=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)p_(e,n,a);l=o;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],p_(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=s,n[2*l]=n[2*a]+n[2*s],e.depth[l]=(e.depth[a]>=e.depth[s]?e.depth[a]:e.depth[s])+1,n[2*a+1]=n[2*s+1]=l,e.heap[1]=l++,p_(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,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length;let u,c,d,p,f,h,m=0;for(p=0;p<=GP;p++)e.bl_count[p]=0;for(n[2*e.heap[e.heap_max]+1]=0,u=e.heap_max+1;u<573;u++)c=e.heap[u],p=n[2*n[2*c+1]+1]+1,p>l&&(p=l,m++),n[2*c+1]=p,c>r||(e.bl_count[p]++,f=0,c>=s&&(f=a[c-s]),h=n[2*c],e.opt_len+=h*(p+f),o&&(e.static_len+=h*(i[2*c+1]+f)));if(0!==m){do{for(p=l-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(p=l;0!==p;p--)for(c=e.bl_count[p];0!==c;)d=e.heap[--u],d>r||(n[2*d+1]!==p&&(e.opt_len+=(p-n[2*d+1])*n[2*d],n[2*d+1]=p),c--)}})(e,t),l_(n,u,e.bl_count)},m_=(e,t,n)=>{let r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s{let r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s{o_(e,0+(r?1:0),3),((e,t,n,r)=>{c_(e),r&&(i_(e,n),i_(e,~n)),e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n})(e,t,n,!0)};var b_=e=>{v_||((()=>{let e,t,n,r,i;const o=new Array(16);for(n=0,r=0;r<28;r++)for(ZP[r]=n,e=0;e<1<>=7;r{let i,o,a=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{let t;for(m_(e,e.dyn_ltree,e.l_desc.max_code),m_(e,e.dyn_dtree,e.d_desc.max_code),h_(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*HP[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?y_(e,t,n,r):4===e.strategy||o===i?(o_(e,2+(r?1:0),3),f_(e,KP,XP)):(o_(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(o_(e,t-257,5),o_(e,n-1,5),o_(e,r-4,4),i=0;i(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*(YP[n]+LP+1)]++,e.dyn_dtree[2*r_(t)]++),e.last_lit===e.lit_bufsize-1),S_={_tr_init:b_,_tr_stored_block:y_,_tr_flush_block:w_,_tr_tally:x_,_tr_align:e=>{o_(e,2,3),a_(e,256,KP),(e=>{16===e.bi_valid?(i_(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)}};var C_=(e,t,n,r)=>{let i=65535&e|0,o=e>>>16&65535|0,a=0;for(;0!==n;){a=n>2e3?2e3:n,n-=a;do{i=i+t[r++]|0,o=o+i|0}while(--a);i%=65521,o%=65521}return i|o<<16|0};const A_=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 P_=(e,t,n,r)=>{const i=A_,o=r+n;e^=-1;for(let n=r;n>>8^i[255&(e^t[n])];return-1^e},__={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"},O_={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:T_,_tr_stored_block:D_,_tr_flush_block:E_,_tr_tally:I_,_tr_align:k_}=S_,{Z_NO_FLUSH:M_,Z_PARTIAL_FLUSH:N_,Z_FULL_FLUSH:R_,Z_FINISH:F_,Z_BLOCK:B_,Z_OK:L_,Z_STREAM_END:V_,Z_STREAM_ERROR:j_,Z_DATA_ERROR:G_,Z_BUF_ERROR:U_,Z_DEFAULT_COMPRESSION:z_,Z_FILTERED:W_,Z_HUFFMAN_ONLY:H_,Z_RLE:K_,Z_FIXED:X_,Z_DEFAULT_STRATEGY:q_,Z_UNKNOWN:Y_,Z_DEFLATED:Z_}=O_,J_=258,Q_=262,$_=103,eO=113,tO=666,nO=(e,t)=>(e.msg=__[t],t),rO=e=>(e<<1)-(e>4?9:0),iO=e=>{let t=e.length;for(;--t>=0;)e[t]=0};let oO=(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))},sO=(e,t)=>{E_(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,aO(e.strm)},lO=(e,t)=>{e.pending_buf[e.pending++]=t},uO=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},cO=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=C_(e.adler,t,i,n):2===e.state.wrap&&(e.adler=P_(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},dO=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match;const l=e.strstart>e.w_size-Q_?e.strstart-(e.w_size-Q_):0,u=e.window,c=e.w_mask,d=e.prev,p=e.strstart+J_;let f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(n=t,u[n+a]===h&&u[n+a-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&oa){if(e.match_start=t,a=r,r>=s)break;f=u[o+a-1],h=u[o+a]}}}while((t=d[t&c])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead},pO=e=>{const t=e.w_size;let n,r,i,o,a;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Q_)){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{i=e.head[--n],e.head[n]=i>=t?i-t:0}while(--r);r=t,n=r;do{i=e.prev[--n],e.prev[n]=i>=t?i-t:0}while(--r);o+=t}if(0===e.strm.avail_in)break;if(r=cO(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=oO(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=oO(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let n,r;for(;;){if(e.lookahead=3&&(e.ins_h=oO(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-Q_&&(e.match_length=dO(e,n)),e.match_length>=3)if(r=I_(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=oO(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=oO(e,e.ins_h,e.window[e.strstart+1]);else r=I_(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(sO(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===F_?(sO(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(sO(e,!1),0===e.strm.avail_out)?1:2},hO=(e,t)=>{let n,r,i;for(;;){if(e.lookahead=3&&(e.ins_h=oO(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){i=e.strstart+e.lookahead-3,r=I_(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=oO(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&&(sO(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=I_(e,0,e.window[e.strstart-1]),r&&sO(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=I_(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===F_?(sO(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(sO(e,!1),0===e.strm.avail_out)?1:2};function mO(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const gO=[new mO(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(pO(e),0===e.lookahead&&t===M_)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,sO(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-Q_&&(sO(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===F_?(sO(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(sO(e,!1),e.strm.avail_out),1)})),new mO(4,4,8,4,fO),new mO(4,5,16,8,fO),new mO(4,6,32,32,fO),new mO(4,4,16,16,hO),new mO(8,16,32,32,hO),new mO(8,16,128,128,hO),new mO(8,32,128,256,hO),new mO(32,128,258,1024,hO),new mO(32,258,258,4096,hO)];function vO(){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=Z_,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),iO(this.dyn_ltree),iO(this.dyn_dtree),iO(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),iO(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),iO(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 yO=e=>{if(!e||!e.state)return nO(e,j_);e.total_in=e.total_out=0,e.data_type=Y_;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:eO,e.adler=2===t.wrap?0:1,t.last_flush=M_,T_(t),L_},bO=e=>{const t=yO(e);var n;return t===L_&&((n=e.state).window_size=2*n.w_size,iO(n.head),n.max_lazy_match=gO[n.level].max_lazy,n.good_match=gO[n.level].good_length,n.nice_match=gO[n.level].nice_length,n.max_chain_length=gO[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},wO=(e,t,n,r,i,o)=>{if(!e)return j_;let a=1;if(t===z_&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==Z_||r<8||r>15||t<0||t>9||o<0||o>X_)return nO(e,j_);8===r&&(r=9);const s=new vO;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<{let n=t.length;if(!e||!e.state)return j_;const r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return j_;if(1===i&&(e.adler=C_(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(iO(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,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,pO(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=oO(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,pO(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=a,e.input=s,e.avail_in=o,r.wrap=i,L_},SO={deflateInit:(e,t)=>wO(e,t,Z_,15,8,q_),deflateInit2:wO,deflateReset:bO,deflateResetKeep:yO,deflateSetHeader:(e,t)=>e&&e.state?2!==e.state.wrap?j_:(e.state.gzhead=t,L_):j_,deflate:(e,t)=>{let n,r;if(!e||!e.state||t>B_||t<0)return e?nO(e,j_):j_;const i=e.state;if(!e.output||!e.input&&0!==e.avail_in||i.status===tO&&t!==F_)return nO(e,0===e.avail_out?U_:j_);i.strm=e;const o=i.last_flush;if(i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,lO(i,31),lO(i,139),lO(i,8),i.gzhead?(lO(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),lO(i,255&i.gzhead.time),lO(i,i.gzhead.time>>8&255),lO(i,i.gzhead.time>>16&255),lO(i,i.gzhead.time>>24&255),lO(i,9===i.level?2:i.strategy>=H_||i.level<2?4:0),lO(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(lO(i,255&i.gzhead.extra.length),lO(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=P_(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(lO(i,0),lO(i,0),lO(i,0),lO(i,0),lO(i,0),lO(i,9===i.level?2:i.strategy>=H_||i.level<2?4:0),lO(i,3),i.status=eO);else{let t=Z_+(i.w_bits-8<<4)<<8,n=-1;n=i.strategy>=H_||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,i.status=eO,uO(i,t),0!==i.strstart&&(uO(i,e.adler>>>16),uO(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>n&&(e.adler=P_(e.adler,i.pending_buf,i.pending-n,n)),aO(e),n=i.pending,i.pending!==i.pending_buf_size));)lO(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=P_(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=P_(e.adler,i.pending_buf,i.pending-n,n)),aO(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(e.adler=P_(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=P_(e.adler,i.pending_buf,i.pending-n,n)),aO(e),n=i.pending,i.pending===i.pending_buf_size)){r=1;break}r=i.gzindexn&&(e.adler=P_(e.adler,i.pending_buf,i.pending-n,n)),0===r&&(i.status=$_)}else i.status=$_;if(i.status===$_&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&aO(e),i.pending+2<=i.pending_buf_size&&(lO(i,255&e.adler),lO(i,e.adler>>8&255),e.adler=0,i.status=eO)):i.status=eO),0!==i.pending){if(aO(e),0===e.avail_out)return i.last_flush=-1,L_}else if(0===e.avail_in&&rO(t)<=rO(o)&&t!==F_)return nO(e,U_);if(i.status===tO&&0!==e.avail_in)return nO(e,U_);if(0!==e.avail_in||0!==i.lookahead||t!==M_&&i.status!==tO){let n=i.strategy===H_?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(pO(e),0===e.lookahead)){if(t===M_)return 1;break}if(e.match_length=0,n=I_(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(sO(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===F_?(sO(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(sO(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===K_?((e,t)=>{let n,r,i,o;const a=e.window;for(;;){if(e.lookahead<=J_){if(pO(e),e.lookahead<=J_&&t===M_)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){o=e.strstart+J_;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=I_(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=I_(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(sO(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===F_?(sO(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(sO(e,!1),0===e.strm.avail_out)?1:2})(i,t):gO[i.level].func(i,t);if(3!==n&&4!==n||(i.status=tO),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),L_;if(2===n&&(t===N_?k_(i):t!==B_&&(D_(i,0,0,!1),t===R_&&(iO(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),aO(e),0===e.avail_out))return i.last_flush=-1,L_}return t!==F_?L_:i.wrap<=0?V_:(2===i.wrap?(lO(i,255&e.adler),lO(i,e.adler>>8&255),lO(i,e.adler>>16&255),lO(i,e.adler>>24&255),lO(i,255&e.total_in),lO(i,e.total_in>>8&255),lO(i,e.total_in>>16&255),lO(i,e.total_in>>24&255)):(uO(i,e.adler>>>16),uO(i,65535&e.adler)),aO(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?L_:V_)},deflateEnd:e=>{if(!e||!e.state)return j_;const t=e.state.status;return 42!==t&&69!==t&&73!==t&&91!==t&&t!==$_&&t!==eO&&t!==tO?nO(e,j_):(e.state=null,t===eO?nO(e,G_):L_)},deflateSetDictionary:xO,deflateInfo:"pako deflate (from Nodeca project)"};const CO=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var AO=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)CO(n,t)&&(e[t]=n[t])}}return e},PO=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;OO[254]=OO[254]=1;var TO=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,o,a=e.length,s=0;for(i=0;i>>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},DO=(e,t)=>{const n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,i;const o=new Array(2*n);for(i=0,r=0;r4)o[i++]=65533,r+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&r1?o[i++]=65533:t<65536?o[i++]=t:(t-=65536,o[i++]=55296|t>>10&1023,o[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&_O)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+OO[e[n]]>t?n:t};var IO=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 kO=Object.prototype.toString,{Z_NO_FLUSH:MO,Z_SYNC_FLUSH:NO,Z_FULL_FLUSH:RO,Z_FINISH:FO,Z_OK:BO,Z_STREAM_END:LO,Z_DEFAULT_COMPRESSION:VO,Z_DEFAULT_STRATEGY:jO,Z_DEFLATED:GO}=O_;function UO(e){this.options=AO({level:VO,method:GO,chunkSize:16384,windowBits:15,memLevel:8,strategy:jO},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 IO,this.strm.avail_out=0;let n=SO.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==BO)throw new Error(__[n]);if(t.header&&SO.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?TO(t.dictionary):"[object ArrayBuffer]"===kO.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=SO.deflateSetDictionary(this.strm,e),n!==BO)throw new Error(__[n]);this._dict_set=!0}}function zO(e,t){const n=new UO(t);if(n.push(e,!0),n.err)throw n.msg||__[n.err];return n.result}UO.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?FO:MO,"string"==typeof e?n.input=TO(e):"[object ArrayBuffer]"===kO.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===NO||o===RO)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=SO.deflate(n,o),i===LO)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=SO.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===BO;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},UO.prototype.onData=function(e){this.chunks.push(e)},UO.prototype.onEnd=function(e){e===BO&&(this.result=PO(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var WO=function(e,t){return(t=t||{}).raw=!0,zO(e,t)},HO=function(e,t){return(t=t||{}).gzip=!0,zO(e,t)},KO={Deflate:UO,deflate:zO,deflateRaw:WO,gzip:HO,constants:O_};var XO=function(e,t){let n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,w,x,S,C,A,P;const _=e.state;n=e.next_in,A=e.input,r=n+(e.avail_in-5),i=e.next_out,P=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=_.dmax,l=_.wsize,u=_.whave,c=_.wnext,d=_.window,p=_.hold,f=_.bits,h=_.lencode,m=_.distcode,g=(1<<_.lenbits)-1,v=(1<<_.distbits)-1;e:do{f<15&&(p+=A[n++]<>>24,p>>>=b,f-=b,b=y>>>16&255,0===b)P[i++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=h[(65535&y)+(p&(1<>>=b,f-=b),f<15&&(p+=A[n++]<>>24,p>>>=b,f-=b,b=y>>>16&255,!(16&b)){if(0==(64&b)){y=m[(65535&y)+(p&(1<s){e.msg="invalid distance too far back",_.mode=30;break e}if(p>>>=b,f-=b,b=i-o,x>b){if(b=x-b,b>u&&_.sane){e.msg="invalid distance too far back",_.mode=30;break e}if(S=0,C=d,0===c){if(S+=l-b,b2;)P[i++]=C[S++],P[i++]=C[S++],P[i++]=C[S++],w-=3;w&&(P[i++]=C[S++],w>1&&(P[i++]=C[S++]))}else{S=i-x;do{P[i++]=P[S++],P[i++]=P[S++],P[i++]=P[S++],w-=3}while(w>2);w&&(P[i++]=P[S++],w>1&&(P[i++]=P[S++]))}break}}break}}while(n>3,n-=w,f-=w<<3,p&=(1<{const l=s.bits;let u,c,d,p,f,h,m=0,g=0,v=0,y=0,b=0,w=0,x=0,S=0,C=0,A=0,P=null,_=0;const O=new Uint16Array(16),T=new Uint16Array(16);let D,E,I,k=null,M=0;for(m=0;m<=qO;m++)O[m]=0;for(g=0;g=1&&0===O[y];y--);if(b>y&&(b=y),0===y)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(v=1;v0&&(0===e||1!==y))return-1;for(T[1]=0,m=1;m852||2===e&&C>592)return 1;for(;;){D=m-x,a[g]h?(E=k[M+a[g]],I=P[_+a[g]]):(E=96,I=0),u=1<>x)+c]=D<<24|E<<16|I|0}while(0!==c);for(u=1<>=1;if(0!==u?(A&=u-1,A+=u):A=0,g++,0==--O[m]){if(m===y)break;m=t[n+a[g]]}if(m>b&&(A&p)!==d){for(0===x&&(x=b),f+=v,w=m-x,S=1<852||2===e&&C>592)return 1;d=A&p,i[d]=b<<24|w<<16|f-o|0}}return 0!==A&&(i[f+A]=m-x<<24|64<<16|0),s.bits=b,0};const{Z_FINISH:eT,Z_BLOCK:tT,Z_TREES:nT,Z_OK:rT,Z_STREAM_END:iT,Z_NEED_DICT:oT,Z_STREAM_ERROR:aT,Z_DATA_ERROR:sT,Z_MEM_ERROR:lT,Z_BUF_ERROR:uT,Z_DEFLATED:cT}=O_,dT=12,pT=30,fT=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function hT(){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 mT=e=>{if(!e||!e.state)return aT;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,rT},gT=e=>{if(!e||!e.state)return aT;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,mT(e)},vT=(e,t)=>{let n;if(!e||!e.state)return aT;const r=e.state;return t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?aT:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,gT(e))},yT=(e,t)=>{if(!e)return aT;const n=new hT;e.state=n,n.window=null;const r=vT(e,t);return r!==rT&&(e.state=null),r};let bT,wT,xT=!0;const ST=e=>{if(xT){bT=new Int32Array(512),wT=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($O(1,e.lens,0,288,bT,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;$O(2,e.lens,0,32,wT,0,e.work,{bits:5}),xT=!1}e.lencode=bT,e.lenbits=9,e.distcode=wT,e.distbits=5},CT=(e,t,n,r)=>{let i;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):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,a,s,l,u,c,d,p,f,h,m,g,v,y,b,w,x,S,C,A=0;const P=new Uint8Array(4);let _,O;const T=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 aT;n=e.state,n.mode===dT&&(n.mode=13),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,d=s,p=l,C=rT;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;c<16;){if(0===s)break e;s--,u+=r[o++]<>>8&255,n.check=P_(n.check,P,2,0),u=0,c=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",n.mode=pT;break}if((15&u)!==cT){e.msg="unknown compression method",n.mode=pT;break}if(u>>>=4,c-=4,S=8+(15&u),0===n.wbits)n.wbits=S;else if(S>n.wbits){e.msg="invalid window size",n.mode=pT;break}n.dmax=1<>8&1),512&n.flags&&(P[0]=255&u,P[1]=u>>>8&255,n.check=P_(n.check,P,2,0)),u=0,c=0,n.mode=3;case 3:for(;c<32;){if(0===s)break e;s--,u+=r[o++]<>>8&255,P[2]=u>>>16&255,P[3]=u>>>24&255,n.check=P_(n.check,P,4,0)),u=0,c=0,n.mode=4;case 4:for(;c<16;){if(0===s)break e;s--,u+=r[o++]<>8),512&n.flags&&(P[0]=255&u,P[1]=u>>>8&255,n.check=P_(n.check,P,2,0)),u=0,c=0,n.mode=5;case 5:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,u+=r[o++]<>>8&255,n.check=P_(n.check,P,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f=n.length,f>s&&(f=s),f&&(n.head&&(S=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+f),S)),512&n.flags&&(n.check=P_(n.check,r,f,o)),s-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;f=0;do{S=r[o+f++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S))}while(S&&f>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=dT;break;case 10:for(;c<32;){if(0===s)break e;s--,u+=r[o++]<>>=7&c,c-=7&c,n.mode=27;break}for(;c<3;){if(0===s)break e;s--,u+=r[o++]<>>=1,c-=1,3&u){case 0:n.mode=14;break;case 1:if(ST(n),n.mode=20,t===nT){u>>>=2,c-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=pT}u>>>=2,c-=2;break;case 14:for(u>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,u+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=pT;break}if(n.length=65535&u,u=0,c=0,n.mode=15,t===nT)break e;case 15:n.mode=16;case 16:if(f=n.length,f){if(f>s&&(f=s),f>l&&(f=l),0===f)break e;i.set(r.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,n.length-=f;break}n.mode=dT;break;case 17:for(;c<14;){if(0===s)break e;s--,u+=r[o++]<>>=5,c-=5,n.ndist=1+(31&u),u>>>=5,c-=5,n.ncode=4+(15&u),u>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=pT;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,c-=3}for(;n.have<19;)n.lens[T[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,_={bits:n.lenbits},C=$O(0,n.lens,0,19,n.lencode,0,n.work,_),n.lenbits=_.bits,C){e.msg="invalid code lengths set",n.mode=pT;break}n.have=0,n.mode=19;case 19:for(;n.have>>24,v=A>>>16&255,y=65535&A,!(g<=c);){if(0===s)break e;s--,u+=r[o++]<>>=g,c-=g,n.lens[n.have++]=y;else{if(16===y){for(O=g+2;c>>=g,c-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=pT;break}S=n.lens[n.have-1],f=3+(3&u),u>>>=2,c-=2}else if(17===y){for(O=g+3;c>>=g,c-=g,S=0,f=3+(7&u),u>>>=3,c-=3}else{for(O=g+7;c>>=g,c-=g,S=0,f=11+(127&u),u>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=pT;break}for(;f--;)n.lens[n.have++]=S}}if(n.mode===pT)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=pT;break}if(n.lenbits=9,_={bits:n.lenbits},C=$O(1,n.lens,0,n.nlen,n.lencode,0,n.work,_),n.lenbits=_.bits,C){e.msg="invalid literal/lengths set",n.mode=pT;break}if(n.distbits=6,n.distcode=n.distdyn,_={bits:n.distbits},C=$O(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,_),n.distbits=_.bits,C){e.msg="invalid distances set",n.mode=pT;break}if(n.mode=20,t===nT)break e;case 20:n.mode=21;case 21:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=u,n.bits=c,XO(e,p),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,u=n.hold,c=n.bits,n.mode===dT&&(n.back=-1);break}for(n.back=0;A=n.lencode[u&(1<>>24,v=A>>>16&255,y=65535&A,!(g<=c);){if(0===s)break e;s--,u+=r[o++]<>b)],g=A>>>24,v=A>>>16&255,y=65535&A,!(b+g<=c);){if(0===s)break e;s--,u+=r[o++]<>>=b,c-=b,n.back+=b}if(u>>>=g,c-=g,n.back+=g,n.length=y,0===v){n.mode=26;break}if(32&v){n.back=-1,n.mode=dT;break}if(64&v){e.msg="invalid literal/length code",n.mode=pT;break}n.extra=15&v,n.mode=22;case 22:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=n.distcode[u&(1<>>24,v=A>>>16&255,y=65535&A,!(g<=c);){if(0===s)break e;s--,u+=r[o++]<>b)],g=A>>>24,v=A>>>16&255,y=65535&A,!(b+g<=c);){if(0===s)break e;s--,u+=r[o++]<>>=b,c-=b,n.back+=b}if(u>>>=g,c-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=pT;break}n.offset=y,n.extra=15&v,n.mode=24;case 24:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=pT;break}n.mode=25;case 25:if(0===l)break e;if(f=p-l,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=pT;break}f>n.wnext?(f-=n.wnext,h=n.wsize-f):h=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=i,h=a-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{i[a++]=m[h++]}while(--f);0===n.length&&(n.mode=21);break;case 26:if(0===l)break e;i[a++]=n.length,l--,n.mode=21;break;case 27:if(n.wrap){for(;c<32;){if(0===s)break e;s--,u|=r[o++]<{if(!e||!e.state)return aT;let t=e.state;return t.window&&(t.window=null),e.state=null,rT},_T=(e,t)=>{if(!e||!e.state)return aT;const n=e.state;return 0==(2&n.wrap)?aT:(n.head=t,t.done=!1,rT)},OT=(e,t)=>{const n=t.length;let r,i,o;return e&&e.state?(r=e.state,0!==r.wrap&&11!==r.mode?aT:11===r.mode&&(i=1,i=C_(i,t,n,0),i!==r.check)?sT:(o=CT(e,t,n,n),o?(r.mode=31,lT):(r.havedict=1,rT))):aT},TT={inflateReset:gT,inflateReset2:vT,inflateResetKeep:mT,inflateInit:e=>yT(e,15),inflateInit2:yT,inflate:AT,inflateEnd:PT,inflateGetHeader:_T,inflateSetDictionary:OT,inflateInfo:"pako inflate (from Nodeca project)"};var DT=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 ET=Object.prototype.toString,{Z_NO_FLUSH:IT,Z_FINISH:kT,Z_OK:MT,Z_STREAM_END:NT,Z_NEED_DICT:RT,Z_STREAM_ERROR:FT,Z_DATA_ERROR:BT,Z_MEM_ERROR:LT}=O_;function VT(e){this.options=AO({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 IO,this.strm.avail_out=0;let n=TT.inflateInit2(this.strm,t.windowBits);if(n!==MT)throw new Error(__[n]);if(this.header=new DT,TT.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=TO(t.dictionary):"[object ArrayBuffer]"===ET.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=TT.inflateSetDictionary(this.strm,t.dictionary),n!==MT)))throw new Error(__[n])}function jT(e,t){const n=new VT(t);if(n.push(e),n.err)throw n.msg||__[n.err];return n.result}VT.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,a,s;if(this.ended)return!1;for(a=t===~~t?t:!0===t?kT:IT,"[object ArrayBuffer]"===ET.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=TT.inflate(n,a),o===RT&&i&&(o=TT.inflateSetDictionary(n,i),o===MT?o=TT.inflate(n,a):o===BT&&(o=RT));n.avail_in>0&&o===NT&&n.state.wrap>0&&0!==e[n.next_in];)TT.inflateReset(n),o=TT.inflate(n,a);switch(o){case FT:case BT:case RT:case LT:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(0===n.avail_out||o===NT))if("string"===this.options.to){let e=EO(n.output,n.next_out),t=n.next_out-e,i=DO(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(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==MT||0!==s){if(o===NT)return o=TT.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},VT.prototype.onData=function(e){this.chunks.push(e)},VT.prototype.onEnd=function(e){e===MT&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=PO(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var GT=function(e,t){return(t=t||{}).raw=!0,jT(e,t)},UT={Inflate:VT,inflate:jT,inflateRaw:GT,ungzip:jT,constants:O_};const{Deflate:zT,deflate:WT,deflateRaw:HT,gzip:KT}=KO,{Inflate:XT,inflate:qT,inflateRaw:YT,ungzip:ZT}=UT;var JT={Deflate:zT,deflate:WT,deflateRaw:HT,gzip:KT,Inflate:XT,inflate:qT,inflateRaw:YT,ungzip:ZT,constants:O_},QT={};function $T(e){return!!QT[e]}function eD(e,t){QT[e]=t}var tD={get:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"http",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return QT[e](t)},has:$T,registerType:eD},nD=Ae.vtkErrorMacro,rD=Ae.vtkDebugMacro,iD=0;function oD(e){var t=document.querySelector('.webResource[data-url="'.concat(e,'"]'));return t?t.innerHTML:null}function aD(e){return document.querySelector('.webResource[data-url="'.concat(e,'"]'))}function sD(e){return"/"===e[0]?e.substr(1):e}var lD={fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0;return new Promise((function(t,n){var r=oD(sD(e));null===r?n(new Error("No such JSON ".concat(e))):t(JSON.parse(r))}))},fetchText:function(){var e=arguments.length>1?arguments[1]:void 0;return new Promise((function(t,n){var r=oD(e);null===r?n(new Error("No such text ".concat(e))):t(r)}))},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 new Promise((function(i,o){var a=sD([t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/")),s=oD(a);if(null===s)o(new Error("No such array ".concat(a)));else{if("string"===n.dataType){var l=atob(s);r.compression&&(l=JT.inflate(l,{to:"string"})),n.values=JSON.parse(l)}else{var u=new Uint8Array(h.toArrayBuffer(s));n.buffer=new ArrayBuffer(u.length),new Uint8Array(n.buffer).set(u),r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=JT.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=JT.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sr.ENDIANNESS!==n.ref.encode&&sr.ENDIANNESS&&(rD("Swap bytes of ".concat(n.name)),sr.swapBytes(n.buffer,Pe[n.dataType])),n.values=Ae.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&nD("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==--iD&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),i(n)}}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0;return new Promise((function(t,n){var r=aD(e);r?t(r):n(new Error("No such image ".concat(e)))}))}};eD("html",(function(e){return lD}));var uD=Ae.vtkErrorMacro,cD=Ae.vtkDebugMacro,dD=0;function pD(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=y(e,2),n=t[0],i=t[1];return r.setRequestHeader(n,i)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var fD={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(i,o){var a=pD("GET",[t,n.ref.basepath,r.compression?"".concat(n.ref.id,".gz"):n.ref.id].join("/"),r);a.onreadystatechange=function(t){1===a.readyState&&(n.ref.pending=!0,1==++dD&&e.invokeBusy&&e.invokeBusy(!0)),4===a.readyState&&(n.ref.pending=!1,200===a.status||0===a.status?(n.buffer=a.response,r.compression&&("string"===n.dataType||"JSON"===n.dataType?n.buffer=JT.inflate(new Uint8Array(n.buffer),{to:"string"}):n.buffer=JT.inflate(new Uint8Array(n.buffer)).buffer),"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sr.ENDIANNESS!==n.ref.encode&&sr.ENDIANNESS&&(cD("Swap bytes of ".concat(n.name)),sr.swapBytes(n.buffer,Pe[n.dataType])),n.values=Ae.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&uD("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==--dD&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),i(n)):o({xhr:a,e:t}))},a.responseType=r.compression||"string"!==n.dataType?"arraybuffer":"text",a.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,i){var o=pD("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++dD&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--dD&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JSON.parse(JT.inflate(new Uint8Array(o.response),{to:"string"}))):r(JSON.parse(o.responseText)):i({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&&(uD("Supported algorithms are: [gz]"),uD("Unkown compression algorithm: ".concat(n.compression))),new Promise((function(r,i){var o=pD("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++dD&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--dD&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?n.compression?r(JT.inflate(new Uint8Array(o.response),{to:"string"})):r(o.responseText):i({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 t&&t.compression&&"gz"!==t.compression&&(uD("Supported algorithms are: [gz]"),uD("Unkown compression algorithm: ".concat(t.compression))),new Promise((function(n,r){var i=pD("GET",e,t);i.onreadystatechange=function(e){4===i.readyState&&(200===i.status||0===i.status?t.compression?n(JT.inflate(new Uint8Array(i.response),{to:"arraybuffer"}).buffer):n(i.response):r({xhr:i,e:e}))},i.responseType="arraybuffer",i.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 i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin),i.onload=function(){return n(i)},i.onerror=r,i.src=e}))}};eD("http",(function(e){return fD}));var hD=n(733),mD=n.n(hD),gD=Ae.vtkErrorMacro,vD=Ae.vtkDebugMacro;function yD(e){var t=e.split(".").pop().toLowerCase();return"jpg"===t?"jpeg":t}var bD={uint8array:function(e,t,n){return function(r){e.buffer=new ArrayBuffer(r.length),new Uint8Array(e.buffer).set(r),t&&("string"===e.dataType||"JSON"===e.dataType?e.buffer=JT.inflate(new Uint8Array(e.buffer),{to:"string"}):e.buffer=JT.inflate(new Uint8Array(e.buffer)).buffer),"JSON"===e.ref.encode?e.values=JSON.parse(e.buffer):(sr.ENDIANNESS!==e.ref.encode&&sr.ENDIANNESS&&(vD("Swap bytes of ".concat(e.name)),sr.swapBytes(e.buffer,Pe[e.dataType])),e.values=Ae.newTypedArray(e.dataType,e.buffer)),e.values.length!==e.size&&gD("Error in FetchArray: ".concat(e.name," does not have the proper array size. Got ").concat(e.values.length,", instead of ").concat(e.size)),n()}},string:function(e,t,n){return function(r){e.values=t?JSON.parse(JT.inflate(r,{to:"string"})):JSON.parse(r),n()}}};function wD(e){return function(e){return"/"===e[0]?e.substr(1):e}(function(e){return new URL(e,"http://any").pathname}(e))}var xD={create:function(e){var t=!1,n=0,r=new(mD()),i=r;return r.loadAsync(e.zipContent).then((function(){t=!0;var n=[];r.forEach((function(e,t){-1!==e.indexOf("index.json")&&n.push(e)})),n.sort((function(e,t){return e.length-t.length}));for(var o=n[0].split("/");o.length>1;){var a=o.shift();i=i.folder(a)}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,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise((function(s,l){t||gD("ERROR!!! zip not ready...");var u=wD([r,o.ref.basepath,a.compression?"".concat(o.ref.id,".gz"):o.ref.id].join("/"));1==++n&&e.invokeBusy&&e.invokeBusy(!0);var c="string"!==o.dataType||a.compression?"uint8array":"string",d=bD[c](o,a.compression,(function(){delete o.ref,0==--n&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),s(o)}));i.file(u).async(c).then(d)}))},fetchJSON:function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=wD(e);return t||gD("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?i.file(r).async("uint8array").then((function(e){var t=JT.inflate(e,{to:"string"});return Promise.resolve(JSON.parse(t))})):Promise.reject(new Error("Invalid compression")):i.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=wD(e);return t||gD("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?i.file(r).async("uint8array").then((function(e){var t=JT.inflate(e,{to:"string"});return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):i.file(r).async("string").then((function(e){return Promise.resolve(e)}))},fetchImage:function(){var e=arguments.length>1?arguments[1]:void 0,n=wD(e);return t||gD("ERROR!!! zip not ready..."),new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,i.file(n).async("base64").then((function(e){r.src="data:image/".concat(yD(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=wD(e);return t||gD("ERROR!!! zip not ready..."),n.compression?"gz"===n.compression?i.file(r).then((function(e){var t=JT.inflate(e).buffer;return Promise.resolve(t)})):Promise.reject(new Error("Invalid compression")):i.file(r).async("arraybuffer").then((function(e){return Promise.resolve(e)}))}}}};eD("zip",(function(e){return xD.create(e)}));function SD(e){return new TextDecoder("latin1").decode(e)}var CD={arrayBufferToString:SD,extractBinary:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=SD(e),i=t.exec(r);if(!i)return{text:r};var o=i.index+i[0].length,a=r.substring(0,o),s=null,l=n?n.exec(r):null;if(l){var u=r.substr(l.index);s={text:a+u,binaryBuffer:e.slice(o,l.index)}}else s={text:a,binaryBuffer:e.slice(o)};return s}},AD=Ae.vtkErrorMacro,PD=Ae.vtkDebugMacro,_D=function(){return AD("LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead."),Promise.reject(new Error("LiteHttpDataAccessHelper does not support compression. Need to register HttpDataAccessHelper instead."))},OD=0;function TD(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=y(e,2),n=t[0],i=t[1];return r.setRequestHeader(n,i)})),n.progressCallback&&r.addEventListener("progress",n.progressCallback),r}var DD={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?_D():n.ref&&!n.ref.pending?new Promise((function(i,o){var a=TD("GET",[t,n.ref.basepath,n.ref.id].join("/"),r);a.onreadystatechange=function(t){1===a.readyState&&(n.ref.pending=!0,1==++OD&&e.invokeBusy&&e.invokeBusy(!0)),4===a.readyState&&(n.ref.pending=!1,200===a.status||0===a.status?(n.buffer=a.response,"JSON"===n.ref.encode?n.values=JSON.parse(n.buffer):(sr.ENDIANNESS!==n.ref.encode&&sr.ENDIANNESS&&(PD("Swap bytes of ".concat(n.name)),sr.swapBytes(n.buffer,Pe[n.dataType])),n.values=Ae.newTypedArray(n.dataType,n.buffer)),n.values.length!==n.size&&AD("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==--OD&&e.invokeBusy&&e.invokeBusy(!1),e.modified&&e.modified(),i(n)):o({xhr:a,e:t}))},a.responseType="string"!==n.dataType?"arraybuffer":"text",a.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?_D():new Promise((function(r,i){var o=TD("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++OD&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--OD&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(JSON.parse(o.responseText)):i({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?_D():new Promise((function(r,i){var o=TD("GET",t,n);o.onreadystatechange=function(t){1===o.readyState&&1==++OD&&e.invokeBusy&&e.invokeBusy(!0),4===o.readyState&&(0==--OD&&e.invokeBusy&&e.invokeBusy(!1),200===o.status||0===o.status?r(o.responseText):i({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 i=TD("GET",e,t);i.onreadystatechange=function(e){4===i.readyState&&(200===i.status||0===i.status?n(i.response):r({xhr:i,e:e}))},i.responseType="arraybuffer",i.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 i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin),i.onload=function(){return n(i)},i.onerror=r,i.src=e}))}};$T("http")||eD("http",(function(e){return DD}));var ED=["pointData","cellData","fieldData"],ID={vtkDataArray:Jn,vtkStringArray:rl},kD={},MD={vtkPolyData:function(e){var t=[];return t.push(e.points),["verts","lines","polys","strips"].forEach((function(n){e[n]&&t.push(e[n])})),t},vtkImageData:function(e){return[]},vtkUnstructuredGrid:function(e){var t=[];return t.push(e.points),t.push(e.cells),t.push(e.cellTypes),t},vtkRectilinearGrid:function(e){var t=[];return t.push(e.xCoordinates),t.push(e.yCoordinates),t.push(e.zCoordinates),t}};function ND(e,t,n,r,i,o,a){var s=t.enableArray;t.arrays=[],ED.forEach((function(e){n[e]&&(n[e].arrays.map((function(e){return e.data})).forEach((function(n){t.arrays.push({name:n.name,enable:s,location:e,array:n,registration:n.ref.registration||"addArray"})})),n[e].arrays=[])}));var l=[],u=t.progressCallback,c=t.fetchGzip?"gz":null;function d(){t.dataset=T(n),a?e.loadData().then((function(){t.output[0]=t.dataset,i(e,t.output[0])})):(t.output[0]=t.dataset,i(e,t.output[0]))}MD[n.vtkClass](n).forEach((function(e){l.push(r(e,{compression:c,progressCallback:u}))})),l.length?Promise.all(l).then(d,(function(e){o(e)})):d()}function RD(e,t){function n(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="".concat(n.ref.id,"|").concat(n.vtkClass);return kD[i]?Promise.resolve(kD[i]).then((function(e){n!==e&&(Object.assign(n,e),delete n.ref)})):kD[i]=t.dataAccessHelper.fetchArray(e,t.baseURL,n,r).then((function(e){return kD[i]=e,e})),Promise.resolve(kD[i])}t.classHierarchy.push("vtkHttpDataSetReader"),t.output[0]=T({vtkClass:"vtkPolyData"}),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.updateMetadata=function(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"zip"===t.compression?new Promise((function(i,o){tD.get("http").fetchBinary(t.url).then((function(a){t.dataAccessHelper=tD.get("zip",{zipContent:a,callback:function(a){t.baseURL="",t.dataAccessHelper.fetchJSON(e,"index.json").then((function(a){ND(e,t,a,n,i,o,r)}),(function(e){o(e)}))}})}),(function(e){o(e)}))})):new Promise((function(i,o){t.dataAccessHelper.fetchJSON(e,t.url).then((function(a){ND(e,t,a,n,i,o,r)}),(function(e){o(e)}))}))},e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf("index.json")||r.fullpath){t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.json");return t.compression=r.compression,e.updateMetadata(!!r.loadData)},e.loadData=function(){var r=t.dataset,i=t.arrays.filter((function(e){return e.enable})).filter((function(e){return e.array.ref})).map((function(e){return e.array}));return new Promise((function(o,a){var s=function(e){a(e)};!function a(){if(i.length){var l=t.progressCallback,u=t.fetchGzip?"gz":null;n(i.pop(),{compression:u,progressCallback:l}).then(a,s)}else r&&(t.arrays.filter((function(e){return e.registration&&!e.array.ref})).forEach((function(e){var t=ID[e.array.vtkClass].newInstance(e.array);r["get".concat(Ae.capitalize(e.location))]()[e.registration](t),delete e.registration})),r.modified(),o(e,r))}()}))},e.requestData=function(e,t){},e.enableArray=function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=t.arrays.filter((function(t){return t.name===n&&t.location===e}));1===i.length&&(i[0].enable=r)},e.isBusy=function(){return!!t.requestCount}}var FD={enableArray:!0,fetchGzip:!1,arrays:[],url:null,baseURL:null,requestCount:0};function BD(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FD,n),Ae.obj(e,t),Ae.get(e,t,["enableArray","fetchGzip","url","baseURL","dataAccessHelper"]),Ae.set(e,t,["dataAccessHelper","progressCallback"]),Ae.getArray(e,t,["arrays"]),Ae.algo(e,t,0,1),Ae.event(e,t,"busy"),RD(e,t),void 0===t.progressCallback&&(t.progressCallback=null)}var LD={newInstance:Ae.newInstance(BD,"vtkHttpDataSetReader"),extend:BD},VD={ColorSpace:{RGB:0,HSV:1,LAB:2,DIVERGING:3},Scale:{LINEAR:0,LOG10:1}};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 GD=VD.ColorSpace,UD=VD.Scale,zD=Is.ScalarMappingTarget,WD=Ae.vtkDebugMacro,HD=Ae.vtkErrorMacro,KD=Ae.vtkWarningMacro;function XD(e,t){var n=e[0],r=e[1],i=e[2],o=Math.sqrt(n*n+r*r+i*i),a=o>.001?Math.acos(n/o):0,s=a>.001?Math.atan2(i,r):0;t[0]=o,t[1]=a,t[2]=s}function qD(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 YD(e,t,n,r){var i=[],o=[];pn(t,i),pn(n,o);var a=[],s=[];XD(i,a),XD(o,s);var l=e;if(a[1]>.05&&s[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}(a[2],s[2])>.33*Math.PI){var u=Math.max(a[0],s[0]);u=Math.max(88,u),e<.5?(s[0]=u,s[1]=0,s[2]=0,l*=2):(a[0]=u,a[1]=0,a[2]=0,l=2*l-1)}a[1]<.05&&s[1]>.05?a[2]=qD(s,a[0]):s[1]<.05&&a[1]>.05&&(s[2]=qD(a,s[0]));var c=[];c[0]=(1-l)*a[0]+l*s[0],c[1]=(1-l)*a[1]+l*s[1],c[2]=(1-l)*a[2]+l*s[2];var d=[];!function(e,t){var n=e[0],r=e[1],i=e[2];t[0]=n*Math.cos(r),t[1]=n*Math.sin(r)*Math.cos(i),t[2]=n*Math.sin(r)*Math.sin(i)}(c,d),fn(d,r)}function ZD(e,t){t.classHierarchy.push("vtkColorTransferFunction"),e.getSize=function(){return t.nodes.length},e.addRGBPoint=function(t,n,r,i){return e.addRGBPointLong(t,n,r,i,.5,0)},e.addRGBPointLong=function(n,r,i,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(a<0||a>1)return HD("Midpoint outside range [0.0, 1.0]"),-1;if(s<0||s>1)return HD("Sharpness outside range [0.0, 1.0]"),-1;t.allowDuplicateScalars||e.removePoint(n);var l={x:n,r:r,g:i,b:o,midpoint:a,sharpness:s};t.nodes.push(l),e.sortAndUpdateRange();for(var u=0;u4&&void 0!==arguments[4]?arguments[4]:.5,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=[],l=[n,r,i];return sn(l,s),e.addRGBPoint(t,s[0],s[1],s[2],o,a)},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(),i},e.movePoint=function(n,r){if(n!==r){e.removePoint(r);for(var i=0;i=n&&t.nodes[c].x<=a?t.nodes.splice(c,1):c++;e.addRGBPointLong(n,r,i,o,.5,0),e.addRGBPointLong(a,s,l,u,.5,0),e.modified()},e.addHSVSegment=function(t,n,r,i,o,a,s,l){var u=[a,s,l],c=[],d=[];sn([n,r,i],c),sn(u,d),e.addRGBSegment(t,c[0],c[1],c[2],o,d[0],d[1],d[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 i=e.getSize(),o=e.getAnnotatedValueIndexInternal(n);if(o<0||0===i)e.getNanColor(r);else{var a=[];e.getNodeValue(o%i,a),r[0]=a.r,r[1]=a.g,r[2]=a.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,i,o){if(In(n)||In(r))for(var a=0;a0);var x=0,S=0,C=0;w&&(x=Math.log10(n),S=Math.log10(r));for(var A=0;A1?w?(C=x+A/(i-1)*(S-x),p=Math.pow(10,C)):p=n+A/(i-1)*(r-n):w?(C=.5*(x+S),p=Math.pow(10,C)):p=.5*(n+r),t.discretize){var _=t.mappingRange;if(p>=_[0]&&p<=_[1]){var O=t.numberOfValues,T=_[1]-_[0];if(O<=1)p=_[0]+T/2;else{var D=(p-_[0])/T,E=Ge(O*D);p=_[0]+E/(O-1)*T}}}for(;st.nodes[s].x;)++s.99999&&(v=.99999));if(p>t.mappingRange[1])o[P]=0,o[P+1]=0,o[P+2]=0,t.clamping&&(e.getUseAboveRangeColor()?(o[P]=t.aboveRangeColor[0],o[P+1]=t.aboveRangeColor[1],o[P+2]=t.aboveRangeColor[2]):(o[P]=u,o[P+1]=c,o[P+2]=d));else if(p0&&(o[P]=t.nodes[0].r,o[P+1]=t.nodes[0].g,o[P+2]=t.nodes[0].b));else if(0===s&&(Math.abs(p-n)<1e-6||t.discretize))l>0?(o[P]=t.nodes[0].r,o[P+1]=t.nodes[0].g,o[P+2]=t.nodes[0].b):(o[P]=0,o[P+1]=0,o[P+2]=0);else{var I=0;if(I=(I=w?(C-f)/(h-f):(p-f)/(h-f)).99){if(I<.5){o[P]=m[0],o[P+1]=m[1],o[P+2]=m[2];continue}o[P]=g[0],o[P+1]=g[1],o[P+2]=g[2];continue}if(y<.01){if(t.colorSpace===GD.RGB)o[P]=(1-I)*m[0]+I*g[0],o[P+1]=(1-I)*m[1]+I*g[1],o[P+2]=(1-I)*m[2]+I*g[2];else if(t.colorSpace===GD.HSV){var k=[],M=[];an(m,k),an(g,M),t.hSVWrap&&(k[0]-M[0]>.5||M[0]-k[0]>.5)&&(k[0]>M[0]?k[0]-=1:M[0]-=1);var N=[];N[0]=(1-I)*k[0]+I*M[0],N[0]<0&&(N[0]+=1),N[1]=(1-I)*k[1]+I*M[1],N[2]=(1-I)*k[2]+I*M[2],sn(N,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else if(t.colorSpace===GD.LAB){var R=[],F=[];pn(m,R),pn(g,F);var B=[];B[0]=(1-I)*R[0]+I*F[0],B[1]=(1-I)*R[1]+I*F[1],B[2]=(1-I)*R[2]+I*F[2],fn(B,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else t.colorSpace===GD.DIVERGING?(YD(I,m,g,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]):HD("ColorSpace set to invalid value.",t.colorSpace);continue}I<.5?I=.5*Math.pow(2*I,1+10*y):I>.5&&(I=1-.5*Math.pow(2*(1-I),1+10*y));var L=I*I,V=L*I,j=2*V-3*L+1,G=-2*V+3*L,U=V-2*L+I,z=V-L,W=void 0;if(t.colorSpace===GD.RGB)for(var H=0;H<3;H++)W=(1-y)*(g[H]-m[H]),o[P+H]=j*m[H]+G*g[H]+U*W+z*W;else if(t.colorSpace===GD.HSV){var K=[],X=[];an(m,K),an(g,X),t.hSVWrap&&(K[0]-X[0]>.5||X[0]-K[0]>.5)&&(K[0]>X[0]?K[0]-=1:X[0]-=1);for(var q=[],Y=0;Y<3;Y++)W=(1-y)*(X[Y]-K[Y]),q[Y]=j*K[Y]+G*X[Y]+U*W+z*W,0===Y&&q[Y]<0&&(q[Y]+=1);sn(q,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else if(t.colorSpace===GD.LAB){var Z=[],J=[];pn(m,Z),pn(g,J);for(var Q=[],$=0;$<3;$++)W=(1-y)*(J[$]-Z[$]),Q[$]=j*Z[$]+G*J[$]+U*W+z*W;fn(Q,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]}else t.colorSpace===GD.DIVERGING?(YD(I,m,g,b),o[P]=b[0],o[P+1]=b[1],o[P+2]=b[2]):HD("ColorSpace set to invalid value.");for(var ee=0;ee<3;ee++)o[P+ee]=o[P+ee]<0?0:o[P+ee],o[P+ee]=o[P+ee]>1?1:o[P+ee]}}}},e.getUint8Table=function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.getMTime()<=t.buildTime&&t.tableSize===i&&t.tableWithAlpha!==o)return t.table;if(0===t.nodes.length)return HD("Attempting to lookup a value with no points in the function"),t.table;var a=o?4:3;t.tableSize===i&&t.tableWithAlpha===o||(t.table=new Uint8Array(i*a),t.tableSize=i,t.tableWithAlpha=o);var s=[];e.getTable(n,r,i,s);for(var l=0;l1&&(a=(r-n)/(i-1));for(var s=0;s=t.nodes.length?(HD("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 HD("Index out of range!"),-1;var i=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],i!==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 i=[];e.getNodeValue(t%r,i);for(var o=0;o<3;++o)n[o]=i[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],i),e.addRGBPoint(n[1],i[0],i[1],i[2])):(e.getColor(r[1],i),e.addRGBPoint(n[1],i[0],i[1],i[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,JD,n),Is.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={},Ae.obj(t.buildTime),Ae.get(e,t,["buildTime","mappingRange"]),Ae.setGet(e,t,["useAboveRangeColor","useBelowRangeColor","colorSpace","discretize","numberOfValues"]),Ae.setArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"],4),Ae.getArray(e,t,["nanColor","belowRangeColor","aboveRangeColor"]),ZD(e,t)}var $D=function(e){for(var t=1;t(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?(aE("Bad index - must be between 0 and 3"),0):t.componentData[e].colorChannels},e.setGrayTransferFunction=function(n,r){var i=!1;return t.componentData[n].grayTransferFunction!==r&&(t.componentData[n].grayTransferFunction=r,i=!0),1!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=1,i=!0),i&&e.modified(),i},e.getGrayTransferFunction=function(n){return null===t.componentData[n].grayTransferFunction&&(t.componentData[n].grayTransferFunction=Pu.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 i=!1;return t.componentData[n].rGBTransferFunction!==r&&(t.componentData[n].rGBTransferFunction=r,i=!0),3!==t.componentData[n].colorChannels&&(t.componentData[n].colorChannels=3,i=!0),i&&e.modified(),i},e.getRGBTransferFunction=function(n){return null===t.componentData[n].rGBTransferFunction&&(t.componentData[n].rGBTransferFunction=$D.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=Pu.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 aE("Invalid index"),!1;var i=Math.min(1,Math.max(0,r));return t.componentData[n].componentWeight!==i&&(t.componentData[n].componentWeight=i,e.modified(),!0)},e.getComponentWeight=function(e){return e<0||e>=4?(aE("Invalid index"),0):t.componentData[e].componentWeight},e.setInterpolationTypeToNearest=function(){return e.setInterpolationType(iE.NEAREST)},e.setInterpolationTypeToLinear=function(){return e.setInterpolationType(iE.LINEAR)},e.setInterpolationTypeToFastLinear=function(){return e.setInterpolationType(iE.FAST_LINEAR)},e.getInterpolationTypeAsString=function(){return Ae.enumToString(iE,t.interpolationType)};["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=Ae.capitalize(n);e["set".concat(r)]=function(r,i){return t.componentData[r]["".concat(n)]!==i&&(t.componentData[r]["".concat(n)]=i,e.modified(),!0)}}));["useGradientOpacity","scalarOpacityUnitDistance","gradientOpacityMinimumValue","gradientOpacityMinimumOpacity","gradientOpacityMaximumValue","gradientOpacityMaximumOpacity","opacityMode"].forEach((function(n){var r=Ae.capitalize(n);e["get".concat(r)]=function(e){return t.componentData[e]["".concat(n)]}}))}var lE={independentComponents:!0,interpolationType:iE.FAST_LINEAR,shade:0,ambient:.1,diffuse:.7,specular:.2,specularPower:10,useLabelOutline:!1,labelOutlineThickness:1};function uE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object.assign(t,lE,n),Ae.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:oE.FRACTIONAL,gradientOpacityMinimumValue:0,gradientOpacityMinimumOpacity:0,gradientOpacityMaximumValue:1,gradientOpacityMaximumOpacity:1,useGradientOpacity:!1,componentWeight:1})}Ae.setGet(e,t,["independentComponents","interpolationType","shade","ambient","diffuse","specular","specularPower","useLabelOutline","labelOutlineThickness"]),sE(e,t)}var cE=function(e){for(var t=1;tn[1])return t.mapperBounds=n.concat(),t.bounds=[1,-1,1,-1,1,-1],t.boundsMTime.modified(),n;var r;if(!t.mapperBounds||!(r=[n,t.mapperBounds],r[0].map((function(e,t){return r.map((function(e){return e[t]}))}))).reduce((function(e,t){return e&&t[0]===t[1]}),!0)||e.getMTime()>t.boundsMTime.getMTime()){dE("Recomputing bounds..."),t.mapperBounds=n.map((function(e){return e}));var i=[];si.getCorners(n,i),e.computeMatrix();var o=new Float64Array(16);Wo(o,t.matrix),i.forEach((function(e){return yo(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?i.reduce((function(e,n){return e>n[t/2]?n[t/2]:e}),e):i.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 fE={mapper:null,property:null,bounds:[1,-1,1,-1,1,-1]};function hE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fE,n),yv.extend(e,t,n),t.boundsMTime={},Ae.obj(t.boundsMTime),Ae.set(e,t,["property"]),Ae.setGet(e,t,["mapper"]),Ae.getArray(e,t,["bounds"],6),pE(e,t)}var mE={newInstance:Ae.newInstance(hE,"vtkVolume"),extend:hE},gE=tD.get("http");function vE(e,t,n,r,i,o){t.readers=[];var a=[];return n.series.forEach((function(e){var n=LD.newInstance({fetchGzip:t.fetchGzip,dataAccessHelper:t.dataAccessHelper});a.push(n.setUrl("".concat(t.baseURL,"/").concat(e.url),{loadData:o})),t.readers.push({timeStep:e.timeStep,reader:n})})),Promise.all(a).then((function(){var t=e.getTimeRange();t&&0!==t.length&&e.setUpdateTimeStep(t[0]),r(e)}),(function(e){i(e)}))}function yE(e,t){t.classHierarchy.push("vtkHttpDataSetSeriesReader"),t.output[0]=T({vtkClass:"vtkPolyData"}),t.dataAccessHelper||(t.dataAccessHelper=gE),t.currentReader=null,e.updateMetaData=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return"zip"===t.compression?new Promise((function(r,i){gE.fetchBinary(t.baseURL).then((function(o){t.dataAccessHelper=tD.get("zip",{zipContent:o,callback:function(o){t.baseURL="",t.dataAccessHelper.fetchJSON(e,"index.json").then((function(o){vE(e,t,o,r,i,n)}),(function(e){i(e)}))}})}))})):new Promise((function(r,i){t.dataAccessHelper.fetchJSON(e,t.url).then((function(o){return vE(e,t,o,r,i,n)}),(function(e){i(e)}))}))},e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.endsWith("index.json")||r.fullpath){t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.json");return t.compression=r.compression,e.updateMetaData(r.loadData)},e.getTimeSteps=function(){return t.readers.map((function(e){return e.timeStep})).sort()},e.getTimeRange=function(){var t=e.getTimeSteps(),n=t.length;return n>=1?[t[0],t[n-1]]:[]},e.setUpdateTimeStep=function(n){var r=t.readers.reduce((function(e,t){return t.timeStep<=n?t:e}));void 0!==r&&(t.currentReader=r.reader,t.output[0]=t.currentReader.getOutputData(),t.output[0].modified(),e.modified())},e.requestData=function(e,n){t.currentReader&&(n[0]=t.currentReader.getOutputData())},e.enableArray=function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.currentReader&&t.currentReader.reader.enableArray(e,n,r)},e.loadData=function(){t.currentReader&&t.currentReader.reader.loadData()}}var bE={fetchGzip:!1,url:null,baseURL:null,dataAccessHelper:null};function wE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bE,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.set(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),yE(e,t)}var xE={newInstance:Ae.newInstance(wE,"vtkHttpDataSetSeriesReader"),extend:wE};function SE(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 CE={repeat:!1,interpolate:!1,edgeClamp:!1,image:null,imageLoaded:!1};function AE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,CE,n),Ae.obj(e,t),Ae.algo(e,t,6,0),Ae.get(e,t,["imageLoaded"]),Ae.setGet(e,t,["repeat","edgeClamp","interpolate","image"]),SE(e,t)}var PE={newInstance:Ae.newInstance(AE,"vtkTexture"),extend:AE},_E=Ae.vtkErrorMacro;function OE(e,t){t.classHierarchy.push("vtkTextureLODsDownloader");var n={downloadStack:[]};e.startDownloads=function(){if(t.texture)if(t.files&&0!==t.files.length){var e=t.baseUrl;e&&!e.endsWith("/")&&(e+="/"),n.downloadStack=[],t.files.forEach((function(t){return n.downloadStack.push("".concat(e).concat(t))}));setTimeout((function e(){if(0!==n.downloadStack.length){var r=function(){setTimeout(e,t.waitTimeBetweenDownloads)},i=new Image;t.crossOrigin&&(i.crossOrigin=t.crossOrigin);var o=n.downloadStack.shift();(function(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.open("HEAD",e,!0),r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){var i=r.getResponseHeader("Content-Length");t(i)}else console.log("Failed to get remote file size of",e),n(r)},r.send()}))})(o).then((function(e){if(!e||e/1024>t.maxTextureLODSize)return e?console.log("Skipping image",o,", because it is larger","than the max texture size:",t.maxTextureLODSize,"KiB"):console.log("Failed to get image size"),void r();i.src=o,i.decode().then((function(){t.texture.setImage(i),t.stepFinishedCallback&&t.stepFinishedCallback(),r()})).catch((function(e){console.log("Failed to decode image:",i.src),console.log("Error is:",e),r()}))})).catch((function(e){console.log("Failed to get size of:",o),console.log("status was:",e.status),console.log("statusText was:",e.statusText),r()}))}}),t.waitTimeToStart)}else _E("No files set.");else _E("Texture was not set.")}}var TE={baseUrl:"",files:[],texture:null,crossOrigin:void 0,maxTextureLODSize:5e4,stepFinishedCallback:null,waitTimeToStart:4e3,waitTimeBetweenDownloads:0};function DE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,TE,n),Ae.obj(e,t),Ae.setGet(e,t,["baseUrl","files","texture","crossOrigin","maxTextureLODSize","stepFinishedCallback","waitTimeToStart","waitTimeBetweenDownloads"]),OE(e,t)}var EE={newInstance:Ae.newInstance(DE,"vtkTextureLODsDownloader"),extend:DE},IE=Ae.vtkErrorMacro;function kE(e,t){t.classHierarchy.push("vtkHttpDataSetLODsLoader");var n={downloadStack:[]};e.startDownloads=function(){if(t.mapper)if(t.files&&0!==t.files.length){var e=t.baseUrl;e&&!e.endsWith("/")&&(e+="/"),n.downloadStack=[],t.files.forEach((function(t){return n.downloadStack.push("".concat(e).concat(t))}));setTimeout((function e(){var r=n.downloadStack.shift(),i=LD.newInstance({dataAccessHelper:tD.get("http")});t.currentSource=i;i.setUrl(r,{compression:"zip",loadData:!0,fullpath:!0}).then((function(){if(t.mapper.setInputConnection(i.getOutputPort()),t.sceneItem){var r=t.sceneItem.defaultSettings;r.mapper&&r.mapper.colorByArrayName&&i.enableArray(r.mapper.colorByArrayName,r.mapper.colorByArrayName),t.sceneItem.source=i}t.stepFinishedCallback&&t.stepFinishedCallback(),0!==n.downloadStack.length&&setTimeout(e,t.waitTimeBetweenDownloads)}))}),t.waitTimeToStart)}else IE("No files set.");else IE("Mapper was not set.")}}var ME={baseUrl:"",currentSource:null,files:[],mapper:null,sceneItem:null,stepFinishedCallback:null,waitTimeToStart:4e3,waitTimeBetweenDownloads:0};function NE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ME,n),Ae.obj(e,t),Ae.setGet(e,t,["baseUrl","files","mapper","sceneItem","stepFinishedCallback","waitTimeToStart","waitTimeBetweenDownloads"]),Ae.get(e,t,["currentSource"]),kE(e,t)}var RE={newInstance:Ae.newInstance(NE,"vtkHttpDataSetLODsLoader"),extend:NE},FE={COMPOSITE_BLEND:0,MAXIMUM_INTENSITY_BLEND:1,MINIMUM_INTENSITY_BLEND:2,AVERAGE_INTENSITY_BLEND:3,ADDITIVE_INTENSITY_BLEND:4},BE=FE,LE={OFF:0,NORMALIZED:1,RAW:2};function VE(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=kn(),t.bounds},e.update=function(){e.getInputData()},e.setBlendModeToComposite=function(){e.setBlendMode(BE.COMPOSITE_BLEND)},e.setBlendModeToMaximumIntensity=function(){e.setBlendMode(BE.MAXIMUM_INTENSITY_BLEND)},e.setBlendModeToMinimumIntensity=function(){e.setBlendMode(BE.MINIMUM_INTENSITY_BLEND)},e.setBlendModeToAverageIntensity=function(){e.setBlendMode(BE.AVERAGE_INTENSITY_BLEND)},e.setBlendModeToAdditiveIntensity=function(){e.setBlendMode(BE.ADDITIVE_INTENSITY_BLEND)},e.getBlendModeAsString=function(){return Ae.enumToString(BE,t.blendMode)},e.setAverageIPScalarRange=function(t,n){console.warn("setAverageIPScalarRange is deprecated use setIpScalarRange"),e.setIpScalarRange(t,n)},e.getFilterModeAsString=function(){return Ae.enumToString(LE,t.filterMode)},e.setFilterModeToOff=function(){e.setFilterMode(LE.OFF)},e.setFilterModeToNormalized=function(){e.setFilterMode(LE.NORMALIZED)},e.setFilterModeToRaw=function(){e.setFilterMode(LE.RAW)}}var jE={bounds:[1,-1,1,-1,1,-1],sampleDistance:1,imageSampleDistance:1,maximumSamplesPerRay:1e3,autoAdjustSampleDistances:!0,blendMode:BE.COMPOSITE_BLEND,ipScalarRange:[-1e6,1e6],filterMode:LE.OFF,preferSizeOverAccuracy:!1};function GE(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jE,n),Lv.extend(e,t,n),Ae.obj(e,t),Ae.algo(e,t,1,0),Ae.setGet(e,t,["sampleDistance","imageSampleDistance","maximumSamplesPerRay","autoAdjustSampleDistances","blendMode","filterMode","preferSizeOverAccuracy"]),Ae.setGetArray(e,t,["ipScalarRange"],2),Ae.event(e,t,"lightingActivated"),VE(e,t)}var UE={newInstance:Ae.newInstance(GE,"vtkVolumeMapper"),extend:GE};function zE(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 WE(e){for(var t=1;t=e&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,KE,n),Ae.obj(e,t),Ae.get(e,t,["applySettings","currentTimeStep","data","originalMetada","scene","timeRange","timeSteps"]),Ae.setGet(e,t,["renderers"]),HE(e,t)}var qE={newInstance:Ae.newInstance(XE,"vtkTimeStepBasedAnimationHandler"),extend:XE};function YE(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 ZE(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sI,n),Ae.obj(e,t),Ae.get(e,t,["fetchGzip","url","baseURL","scene","metadata","animationHandler"]),Ae.setGet(e,t,["renderer"]),Ae.event(e,t,"ready"),aI(e,t)}var uI={newInstance:Ae.newInstance(lI,"vtkHttpSceneLoader"),extend:lI,applySettings:$E,updateDatasetTypeMapping:function(e,t){iI[e]=t}};function cI(e){return{subscribeToImageStream:function(t){return e.subscribe("viewport.image.push.subscription",t)},unsubscribeToImageStream:function(t){return e.unsubscribe(t)},registerView:function(t){return e.call("viewport.image.push.observer.add",[t])},unregisterView:function(t){return e.call("viewport.image.push.observer.remove",[t])},enableView:function(t,n){return e.call("viewport.image.push.enabled",[t,n])},render:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{size:[400,400],view:-1};return e.call("viewport.image.push",[t])},resetCamera:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return e.call("viewport.camera.reset",[t])},invalidateCache:function(t){return e.call("viewport.image.push.invalidate.cache",[t])},setQuality:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e.call("viewport.image.push.quality",[t,n,r])},setSize:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return e.call("viewport.image.push.original.size",[t,n,r])},setServerAnimationFPS:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;return e.call("viewport.image.animation.fps.max",[t])},getServerAnimationFPS:function(){return e.call("viewport.image.animation.fps.get",[])},startAnimation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return e.call("viewport.image.animation.start",[t])},stopAnimation:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return e.call("viewport.image.animation.stop",[t])},updateCamera:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return e.call("viewport.camera.update",[t,n,r,i,o])},updateCameraParameters:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.call("viewport.camera.update.params",[t,n,r])}}}function dI(e,t){function n(n){var r=Number(this.dataset.id);e.invokeImageReady(t.eventPool[r])}t.classHierarchy.push("vtkViewStream"),t.imageDecodingPool=[new Image,new Image],t.eventPool=[],t.nextPoolImageIndex=0,t.urlToRevoke=[],t.activeURL=null,t.fps=[],t.lastTime=Date.now(),t.lastImageEvent=null,e.pushCamera=function(){var n=t.camera.getReferenceByName("focalPoint"),r=t.camera.getReferenceByName("viewUp"),i=t.camera.getReferenceByName("position"),o=t.camera.getParallelProjection(),a=t.camera.getViewAngle(),s=t.camera.getParallelScale(),l=null;return l=t.useCameraParameters?t.protocol.updateCameraParameters(t.viewId,{focalPoint:n,viewUp:r,position:i,parallelProjection:o,viewAngle:a,parallelScale:s},!1):t.protocol.updateCamera(t.viewId,n,r,i,!1),t.isAnimating&&setTimeout(e.pushCamera,1e3/t.cameraUpdateRate),l},e.invalidateCache=function(){return t.protocol.invalidateCache(t.viewId)},e.render=function(){return t.protocol.render({view:t.viewId,size:t.size})},e.resetCamera=function(){return t.protocol.resetCamera(t.viewId)},e.startAnimation=function(){return t.protocol.startAnimation(t.viewId)},e.stopAnimation=function(){return t.protocol.stopAnimation(t.viewId)},e.setSize=function(n,r){var i=!1;return t.size[0]===n&&t.size[1]===r||(t.size=[n,r],i=!0),i&&(e.modified(),t.protocol)?t.protocol.setSize(t.viewId,n,r):Promise.resolve(!1)},e.startInteraction=function(){var n=[t.protocol.setQuality(t.viewId,t.interactiveQuality,t.interactiveRatio)];return t.camera&&(n.push(e.startAnimation()),t.isAnimating=!0,n.push(e.pushCamera())),Promise.all(n)},e.endInteraction=function(){var n=[];return n.push(t.protocol.setQuality(t.viewId,t.stillQuality,t.stillRatio)),t.camera?(n.push(e.stopAnimation()),t.isAnimating=!1,n.push(e.pushCamera())):n.push(e.render()),Promise.all(n)},e.setViewId=function(e){return!(t.viewId===e||!t.protocol)&&(t.viewId&&t.protocol.unregisterView(t.viewId),t.viewId=e,t.viewId&&t.protocol.registerView(t.viewId).then((function(e){var n=e.viewId;t.viewId=n})),!0)},e.processMessage=function(n){if(n.id==t.viewId){var r=new Blob([n.image],{type:t.mimeType});if(t.activeURL)for(t.urlToRevoke.push(t.activeURL),t.activeURL=null;t.urlToRevoke.length>60;){var i=t.urlToRevoke.shift();window.URL.revokeObjectURL(i)}t.activeURL=URL.createObjectURL(r);var o,a=Date.now(),s=Math.floor(1e4/(a-t.lastTime))/10;for(t.fps.push(s),t.lastTime=a,t.lastImageEvent={url:t.activeURL,fps:s,metadata:{size:n.size,id:n.id,memory:n.memsize,workTime:n.workTime}},t.decodeImage?(o=t.lastImageEvent,t.eventPool[t.nextPoolImageIndex]=o,o.image=t.imageDecodingPool[t.nextPoolImageIndex++],t.nextPoolImageIndex%=t.imageDecodingPool.length,o.image.src=o.url):e.invokeImageReady(t.lastImageEvent);t.fps.length>t.fpsWindowSize;)t.fps.shift()}},e.delete=Ae.chain((function(){for(t.unregisterViewStream(e),e.setViewId(null);t.urlToRevoke.length;)window.URL.revokeObjectURL(t.urlToRevoke.pop())}),e.delete),function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2;t.imageDecodingPool.length2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pI,n),Ae.obj(e,t),Ae.event(e,t,"ImageReady"),Ae.get(e,t,["viewId","size","fps","lastImageEvent"]),Ae.setGet(e,t,["camera","cameraUpdateRate","decodeImage","fpsWindowSize","interactiveQuality","interactiveRatio","stillQuality","stillRatio","useCameraParameters"]),dI(e,t),Object.assign(e,t.sharedAPI)}var hI={newInstance:Ae.newInstance(fI,"vtkViewStream"),extend:fI};function mI(e,t){function n(e){var n=e[0];if(n&&n.image)for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:30,r=!1;return t.serverAnimationFPS!==n&&(t.serverAnimationFPS=n,r=!0),t.protocol?(r&&e.modified(),t.protocol.setServerAnimationFPS(n)):Promise.resolve(!0)},e.connect=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cI;!t.connected&&e&&r&&(t.protocol=r(e),t.protocol.subscribeToImageStream(n).promise.then((function(e){t.renderTopicSubscription=e,t.connected=!0})).catch((function(e){t.connected=!1,console.error(e)})))},e.disconnect=function(){t.protocol&&t.connected&&t.renderTopicSubscription&&(t.protocol.unsubscribeToImageStream(t.renderTopicSubscription),t.renderTopicSubscription=null),t.connected=!1},e.registerViewStream=function(e){t.viewStreams.push(e)},e.unregisterViewStream=function(e){t.viewStreams=t.viewStreams.filter((function(t){return t!==e}))},e.createViewStream=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"-1",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[400,400],i=e.setServerAnimationFPS,o=e.getServerAnimationFPS,a=e.unregisterViewStream,s=hI.newInstance({protocol:t.protocol,unregisterViewStream:a,sharedAPI:{setServerAnimationFPS:i,getServerAnimationFPS:o}});return s.setViewId(n),s.setSize(r[0],r[1]),e.registerViewStream(s),s},e.delete=Ae.chain((function(){for(;t.viewStreams.length;)t.viewStreams.pop().delete();e.disconnect()}),e.delete)}var gI={viewStreams:[],serverAnimationFPS:-1};function vI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gI,n),Ae.obj(e,t),Ae.get(e,t,["serverAnimationFPS","protocol"]),mI(e,t)}var yI={newInstance:Ae.newInstance(vI,"vtkImageStream"),extend:vI},bI=[];var wI={loadScript:function(e){return new Promise((function(t,n){if(-1===bI.indexOf(e)){bI.push(e);var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=t,r.onerror=n,document.body.appendChild(r)}else t(!1)}))},loadCSS:function(e){return new Promise((function(t,n){if(-1===bI.indexOf(e)){bI.push(e);var r=document.createElement("link");r.rel="stylesheet",r.href=e,r.onload=t,r.onerror=n,document.head.appendChild(r)}else t(!1)}))},LOADED_URLS:bI},xI=null;function SI(e,t){return function(){for(var n=arguments.length,r=new Array(n),i=0;i2&&void 0!==arguments[2]?arguments[2]:[],r={};return Object.keys(e).forEach((function(i){-1===n.indexOf(i)?r[i]=SI(e[i],t):r[i]=e[i]})),r}function AI(e,t){function n(){e.invokeBusyChange(t.busyCount)}function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;t.busyCount+=e,t.timeoutId&&(clearTimeout(t.timeoutId),t.timeoutId=0),t.busyCount?n():t.timeoutId=setTimeout(n,t.notificationTimeout)}t.classHierarchy.push("vtkWSLinkClient"),e.beginBusy=function(){return r(1)},e.endBusy=function(){return r(-1)},e.isBusy=function(){return!!t.busyCount},e.isConnected=function(){return!!t.connection},e.connect=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return xI?t.connection?Promise.reject(new Error("Need to disconnect first")):(t.config=n,t.configDecorator=i||t.configDecorator,new Promise((function(i,o){t.smartConnect=xI.newInstance({config:n,configDecorator:t.configDecorator}),t.smartConnect.onConnectionReady((function(n){t.connection=n,t.remote={},t.config=t.smartConnect.getConfig();var o=n.getSession();t.protocols=t.protocols||{},Object.keys(t.protocols).forEach((function(e){t.remote[e]=CI(t.protocols[e](o),r,t.notBusyList)})),t.createImageStream&&(t.imageStream=yI.newInstance(),t.imageStream.connect(o)),e.invokeConnectionReady(e),i(e)})),t.smartConnect.onConnectionError((function(t){e.invokeConnectionError(t),o(t)})),t.smartConnect.onConnectionClose((function(t){e.invokeConnectionClose(t),o(t)})),t.smartConnect.connect()}))):Promise.reject(new Error("Need to provide SmartConnect"))},e.disconnect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60;t.connection&&(t.connection.destroy(e),t.connection=null)},e.registerProtocol=function(e,n){t.remote[e]=CI(n(t.connection.getSession()),r,t.notBusyList)},e.unregisterProtocol=function(e){delete t.remote[e]}}var PI={notBusyList:[],busyCount:0,timeoutId:0,notificationTimeout:50,createImageStream:!0};function _I(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PI,n),Ae.obj(e,t),Ae.setGet(e,t,["protocols","notBusyList","createImageStream","configDecorator"]),Ae.get(e,t,["connection","config","remote","imageStream"]),Ae.event(e,t,"BusyChange"),Ae.event(e,t,"ConnectionReady"),Ae.event(e,t,"ConnectionError"),Ae.event(e,t,"ConnectionClose"),AI(e,t)}var OI=Ae.newInstance(_I,"vtkWSLinkClient"),TI={BinaryHelper:CD,DataAccessHelper:tD,vtkHttpDataSetReader:LD,vtkHttpSceneLoader:uI,vtkImageStream:yI,vtkResourceLoader:wI,vtkWSLinkClient:{newInstance:OI,extend:_I,setSmartConnectClass:function(e){xI=e}}},DI=Ae.vtkErrorMacro;function EI(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},i=void 0!==r.compression?r.compression:t.compression,o=void 0!==r.progressCallback?r.progressCallback:t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkSTLReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.join("/"),e.loadData(r)},e.loadData=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r(t.url,n);return i.then(e.parse),i},e.parse=function(t){"string"==typeof t?e.parseAsText(t):e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(r){if(r&&r!==t.parseData){e.modified(),t.parseData=r;if(84+50*new DataView(r,0,84).getUint32(80,!0)===r.byteLength){var i=r.slice(0,80),o=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,MI,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),kI(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var RI={extend:NI,newInstance:Ae.newInstance(NI,"vtkSTLReader")},FI="ascii",BI="binary_little_endian",LI={diffuse_red:"red",diffuse_green:"green",diffuse_blue:"blue"},VI={patternHeader:/ply([\s\S]*)end_header\r?\n/,patternBody:/end_header\s([\s\S]*)$/};function jI(e){var t="",n=0,r=VI.patternHeader.exec(e);null!==r&&(t=r[1],n=r[0].length);for(var i,o,a,s={comments:[],elements:[],headerLength:n},l=t.split("\n"),u=0;u0,d=e.uvs.length>0,p=e.normals.length>0,f=e.faceVertexUvs.length>0,h=0;h0&&(e.indices.push(r.length),r.forEach((function(t,n){e.indices.push(t)}))),e.faceVertexUvs.push(i)}}function HI(e,t,n,r){var i;switch(n){case"int8":case"char":i=[e.getInt8(t),1];break;case"uint8":case"uchar":i=[e.getUint8(t),1];break;case"int16":case"short":i=[e.getInt16(t,r),2];break;case"uint16":case"ushort":i=[e.getUint16(t,r),2];break;case"int32":case"int":i=[e.getInt32(t,r),4];break;case"uint32":case"uint":i=[e.getUint32(t,r),4];break;case"float32":case"float":i=[e.getFloat32(t,r),4];break;case"float64":case"double":i=[e.getFloat64(t,r),8];break;default:console.log("Unsupported type")}return i}function KI(e,t,n,r){for(var i,o={},a=0,s=0;s1&&void 0!==arguments[1]?arguments[1]:{},i=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkPLYReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.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]:{},i=n(t.url,r);return i.then(e.parse),i},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=jI(CD.arrayBufferToString(n));if(r.format!==FI){t.parseData=n;for(var i,o={indices:[],vertices:[],normals:[],uvs:[],faceVertexUvs:[],colors:[]},a=r.format===BI,s=n instanceof ArrayBuffer?n:n.buffer,l=new DataView(s,r.headerLength),u=0,c=0;c=i.elements[u].count&&(u++,c=0);var f=zI(i.elements[u].properties,p);WI(o,i.elements[u].name,f),c++}}var h=GI(o,i.elements);t.output[0]=h}}},e.requestData=function(n,r){e.parse(t.parseData)}}var qI={};function YI(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qI,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),XI(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var ZI={extend:YI,newInstance:Ae.newInstance(YI,"vtkPLYReader")},JI=Ae.vtkErrorMacro,QI={};function $I(e,t){var n=new QI.Decoder,r=n.GetAttribute(e,t),i=r.num_components(),o=e.num_points(),a=new QI.DracoFloat32Array;n.GetAttributeFloatForAllPoints(e,r,a);for(var s=o*i,l=new Float32Array(s);s--;)l[s]=a.GetValue(s);return l}function ek(e,t){function n(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.compression,o=t.progressCallback;return r.binary?t.dataAccessHelper.fetchBinary(n,{compression:i,progressCallback:o}):t.dataAccessHelper.fetchText(e,n,{compression:i,progressCallback:o})}t.classHierarchy.push("vtkDracoReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{binary:!0};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.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]:{},i=n(t.url,r);return i.then(e.parse),i},e.parse=function(t){e.parseAsArrayBuffer(t)},e.parseAsArrayBuffer=function(n){if(n&&n!==t.parseData){e.modified(),t.parseData=n;var r=function(e){var t,n=new Int8Array(e),r=new QI.Decoder,i=new QI.DecoderBuffer;if(i.Init(n,n.length),r.GetEncodedGeometryType(i)===QI.TRIANGULAR_MESH){t=new QI.Mesh;var o=r.DecodeBufferToMesh(i,t);o.ok()||JI("Could not decode Draco file: ".concat(o.error_msg()))}else JI("Wrong geometry type, expected mesh, got point cloud.");return QI.destroy(i),QI.destroy(r),t}(n),i=function(e){var t=new QI.Decoder,n=t.GetAttributeId(e,QI.POSITION);if(-1===n)return console.error("No position attribute found in the decoded model."),QI.destroy(t),QI.destroy(e),null;for(var r=$I(e,n),i=e.num_faces(),o=new Uint32Array(4*i),a=new QI.DracoInt32Array;i--;){t.GetFaceFromMesh(e,i,a);var s=4*i;o[s]=3,o[s+1]=a.GetValue(0),o[s+2]=a.GetValue(1),o[s+3]=a.GetValue(2)}var l=or.newInstance({values:o}),u=rc.newInstance({polys:l});u.getPoints().setData(r);var c=u.getPointData();if(-1!==t.GetAttributeId(e,QI.NORMAL)){var d=$I(e,QI.NORMAL),p=Jn.newInstance({numberOfComponents:3,values:d,name:"Normals"});c.setNormals(p)}var f=t.GetAttributeId(e,QI.TEX_COORD);if(-1!==f){var h=$I(e,f),m=Jn.newInstance({numberOfComponents:2,values:h,name:"TCoords"});c.setTCoords(m)}var g=t.GetAttributeId(e,QI.COLOR);if(-1!==g){var v=$I(e,g),y=Jn.newInstance({numberOfComponents:3,values:v,name:"Scalars"});c.setScalars(y)}return QI.destroy(t),u}(r);QI.destroy(r),t.output[0]=i}},e.requestData=function(){e.parse(t.parseData)}}var tk={};function nk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tk,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),ek(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var rk={extend:nk,newInstance:Ae.newInstance(nk,"vtkDracoReader"),setDracoDecoder:function(e){QI=e({})},setWasmBinary:function(e,t){var n={};return new Promise((function(r,i){n.wasmBinaryFile=t;var o=new XMLHttpRequest;o.open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){200===o.status?(n.wasmBinary=o.response,Promise.resolve(window.DracoDecoderModule(n)).then((function(e){QI=e,r(!0)}),i)):i(Error("WASM binary could not be loaded: ".concat(o.statusText)))},o.send(null)}))},getDracoDecoder:function(){return QI}},ik={ASCII:"ascii",BINARY:"binary"};function ok(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 ak=Ae.vtkErrorMacro;function sk(e,t,n){return e.setFloat32(t,n.toPrecision(6),!0),t+4}function lk(e,t,n){var r=sk(e,t,n[0]);return r=sk(e,r,n[1]),sk(e,r,n[2])}var uk=function(){var e=0,t=null;return{init:function(e){var n=e.getPolys().getData(),r=new ArrayBuffer(84+50*n.length/4);t=new DataView(r)},writeHeader:function(n){e+=80,t.setUint32(e,n.getNumberOfCells(),!0),e+=4},writeTriangle:function(n,r,i,o){e=lk(t,e,o),e=lk(t,e,n),e=lk(t,e,r),e=lk(t,e,i),e+=2},writeFooter:function(e){},getOutputData:function(){return t}}},ck=function(){var e="";return{init:function(e){},writeHeader:function(t){e+="solid ascii\n"},writeTriangle:function(t,n,r,i){e+=" facet normal ".concat(i[0].toPrecision(6)," ").concat(i[1].toPrecision(6)," ").concat(i[2].toPrecision(6),"\n"),e+=" outer loop\n",e+=" vertex ".concat(t[0].toPrecision(6)," ").concat(t[1].toPrecision(6)," ").concat(t[2].toPrecision(6),"\n"),e+=" vertex ".concat(n[0].toPrecision(6)," ").concat(n[1].toPrecision(6)," ").concat(n[2].toPrecision(6),"\n"),e+=" vertex ".concat(r[0].toPrecision(6)," ").concat(r[1].toPrecision(6)," ").concat(r[2].toPrecision(6),"\n"),e+=" endloop\n",e+=" endfacet\n"},writeFooter:function(t){e+="endsolid\n"},getOutputData:function(){return e}}};function dk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ik.BINARY,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=null;t===ik.BINARY?r=uk():t===ik.ASCII?r=ck():ak("Invalid format type"),r.init(e),r.writeHeader(e);var i=e.getPolys().getData(),o=e.getPoints().getData(),a=e.getStrips()?e.getStrips().getData():null,s=[],l=[],u=[],c=[];if(a&&a.length>0)throw new Error("Unsupported strips");for(var d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,hk,n),Ae.obj(e,t),Ae.algo(e,t,1,1),Ae.setGet(e,t,["format","transform"]),fk(e,t)}var gk=function(e){for(var t=1;t0?Number(a):1,l=t[t.activeFieldLocation]*s,u=new bk[o](l),c=Jn.newInstance({name:i,empty:!0});return t.dataset[yk[t.activeFieldLocation]]()[wk[r]](c),t.arrayHandler=xk(u,c.setData,s),!0},parse:function(e,t){return"LOOKUP_TABLE"===e.split(" ")[0]||t.arrayHandler(e)}},COLOR_SCALARS:{init:function(e,t){var n=y(e.split(" "),3),r=n[0],i=n[1],o=n[2],a=Number(o)>0?Number(o):1,s=t[t.activeFieldLocation]*a,l=new Uint8Array(s),u=Jn.newInstance({name:i,empty:!0});return t.dataset[yk[t.activeFieldLocation]]()[wk[r]](u),t.arrayHandler=xk(l,u.setData,a),!0},parse:function(e,t){return"LOOKUP_TABLE"===e.split(" ")[0]||t.arrayHandler(e)}},VECTORS:{init:function(e,t){var n=y(e.split(" "),3),r=n[0],i=n[1],o=n[2],a=3*t[t.activeFieldLocation],s=new bk[o](a),l=Jn.newInstance({name:i,empty:!0});return t.dataset[yk[t.activeFieldLocation]]()[wk[r]](l),t.arrayHandler=xk(s,l.setData,3),!0},parse:function(e,t){return t.arrayHandler(e)}},NORMALS:{init:function(e,t){var n=y(e.split(" "),2),r=n[0],i=n[1],o=3*t[t.activeFieldLocation],a=new Float32Array(o),s=Jn.newInstance({name:i,empty:!0});return t.dataset[yk[t.activeFieldLocation]]()[wk[r]](s),t.arrayHandler=xk(a,s.setData,3),!0},parse:function(e,t){return t.arrayHandler(e)}},TEXTURE_COORDINATES:{init:function(e,t){var n=y(e.split(" "),4),r=n[0],i=n[1],o=n[2],a=n[3],s=t[t.activeFieldLocation]*Number(o),l=new bk[a](s),u=Jn.newInstance({name:i,empty:!0});return t.dataset[yk[t.activeFieldLocation]]()[wk[r]](u),t.arrayHandler=xk(l,u.setData,3),!0},parse:function(e,t){return t.arrayHandler(e)}},TENSORS:{init:function(e,t){var n=y(e.split(" "),3),r=n[0],i=n[1],o=n[2],a=9*t[t.activeFieldLocation],s=new bk[o](a),l=Jn.newInstance({name:i,empty:!0});return t.dataset[yk[t.activeFieldLocation]]()[wk[r]](l),t.arrayHandler=xk(s,l.setData,9),!0},parse:function(e,t){return t.arrayHandler(e)}}};function Ak(e,t){var n=e.split(" ");return Ck[n[0]]}var Pk={parseLegacyASCII:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=/\r?\n/,i=r.exec(e),o=null!==i?i[0]:null;return e.split(o).forEach((function(e,r){if(!(r<2))if(n)n&&!n.parse(e,t)&&(n=null);else{if(!(n=Ak(e)))return;n=n.init(e,t)?n:null}})),t}};function _k(e,t){function n(n){var r=t.compression,i=t.progressCallback;return t.dataAccessHelper.fetchText(e,n,{compression:r,progressCallback:i})}t.classHierarchy.push("vtkPolyDataReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.join("/"),t.compression=r.compression,e.loadData({progressCallback:r.progressCallback})},e.loadData=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n(t.url,r);return i.then(e.parseAsText),i},e.parseAsText=function(n){n&&n!==t.parseData&&(e.modified(),t.parseData=n,t.output[0]=Pk.parseLegacyASCII(t.parseData).dataset)},e.requestData=function(n,r){e.parseAsText(t.parseData)}}var Ok={};function Tk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ok,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),_k(e,t),t.compression||(t.compression=null),t.progressCallback||(t.progressCallback=null)}var Dk=Ae.newInstance(Tk,"vtkPolyDataReader"),Ek={vtkLegacyAsciiParser:Pk,vtkPolyDataReader:{newInstance:Dk,extend:Tk}};function Ik(e,t){t.classHierarchy.push("vtkElevationReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.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=rc.newInstance();if(r.getPoints().setData(new Float32Array(0,0,0,1,1,1),3),t.elevation){var i=t.elevation.length,o=t.elevation[0].length,a=r.getPoints();a.setNumberOfPoints(o*i,3);var s=a.getData(),l=or.newInstance({size:5*(o-1)*(i-1)});r.setPolys(l);var u=l.getData(),c=0,d=new Float32Array(o*i*2),p=Jn.newInstance({numberOfComponents:2,values:d,name:"TextureCoordinates"});r.getPointData().setTCoords(p);for(var f=0;f0&&f>0&&(u[c++]=4,u[c++]=m,u[c++]=m-1,u[c++]=m-1-o,u[c++]=m-o)}}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var kk={origin:[0,0,0],xSpacing:1,ySpacing:1,zScaling:1,xDirection:1,yDirection:-1,requestCount:0};function Mk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kk,n),Ae.obj(e,t),Ae.get(e,t,["url"]),Ae.setGet(e,t,["dataAccessHelper","xSpacing","ySpacing","zScaling","xDirection","yDirection"]),Ae.algo(e,t,0,1),Ae.event(e,t,"busy"),Ik(e,t)}var Nk={newInstance:Ae.newInstance(Mk,"vtkElevationReader"),extend:Mk},Rk=Yl.convertItkToVtkImage,Fk=null,Bk=function(e){return e};function Lk(e,t){t.classHierarchy.push("vtkITKImageReader"),e.parseAsArrayBuffer=function(n){return n&&n!==t.rawDataBuffer?(t.rawDataBuffer=n,Fk(n,t.fileName).then(Bk).then((function(n){var r,i,o,a=Rk(n,{scalarArrayName:t.arrayName||(r=t.fileName,i=r.lastIndexOf("."),o=i>-1?r.substring(0,i):r,"Scalars ".concat(o))});t.output[0]=a,e.modified()}))):Promise.resolve()},e.requestData=function(n,r){e.parseAsArrayBuffer(t.rawDataBuffer,t.fileName)}}var Vk={fileName:"",arrayName:null};function jk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Vk,n),Ae.obj(e,t),Ae.algo(e,t,0,1),Ae.setGet(e,t,["fileName","arrayName"]),Lk(e,t),Fk||console.error("\n // Dependency needs to be added inside your project\n import readImageArrayBuffer from 'itk/readImageArrayBuffer';\n vtkITKImageReader.setReadImageArrayBufferFromITK(readImageArrayBuffer);\n ")}var Gk={newInstance:Ae.newInstance(jk,"vtkITKImageReader"),extend:jk,setReadImageArrayBufferFromITK:function(e){4===(Fk=e).length&&(Fk=function(){for(var t=arguments.length,n=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hk,n),Ae.obj(e,t),Ae.algo(e,t,0,1),Ae.setGet(e,t,["fileName","arrayName"]),Wk(e,t),Uk||console.error("\n // Dependency needs to be added inside your project\n import readPolyDataArrayBuffer from 'itk/readPolyDataArrayBuffer';\n vtkITKPolyDataReader.setReadPolyDataArrayBufferFromITK(readPolyDataArrayBuffer);\n ")}var Xk={newInstance:Ae.newInstance(Kk,"vtkITKPolyDataReader"),extend:Kk,setReadPolyDataArrayBufferFromITK:function(e){Uk=e,Uk=function(){for(var t=arguments.length,n=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yk,n),Ae.obj(e,t),Ae.get(e,t,["url"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),qk(e,t)}var Jk={newInstance:Ae.newInstance(Zk,"vtkJSONNucleoReader"),extend:Zk};function Qk(e,t){function n(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkJSONReader"),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.url=n,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&&(t.data=JSON.parse(n),e.modified(),!0)},e.requestData=function(e,n){n[0]=t.data},e.isBusy=function(){return!1},e.getNumberOfOutputPorts=function(){return t.numberOfOutputs}}var $k={};function eM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$k,n),Ae.obj(e,t),Ae.get(e,t,["url"]),Ae.algo(e,t,0,1),Ae.event(e,t,"busy"),Qk(e,t)}var tM={newInstance:Ae.newInstance(eM,"vtkJSONReader"),extend:eM};function nM(e,t){function n(){t.requestCount--,0===t.requestCount&&e.invokeBusy(!1)}function r(e){if("#"!==e[0]&&0!==e.length){var r=e.split(/[ \t]+/).map((function(e){return e.trim()})).filter((function(e){return e.length}));if("newmtl"===r[0])r.shift(),t.currentMaterial=r.join(" ").trim();else if(t.currentMaterial){if(r.length<2)return;if(t.materials[t.currentMaterial]||(t.materials[t.currentMaterial]={}),t.materials[t.currentMaterial][r[0]]=r.slice(1),"map_Kd"===r[0]){var i=new Image;i.onload=function(){return setTimeout(n,0)},i.src=[t.baseURL,r[1]].join("/"),t.materials[t.currentMaterial].image=i,t.requestCount++}}}}t.classHierarchy.push("vtkMTLReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(-1!==n.indexOf(".mtl")||r.fullpath){t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.join("/")}else t.baseURL=n,t.url="".concat(n,"/index.mtl");return e.loadData(r)},e.loadData=function(n){return new Promise((function(r,i){(function(n,r){return t.dataAccessHelper.fetchText(e,n,r)})(t.url,n).then((function(t){e.parseAsText(t),r()}),(function(e){i()}))}))},e.parseAsText=function(n){e.modified(),t.materials={},n.split("\n").forEach(r)},e.isBusy=function(){return!!t.requestCount},e.getMaterialNames=function(){return Object.keys(t.materials)},e.getMaterial=function(e){return t.materials[e]},e.listImages=function(){return Object.keys(t.materials).map((function(e){return t.materials[e].map_Kd})).filter((function(e){return!!e})).map((function(e){return e[0].trim()}))},e.setImageSrc=function(e,n){return new Promise((function(r,i){var o=Object.keys(t.materials).find((function(n){return t.materials[n].map_Kd&&t.materials[n].map_Kd[0].trim()===e.trim()})),a=t.materials[o];a&&a.image?(a.image.src=n,a.image.onload=function(){return setTimeout(r,0)}):r()}))},e.applyMaterialToActor=function(e,n){var r=t.materials[e];if(r&&n){var i=[1,1,1],o={ambientColor:r.Ka?r.Ka.map((function(e){return Number(e)})):i,specularColor:r.Ks?r.Ks.map((function(e){return Number(e)})):i,diffuseColor:r.Kd?r.Kd.map((function(e){return Number(e)})):i,opacity:r.d?Number(r.d):1,specularPower:r.Ns?Number(r.Ns):1},a=Number(r.illum||2);if(["ambient","diffuse","specular"].forEach((function(e,t){o[e]=t<=a?1:0})),r.image){var s=PE.newInstance({interpolate:t.interpolateTextures});s.setImage(r.image),n.addTexture(s)}n.getProperty().set(o)}}}var rM={numberOfOutputs:1,requestCount:0,materials:{},interpolateTextures:!0};function iM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rM,n),re(e,t),ie(e,t,["url","baseURL"]),le(e,t,["dataAccessHelper","interpolateTextures","splitGroup"]),he(e,t,"busy"),nM(e,t)}var oM={newInstance:me(iM,"vtkMTLReader"),extend:iM},aM={};function sM(e,t,n,r){for(var i=0;i0&&"\r"!==e})),i=r.length;n.push(i);for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchText(e,n,r)}t.classHierarchy.push("vtkOBJReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.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 i=n.split("/");i.pop(),t.baseURL=i.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,aM.splitOn=r,aM.pieces=[],aM.v=[],aM.vt=[],aM.vn=[],aM.f=[[]],aM.size=0,n.split("\n").forEach(uM),function(e){var t=!!aM.vt.length,n=!!aM.vn.length;if(e.splitMode){e.numberOfOutputs=aM.size;for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dM,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.setGet(e,t,["dataAccessHelper","splitMode"]),Ae.algo(e,t,0,1),Ae.event(e,t,"busy"),cM(e,t)}var fM={newInstance:Ae.newInstance(pM,"vtkOBJReader"),extend:pM},hM=JSON.parse('{"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 mM(e,t){t.classHierarchy.push("vtkPDBReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n,r){if(-1===n.indexOf(".pdb"))t.baseURL=n,t.url="".concat(n);else{t.url=n;var i=n.split("/");i.pop(),t.baseURL=i.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=wu.newInstance();if(t.molecule){var i=t.molecule.length,o=[],a=[];t.numberOfAtoms=0;for(var s=0;s=78&&(m=u.substr(76,2).replace(/\s+/g,"")),""===m&&(m=d.substr(0,2).replace(/\d/g,"")),o.push(p),o.push(f),o.push(h);var g=y(hM[m],1)[0];a.push(g),t.numberOfAtoms++}s++}r.getAtoms().elements={},r.getAtoms().elements.number=Int8Array.from(a),r.getAtoms().coords={},r.getAtoms().coords["3d"]=Float32Array.from(o)}t.output[0]=r},e.isBusy=function(){return!!t.requestCount}}var gM={numberOfAtoms:0,requestCount:0};function vM(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gM,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL","numberOfAtoms","requestCount"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),Ae.event(e,t,"busy"),mM(e,t)}var yM=Ae.newInstance(vM,"vtkPDBReader");function bM(e,t){function n(e){var n=t.compression,r=t.progressCallback;return t.dataAccessHelper.fetchBinary(e,{compression:n,progressCallback:r})}t.classHierarchy.push("vtkSkyboxReader"),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.url=n,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;t.textures={},t.busy=!0,e.invokeBusy(t.busy),t.dataMapping={};var r=0,i=!1,o=[];function a(){if(0===--r||i){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wM,n),Ae.obj(e,t),Ae.get(e,t,["url","positions","position"]),Ae.setGet(e,t,["faceMapping"]),Ae.event(e,t,"busy"),Ae.algo(e,t,0,6),bM(e,t)}var SM={vtkElevationReader:Nk,vtkITKImageReader:Gk,vtkITKPolyDataReader:Xk,vtkJSONNucleoReader:Jk,vtkJSONReader:tM,vtkMTLReader:oM,vtkOBJReader:fM,vtkPDBReader:{newInstance:yM,extend:vM},vtkSkyboxReader:{newInstance:Ae.newInstance(xM,"vtkSkyboxReader"),extend:xM}},CM=n(420);function AM(e,t){return w(e.getElementsByTagName(t))}function PM(e,t){return AM(e,t)[0]}var _M={Int8:Int8Array,UInt8:Uint8Array,Int16:Int16Array,UInt16:Uint16Array,Int32:Int32Array,UInt32:Uint32Array,Int64:Int32Array,UInt64:Uint32Array,Float32:Float32Array,Float64:Float64Array},OM={Int8:1,UInt8:1,Int16:2,UInt16:2,Int32:4,UInt32:4,Int64:8,UInt64:8,Float32:4,Float64:8};function TM(e){var t=e.length-1;return e.filter((function(e,n){return n1&&void 0!==arguments[1]?arguments[1]:{};return t.dataAccessHelper.fetchBinary(e,n)}t.classHierarchy.push("vtkXMLReader"),t.dataAccessHelper||(t.dataAccessHelper=tD.get("http")),e.setUrl=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.url=n;var i=n.split("/");return i.pop(),t.baseURL=i.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 CD.extractBinary(e,/^\s*\s*_/m,/\n\s*<\/AppendedData>/m)}(n),i=r.text,o=r.binaryBuffer;t.rawDataBuffer=n,t.binaryBuffer=o;var a,s=(a=i,(0,CM.create)(a)).root().node,l=s.getAttribute("type"),u=s.getAttribute("compressor"),c=s.getAttribute("byte_order"),d=s.getAttribute("header_type")||"UInt32";if(u&&"vtkZLibDataCompressor"!==u)return console.error("Invalid compressor",u),!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(PM(s,"AppendedData")){var p=PM(s,"AppendedData"),f=p.getAttribute("encoding"),m=AM(s,"DataArray"),g=t.binaryBuffer;"base64"===f&&(g=p.textContent.trim().substr(1));for(var v=[],y=0;y0?0===A[3]?new ArrayBuffer(A[2]*P):new ArrayBuffer(A[2]*(P-1)+A[3]):new ArrayBuffer(0);for(var T=new Uint8Array(O),D={offset:0,uint8:T},E=0;E2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MM,n),Ae.obj(e,t),Ae.get(e,t,["url","baseURL"]),Ae.setGet(e,t,["dataAccessHelper"]),Ae.algo(e,t,0,1),kM(e,t)},processDataArray:IM,processFieldData:function(e,t,n,r,i,o,a){if(t){var s={};["Scalars","Vectors","Normals","Tensors","TCoords"].forEach((function(e){var r=t.getAttribute(e);r&&(s[r]=n["set".concat(e)])}));for(var l=t.getElementsByTagName("DataArray"),u=l.length,c=0;c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,FM,n),NM.extend(e,t,n),RM(e,t)}var LM={newInstance:Ae.newInstance(BM,"vtkXMLImageDataReader"),extend:BM},VM={ASCII:"ascii",BINARY:"binary",APPENDED:"appended"},jM={Int8Array:"Int8",Uint8Array:"UInt8",Int16Array:"Int16",Uint16Array:"UInt16",Int32Array:"Int32",Uint32Array:"UInt32",Float32Array:"Float32",Float64Array:"Float64"};function GM(e){return JT.deflate(e)}function UM(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"vtkZLibDataCompressor";if(t===VM.ASCII)return e.getData().join(" ");if(t===VM.BINARY){if("vtkZLibDataCompressor"===r){var i=e.getElementComponentSize(),o=e.getNumberOfValues()*i,a=n,s=Math.trunc(o/a),l=o%a,u=s+(l?1:0),c=new Uint32Array(3+u);c[0]=u,c[1]=a,c[2]=l;for(var d=0,p=[],h=0,m=u-1,g=0;g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,WM,n),Ae.obj(e,t),Ae.setGet(e,t,["blockSize","format"]),Ae.get(e,t,["file"]),Ae.algo(e,t,1,0),zM(e,t)},compressBlock:GM,processDataArray:UM,FormatTypes:VM};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}function XM(e,t){t.classHierarchy.push("vtkXMLImageDataWriter");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qM,n),HM.extend(e,t,n),XM(e,t)}var ZM={newInstance:Ae.newInstance(YM,"vtkXMLImageDataWriter"),extend:YM};function JM(e,t){t.classHierarchy.push("vtkXMLPolyDataReader"),e.parseXML=function(e,n,r,i,o){for(var a=e.getElementsByTagName(t.dataType)[0].getElementsByTagName("Piece"),s=a.length,l=function(e){var n=rc.newInstance(),s=a[e],l=function(e,t,n,r,i,o,a){var s=Number(n.getAttribute("NumberOf".concat(t)));if(s>0){var l=n.getElementsByTagName(t)[0].getElementsByTagName("DataArray")[0],u=NM.processDataArray(s,l,r,i,o,a),c=u.values,d=u.numberOfComponents;e["get".concat(t)]().setData(c,d)}return s}(n,"Points",s,r,i,o,t.binaryBuffer),u=0;["Verts","Lines","Strips","Polys"].forEach((function(e){u+=function(e,t,n,r,i,o,a){var s=Number(n.getAttribute("NumberOf".concat(t)));if(s>0){var l=NM.processCells(s,n.getElementsByTagName(t)[0],r,i,o,a);e["get".concat(t)]().setData(l)}return s}(n,e,s,r,i,o,t.binaryBuffer)})),NM.processFieldData(l,s.getElementsByTagName("PointData")[0],n.getPointData(),r,i,o,t.binaryBuffer),NM.processFieldData(u,s.getElementsByTagName("CellData")[0],n.getCellData(),r,i,o,t.binaryBuffer),t.output[e]=n},u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QM,n),NM.extend(e,t,n),JM(e,t)}var eN=Ae.newInstance($M,"vtkXMLPolyDataReader");function tN(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 nN(e,t){t.classHierarchy.push("vtkXMLPolyDataWriter");var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rN,n),HM.extend(e,t,n),nN(e,t)}var oN={Core:TI,Geometry:vk,Legacy:Ek,Misc:SM,XML:{vtkXMLImageDataReader:LM,vtkXMLImageDataWriter:ZM,vtkXMLPolyDataReader:{newInstance:eN,extend:$M},vtkXMLPolyDataWriter:{newInstance:Ae.newInstance(iN,"vtkXMLPolyDataWriter"),extend:iN},vtkXMLReader:NM,vtkXMLWriter:HM}},aN=JSON.parse('[{"Name":"KAAMS","IndexedColors":[1,1,1,1,0,0,0,1,0,0,0,1,1,1,0,1,0,1,0,1,1,0.63,0.63,1,0.67,0.5,0.33,1,0.5,0.75,0.53,0.35,0.7,1,0.75,0.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,0.23137254902,0.298039215686,0.752941176471,0.5,0.865,0.865,0.865,1,0.705882352941,0.0156862745098,0.149019607843]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Cool to Warm (Extended)","NanColor":[0.25,0,0],"RGBPoints":[0,0,0,0.34902,0.03125,0.039216,0.062745,0.380392,0.0625,0.062745,0.117647,0.411765,0.09375,0.090196,0.184314,0.45098,0.125,0.12549,0.262745,0.501961,0.15625,0.160784,0.337255,0.541176,0.1875,0.2,0.396078,0.568627,0.21875,0.239216,0.454902,0.6,0.25,0.286275,0.521569,0.65098,0.28125,0.337255,0.592157,0.701961,0.3125,0.388235,0.654902,0.74902,0.34375,0.466667,0.737255,0.819608,0.375,0.572549,0.819608,0.878431,0.40625,0.654902,0.866667,0.909804,0.4375,0.752941,0.917647,0.941176,0.46875,0.823529,0.956863,0.968627,0.5,0.988235,0.960784,0.901961,0.5,0.941176,0.984314,0.988235,0.52,0.988235,0.945098,0.85098,0.54,0.980392,0.898039,0.784314,0.5625,0.968627,0.835294,0.698039,0.59375,0.94902,0.733333,0.588235,0.625,0.929412,0.65098,0.509804,0.65625,0.909804,0.564706,0.435294,0.6875,0.878431,0.458824,0.352941,0.71875,0.839216,0.388235,0.286275,0.75,0.760784,0.294118,0.211765,0.78125,0.701961,0.211765,0.168627,0.8125,0.65098,0.156863,0.129412,0.84375,0.6,0.094118,0.094118,0.875,0.54902,0.066667,0.098039,0.90625,0.501961,0.05098,0.12549,0.9375,0.45098,0.054902,0.172549,0.96875,0.4,0.054902,0.192157,1,0.34902,0.070588,0.211765]},{"ColorSpace":"Diverging","Name":"Warm to Cool","NanColor":[1,1,0],"RGBPoints":[0,0.705882352941,0.0156862745098,0.149019607843,0.5,0.865,0.865,0.865,1,0.23137254902,0.298039215686,0.752941176471]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Warm to Cool (Extended)","NanColor":[0.250004,0,0],"RGBPoints":[0,0.34902,0,0.129412,0.025,0.4,0.00392157,0.101961,0.05,0.470588,0.0156863,0.0901961,0.075,0.54902,0.027451,0.0705882,0.1,0.619608,0.0627451,0.0431373,0.125,0.690196,0.12549,0.0627451,0.15,0.741176,0.184314,0.0745098,0.175,0.788235,0.266667,0.0941176,0.2,0.811765,0.345098,0.113725,0.225,0.831373,0.411765,0.133333,0.25,0.85098,0.47451,0.145098,0.275,0.870588,0.54902,0.156863,0.3,0.878431,0.619608,0.168627,0.325,0.890196,0.658824,0.196078,0.35,0.909804,0.717647,0.235294,0.375,0.929412,0.776471,0.278431,0.395522,0.94902,0.823529,0.321569,0.418905,0.968627,0.87451,0.407843,0.444278,0.980392,0.917647,0.509804,0.470149,0.988235,0.956863,0.643137,0.483582,0.992157,0.964706,0.713725,0.499,0.988235,0.980392,0.870588,0.5,1,1,1,0.501,0.913725,0.988235,0.937255,0.516418,0.827451,0.980392,0.886275,0.531343,0.764706,0.980392,0.866667,0.546766,0.658824,0.980392,0.843137,0.564179,0.572549,0.964706,0.835294,0.587562,0.423529,0.941176,0.87451,0.60597,0.262745,0.901961,0.862745,0.629851,0.0705882,0.854902,0.870588,0.651741,0.0509804,0.8,0.85098,0.681592,0.0235294,0.709804,0.831373,0.712935,0.0313725,0.615686,0.811765,0.75,0.0313725,0.537255,0.788235,0.775,0.0392157,0.466667,0.768627,0.8,0.0509804,0.396078,0.741176,0.825,0.054902,0.317647,0.709804,0.85,0.054902,0.243137,0.678431,0.875,0.0431373,0.164706,0.639216,0.9,0.0313725,0.0980392,0.6,0.925,0.0392157,0.0392157,0.560784,0.95,0.105882,0.0509804,0.509804,0.975,0.113725,0.0235294,0.45098,1,0.12549,0,0.380392]},{"ColorSpace":"RGB","Name":"Rainbow Desaturated","NanColor":[1,1,0],"RGBPoints":[0,0.278431372549,0.278431372549,0.858823529412,0.143,0,0,0.360784313725,0.285,0,1,1,0.429,0,0.501960784314,0,0.571,1,1,0,0.714,1,0.380392156863,0,0.857,0.419607843137,0,0,1,0.878431372549,0.301960784314,0.301960784314]},{"ColorSpace":"RGB","Name":"Cold and Hot","NanColor":[1,1,0],"RGBPoints":[0,0,1,1,0.45,0,0,1,0.5,0,0,0.501960784314,0.55,1,0,0,1,1,1,0]},{"ColorSpace":"RGB","Name":"Black-Body Radiation","NanColor":[0,0.498039215686,1],"RGBPoints":[0,0,0,0,0.4,0.901960784314,0,0,0.8,0.901960784314,0.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,0.333,0,0,0.501960784314,0.666,0,0.501960784314,1,1,1,1,1]},{"ColorSpace":"RGB","Name":"Black, Orange and White","NanColor":[1,1,0],"RGBPoints":[0,0,0,0,0.333,0.501960784314,0,0,0.666,1,0.501960784314,0,1,1,1,1]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Linear YGB 1211g","NanColor":[0.25,0,0],"RGBPoints":[0,1,0.988235,0.968627,0.02,1,0.952941,0.878431,0.05,0.968627,0.905882,0.776471,0.1,0.94902,0.898039,0.647059,0.15,0.901961,0.878431,0.556863,0.2,0.847059,0.858824,0.482353,0.25,0.690196,0.819608,0.435294,0.3,0.513725,0.768627,0.384314,0.35,0.337255,0.721569,0.337255,0.4,0.278431,0.658824,0.392157,0.45,0.231373,0.639216,0.435294,0.5,0.203922,0.6,0.486275,0.55,0.172549,0.568627,0.537255,0.6,0.141176,0.517647,0.54902,0.65,0.133333,0.458824,0.541176,0.7,0.12549,0.396078,0.529412,0.75,0.117647,0.321569,0.521569,0.8,0.121569,0.258824,0.509804,0.85,0.133333,0.227451,0.501961,0.9,0.145098,0.192157,0.490196,0.95,0.188235,0.164706,0.470588,1,0.258824,0.196078,0.439216]},{"ColorSpace":"CIELAB","Creator":"Francesca Samsel","Name":"Linear Green (Gr4L)","NanColor":[0.25,0,0],"RGBPoints":[0,0.054902,0.109804,0.121569,0.05,0.07451,0.172549,0.180392,0.1,0.086275,0.231373,0.219608,0.15,0.094118,0.278431,0.25098,0.2,0.109804,0.34902,0.278431,0.25,0.113725,0.4,0.278431,0.3,0.117647,0.45098,0.270588,0.35,0.117647,0.490196,0.243137,0.4,0.113725,0.521569,0.203922,0.45,0.109804,0.54902,0.152941,0.5,0.082353,0.588235,0.082353,0.55,0.109804,0.631373,0.05098,0.6,0.211765,0.678431,0.082353,0.65,0.317647,0.721569,0.113725,0.7,0.431373,0.760784,0.160784,0.75,0.556863,0.8,0.239216,0.8,0.666667,0.839216,0.294118,0.85,0.784314,0.878431,0.396078,0.9,0.886275,0.921569,0.533333,0.95,0.960784,0.94902,0.670588,1,1,0.984314,0.901961]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Linear Blue (8_31f)","NanColor":[0.25,0,0],"RGBPoints":[0,0.960784,1,0.980392,0.05,0.815686,0.960784,0.913725,0.1,0.670588,0.929412,0.870588,0.15,0.556863,0.901961,0.843137,0.2,0.478431,0.870588,0.823529,0.25,0.439216,0.831373,0.803922,0.3,0.4,0.8,0.788235,0.35,0.376471,0.768627,0.768627,0.4,0.34902,0.709804,0.729412,0.45,0.32549,0.654902,0.690196,0.5,0.301961,0.607843,0.658824,0.55,0.247059,0.545098,0.619608,0.6,0.239216,0.494118,0.580392,0.65,0.227451,0.439216,0.541176,0.7,0.227451,0.403922,0.521569,0.75,0.231373,0.368627,0.501961,0.8,0.227451,0.321569,0.470588,0.85,0.219608,0.282353,0.439216,0.9,0.192157,0.235294,0.4,0.95,0.160784,0.184314,0.34902,1,0.133333,0.12549,0.301961]},{"ColorSpace":"HSV","Name":"Blue to Red Rainbow","NanColor":[0.498039215686,0.498039215686,0.498039215686],"RGBPoints":[0,0,0,1,1,1,0,0]},{"ColorSpace":"HSV","Name":"Red to Blue Rainbow","NanColor":[0.498039215686,0.498039215686,0.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,0.17,0,0,1,0.34,0,1,1,0.5,0,1,0,0.67,1,1,0,0.84,1,0,0,1,0.878431372549,0,1]},{"ColorSpace":"RGB","Name":"Rainbow Blended Grey","NanColor":[1,1,0],"RGBPoints":[0,0.317647058824,0.341176470588,0.43137254902,0.17,0,0,1,0.34,0,1,1,0.5,0,1,0,0.67,1,1,0,0.84,1,0,0,1,0.878431372549,0,1]},{"ColorSpace":"RGB","Name":"Rainbow Blended Black","NanColor":[1,1,0],"RGBPoints":[0,0,0,0,0.17,0,0,1,0.34,0,1,1,0.5,0,1,0,0.67,1,1,0,0.84,1,0,0,1,0.878431372549,0,1]},{"ColorSpace":"RGB","Name":"Blue to Yellow","NanColor":[1,0,0],"RGBPoints":[0,0.0392156862745,0.0392156862745,0.949019607843,1,0.949019607843,0.949019607843,0.0392156862745]},{"ColorSpace":"HSV","Name":"blot","RGBPoints":[0,0,0,1,0.166,0,0,1,0.167,1,0,1,0.332,1,0,1,0.333,0,1,1,0.5,0,1,1,0.501,0,1,0,0.666,0,1,0,0.667,1,1,0,0.832,1,1,0,0.833,1,0,0,1,1,0,0]},{"ColorSpace":"Lab","Name":"CIELab Blue to Red","NanColor":[1,1,0],"RGBPoints":[0,0,0.6,0.749019607843,1,0.76862745098,0.466666666667,0.341176470588]},{"ColorSpace":"RGB","Name":"jet","RGBPoints":[-1,0,0,0.5625,-0.777778,0,0,1,-0.269841,0,1,1,-0.015873,0.5,1,0.5,0.238095,1,1,0,0.746032,1,0,0,1,0.5,0,0]},{"ColorSpace":"RGB","Name":"rainbow","RGBPoints":[-1,0,0,1,-0.5,0,1,1,0,0,1,0,0.5,1,1,0,1,1,0,0]},{"ColorSpace":"Lab","Name":"erdc_rainbow_bright","RGBPoints":[-1,0.32549,0.14902,0.960784,-0.866221,0.297047,0.375586,0.963836,-0.732441,0.180302,0.536818,0.964627,-0.598662,0.1302,0.649207,0.929647,-0.464883,0.0445143,0.749654,0.855998,-0.331104,0.0271325,0.830713,0.721527,-0.197324,0.259504,0.866145,0.543555,-0.0635452,0.428364,0.890725,0.329819,0.0702341,0.568503,0.898508,0.187623,0.204013,0.738259,0.890317,0.0825461,0.337793,0.84546,0.86136,0.0147555,0.471572,0.912191,0.808018,0,0.605351,0.962848,0.710445,0,0.73913,0.999469,0.600258,0.0176284,0.87291,0.994156,0.445975,0.193912,1,0.980407,0.247105,0.262699]},{"ColorSpace":"Lab","Name":"erdc_rainbow_dark","RGBPoints":[-1,0,0,0.423499,-0.866221,0,0.119346,0.529237,-0.732441,0,0.238691,0.634976,-0.598662,0,0.346852,0.68788,-0.464883,0,0.45022,0.718141,-0.331104,0,0.553554,0.664839,-0.197324,0,0.651082,0.519303,-0.0635452,0.115841,0.72479,0.352857,0.0702341,0.326771,0.781195,0.140187,0.204013,0.522765,0.798524,0.0284624,0.337793,0.703162,0.788685,0.00885756,0.471572,0.845118,0.751133,0,0.605351,0.955734,0.690825,0,0.73913,0.995402,0.567916,0.0618524,0.87291,0.987712,0.403398,0.164851,1,0.980407,0.247105,0.262699]},{"ColorSpace":"Lab","Name":"nic_CubicL","RGBPoints":[-1,0.479965,0.0118108,0.5307,-0.87451,0.522213,0.0551282,0.706919,-0.74902,0.50839,0.237278,0.867764,-0.623529,0.451617,0.373834,0.987255,-0.498039,0.39365,0.497255,0.97506,-0.372549,0.328631,0.599639,0.891843,-0.247059,0.250043,0.690286,0.778553,-0.121569,0.249656,0.764905,0.645857,0.00392157,0.297954,0.821466,0.50449,0.129412,0.337509,0.872595,0.358447,0.254902,0.430011,0.913789,0.297079,0.380392,0.587191,0.931381,0.333353,0.505882,0.727937,0.93591,0.353742,0.631373,0.826403,0.921081,0.365066,0.756863,0.893201,0.846317,0.372662,0.882353,0.965347,0.73884,0.378506,1,0.983235,0.597451,0.366856]},{"ColorSpace":"Lab","Name":"nic_CubicYF","RGBPoints":[-1,0.5151,0.0482,0.6697,-0.87451,0.520711,0.168955,0.800574,-0.74902,0.493694,0.278596,0.911824,-0.623529,0.440026,0.369475,0.984978,-0.498039,0.398932,0.457593,0.987053,-0.372549,0.350651,0.540644,0.929608,-0.247059,0.298827,0.615625,0.857729,-0.121569,0.239928,0.685061,0.769531,0.00392157,0.228832,0.739349,0.673287,0.129412,0.263297,0.78608,0.569988,0.254902,0.298107,0.828337,0.460214,0.380392,0.33092,0.864071,0.352674,0.505882,0.38306,0.898169,0.287309,0.631373,0.49023,0.917481,0.307961,0.756863,0.62372,0.926026,0.332309,0.882353,0.717458,0.92527,0.342476,1,0.8,0.9255,0.3529]},{"ColorSpace":"Lab","Name":"gist_earth","RGBPoints":[-1,0,0,0,-0.87451,0.239216,0.027451,0.415686,-0.74902,0.0901961,0.254902,0.556863,-0.623529,0.0941176,0.352941,0.54902,-0.498039,0.105882,0.435294,0.533333,-0.372549,0.12549,0.52549,0.501961,-0.247059,0.156863,0.596078,0.443137,-0.121569,0.196078,0.65098,0.380392,0.00392157,0.282353,0.717647,0.301961,0.129412,0.466667,0.772549,0.27451,0.254902,0.678431,0.784314,0.309804,0.380392,0.901961,0.756863,0.376471,0.505882,0.992157,0.705882,0.521569,0.631373,1,0.721569,0.701961,0.756863,1,0.784314,0.784314,0.882353,1,0.866667,0.866667,1,1,1,1]},{"ColorSpace":"Lab","Name":"2hot","RGBPoints":[-1,0.0416667,0,0,-0.873016,0.208333,0,0,-0.746032,0.375,0,0,-0.619048,0.541667,0,0,-0.492063,0.708333,0,0,-0.365079,0.854137,0,0,-0.238095,0.937488,0.039062,0,-0.111111,1,0.208333,0,0.015873,1,0.375,0,0.142857,1,0.541667,0,0.269841,1,0.708333,0,0.396825,1,0.858805,0.03125,0.52381,1,0.947392,0.15625,0.650794,1,1,0.3125,0.777778,1,1,0.5625,0.904762,1,1,0.8125,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_red2yellow_BW","RGBPoints":[-1,7.54296e-7,0,0.0000109827,-0.87451,0.18285,0.0264094,0,-0.74902,0.3066,0,0,-0.623529,0.422841,0,0,-0.498039,0.522945,0,0,-0.372549,0.605721,0,0,-0.247059,0.672502,0.14168,0,-0.121569,0.728167,0.244025,0,0.00392157,0.781215,0.333454,0,0.129412,0.825,0.423586,0,0.254902,0.855893,0.516793,0,0.380392,0.880491,0.608846,0,0.505882,0.910305,0.695505,0,0.631373,0.94109,0.779067,0.223528,0.756863,0.967873,0.858572,0.473521,0.882353,0.986815,0.933211,0.751583,1,1,1,0.999997]},{"ColorSpace":"Lab","Name":"erdc_marine2gold_BW","RGBPoints":[-1,1.11641e-7,0,0.00000162551,-0.87451,0.0413146,0.0619808,0.209857,-0.74902,0.0185557,0.101341,0.350684,-0.623529,0.00486405,0.149847,0.461054,-0.498039,0.0836345,0.210845,0.517906,-0.372549,0.173222,0.276134,0.541793,-0.247059,0.259857,0.343877,0.535869,-0.121569,0.362299,0.408124,0.504293,0.00392157,0.468266,0.468276,0.468257,0.129412,0.582781,0.527545,0.374914,0.254902,0.691591,0.585251,0.274266,0.380392,0.784454,0.645091,0.247332,0.505882,0.862299,0.710383,0.27518,0.631373,0.920863,0.782923,0.351563,0.756863,0.955792,0.859699,0.533541,0.882353,0.976162,0.93433,0.780671,1,1,1,0.999983]},{"ColorSpace":"Lab","Name":"erdc_blue2gold_BW","RGBPoints":[-1,0,0,0,-0.87451,0.0742735,0.0440331,0.230013,-0.74902,0.125276,0.0258685,0.415826,-0.623529,0.143879,0.0163031,0.591346,-0.498039,0.212261,0.0627855,0.705239,-0.372549,0.306048,0.141178,0.763636,-0.247059,0.391537,0.232286,0.773263,-0.121569,0.461734,0.336633,0.708321,0.00392157,0.54209,0.427581,0.590007,0.129412,0.61704,0.508623,0.460978,0.254902,0.702703,0.579586,0.309117,0.380392,0.790336,0.644811,0.170397,0.505882,0.870173,0.710733,0.117134,0.631373,0.93656,0.781991,0.157144,0.756863,0.965672,0.862068,0.409836,0.882353,0.985751,0.936296,0.714162,1,1,1,0.999999]},{"ColorSpace":"Lab","Name":"erdc_sapphire2gold_BW","RGBPoints":[-1,0.107704,0.107708,0.107694,-0.87451,0.1851,0.112354,0.308554,-0.74902,0.236782,0.114233,0.48788,-0.623529,0.28296,0.126187,0.639464,-0.498039,0.344787,0.171643,0.739713,-0.372549,0.413325,0.242371,0.76913,-0.247059,0.481863,0.3131,0.719841,-0.121569,0.550402,0.383829,0.612222,0.00392157,0.61894,0.454558,0.51126,0.129412,0.687478,0.525287,0.39993,0.254902,0.756017,0.596016,0.289923,0.380392,0.824555,0.666745,0.255498,0.505882,0.892979,0.736822,0.27696,0.631373,0.938851,0.804966,0.351734,0.756863,0.966491,0.874853,0.53572,0.882353,0.982105,0.94153,0.782579,1,1,1,0.999986]},{"ColorSpace":"Lab","Name":"erdc_red2purple_BW","RGBPoints":[-1,0,0,0,-0.87451,0.167793,0.0166271,0.0431278,-0.74902,0.262608,0.0107595,0.0791181,-0.623529,0.351902,0.0101858,0.100926,-0.498039,0.441257,0.0160835,0.131919,-0.372549,0.5221,0.0555972,0.195625,-0.247059,0.593852,0.104294,0.310234,-0.121569,0.654628,0.158115,0.448486,0.00392157,0.707443,0.220914,0.570253,0.129412,0.749504,0.293268,0.67897,0.254902,0.781587,0.370517,0.779269,0.380392,0.809951,0.451099,0.855831,0.505882,0.84424,0.531462,0.900451,0.631373,0.865174,0.620901,0.91606,0.756863,0.875041,0.714054,0.910284,0.882353,0.880764,0.80554,0.896276,1,0.887572,0.887591,0.887556]},{"ColorSpace":"Lab","Name":"erdc_purple2pink_BW","RGBPoints":[-1,0,0,0,-0.87451,0.117562,0.0291202,0.175876,-0.74902,0.178368,0.0458476,0.285454,-0.623529,0.237731,0.0680173,0.387717,-0.498039,0.300877,0.0956291,0.484802,-0.372549,0.370929,0.136858,0.554985,-0.247059,0.449033,0.189273,0.58863,-0.121569,0.529971,0.245796,0.598587,0.00392157,0.609914,0.300643,0.610244,0.129412,0.697079,0.351286,0.616371,0.254902,0.785858,0.401991,0.617376,0.380392,0.862517,0.45745,0.64463,0.505882,0.91359,0.525462,0.705336,0.631373,0.932583,0.61064,0.767412,0.756863,0.922478,0.706966,0.817522,0.882353,0.901302,0.803071,0.856311,1,0.887571,0.887591,0.887549]},{"ColorSpace":"Lab","Name":"erdc_pbj_lin","RGBPoints":[-1,0,0,0,-0.87451,0.091821,0.0611476,0.10617,-0.74902,0.160311,0.0900022,0.192713,-0.623529,0.22484,0.12126,0.272128,-0.498039,0.291263,0.157469,0.340828,-0.372549,0.360015,0.200388,0.388903,-0.247059,0.437497,0.250058,0.387201,-0.121569,0.512636,0.304969,0.355955,0.00392157,0.582603,0.360874,0.33488,0.129412,0.655126,0.416374,0.306351,0.254902,0.725889,0.473329,0.279051,0.380392,0.778125,0.537928,0.302697,0.505882,0.815894,0.606931,0.382431,0.631373,0.839159,0.679308,0.497608,0.756863,0.854748,0.751666,0.631792,0.882353,0.869483,0.822508,0.768592,1,0.887572,0.887589,0.887565]},{"ColorSpace":"Lab","Name":"erdc_blue2green_muted","RGBPoints":[-1,0.107704,0.107708,0.107695,-0.87451,0.141522,0.13066,0.270741,-0.74902,0.180123,0.146119,0.42308,-0.623529,0.210161,0.169674,0.551795,-0.498039,0.239701,0.212939,0.634969,-0.372549,0.253916,0.282947,0.653641,-0.247059,0.242791,0.366933,0.608521,-0.121569,0.226302,0.446776,0.52693,0.00392157,0.236237,0.514689,0.458798,0.129412,0.274641,0.577589,0.376069,0.254902,0.349625,0.633993,0.288131,0.380392,0.4437,0.683677,0.260497,0.505882,0.536247,0.731214,0.285424,0.631373,0.628472,0.777128,0.349151,0.756863,0.718259,0.819287,0.496825,0.882353,0.804768,0.856164,0.703299,1,0.887571,0.887591,0.887548]},{"ColorSpace":"Lab","Name":"erdc_blue2green_BW","RGBPoints":[-1,3.63578e-7,0,0.00000529374,-0.87451,0.0539915,0.0577948,0.212806,-0.74902,0.0620393,0.0758942,0.388959,-0.623529,0.0697499,0.102032,0.54177,-0.498039,0.113295,0.156156,0.64334,-0.372549,0.152047,0.243196,0.670283,-0.247059,0.158096,0.344084,0.622864,-0.121569,0.151142,0.43922,0.532767,0.00392157,0.17155,0.521588,0.457719,0.129412,0.225861,0.599141,0.363997,0.254902,0.32328,0.67007,0.259083,0.380392,0.442344,0.733697,0.223754,0.505882,0.558409,0.794941,0.257411,0.631373,0.673875,0.854344,0.340822,0.756863,0.787244,0.909326,0.524717,0.882353,0.896483,0.958063,0.775914,1,1,1,0.999982]},{"ColorSpace":"Lab","Name":"GREEN-WHITE_LINEAR","RGBPoints":[-1,0,0,0,-0.87451,0,0.062745,0,-0.74902,0,0.12549,0,-0.623529,0,0.188235,0,-0.498039,0,0.25098,0,-0.372549,0,0.313725,0,-0.247059,0,0.376471,0,-0.121569,0.094118,0.439216,0,0.00392157,0.196078,0.501961,0,0.129412,0.294118,0.564706,0,0.254902,0.396078,0.627451,0,0.380392,0.498039,0.690196,0,0.505882,0.6,0.752941,0.145098,0.631373,0.701961,0.815686,0.364706,0.756863,0.8,0.878431,0.580392,0.882353,0.901961,0.941176,0.796078,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_green2yellow_BW","RGBPoints":[-1,0,0,0,-0.87451,0,0.105542,0.0603919,-0.74902,0,0.159454,0.104148,-0.623529,0,0.219502,0.15542,-0.498039,0,0.282276,0.203811,-0.372549,0,0.346331,0.235652,-0.247059,0,0.411765,0.235428,-0.121569,0,0.477177,0.217977,0.00392157,0.0593644,0.541635,0.21361,0.129412,0.233081,0.604722,0.210591,0.254902,0.369803,0.664942,0.226536,0.380392,0.498446,0.722367,0.288237,0.505882,0.601929,0.782244,0.380815,0.631373,0.703207,0.840497,0.512134,0.756863,0.803186,0.896433,0.674462,0.882353,0.903834,0.950266,0.846715,1,1,1,0.999981]},{"ColorSpace":"Lab","Name":"blue2cyan","RGBPoints":[-1,0,0,0,-0.87451,0,0.152941,0.364706,-0.74902,0,0.254902,0.470588,-0.623529,0,0.34902,0.572549,-0.498039,0,0.443137,0.670588,-0.372549,0,0.537255,0.772549,-0.247059,0,0.627451,0.870588,-0.121569,0,0.717647,0.964706,0.00392157,0.0784314,0.772549,1,0.129412,0.207843,0.858824,1,0.254902,0.32549,0.941176,1,0.380392,0.45098,1,1,0.505882,0.560784,1,1,0.631373,0.662745,1,1,0.756863,0.760784,1,1,0.882353,0.870588,1,1,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_blue2cyan_BW","RGBPoints":[-1,4.05298e-7,0,0.0000059012,-0.87451,0.0207526,0.0740933,0.18093,-0.74902,0,0.121033,0.30343,-0.623529,0,0.166892,0.416095,-0.498039,0,0.216768,0.524796,-0.372549,0.0164769,0.275471,0.608585,-0.247059,0.0544527,0.344824,0.659267,-0.121569,0.0880643,0.419118,0.688675,0.00392157,0.127938,0.492556,0.720256,0.129412,0.149476,0.566946,0.756918,0.254902,0.188961,0.641333,0.792122,0.380392,0.245482,0.715336,0.827609,0.505882,0.329216,0.786235,0.874761,0.631373,0.453558,0.852803,0.918466,0.756863,0.626281,0.910493,0.954,0.882353,0.82257,0.958709,0.980146,1,1,1,0.999989]},{"ColorSpace":"Lab","Name":"erdc_blue_BW","RGBPoints":[-1,0,0,0,-0.87451,0.0425591,0.0763529,0.150682,-0.74902,0.0569472,0.119154,0.275403,-0.623529,0.0635978,0.164772,0.395427,-0.498039,0.0774342,0.213851,0.510014,-0.372549,0.106815,0.267034,0.615102,-0.247059,0.122093,0.324649,0.720068,-0.121569,0.160851,0.387068,0.806956,0.00392157,0.213754,0.453516,0.878012,0.129412,0.26722,0.524656,0.932436,0.254902,0.326844,0.599279,0.968038,0.380392,0.403403,0.674712,0.984784,0.505882,0.499703,0.745519,1,0.631373,0.615055,0.813983,1,0.756863,0.74405,0.879228,1,0.882353,0.877909,0.941913,1,1,1,1,0.999996]},{"ColorSpace":"Lab","Name":"BLUE-WHITE","RGBPoints":[-1,0,0,0,-0.87451,0,0,0.082353,-0.74902,0,0,0.168627,-0.623529,0,0,0.254902,-0.498039,0,0,0.337255,-0.372549,0,0,0.423529,-0.247059,0,0,0.509804,-0.121569,0,0.101961,0.592157,0.00392157,0,0.203922,0.678431,0.129412,0,0.301961,0.764706,0.254902,0,0.403922,0.85098,0.380392,0,0.505882,0.933333,0.505882,0,0.603922,1,0.631373,0.254902,0.705882,1,0.756863,0.509804,0.807843,1,0.882353,0.764706,0.905882,1,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_purple_BW","RGBPoints":[-1,4.264e-8,0,6.20844e-7,-0.87451,0.100579,0.0593111,0.145666,-0.74902,0.167794,0.0889224,0.254953,-0.623529,0.231446,0.123339,0.360511,-0.498039,0.296699,0.163027,0.461278,-0.372549,0.363211,0.209286,0.55306,-0.247059,0.431136,0.260776,0.637195,-0.121569,0.498202,0.320012,0.705799,0.00392157,0.567456,0.380459,0.778091,0.129412,0.629381,0.445284,0.8448,0.254902,0.688373,0.517374,0.895694,0.380392,0.74891,0.590906,0.93976,0.505882,0.805017,0.667956,0.977626,0.631373,0.850914,0.752618,0.992396,0.756863,0.89724,0.838454,0.994093,0.882353,0.948461,0.922603,0.994449,1,1,1,0.999967]},{"ColorSpace":"Lab","Name":"erdc_magenta_BW","RGBPoints":[-1,0,0,0.0000254023,-0.87451,0.128696,0.0456782,0.11635,-0.74902,0.228133,0.0476299,0.201452,-0.623529,0.327273,0.0374065,0.282107,-0.498039,0.420953,0.0408166,0.35709,-0.372549,0.511562,0.0642203,0.430511,-0.247059,0.599552,0.102686,0.504257,-0.121569,0.684646,0.150536,0.579429,0.00392157,0.765817,0.205978,0.656062,0.129412,0.839176,0.27229,0.731807,0.254902,0.89536,0.357594,0.797309,0.380392,0.930238,0.457825,0.846984,0.505882,0.945921,0.564536,0.880571,0.631373,0.948995,0.670753,0.902279,0.756863,0.947124,0.772819,0.918171,0.882353,0.947265,0.869424,0.934352,1,0.954719,0.95475,0.954726]},{"ColorSpace":"Lab","Name":"magenta","RGBPoints":[-1,0,0,0,-0.87451,0.364706,0,0.152941,-0.74902,0.470588,0,0.254902,-0.623529,0.572549,0,0.34902,-0.498039,0.670588,0,0.443137,-0.372549,0.772549,0,0.537255,-0.247059,0.870588,0,0.627451,-0.121569,0.964706,0,0.717647,0.00392157,1,0.0784314,0.772549,0.129412,1,0.207843,0.858824,0.254902,1,0.32549,0.941176,0.380392,1,0.45098,1,0.505882,1,0.560784,1,0.631373,1,0.662745,1,0.756863,1,0.760784,1,0.882353,1,0.870588,1,1,1,1,1]},{"ColorSpace":"Lab","Name":"RED-PURPLE","RGBPoints":[-1,0,0,0,-0.87451,0.188235,0,0.007843,-0.74902,0.345098,0,0.035294,-0.623529,0.439216,0,0.098039,-0.498039,0.533333,0,0.152941,-0.372549,0.627451,0.015686,0.211765,-0.247059,0.721569,0.031373,0.266667,-0.121569,0.8,0.047059,0.329412,0.00392157,0.862745,0.047059,0.403922,0.129412,0.941176,0.062745,0.466667,0.254902,0.988235,0.078431,0.54902,0.380392,0.988235,0.141176,0.643137,0.505882,0.988235,0.25098,0.729412,0.631373,0.988235,0.376471,0.811765,0.756863,0.988235,0.54902,0.886275,0.882353,0.988235,0.752941,0.952941,1,0.996078,0.996078,0.996078]},{"ColorSpace":"Lab","Name":"erdc_red_BW","RGBPoints":[-1,0,0,0,-0.87451,0.147204,0.0480135,0.0401815,-0.74902,0.253411,0.0617478,0.0301333,-0.623529,0.356059,0.0746331,0.0446897,-0.498039,0.457731,0.0934935,0.0636931,-0.372549,0.557199,0.122714,0.0860013,-0.247059,0.665179,0.144238,0.105585,-0.121569,0.763833,0.187056,0.138326,0.00392157,0.847035,0.254558,0.189407,0.129412,0.905663,0.345937,0.258215,0.254902,0.941431,0.447111,0.346277,0.380392,0.962608,0.546927,0.457571,0.505882,0.987833,0.637276,0.569944,0.631373,0.994202,0.732176,0.687958,0.756863,0.993304,0.826268,0.800567,0.882353,0.994413,0.917205,0.906393,1,1,1,0.999979]},{"ColorSpace":"Lab","Name":"RED_TEMPERATURE","RGBPoints":[-1,0,0,0,-0.87451,0.090196,0,0,-0.74902,0.180392,0,0,-0.623529,0.270588,0,0,-0.498039,0.360784,0,0,-0.372549,0.45098,0,0,-0.247059,0.545098,0,0,-0.121569,0.635294,0,0,0.00392157,0.72549,0.058824,0,0.129412,0.815686,0.176471,0,0.254902,0.905882,0.294118,0,0.380392,1,0.411765,0,0.505882,1,0.533333,0.027451,0.631373,1,0.65098,0.27451,0.756863,1,0.768627,0.521569,0.882353,1,0.886275,0.768627,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_orange_BW","RGBPoints":[-1,0,0,0.0000253806,-0.87451,0.135871,0.0593824,0,-0.74902,0.224328,0.0907216,0,-0.623529,0.318083,0.119647,0,-0.498039,0.414443,0.150246,0,-0.372549,0.511077,0.184884,0,-0.247059,0.605501,0.226033,0,-0.121569,0.695274,0.275491,0,0.00392157,0.777826,0.334445,0,0.129412,0.851498,0.402441,0,0.254902,0.915899,0.47759,0.000602975,0.380392,0.971984,0.557882,0.0361443,0.505882,1,0.641287,0.135967,0.631373,1,0.725198,0.27997,0.756863,1,0.808205,0.438135,0.882353,1,0.89306,0.587036,1,1,0.977928,0.721599]},{"ColorSpace":"Lab","Name":"heated_object","RGBPoints":[-1,0,0,0,-0.87451,0.34902,0.0862745,0,-0.74902,0.45098,0.172549,0,-0.623529,0.52549,0.231373,0,-0.498039,0.580392,0.278431,0,-0.372549,0.623529,0.313725,0,-0.247059,0.670588,0.352941,0,-0.121569,0.717647,0.392157,0,0.00392157,0.772549,0.439216,0,0.129412,0.839216,0.494118,0,0.254902,0.901961,0.541176,0,0.380392,0.968627,0.6,0,0.505882,1,0.658824,0,0.631373,1,0.721569,0,0.756863,1,0.827451,0.298039,0.882353,1,0.976471,0.72549,1,1,1,1]},{"ColorSpace":"Lab","Name":"erdc_gold_BW","RGBPoints":[-1,0,0,0.0000190933,-0.87451,0.128363,0.0636265,0,-0.74902,0.193795,0.111057,0,-0.623529,0.25976,0.15987,0,-0.498039,0.328546,0.210589,0,-0.372549,0.399726,0.26332,0,-0.247059,0.472969,0.318261,0,-0.121569,0.546245,0.375827,0,0.00392157,0.61745,0.436719,0,0.129412,0.685545,0.501113,0,0.254902,0.749578,0.568799,0,0.380392,0.80962,0.6394,0,0.505882,0.865572,0.712699,0.10257,0.631373,0.917709,0.787569,0.233665,0.756863,0.966914,0.863138,0.369608,0.882353,1,0.939405,0.496104,1,0.999225,1,0.612275]},{"ColorSpace":"Lab","Name":"erdc_brown_BW","RGBPoints":[-1,3.3216e-7,0,0.00000483629,-0.87451,0.14693,0.0518172,0,-0.74902,0.225806,0.0814996,0,-0.623529,0.301681,0.111452,0,-0.498039,0.370487,0.150664,0,-0.372549,0.43108,0.199477,0,-0.247059,0.4849,0.255107,0,-0.121569,0.536798,0.313486,0,0.00392157,0.59286,0.371167,0,0.129412,0.653119,0.428135,0,0.254902,0.714589,0.485917,0.0379541,0.380392,0.774667,0.54565,0.116634,0.505882,0.831222,0.608047,0.183895,0.631373,0.880305,0.674199,0.260298,0.756863,0.922314,0.742472,0.367086,0.882353,0.959408,0.811222,0.497258,1,0.993548,0.875183,0.622093]},{"ColorSpace":"Lab","Name":"copper_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.0784314,0.0501961,0.0313725,-0.74902,0.156863,0.100392,0.0627451,-0.623529,0.235294,0.150588,0.0941176,-0.498039,0.313725,0.200784,0.12549,-0.372549,0.392157,0.25098,0.156863,-0.247059,0.470588,0.301176,0.188235,-0.121569,0.54902,0.351373,0.219608,0.00392157,0.627451,0.401569,0.25098,0.129412,0.705882,0.451765,0.282353,0.254902,0.784314,0.501961,0.313725,0.380392,0.862745,0.552157,0.345098,0.505882,0.941176,0.602353,0.376471,0.631373,1,0.652549,0.407843,0.756863,1,0.702745,0.439216,0.882353,1,0.752941,0.470588,1,1,0.8,0.5]},{"ColorSpace":"Lab","Name":"pink_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.312416,0.204524,0.204524,-0.74902,0.441822,0.289241,0.289241,-0.623529,0.54112,0.354246,0.354246,-0.498039,0.624831,0.409048,0.409048,-0.372549,0.698582,0.45733,0.45733,-0.247059,0.764404,0.502282,0.500979,-0.121569,0.791292,0.591516,0.54112,0.00392157,0.817297,0.66895,0.578481,0.129412,0.842499,0.738308,0.613572,0.254902,0.866968,0.801687,0.646762,0.380392,0.890766,0.86041,0.678329,0.505882,0.913944,0.913944,0.711254,0.631373,0.936549,0.936549,0.79459,0.756863,0.958621,0.958621,0.869979,0.882353,0.980196,0.980196,0.939336,1,1,1,1]},{"ColorSpace":"Lab","Name":"bone_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.054902,0.054902,0.075817,-0.74902,0.109804,0.109804,0.151634,-0.623529,0.164706,0.164706,0.227451,-0.498039,0.219608,0.219608,0.303268,-0.372549,0.27451,0.27451,0.379085,-0.247059,0.329412,0.329902,0.454412,-0.121569,0.384314,0.405719,0.509314,0.00392157,0.439216,0.481536,0.564216,0.129412,0.494118,0.557353,0.619118,0.254902,0.54902,0.63317,0.67402,0.380392,0.603922,0.708987,0.728922,0.505882,0.660294,0.783824,0.783824,0.631373,0.746569,0.838725,0.838725,0.756863,0.832843,0.893627,0.893627,0.882353,0.919118,0.948529,0.948529,1,1,1,1]},{"ColorSpace":"Lab","Name":"gray_Matlab","RGBPoints":[-1,0,0,0,-0.87451,0.0627451,0.0627451,0.0627451,-0.74902,0.12549,0.12549,0.12549,-0.623529,0.188235,0.188235,0.188235,-0.498039,0.25098,0.25098,0.25098,-0.372549,0.313725,0.313725,0.313725,-0.247059,0.376471,0.376471,0.376471,-0.121569,0.439216,0.439216,0.439216,0.00392157,0.501961,0.501961,0.501961,0.129412,0.564706,0.564706,0.564706,0.254902,0.627451,0.627451,0.627451,0.380392,0.690196,0.690196,0.690196,0.505882,0.752941,0.752941,0.752941,0.631373,0.815686,0.815686,0.815686,0.756863,0.878431,0.878431,0.878431,0.882353,0.941176,0.941176,0.941176,1,1,1,1]},{"ColorSpace":"Lab","Name":"Purples","RGBPoints":[-1,0.247059,0,0.490196,-0.87451,0.288397,0.07677,0.525629,-0.74902,0.32975,0.153587,0.561092,-0.623529,0.373057,0.236263,0.600461,-0.498039,0.416363,0.319,0.639923,-0.372549,0.459669,0.405613,0.685198,-0.247059,0.503345,0.491534,0.730058,-0.121569,0.562399,0.54862,0.757616,0.00392157,0.621453,0.606075,0.785544,0.129412,0.680508,0.674971,0.824914,0.254902,0.739562,0.743406,0.863899,0.380392,0.798616,0.800492,0.893426,0.505882,0.85684,0.856655,0.922491,0.631373,0.898178,0.894056,0.942176,0.756863,0.938654,0.930919,0.961646,0.882353,0.964245,0.958478,0.977393,1,0.988235,0.984314,0.992157]},{"ColorSpace":"Lab","Name":"Blues","RGBPoints":[-1,0.031373,0.188235,0.419608,-0.87451,0.031373,0.253195,0.516063,-0.74902,0.031757,0.318139,0.612149,-0.623529,0.080969,0.38113,0.661361,-0.498039,0.130427,0.444152,0.710327,-0.372549,0.195386,0.509112,0.743791,-0.247059,0.260715,0.573841,0.777209,-0.121569,0.341423,0.628958,0.808704,0.00392157,0.422745,0.684075,0.839892,0.129412,0.523137,0.739193,0.861546,0.254902,0.622684,0.793464,0.883429,0.380392,0.701423,0.826928,0.910988,0.505882,0.778685,0.8603,0.937993,0.631373,0.825928,0.891795,0.953741,0.756863,0.87328,0.923291,0.969489,0.882353,0.922491,0.954787,0.985236,1,0.968627,0.984314,1]},{"ColorSpace":"Lab","Name":"Greens","RGBPoints":[-1,0,0.266667,0.105882,-0.87451,0,0.347374,0.139346,-0.74902,0.000538,0.427912,0.172933,-0.623529,0.069435,0.486967,0.222145,-0.498039,0.138178,0.546082,0.271326,-0.372549,0.197232,0.609073,0.31857,-0.247059,0.257255,0.671742,0.365859,-0.121569,0.357647,0.720953,0.415071,0.00392157,0.45767,0.769919,0.465021,0.129412,0.546251,0.811257,0.537855,0.254902,0.634295,0.852211,0.610688,0.380392,0.709097,0.883706,0.683522,0.505882,0.78316,0.914833,0.755894,0.631373,0.842215,0.938454,0.818885,0.756863,0.899977,0.961538,0.880692,0.882353,0.935409,0.975317,0.92203,1,0.968627,0.988235,0.960784]},{"ColorSpace":"Lab","Name":"PuBu","RGBPoints":[-1,0.301961,0,0.294118,-0.87451,0.404321,0.029527,0.390573,-0.74902,0.50599,0.059592,0.486782,-0.623529,0.519769,0.158016,0.551742,-0.498039,0.533456,0.256194,0.616301,-0.372549,0.54133,0.33887,0.655671,-0.247059,0.54902,0.421592,0.695087,-0.121569,0.54902,0.506236,0.736424,0.00392157,0.550127,0.590573,0.777701,0.129412,0.585559,0.665375,0.81707,0.254902,0.622145,0.739023,0.855825,0.380392,0.687105,0.784298,0.879446,0.505882,0.752065,0.829758,0.903253,0.631373,0.817024,0.87897,0.930811,0.756863,0.880907,0.927213,0.957832,0.882353,0.926182,0.958708,0.975548,1,0.968627,0.988235,0.992157]},{"ColorSpace":"Lab","Name":"BuPu","RGBPoints":[-1,0.007843,0.219608,0.345098,-0.87451,0.01178,0.286536,0.449427,-0.74902,0.015702,0.35328,0.553479,-0.623529,0.01767,0.396586,0.622376,-0.498039,0.021115,0.4402,0.690688,-0.372549,0.11757,0.503191,0.722184,-0.247059,0.214625,0.565859,0.753633,-0.121569,0.336671,0.615071,0.78316,0.00392157,0.457978,0.663975,0.812503,0.129412,0.556401,0.703345,0.836125,0.254902,0.65421,0.742714,0.859669,0.380392,0.736886,0.782084,0.881323,0.505882,0.81827,0.821638,0.903068,0.631373,0.873387,0.864944,0.92669,0.756863,0.927536,0.907605,0.949988,0.882353,0.964937,0.9391,0.967705,1,1,0.968627,0.984314]},{"ColorSpace":"Lab","Name":"BuGn","RGBPoints":[-1,0.031373,0.25098,0.505882,-0.87451,0.031373,0.329719,0.590527,-0.74902,0.031911,0.408397,0.674787,-0.623529,0.100807,0.479262,0.710219,-0.498039,0.169704,0.550219,0.745744,-0.372549,0.238601,0.62699,0.787082,-0.247059,0.307958,0.703114,0.826759,-0.121569,0.39654,0.752326,0.797232,0.00392157,0.485121,0.801046,0.767705,0.129412,0.573702,0.83451,0.738178,0.254902,0.661592,0.867743,0.711034,0.380392,0.732457,0.895302,0.74253,0.505882,0.801845,0.922307,0.774579,0.631373,0.841215,0.938055,0.817885,0.756863,0.880907,0.95391,0.861084,0.882353,0.926182,0.971626,0.902422,1,0.968627,0.988235,0.941176]},{"ColorSpace":"Lab","Name":"GnBu","RGBPoints":[-1,0,0.266667,0.105882,-0.87451,0,0.347374,0.139346,-0.74902,0.000538,0.427912,0.172933,-0.623529,0.069435,0.486967,0.222145,-0.498039,0.138178,0.546175,0.272095,-0.372549,0.197232,0.615071,0.368551,-0.247059,0.256609,0.683276,0.464867,-0.121569,0.329443,0.722645,0.555417,0.00392157,0.403137,0.762138,0.645413,0.129412,0.503529,0.805444,0.718247,0.254902,0.603922,0.848597,0.790465,0.380392,0.704314,0.887966,0.847551,0.505882,0.802307,0.926321,0.903714,0.631373,0.851519,0.944037,0.941115,0.756863,0.899977,0.961538,0.976901,0.882353,0.935409,0.975317,0.984775,1,0.968627,0.988235,0.992157]},{"ColorSpace":"Lab","Name":"GnBuPu","RGBPoints":[-1,0.003922,0.27451,0.211765,-0.87451,0.003922,0.349312,0.280661,-0.74902,0.003937,0.423852,0.349773,-0.623529,0.005905,0.46519,0.446228,-0.498039,0.009443,0.506344,0.542837,-0.372549,0.111803,0.535871,0.649135,-0.247059,0.214025,0.565859,0.753633,-0.121569,0.310481,0.615071,0.78316,0.00392157,0.407797,0.663975,0.812503,0.129412,0.531811,0.703345,0.836125,0.254902,0.65421,0.742714,0.859669,0.380392,0.736886,0.782084,0.881323,0.505882,0.81827,0.821176,0.902884,0.631373,0.873387,0.854641,0.922568,0.756863,0.927536,0.888535,0.942361,0.882353,0.964937,0.929873,0.964014,1,1,0.968627,0.984314]},{"ColorSpace":"Lab","Name":"BuGnYl","RGBPoints":[-1,0.031373,0.113725,0.345098,-0.87451,0.088458,0.159,0.463206,-0.74902,0.145052,0.204567,0.5807,-0.623529,0.139146,0.287243,0.620069,-0.498039,0.13318,0.370196,0.659562,-0.372549,0.123337,0.470588,0.706805,-0.247059,0.115386,0.570335,0.753126,-0.121569,0.186251,0.643168,0.761,0.00392157,0.258716,0.71514,0.768074,0.129412,0.380761,0.760415,0.750358,0.254902,0.503576,0.806075,0.732795,0.380392,0.645306,0.861192,0.719016,0.505882,0.783899,0.91511,0.705606,0.631373,0.858701,0.944637,0.6997,0.756863,0.931349,0.973303,0.698424,0.882353,0.966782,0.987082,0.777163,1,1,1,0.85098]},{"ColorSpace":"Lab","Name":"PuRd","RGBPoints":[-1,0.286275,0,0.415686,-0.87451,0.38273,0.001968,0.441276,-0.74902,0.479231,0.003922,0.466774,-0.623529,0.581592,0.003922,0.480554,-0.498039,0.683799,0.00549,0.494887,-0.372549,0.776317,0.105882,0.544098,-0.247059,0.867866,0.206321,0.592618,-0.121569,0.919047,0.308681,0.612303,0.00392157,0.968812,0.411226,0.632603,0.129412,0.974717,0.519493,0.671972,0.254902,0.980546,0.626451,0.71065,0.380392,0.984483,0.701253,0.732303,0.505882,0.988328,0.77504,0.755617,0.631373,0.990296,0.828189,0.812703,0.756863,0.992372,0.880907,0.869035,0.882353,0.996309,0.926182,0.912341,1,1,0.968627,0.952941]},{"ColorSpace":"Lab","Name":"RdPu","RGBPoints":[-1,0.403922,0,0.121569,-0.87451,0.500377,0,0.192434,-0.74902,0.596909,0.000277,0.263037,-0.623529,0.703206,0.035709,0.300438,-0.498039,0.808612,0.071296,0.338854,-0.372549,0.857824,0.116571,0.441215,-0.247059,0.905513,0.163552,0.54293,-0.121569,0.889765,0.281661,0.617732,0.00392157,0.873156,0.39897,0.691611,0.129412,0.82985,0.491488,0.736886,0.254902,0.789081,0.583237,0.781853,0.380392,0.810734,0.656071,0.819254,0.505882,0.833126,0.729181,0.85684,0.631373,0.870527,0.80792,0.898178,0.756863,0.907605,0.884398,0.938331,0.882353,0.9391,0.921799,0.958016,1,0.968627,0.956863,0.976471]},{"ColorSpace":"Lab","Name":"Oranges","RGBPoints":[-1,0.498039,0.152941,0.015686,-0.87451,0.57481,0.182468,0.013718,-0.74902,0.651765,0.212042,0.011734,-0.623529,0.752157,0.247474,0.007797,-0.498039,0.851719,0.283368,0.004475,-0.372549,0.898962,0.348328,0.039908,-0.247059,0.945652,0.413426,0.076401,-0.121569,0.969273,0.484291,0.157109,0.00392157,0.992157,0.554971,0.238185,0.129412,0.992157,0.619931,0.330704,0.254902,0.992157,0.684967,0.423837,0.380392,0.992157,0.751895,0.532103,0.505882,0.992249,0.817716,0.639354,0.631373,0.994218,0.861023,0.725967,0.756863,0.996186,0.903576,0.810965,0.882353,0.998155,0.933103,0.868051,1,1,0.960784,0.921569]},{"ColorSpace":"Lab","Name":"Reds","RGBPoints":[-1,0.403922,0,0.05098,-0.87451,0.525967,0.029527,0.066728,-0.74902,0.647643,0.058962,0.082476,-0.623529,0.722445,0.076678,0.098224,-0.498039,0.797186,0.095194,0.114187,-0.372549,0.868051,0.164091,0.143714,-0.247059,0.937809,0.233541,0.173933,-0.121569,0.96143,0.326059,0.232987,0.00392157,0.984375,0.418147,0.292657,0.129412,0.986344,0.496886,0.371396,0.254902,0.988235,0.575702,0.450673,0.380392,0.988235,0.656409,0.543191,0.505882,0.98842,0.736747,0.635894,0.631373,0.992357,0.809581,0.732349,0.756863,0.996186,0.880692,0.826759,0.882353,0.998155,0.92203,0.885813,1,1,0.960784,0.941176]},{"ColorSpace":"Lab","Name":"RdOr","RGBPoints":[-1,0.498039,0,0,-0.87451,0.6004,0,0,-0.74902,0.702514,0.000738,0.000477,-0.623529,0.773379,0.095225,0.061499,-0.498039,0.843875,0.189865,0.12283,-0.372549,0.891119,0.294195,0.203537,-0.247059,0.937855,0.397924,0.283137,-0.121569,0.963445,0.476663,0.316601,0.00392157,0.988297,0.555771,0.351665,0.129412,0.990265,0.646321,0.436309,0.254902,0.992157,0.735256,0.519646,0.380392,0.992157,0.784468,0.570827,0.505882,0.992249,0.833218,0.623483,0.631373,0.994218,0.872587,0.706159,0.756863,0.996186,0.911419,0.788189,0.882353,0.998155,0.940946,0.859054,1,1,0.968627,0.92549]},{"ColorSpace":"Lab","Name":"BrOrYl","RGBPoints":[-1,0.4,0.145098,0.023529,-0.87451,0.500392,0.174625,0.019592,-0.74902,0.600784,0.204291,0.015656,-0.623529,0.701176,0.251534,0.011719,-0.498039,0.800984,0.299146,0.008397,-0.372549,0.863975,0.370012,0.043829,-0.247059,0.926321,0.441107,0.0794,-0.121569,0.961753,0.521815,0.120738,0.00392157,0.996078,0.602645,0.163122,0.129412,0.996078,0.68729,0.237924,0.254902,0.996078,0.771011,0.314879,0.380392,0.996078,0.832034,0.444798,0.505882,0.996171,0.892042,0.572595,0.631373,0.998139,0.931411,0.65724,0.756863,1,0.969489,0.741669,0.882353,1,0.985236,0.822376,1,1,1,0.898039]},{"ColorSpace":"Lab","Name":"RdOrYl","RGBPoints":[-1,0.501961,0,0.14902,-0.87451,0.622038,0,0.14902,-0.74902,0.741761,0.0004,0.148866,-0.623529,0.816563,0.05158,0.129181,-0.498039,0.890965,0.10356,0.110235,-0.372549,0.940177,0.205921,0.137793,-0.247059,0.988281,0.308789,0.165536,-0.121569,0.99025,0.432803,0.200969,0.00392157,0.992218,0.555217,0.236278,0.129412,0.994187,0.628051,0.267774,0.254902,0.996078,0.701038,0.301269,0.380392,0.996078,0.777809,0.383945,0.505882,0.996171,0.852826,0.466621,0.631373,0.998139,0.892195,0.549296,0.756863,1,0.931349,0.632188,0.882353,1,0.966782,0.7188,1,1,1,0.8]},{"ColorSpace":"Lab","Name":"CIELab_blue2red","RGBPoints":[-1,0,0.6,0.74902,1,0.76863,0.46667,0.34118]},{"ColorSpace":"Lab","Name":"blue2yellow","RGBPoints":[-1,0,0,1,0,0.5,0.5,0.5,1,1,1,0]},{"ColorSpace":"Lab","Name":"erdc_blue2gold","RGBPoints":[-1,0.175119,0.0438468,1,-0.874016,0.22383,0.159771,0.94557,-0.748031,0.27254,0.233611,0.891216,-0.622047,0.321251,0.296526,0.836857,-0.496063,0.369962,0.354296,0.782359,-0.370079,0.418672,0.409139,0.72754,-0.244094,0.467383,0.462152,0.672148,-0.11811,0.51609,0.51396,0.615825,0.00787402,0.572863,0.55452,0.559172,0.133858,0.630269,0.593822,0.517729,0.259843,0.689588,0.624668,0.47446,0.385827,0.745394,0.656113,0.428638,0.511811,0.798624,0.688104,0.379105,0.637795,0.849926,0.720593,0.323834,0.76378,0.899765,0.753543,0.258657,0.889764,0.948487,0.78692,0.171778,1,0.990413,0.816451,0.00729848]},{"ColorSpace":"Lab","Name":"erdc_blue2yellow","RGBPoints":[-1,0.0830122,0,0.495617,-0.87451,0.141973,0.0551288,0.57363,-0.74902,0.193048,0.110258,0.604561,-0.623529,0.234231,0.165386,0.57643,-0.498039,0.275413,0.220515,0.548299,-0.372549,0.316596,0.275644,0.520169,-0.247059,0.357778,0.330773,0.492038,-0.121569,0.398961,0.385901,0.463908,0.00392157,0.449929,0.438487,0.426815,0.129412,0.511572,0.488299,0.379944,0.254902,0.581222,0.53603,0.325741,0.380392,0.650871,0.583761,0.271538,0.505882,0.720521,0.631493,0.217335,0.631373,0.79017,0.679224,0.163132,0.756863,0.85982,0.726955,0.108929,0.882353,0.910254,0.774159,0.14112,1,0.927513,0.81759,0.306289]},{"ColorSpace":"Lab","Name":"erdc_cyan2orange","RGBPoints":[-1,0.0471513,0.213874,0.414329,-0.87451,0.0674702,0.256648,0.439027,-0.74902,0.0959957,0.299331,0.462089,-0.623529,0.132428,0.341872,0.483212,-0.498039,0.188743,0.38277,0.500597,-0.372549,0.268511,0.420229,0.512179,-0.247059,0.352945,0.455602,0.519101,-0.121569,0.43893,0.489368,0.521538,0.00392157,0.522445,0.522495,0.522436,0.129412,0.600089,0.555682,0.53205,0.254902,0.67988,0.587981,0.539163,0.380392,0.761011,0.619586,0.544439,0.505882,0.84278,0.650741,0.548567,0.631373,0.910713,0.687347,0.557822,0.756863,0.952232,0.734972,0.577775,0.882353,0.975642,0.789858,0.604868,1,0.990752,0.843643,0.632857]},{"ColorSpace":"Lab","Name":"erdc_purple2green","RGBPoints":[-1,0.235006,0.0483128,0.530899,-0.87451,0.302968,0.108419,0.552391,-0.74902,0.360241,0.166059,0.569502,-0.623529,0.406746,0.226782,0.579373,-0.498039,0.444073,0.28964,0.582094,-0.372549,0.473648,0.353774,0.577947,-0.247059,0.497636,0.418154,0.567911,-0.121569,0.519086,0.481741,0.553968,0.00392157,0.542884,0.542914,0.542875,0.129412,0.566303,0.603989,0.527499,0.254902,0.595218,0.662965,0.516857,0.380392,0.628641,0.720701,0.510673,0.505882,0.665373,0.777849,0.508165,0.631373,0.704182,0.834921,0.508303,0.756863,0.743846,0.892328,0.50999,0.882353,0.783158,0.950422,0.512181,1,0.818617,1,0.513888]},{"ColorSpace":"Lab","Name":"erdc_purple2green_dark","RGBPoints":[-1,0.107656,0,0.428682,-0.87451,0.1924,0,0.449799,-0.74902,0.255118,0.0648939,0.466726,-0.623529,0.304256,0.133066,0.476703,-0.498039,0.343202,0.19716,0.479793,-0.372549,0.373876,0.260353,0.476241,-0.247059,0.398497,0.322872,0.466953,-0.121569,0.420016,0.384252,0.453785,0.00392157,0.44319,0.443216,0.443186,0.129412,0.465553,0.502139,0.428233,0.254902,0.492959,0.559151,0.417591,0.380392,0.524654,0.615092,0.411016,0.505882,0.55959,0.670583,0.40779,0.631373,0.596614,0.726102,0.406948,0.756863,0.634544,0.782032,0.407439,0.882353,0.672183,0.838703,0.408237,1,0.706131,0.892759,0.408452]},{"ColorSpace":"Lab","Name":"coolwarm","RGBPoints":[-1,0.229806,0.298718,0.753683,-0.875,0.303869,0.406535,0.844959,-0.75,0.383013,0.509419,0.917388,-0.625,0.466667,0.604563,0.968155,-0.5,0.552953,0.688929,0.995376,-0.375,0.639176,0.7596,0.998151,-0.25,0.722193,0.813953,0.976575,-0.125,0.798692,0.849786,0.931689,0,0.865395,0.86541,0.865396,0.125,0.924128,0.827385,0.774508,0.25,0.958853,0.769768,0.678008,0.375,0.969954,0.694267,0.579375,0.5,0.958003,0.602842,0.481776,0.625,0.923945,0.497309,0.38797,0.75,0.869187,0.378313,0.300267,0.875,0.795632,0.241284,0.220526,1,0.705673,0.0155562,0.150233]},{"ColorSpace":"Lab","Name":"BuRd","RGBPoints":[-1,0.019608,0.188235,0.380392,-0.87451,0.088504,0.321107,0.564937,-0.74902,0.163399,0.444983,0.697501,-0.623529,0.247059,0.555709,0.754095,-0.498039,0.420684,0.676432,0.818685,-0.372549,0.606459,0.789773,0.880277,-0.247059,0.761476,0.868512,0.924567,-0.121569,0.878047,0.925721,0.951942,0.00392157,0.969089,0.966474,0.964937,0.129412,0.983852,0.897578,0.846828,0.254902,0.982468,0.800692,0.706113,0.380392,0.960323,0.66782,0.536332,0.505882,0.894579,0.503806,0.399769,0.631373,0.81707,0.33218,0.281046,0.756863,0.728489,0.155017,0.197386,0.882353,0.576932,0.055363,0.14925,1,0.403922,0,0.121569]},{"ColorSpace":"Lab","Name":"Spectral_lowBlue","RGBPoints":[-1,0.368627,0.309804,0.635294,-0.87451,0.260361,0.450058,0.70173,-0.74902,0.248058,0.591311,0.717186,-0.623529,0.376009,0.734025,0.658132,-0.498039,0.537947,0.814764,0.64506,-0.372549,0.702345,0.879585,0.636678,-0.247059,0.84752,0.938639,0.607151,-0.121569,0.940408,0.976163,0.656055,0.00392157,0.999923,0.997616,0.745021,0.129412,0.997463,0.921338,0.61707,0.254902,0.995002,0.824606,0.499885,0.380392,0.992541,0.701576,0.39654,0.505882,0.973472,0.547405,0.318108,0.631373,0.937793,0.398539,0.270127,0.756863,0.861515,0.282891,0.299654,0.882353,0.746482,0.144637,0.288812,1,0.619608,0.003922,0.258824]},{"ColorSpace":"Lab","Name":"GnRP","RGBPoints":[-1,0,0.266667,0.105882,-0.87451,0.066436,0.394617,0.174779,-0.74902,0.168858,0.524567,0.25767,-0.623529,0.323875,0.657439,0.361015,-0.498039,0.504883,0.772318,0.506344,-0.372549,0.678431,0.870127,0.654902,-0.247059,0.803922,0.921799,0.780392,-0.121569,0.897116,0.951942,0.882814,0.00392157,0.967397,0.965936,0.967474,0.129412,0.928028,0.879815,0.930565,0.254902,0.866052,0.780777,0.882891,0.380392,0.77501,0.665129,0.821376,0.505882,0.675663,0.537024,0.737024,0.631373,0.57847,0.396155,0.645982,0.756863,0.492349,0.223914,0.547559,0.882353,0.375548,0.096886,0.423299,1,0.25098,0,0.294118]},{"ColorSpace":"Lab","Name":"GYPi","RGBPoints":[-1,0.152941,0.392157,0.098039,-0.87451,0.246444,0.505344,0.117724,-0.74902,0.351942,0.614533,0.161399,-0.623529,0.474971,0.717878,0.240138,-0.498039,0.611995,0.811226,0.392849,-0.372549,0.746328,0.893118,0.565321,-0.247059,0.859516,0.94233,0.747405,-0.121569,0.928105,0.96386,0.875663,0.00392157,0.969089,0.966859,0.968012,0.129412,0.983852,0.910265,0.948328,0.254902,0.979239,0.833218,0.914648,0.380392,0.949712,0.729873,0.862976,0.505882,0.905652,0.58293,0.763552,0.631373,0.85521,0.410073,0.652211,0.756863,0.793695,0.183699,0.531642,0.882353,0.683737,0.063899,0.420761,1,0.556863,0.003922,0.321569]},{"ColorSpace":"Lab","Name":"GnYlRd","RGBPoints":[-1,0,0.407843,0.215686,-0.87451,0.063975,0.525952,0.277201,-0.74902,0.177932,0.633064,0.332718,-0.623529,0.364937,0.724106,0.379469,-0.498039,0.527951,0.797155,0.40223,-0.372549,0.678431,0.862822,0.433449,-0.247059,0.803922,0.916955,0.514648,-0.121569,0.909419,0.961861,0.625067,0.00392157,0.999923,0.997616,0.745021,0.129412,0.997463,0.921338,0.61707,0.254902,0.995002,0.824606,0.499885,0.380392,0.992541,0.701576,0.39654,0.505882,0.973472,0.547405,0.318108,0.631373,0.939023,0.389927,0.245521,0.756863,0.867666,0.239831,0.176624,0.882353,0.762399,0.110727,0.151326,1,0.647059,0,0.14902]},{"ColorSpace":"Lab","Name":"GBBr","RGBPoints":[-1,0,0.235294,0.188235,-0.87451,0.002461,0.338639,0.301423,-0.74902,0.055902,0.448981,0.417609,-0.623529,0.183852,0.56955,0.538178,-0.498039,0.357785,0.700115,0.660746,-0.372549,0.540177,0.819531,0.77624,-0.247059,0.714879,0.890888,0.864821,-0.121569,0.851134,0.934564,0.922645,0.00392157,0.960861,0.959785,0.95694,0.129412,0.963322,0.927797,0.83391,0.254902,0.939946,0.868897,0.68935,0.380392,0.883353,0.775394,0.517109,0.505882,0.808074,0.625836,0.324106,0.631373,0.717647,0.476355,0.15494,0.756863,0.592157,0.358247,0.06882,0.882353,0.458593,0.26436,0.031142,1,0.329412,0.188235,0.019608]},{"ColorSpace":"Lab","Name":"PuOr","RGBPoints":[-1,0.498039,0.231373,0.031373,-0.87451,0.62599,0.30273,0.026451,-0.74902,0.746943,0.387082,0.037524,-0.623529,0.85767,0.490427,0.071972,-0.498039,0.936409,0.617762,0.236371,-0.372549,0.992695,0.743099,0.43291,-0.247059,0.995156,0.841523,0.63714,-0.121569,0.985313,0.913802,0.813687,0.00392157,0.966244,0.966398,0.967705,0.129412,0.889965,0.89504,0.938178,0.254902,0.806151,0.804306,0.894656,0.380392,0.712649,0.688658,0.833141,0.505882,0.594233,0.554325,0.744637,0.631373,0.474894,0.404229,0.652364,0.756863,0.366628,0.217224,0.563783,0.882353,0.266436,0.089965,0.434833,1,0.176471,0,0.294118]},{"ColorSpace":"Lab","Name":"PRGn","RGBPoints":[-1,0.25098,0,0.294118,-0.87451,0.383852,0.103345,0.431911,-0.74902,0.497732,0.234679,0.55371,-0.623529,0.583852,0.40692,0.652134,-0.498039,0.681968,0.545175,0.742561,-0.372549,0.7807,0.672357,0.825221,-0.247059,0.871742,0.788005,0.886736,-0.121569,0.930488,0.885198,0.932872,0.00392157,0.966321,0.968089,0.965859,0.129412,0.892503,0.950865,0.877278,0.254902,0.796078,0.91857,0.772549,0.380392,0.670588,0.866897,0.647059,0.505882,0.493195,0.765398,0.496655,0.631373,0.314187,0.649135,0.354556,0.756863,0.15917,0.516263,0.251211,0.882353,0.062284,0.386621,0.170473,1,0,0.266667,0.105882]},{"ColorSpace":"Lab","Name":"PiYG","RGBPoints":[-1,0.556863,0.003922,0.321569,-0.87451,0.692195,0.067897,0.427374,-0.74902,0.797539,0.197847,0.539177,-0.623529,0.859054,0.424221,0.659746,-0.498039,0.908574,0.592618,0.770319,-0.372549,0.951557,0.736332,0.866205,-0.247059,0.981084,0.839677,0.917878,-0.121569,0.98293,0.913802,0.949558,0.00392157,0.96732,0.968474,0.965629,0.129412,0.92549,0.963552,0.869666,0.254902,0.852441,0.939254,0.736025,0.380392,0.739254,0.890042,0.553941,0.505882,0.60323,0.805536,0.382238,0.631373,0.467282,0.711419,0.235217,0.756863,0.344252,0.608074,0.156478,0.882353,0.2406,0.49827,0.116494,1,0.152941,0.392157,0.098039]},{"ColorSpace":"Lab","Name":"OrPu","RGBPoints":[-1,0.176471,0,0.294118,-0.87451,0.272434,0.095963,0.444214,-0.74902,0.373395,0.228912,0.56932,-0.623529,0.481661,0.415917,0.657901,-0.498039,0.601922,0.562937,0.750481,-0.372549,0.718493,0.695886,0.836986,-0.247059,0.811995,0.811534,0.898501,-0.121569,0.894733,0.8995,0.940023,0.00392157,0.969166,0.966859,0.963629,0.129412,0.98639,0.910265,0.803691,0.254902,0.995002,0.835371,0.624375,0.380392,0.992541,0.736947,0.420146,0.505882,0.931949,0.609458,0.224221,0.631373,0.85075,0.483968,0.069819,0.756863,0.740023,0.380623,0.035371,0.882353,0.617993,0.29827,0.026759,1,0.498039,0.231373,0.031373]},{"ColorSpace":"Lab","Name":"BrBG","RGBPoints":[-1,0.329412,0.188235,0.019608,-0.87451,0.467205,0.269435,0.031911,-0.74902,0.6,0.365629,0.074202,-0.623529,0.72549,0.483737,0.160323,-0.498039,0.812995,0.635832,0.336409,-0.372549,0.88689,0.781238,0.527874,-0.247059,0.943483,0.87474,0.700115,-0.121569,0.963168,0.929796,0.841599,0.00392157,0.957247,0.959938,0.959554,0.129412,0.84406,0.932872,0.920185,0.254902,0.70396,0.886428,0.859285,0.380392,0.529258,0.815071,0.770704,0.505882,0.346251,0.691811,0.653057,0.631373,0.175855,0.562015,0.530642,0.756863,0.047905,0.441446,0.410073,0.882353,0.002307,0.33218,0.294348,1,0,0.235294,0.188235]},{"ColorSpace":"Lab","Name":"GyRd","RGBPoints":[-1,0.101961,0.101961,0.101961,-0.87451,0.227451,0.227451,0.227451,-0.74902,0.359939,0.359939,0.359939,-0.623529,0.502653,0.502653,0.502653,-0.498039,0.631373,0.631373,0.631373,-0.372549,0.749865,0.749865,0.749865,-0.247059,0.843368,0.843368,0.843368,-0.121569,0.926105,0.926105,0.926105,0.00392157,0.999846,0.997232,0.995694,0.129412,0.994925,0.908651,0.857901,0.254902,0.982468,0.800692,0.706113,0.380392,0.960323,0.66782,0.536332,0.505882,0.894579,0.503806,0.399769,0.631373,0.81707,0.33218,0.281046,0.756863,0.728489,0.155017,0.197386,0.882353,0.576932,0.055363,0.14925,1,0.403922,0,0.121569]},{"ColorSpace":"Lab","Name":"erdc_divHi_purpleGreen","RGBPoints":[-1,0.297553,0,0.489074,-0.87451,0.40259,0.151146,0.567754,-0.74902,0.516038,0.284843,0.658231,-0.623529,0.629783,0.423646,0.750938,-0.498039,0.735198,0.563697,0.835956,-0.372549,0.82408,0.695541,0.903582,-0.247059,0.889091,0.807454,0.944862,-0.121569,0.92334,0.886917,0.951839,0.00392157,0.921045,0.921084,0.921003,0.129412,0.877324,0.907455,0.845381,0.254902,0.797649,0.849713,0.734695,0.380392,0.691646,0.75964,0.600532,0.505882,0.568981,0.649159,0.453807,0.631373,0.438945,0.529756,0.304259,0.756863,0.30973,0.412001,0.158303,0.882353,0.187078,0.305111,0.00251458,1,0.101655,0.220836,0]},{"ColorSpace":"Lab","Name":"erdc_divHi_purpleGreen_dim","RGBPoints":[-1,0.404088,0.131038,0.592767,-0.87451,0.486469,0.230957,0.651243,-0.74902,0.575165,0.339335,0.717723,-0.623529,0.662741,0.454332,0.784263,-0.498039,0.742071,0.570213,0.842918,-0.372549,0.806935,0.678992,0.886227,-0.247059,0.852219,0.771315,0.90763,-0.121569,0.873345,0.837327,0.901572,0.00392157,0.866783,0.86682,0.866745,0.129412,0.82839,0.858225,0.796812,0.254902,0.762578,0.814287,0.700202,0.380392,0.676429,0.744229,0.585735,0.505882,0.577033,0.65732,0.461526,0.631373,0.47128,0.562476,0.33476,0.756863,0.365461,0.467957,0.21076,0.882353,0.264758,0.381138,0.0878313,1,0.182591,0.312249,0]},{"ColorSpace":"Lab","Name":"erdc_divLow_icePeach","RGBPoints":[-1,0.480048,0.817441,0.998056,-0.87451,0.425898,0.726921,0.883187,-0.74902,0.366682,0.629445,0.761936,-0.623529,0.308756,0.531002,0.640217,-0.498039,0.258021,0.43705,0.523433,-0.372549,0.219244,0.352381,0.416348,-0.247059,0.195127,0.281032,0.322979,-0.121569,0.186286,0.22627,0.246525,0.00392157,0.192352,0.19236,0.192364,0.129412,0.255927,0.214469,0.191756,0.254902,0.340459,0.254426,0.206666,0.380392,0.444655,0.309315,0.234029,0.505882,0.565353,0.376004,0.270969,0.631373,0.697917,0.450748,0.314293,0.756863,0.836657,0.529064,0.360227,0.882353,0.972695,0.614884,0.413123,1,1,0.705904,0.472699]},{"ColorSpace":"Lab","Name":"erdc_divLow_purpleGreen","RGBPoints":[-1,0.956034,0.666487,0.952663,-0.87451,0.874457,0.572698,0.936352,-0.74902,0.753465,0.488253,0.909063,-0.623529,0.63309,0.413507,0.763833,-0.498039,0.514491,0.345878,0.620015,-0.372549,0.405008,0.288141,0.484376,-0.247059,0.311388,0.241986,0.363556,-0.121569,0.238722,0.209044,0.263449,0.00392157,0.192352,0.192366,0.192362,0.129412,0.200379,0.233201,0.168618,0.254902,0.230151,0.291737,0.165227,0.380392,0.279481,0.366076,0.178607,0.505882,0.344927,0.453267,0.205703,0.631373,0.421554,0.549449,0.242643,0.756863,0.503334,0.649999,0.284377,0.882353,0.583497,0.749672,0.324969,1,0.650705,0.837228,0.356264]},{"ColorSpace":"Lab","Name":"Haze_green","RGBPoints":[-1,1,0.835294,0.886275,-0.87451,0.937255,0.756863,0.870443,-0.74902,0.875817,0.666376,0.857807,-0.623529,0.778359,0.583007,0.808134,-0.498039,0.676253,0.494118,0.745098,-0.372549,0.561365,0.390123,0.682353,-0.247059,0.438344,0.262745,0.621496,-0.121569,0.321133,0.141031,0.558751,0.00392157,0.203922,0.0217865,0.495861,0.129412,0.265505,0.129412,0.433261,0.254902,0.311692,0.255338,0.37008,0.380392,0.356282,0.377342,0.310821,0.505882,0.39971,0.488889,0.258243,0.631373,0.442556,0.604357,0.205519,0.756863,0.48671,0.71968,0.152941,0.882353,0.529847,0.830356,0.100944,1,0.572549,0.933333,0.054902]},{"ColorSpace":"Lab","Name":"Haze_lime","RGBPoints":[-1,0.704034,0.784196,1,-0.87451,0.633111,0.691418,0.956078,-0.74902,0.564021,0.600606,0.912157,-0.623529,0.496827,0.51189,0.868235,-0.498039,0.43157,0.425416,0.824314,-0.372549,0.368248,0.341347,0.780392,-0.247059,0.306767,0.259855,0.736471,-0.121569,0.246862,0.181069,0.692549,0.00392157,0.191619,0.109542,0.648627,0.129412,0.257404,0.194031,0.604706,0.254902,0.321794,0.278775,0.560784,0.380392,0.387909,0.364617,0.516863,0.505882,0.456569,0.451881,0.472941,0.631373,0.527424,0.540773,0.42902,0.756863,0.599759,0.631427,0.385098,0.882353,0.673065,0.723898,0.341176,1,0.742751,0.812252,0.3]},{"ColorSpace":"RGB","Name":"Haze","RGBPoints":[-1,1,0.835294,0.996078,-0.00392157,0.023529,0.141176,0.498039,0.00392157,0.015686,0.137255,0.494118,1,0.984314,0.764706,0]},{"ColorSpace":"Lab","Name":"Haze_cyan","RGBPoints":[-1,0.956863,1,0.835294,-0.87451,0.933188,0.921714,0.760784,-0.74902,0.870588,0.803486,0.671605,-0.623529,0.807843,0.684096,0.583297,-0.498039,0.745098,0.569208,0.494118,-0.372549,0.682353,0.437763,0.390123,-0.247059,0.621496,0.288163,0.262745,-0.121569,0.558751,0.144517,0.141031,0.00392157,0.495861,0.0217865,0.0413943,0.129412,0.433261,0.137255,0.129412,0.254902,0.37008,0.263181,0.255338,0.380392,0.306318,0.381845,0.372694,0.505882,0.243137,0.503994,0.494263,0.631373,0.180392,0.629484,0.619753,0.756863,0.117647,0.754975,0.747131,0.882353,0.054902,0.876398,0.866812,1,0,0.988235,0.976471]},{"ColorSpace":"Lab","Name":"nic_Edge","RGBPoints":[-1,0.191208,0.191208,0.191208,-0.87451,0.239484,0.00545035,0.614821,-0.74902,0.220593,0.0617459,0.863547,-0.623529,0.17509,0.278988,0.97794,-0.498039,0.143526,0.576069,0.998553,-0.372549,0.166456,0.871883,0.96594,-0.247059,0.376202,0.993555,0.981833,-0.121569,0.681996,0.991297,0.999239,0.00392157,0.954172,0.952734,0.94374,0.129412,0.999735,0.99301,0.662896,0.254902,0.979399,0.991466,0.357973,0.380392,0.968771,0.854967,0.162659,0.505882,0.999245,0.556697,0.144323,0.631373,0.973959,0.26223,0.177946,0.756863,0.852358,0.0526707,0.222974,0.882353,0.593889,0.00912724,0.238855,1,0.191208,0.191208,0.191208]},{"ColorSpace":"Lab","Name":"erdc_iceFire_H","RGBPoints":[-1,4.05432e-7,0,0.00000590122,-0.87451,0,0.120401,0.302675,-0.74902,0,0.216583,0.524574,-0.623529,0.0552475,0.345025,0.6595,-0.498039,0.128047,0.492588,0.720288,-0.372549,0.188955,0.641309,0.792092,-0.247059,0.327673,0.784935,0.873434,-0.121569,0.60824,0.892164,0.935547,0.00392157,0.881371,0.912178,0.818099,0.129412,0.951407,0.835621,0.449279,0.254902,0.904481,0.690489,0,0.380392,0.85407,0.510864,0,0.505882,0.777093,0.33018,0.00088199,0.631373,0.672862,0.139087,0.00269398,0.756863,0.508815,0,0,0.882353,0.299417,0.000366289,0.000547829,1,0.0157519,0.00332021,4.55569e-8]},{"ColorSpace":"Lab","Name":"erdc_iceFire_L","RGBPoints":[-1,0.870485,0.913768,0.832905,-0.87451,0.586919,0.887865,0.934003,-0.74902,0.31583,0.776442,0.867858,-0.623529,0.18302,0.632034,0.787722,-0.498039,0.117909,0.484134,0.713825,-0.372549,0.0507239,0.335979,0.654741,-0.247059,0,0.209874,0.511832,-0.121569,0,0.114689,0.28935,0.00392157,0.0157519,0.00332021,4.55569e-8,0.129412,0.312914,0,0,0.254902,0.520865,0,0,0.380392,0.680105,0.15255,0.0025996,0.505882,0.785109,0.339479,0.000797922,0.631373,0.857354,0.522494,0,0.756863,0.910974,0.699774,0,0.882353,0.951921,0.842817,0.478545,1,0.881371,0.912178,0.818099]},{"ColorSpace":"RGB","Name":"hsv","RGBPoints":[-1,1,0,0,-0.666666,1,0,1,-0.333333,0,0,1,0,0,1,1,0.33333,0,1,0,0.66666,1,1,0,1,1,0,0]},{"ColorSpace":"Lab","Name":"hue_L60","RGBPoints":[-1,0.964784,0.400592,0.349549,-0.87451,0.964915,0.372498,0.53785,-0.74902,0.892353,0.401039,0.759569,-0.623529,0.79263,0.446956,0.903017,-0.498039,0.682208,0.49954,0.966673,-0.372549,0.56392,0.553082,0.968836,-0.247059,0.442031,0.606396,0.901601,-0.121569,0.305499,0.65701,0.765784,0.00392157,0.197251,0.687914,0.620914,0.129412,0.193882,0.701887,0.472654,0.254902,0.249866,0.706123,0.320005,0.380392,0.35132,0.697417,0.202919,0.505882,0.498097,0.669467,0.125232,0.631373,0.637477,0.626239,0.107431,0.756863,0.762115,0.56872,0.155812,0.882353,0.889434,0.481116,0.240445,1,0.964784,0.400592,0.349549]},{"IndexedColors":[0,0,0,0.8941176470588236,0.1019607843137255,0.1098039215686274,0.2156862745098039,0.4941176470588236,0.7215686274509804,0.3019607843137255,0.6862745098039216,0.2901960784313726,0.596078431372549,0.3058823529411765,0.6392156862745098,1,0.4980392156862745,0,0.6509803921568628,0.3372549019607843,0.1568627450980392],"Name":"Spectrum","NanColor":[0.6509803921568628,0.3372549019607843,0.1568627450980392]},{"IndexedColors":[0.4745098039215686,0.09019607843137255,0.09019607843137255,0.7098039215686275,0.00392156862745098,0.00392156862745098,0.9372549019607843,0.2784313725490196,0.09803921568627451,0.9764705882352941,0.5137254901960784,0.1411764705882353,1,0.7058823529411765,0,1,0.8980392156862745,0.02352941176470588],"Name":"Warm","NanColor":[1,0.8980392156862745,0.02352941176470588]},{"IndexedColors":[0.4588235294117647,0.6941176470588235,0.00392156862745098,0.3450980392156863,0.5019607843137255,0.1607843137254902,0.3137254901960784,0.8431372549019608,0.7490196078431373,0.1098039215686274,0.5843137254901961,0.803921568627451,0.2313725490196079,0.407843137254902,0.6705882352941176,0.6039215686274509,0.407843137254902,1,0.3725490196078431,0.2,0.5019607843137255],"Name":"Cool","NanColor":[0.3725490196078431,0.2,0.5019607843137255]},{"IndexedColors":[0.2313725490196079,0.407843137254902,0.6705882352941176,0.1098039215686274,0.5843137254901961,0.803921568627451,0.3058823529411765,0.8509803921568627,0.9176470588235294,0.4509803921568628,0.6039215686274509,0.8352941176470589,0.2588235294117647,0.2392156862745098,0.6627450980392157,0.3137254901960784,0.3294117647058823,0.5294117647058824,0.06274509803921569,0.1647058823529412,0.3215686274509804],"Name":"Blues","NanColor":[0.06274509803921569,0.1647058823529412,0.3215686274509804]},{"IndexedColors":[0.1098039215686274,0.5843137254901961,0.803921568627451,0.2313725490196079,0.407843137254902,0.6705882352941176,0.4,0.2431372549019608,0.7176470588235294,0.6352941176470588,0.3294117647058823,0.8117647058823529,0.8705882352941177,0.3803921568627451,0.807843137254902,0.8627450980392157,0.3803921568627451,0.5843137254901961,0.2392156862745098,0.06274509803921569,0.3215686274509804],"Name":"Wild Flower","NanColor":[0.2392156862745098,0.06274509803921569,0.3215686274509804]},{"IndexedColors":[0.396078431372549,0.4862745098039216,0.2156862745098039,0.4588235294117647,0.6941176470588235,0.00392156862745098,0.6980392156862745,0.7294117647058823,0.1882352941176471,1,0.8980392156862745,0.02352941176470588,1,0.7058823529411765,0,0.9764705882352941,0.5137254901960784,0.1411764705882353],"Name":"Citrus","NanColor":[0.9764705882352941,0.5137254901960784,0.1411764705882353]},{"IndexedColors":[0.4980392156862745,0.2313725490196079,0.03137254901960784,0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333,0.1764705882352941,0,0.2941176470588235],"Name":"Brewer Diverging Purple-Orange (11)","NanColor":[0.1764705882352941,0,0.2941176470588235]},{"IndexedColors":[0.4980392156862745,0.2313725490196079,0.03137254901960784,0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333,0.1764705882352941,0,0.2941176470588235],"Name":"Brewer Diverging Purple-Orange (10)","NanColor":[0.1764705882352941,0,0.2941176470588235]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (9)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.8784313725490196,0.5098039215686274,0.0784313725490196,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.996078431372549,0.8784313725490196,0.7137254901960784,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.5019607843137255,0.4509803921568628,0.6745098039215687,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (8)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.9450980392156862,0.6392156862745098,0.2509803921568627,0.996078431372549,0.8784313725490196,0.7137254901960784,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6,0.5568627450980392,0.7647058823529411,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (7)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.7019607843137254,0.3450980392156863,0.02352941176470588,0.9450980392156862,0.6392156862745098,0.2509803921568627,0.996078431372549,0.8784313725490196,0.7137254901960784,0.8470588235294118,0.8549019607843137,0.9215686274509803,0.6,0.5568627450980392,0.7647058823529411,0.3294117647058823,0.1529411764705882,0.5333333333333333],"Name":"Brewer Diverging Purple-Orange (6)","NanColor":[0.3294117647058823,0.1529411764705882,0.5333333333333333]},{"IndexedColors":[0.9019607843137255,0.3803921568627451,0.00392156862745098,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.3686274509803922,0.2352941176470588,0.6],"Name":"Brewer Diverging Purple-Orange (5)","NanColor":[0.3686274509803922,0.2352941176470588,0.6]},{"IndexedColors":[0.9019607843137255,0.3803921568627451,0.00392156862745098,0.9921568627450981,0.7215686274509804,0.3882352941176471,0.6980392156862745,0.6705882352941176,0.8235294117647058,0.3686274509803922,0.2352941176470588,0.6],"Name":"Brewer Diverging Purple-Orange (4)","NanColor":[0.3686274509803922,0.2352941176470588,0.6]},{"IndexedColors":[0.9450980392156862,0.6392156862745098,0.2509803921568627,0.9686274509803922,0.9686274509803922,0.9686274509803922,0.6,0.5568627450980392,0.7647058823529411],"Name":"Brewer Diverging Purple-Orange (3)","NanColor":[0.6,0.5568627450980392,0.7647058823529411]},{"IndexedColors":[0.6196078431372549,0.00392156862745098,0.2588235294117647,0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,1,1,0.7490196078431373,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353,0.3686274509803922,0.3098039215686275,0.6352941176470588],"Name":"Brewer Diverging Spectral (11)","NanColor":[0.3686274509803922,0.3098039215686275,0.6352941176470588]},{"IndexedColors":[0.6196078431372549,0.00392156862745098,0.2588235294117647,0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353,0.3686274509803922,0.3098039215686275,0.6352941176470588],"Name":"Brewer Diverging Spectral (10)","NanColor":[0.3686274509803922,0.3098039215686275,0.6352941176470588]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,1,1,0.7490196078431373,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (9)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9568627450980393,0.4274509803921568,0.2627450980392157,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.996078431372549,0.8784313725490196,0.5450980392156862,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.4,0.7607843137254902,0.6470588235294118,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (8)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9882352941176471,0.5529411764705883,0.3490196078431372,0.996078431372549,0.8784313725490196,0.5450980392156862,1,1,0.7490196078431373,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6,0.8352941176470589,0.5803921568627451,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (7)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8352941176470589,0.2431372549019608,0.3098039215686275,0.9882352941176471,0.5529411764705883,0.3490196078431372,0.996078431372549,0.8784313725490196,0.5450980392156862,0.9019607843137255,0.9607843137254902,0.596078431372549,0.6,0.8352941176470589,0.5803921568627451,0.196078431372549,0.5333333333333333,0.7411764705882353],"Name":"Brewer Diverging Spectral (6)","NanColor":[0.196078431372549,0.5333333333333333,0.7411764705882353]},{"IndexedColors":[0.8431372549019608,0.09803921568627451,0.1098039215686274,0.9921568627450981,0.6823529411764706,0.3803921568627451,1,1,0.7490196078431373,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.1686274509803922,0.5137254901960784,0.7294117647058823],"Name":"Brewer Diverging Spectral (5)","NanColor":[0.1686274509803922,0.5137254901960784,0.7294117647058823]},{"IndexedColors":[0.8431372549019608,0.09803921568627451,0.1098039215686274,0.9921568627450981,0.6823529411764706,0.3803921568627451,0.6705882352941176,0.8666666666666667,0.6431372549019608,0.1686274509803922,0.5137254901960784,0.7294117647058823],"Name":"Brewer Diverging Spectral (4)","NanColor":[0.1686274509803922,0.5137254901960784,0.7294117647058823]},{"IndexedColors":[0.9882352941176471,0.5529411764705883,0.3490196078431372,1,1,0.7490196078431373,0.6,0.8352941176470589,0.5803921568627451],"Name":"Brewer Diverging Spectral (3)","NanColor":[0.6,0.8352941176470589,0.5803921568627451]},{"IndexedColors":[0.3294117647058823,0.1882352941176471,0.0196078431372549,0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922,0,0.2352941176470588,0.1882352941176471],"Name":"Brewer Diverging Brown-Blue-Green (11)","NanColor":[0,0.2352941176470588,0.1882352941176471]},{"IndexedColors":[0.3294117647058823,0.1882352941176471,0.0196078431372549,0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922,0,0.2352941176470588,0.1882352941176471],"Name":"Brewer Diverging Brown-Blue-Green (10)","NanColor":[0,0.2352941176470588,0.1882352941176471]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (9)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.7490196078431373,0.5058823529411764,0.1764705882352941,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.5019607843137255,0.803921568627451,0.7568627450980392,0.207843137254902,0.592156862745098,0.5607843137254902,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (8)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.8470588235294118,0.7019607843137254,0.396078431372549,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.3529411764705883,0.7058823529411765,0.6745098039215687,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (7)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.5490196078431373,0.3176470588235294,0.0392156862745098,0.8470588235294118,0.7019607843137254,0.396078431372549,0.9647058823529412,0.9098039215686274,0.7647058823529411,0.7803921568627451,0.9176470588235294,0.8980392156862745,0.3529411764705883,0.7058823529411765,0.6745098039215687,0.00392156862745098,0.4,0.3686274509803922],"Name":"Brewer Diverging Brown-Blue-Green (6)","NanColor":[0.00392156862745098,0.4,0.3686274509803922]},{"IndexedColors":[0.6509803921568628,0.3803921568627451,0.1019607843137255,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.5019607843137255,0.803921568627451,0.7568627450980392,0.00392156862745098,0.5215686274509804,0.4431372549019608],"Name":"Brewer Diverging Brown-Blue-Green (5)","NanColor":[0.00392156862745098,0.5215686274509804,0.4431372549019608]},{"IndexedColors":[0.6509803921568628,0.3803921568627451,0.1019607843137255,0.8745098039215686,0.7607843137254902,0.4901960784313725,0.5019607843137255,0.803921568627451,0.7568627450980392,0.00392156862745098,0.5215686274509804,0.4431372549019608],"Name":"Brewer Diverging Brown-Blue-Green (4)","NanColor":[0.00392156862745098,0.5215686274509804,0.4431372549019608]},{"IndexedColors":[0.8470588235294118,0.7019607843137254,0.396078431372549,0.9607843137254902,0.9607843137254902,0.9607843137254902,0.3529411764705883,0.7058823529411765,0.6745098039215687],"Name":"Brewer Diverging Brown-Blue-Green (3)","NanColor":[0.3529411764705883,0.7058823529411765,0.6745098039215687]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8980392156862745,0.9607843137254902,0.9764705882352941,0.8,0.9254901960784314,0.9019607843137255,0.6,0.8470588235294118,0.788235294117647,0.4,0.7607843137254902,0.6431372549019608,0.2549019607843137,0.6823529411764706,0.4627450980392157,0.1372549019607843,0.5450980392156862,0.2705882352941176,0,0.4274509803921568,0.1725490196078431,0,0.2666666666666667,0.1058823529411765],"Name":"Brewer Sequential Blue-Green (9)","NanColor":[0,0.2666666666666667,0.1058823529411765]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8980392156862745,0.9607843137254902,0.9764705882352941,0.8,0.9254901960784314,0.9019607843137255,0.6,0.8470588235294118,0.788235294117647,0.4,0.7607843137254902,0.6431372549019608,0.2549019607843137,0.6823529411764706,0.4627450980392157,0.1372549019607843,0.5450980392156862,0.2705882352941176,0,0.3450980392156863,0.1411764705882353],"Name":"Brewer Sequential Blue-Green (8)","NanColor":[0,0.3450980392156863,0.1411764705882353]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.8,0.9254901960784314,0.9019607843137255,0.8,0.9254901960784314,0.9019607843137255,0.4,0.7607843137254902,0.6431372549019608,0.2549019607843137,0.6823529411764706,0.4627450980392157,0.1372549019607843,0.5450980392156862,0.2705882352941176,0,0.3450980392156863,0.1411764705882353],"Name":"Brewer Sequential Blue-Green (7)","NanColor":[0,0.3450980392156863,0.1411764705882353]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.8,0.9254901960784314,0.9019607843137255,0.6,0.8470588235294118,0.788235294117647,0.4,0.7607843137254902,0.6431372549019608,0.1725490196078431,0.6352941176470588,0.3725490196078431,0,0.4274509803921568,0.1725490196078431],"Name":"Brewer Sequential Blue-Green (6)","NanColor":[0,0.4274509803921568,0.1725490196078431]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.6980392156862745,0.8862745098039215,0.8862745098039215,0.4,0.7607843137254902,0.6431372549019608,0.1725490196078431,0.6352941176470588,0.3725490196078431,0,0.4274509803921568,0.1725490196078431],"Name":"Brewer Sequential Blue-Green (5)","NanColor":[0,0.4274509803921568,0.1725490196078431]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.6980392156862745,0.8862745098039215,0.8862745098039215,0.4,0.7607843137254902,0.6431372549019608,0.1372549019607843,0.5450980392156862,0.2705882352941176],"Name":"Brewer Sequential Blue-Green (4)","NanColor":[0.1372549019607843,0.5450980392156862,0.2705882352941176]},{"IndexedColors":[0.8980392156862745,0.9607843137254902,0.9764705882352941,0.6,0.8470588235294118,0.788235294117647,0.1725490196078431,0.6352941176470588,0.3725490196078431],"Name":"Brewer Sequential Blue-Green (3)","NanColor":[0.1725490196078431,0.6352941176470588,0.3725490196078431]},{"IndexedColors":[1,1,0.8980392156862745,1,0.9686274509803922,0.7372549019607844,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.9254901960784314,0.4392156862745098,0.0784313725490196,0.8,0.2980392156862745,0.00784313725490196,0.6,0.203921568627451,0.01568627450980392,0.4,0.1450980392156863,0.02352941176470588],"Name":"Brewer Sequential Yellow-Orange-Brown (9)","NanColor":[0.4,0.1450980392156863,0.02352941176470588]},{"IndexedColors":[1,1,0.8980392156862745,1,0.9686274509803922,0.7372549019607844,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.9254901960784314,0.4392156862745098,0.0784313725490196,0.8,0.2980392156862745,0.00784313725490196,0.5490196078431373,0.1764705882352941,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (8)","NanColor":[0.5490196078431373,0.1764705882352941,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.9254901960784314,0.4392156862745098,0.0784313725490196,0.8,0.2980392156862745,0.00784313725490196,0.5490196078431373,0.1764705882352941,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (7)","NanColor":[0.5490196078431373,0.1764705882352941,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8901960784313725,0.5686274509803921,0.996078431372549,0.7686274509803922,0.3098039215686275,0.996078431372549,0.6,0.1607843137254902,0.8509803921568627,0.3725490196078431,0.05490196078431372,0.6,0.203921568627451,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (6)","NanColor":[0.6,0.203921568627451,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8509803921568627,0.5568627450980392,0.996078431372549,0.6,0.1607843137254902,0.8509803921568627,0.3725490196078431,0.05490196078431372,0.6,0.203921568627451,0.01568627450980392],"Name":"Brewer Sequential Yellow-Orange-Brown (5)","NanColor":[0.6,0.203921568627451,0.01568627450980392]},{"IndexedColors":[1,1,0.8313725490196079,0.996078431372549,0.8509803921568627,0.5568627450980392,0.996078431372549,0.6,0.1607843137254902,0.8,0.2980392156862745,0.00784313725490196],"Name":"Brewer Sequential Yellow-Orange-Brown (4)","NanColor":[0.8,0.2980392156862745,0.00784313725490196]},{"IndexedColors":[1,0.9686274509803922,0.7372549019607844,0.996078431372549,0.7686274509803922,0.3098039215686275,0.8509803921568627,0.3725490196078431,0.05490196078431372],"Name":"Brewer Sequential Yellow-Orange-Brown (3)","NanColor":[0.8509803921568627,0.3725490196078431,0.05490196078431372]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8784313725490196,0.9254901960784314,0.9568627450980393,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5490196078431373,0.4196078431372549,0.6941176470588235,0.5333333333333333,0.2549019607843137,0.615686274509804,0.5058823529411764,0.05882352941176471,0.4862745098039216,0.3019607843137255,0,0.2941176470588235],"Name":"Brewer Sequential Blue-Purple (9)","NanColor":[0.3019607843137255,0,0.2941176470588235]},{"IndexedColors":[0.9686274509803922,0.9882352941176471,0.9921568627450981,0.8784313725490196,0.9254901960784314,0.9568627450980393,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5490196078431373,0.4196078431372549,0.6941176470588235,0.5333333333333333,0.2549019607843137,0.615686274509804,0.4313725490196079,0.00392156862745098,0.4196078431372549],"Name":"Brewer Sequential Blue-Purple (8)","NanColor":[0.4313725490196079,0.00392156862745098,0.4196078431372549]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5490196078431373,0.4196078431372549,0.6941176470588235,0.5333333333333333,0.2549019607843137,0.615686274509804,0.4313725490196079,0.00392156862745098,0.4196078431372549],"Name":"Brewer Sequential Blue-Purple (7)","NanColor":[0.4313725490196079,0.00392156862745098,0.4196078431372549]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7490196078431373,0.8274509803921568,0.9019607843137255,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5333333333333333,0.3372549019607843,0.6549019607843137,0.5058823529411764,0.05882352941176471,0.4862745098039216],"Name":"Brewer Sequential Blue-Purple (6)","NanColor":[0.5058823529411764,0.05882352941176471,0.4862745098039216]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7019607843137254,0.803921568627451,0.8901960784313725,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5333333333333333,0.3372549019607843,0.6549019607843137,0.5058823529411764,0.05882352941176471,0.4862745098039216],"Name":"Brewer Sequential Blue-Purple (5)","NanColor":[0.5058823529411764,0.05882352941176471,0.4862745098039216]},{"IndexedColors":[0.9294117647058824,0.9725490196078431,0.984313725490196,0.7019607843137254,0.803921568627451,0.8901960784313725,0.5490196078431373,0.5882352941176471,0.7764705882352941,0.5333333333333333,0.2549019607843137,0.615686274509804],"Name":"Brewer Sequential Blue-Purple (4)","NanColor":[0.5333333333333333,0.2549019607843137,0.615686274509804]},{"IndexedColors":[0.8784313725490196,0.9254901960784314,0.9568627450980393,0.6196078431372549,0.7372549019607844,0.8549019607843137,0.5333333333333333,0.3372549019607843,0.6549019607843137],"Name":"Brewer Sequential Blue-Purple (3)","NanColor":[0.5333333333333333,0.3372549019607843,0.6549019607843137]},{"IndexedColors":[0.4980392156862745,0.788235294117647,0.4980392156862745,0.7450980392156863,0.6823529411764706,0.8313725490196079,0.9921568627450981,0.7529411764705882,0.5254901960784314,1,1,0.6,0.2196078431372549,0.4235294117647059,0.6901960784313725,0.9411764705882353,0.00784313725490196,0.4980392156862745,0.7490196078431373,0.3568627450980392,0.09019607843137255,0.4,0.4,0.4],"Name":"Brewer Qualitative Accent","NanColor":[0.4,0.4,0.4]},{"IndexedColors":[0.1058823529411765,0.6196078431372549,0.4666666666666667,0.8509803921568627,0.3725490196078431,0.00784313725490196,0.4588235294117647,0.4392156862745098,0.7019607843137254,0.9058823529411765,0.1607843137254902,0.5411764705882353,0.4,0.6509803921568628,0.1176470588235294,0.9019607843137255,0.6705882352941176,0.00784313725490196,0.6509803921568628,0.4627450980392157,0.1137254901960784,0.4,0.4,0.4],"Name":"Brewer Qualitative Dark2","NanColor":[0.4,0.4,0.4]},{"IndexedColors":[0.4,0.7607843137254902,0.6470588235294118,0.9882352941176471,0.5529411764705883,0.3843137254901961,0.5529411764705883,0.6274509803921569,0.796078431372549,0.9058823529411765,0.5411764705882353,0.7647058823529411,0.6509803921568628,0.8470588235294118,0.3294117647058823,1,0.8509803921568627,0.1843137254901961,0.8980392156862745,0.7686274509803922,0.5803921568627451,0.7019607843137254,0.7019607843137254,0.7019607843137254],"Name":"Brewer Qualitative Set2","NanColor":[0.7019607843137254,0.7019607843137254,0.7019607843137254]},{"IndexedColors":[0.7019607843137254,0.8862745098039215,0.803921568627451,0.9921568627450981,0.803921568627451,0.6745098039215687,0.796078431372549,0.8352941176470589,0.9098039215686274,0.9568627450980393,0.792156862745098,0.8941176470588236,0.9019607843137255,0.9607843137254902,0.788235294117647,1,0.9490196078431372,0.6823529411764706,0.9450980392156862,0.8862745098039215,0.8,0.8,0.8,0.8],"Name":"Brewer Qualitative Pastel2","NanColor":[0.8,0.8,0.8]},{"IndexedColors":[0.984313725490196,0.7058823529411765,0.6823529411764706,0.7019607843137254,0.803921568627451,0.8901960784313725,0.8,0.9215686274509803,0.7725490196078432,0.8705882352941177,0.796078431372549,0.8941176470588236,0.996078431372549,0.8509803921568627,0.6509803921568628,1,1,0.8,0.8980392156862745,0.8470588235294118,0.7411764705882353,0.9921568627450981,0.8549019607843137,0.9254901960784314,0.9490196078431372,0.9490196078431372,0.9490196078431372],"Name":"Brewer Qualitative Pastel1","NanColor":[0.9490196078431372,0.9490196078431372,0.9490196078431372]},{"IndexedColors":[0.8941176470588236,0.1019607843137255,0.1098039215686274,0.2156862745098039,0.4941176470588236,0.7215686274509804,0.3019607843137255,0.6862745098039216,0.2901960784313726,0.596078431372549,0.3058823529411765,0.6392156862745098,1,0.4980392156862745,0,1,1,0.2,0.6509803921568628,0.3372549019607843,0.1568627450980392,0.9686274509803922,0.5058823529411764,0.7490196078431373,0.6,0.6,0.6],"Name":"Brewer Qualitative Set1","NanColor":[0.6,0.6,0.6]},{"IndexedColors":[0.6509803921568628,0.807843137254902,0.8901960784313725,0.1215686274509804,0.4705882352941176,0.7058823529411765,0.6980392156862745,0.8745098039215686,0.5411764705882353,0.2,0.6274509803921569,0.1725490196078431,0.984313725490196,0.6039215686274509,0.6,0.8901960784313725,0.1019607843137255,0.1098039215686274,0.9921568627450981,0.7490196078431373,0.4352941176470588,1,0.4980392156862745,0,0.792156862745098,0.6980392156862745,0.8392156862745098,0.4156862745098039,0.2392156862745098,0.6039215686274509,1,1,0.6],"Name":"Brewer Qualitative Paired","NanColor":[1,1,0.6]},{"IndexedColors":[0.5529411764705883,0.8274509803921568,0.7803921568627451,1,1,0.7019607843137254,0.7450980392156863,0.7294117647058823,0.8549019607843137,0.984313725490196,0.5019607843137255,0.4470588235294118,0.5019607843137255,0.6941176470588235,0.8274509803921568,0.9921568627450981,0.7058823529411765,0.3843137254901961,0.7019607843137254,0.8705882352941177,0.4117647058823529,0.9882352941176471,0.803921568627451,0.8980392156862745,0.8509803921568627,0.8509803921568627,0.8509803921568627,0.7372549019607844,0.5019607843137255,0.7411764705882353,0.8,0.9215686274509803,0.7725490196078432,1,0.9294117647058824,0.4352941176470588],"Name":"Brewer Qualitative Set3","NanColor":[1,0.9294117647058824,0.4352941176470588]},{"IndexedColors":[1,0,0,1,0.862745,0,0,0.695201,0],"Name":"Traffic Lights","NanColor":[0.803922,0,0.803922]},{"IndexedColors":[0.908659,0.604013,0.581857,1,0.862745,0,0,0.695201,0],"Name":"Traffic Lights For Deuteranopes","NanColor":[0.803922,0,0.803922]},{"IndexedColors":[0.4196078431372549,0,0.07058823529411765,0.9019607843137255,0.9411764705882353,0.0196078431372549,0.01568627450980392,0.6196078431372549,0.00784313725490196],"Name":"Traffic Lights For Deuteranopes 2","NanColor":[0.803922,0,0.803922]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Muted Blue-Green","NanColor":[0.25,0,0],"RGBPoints":[0,0.109804,0.27451,0.301961,0.02,0.129412,0.309804,0.341176,0.05,0.14902,0.341176,0.380392,0.1,0.188235,0.403922,0.458824,0.15,0.227451,0.447059,0.521569,0.2,0.290196,0.494118,0.588235,0.25,0.368627,0.552941,0.670588,0.3,0.458824,0.619608,0.74902,0.35,0.588235,0.713725,0.85098,0.4,0.72549,0.815686,0.941176,0.45,0.831373,0.882353,0.980392,0.475,0.909804,0.933333,1,0.5,0.980392,0.984314,1,0.5,0.996078,1,0.94902,0.5,1,1,0.980392,0.5,0.980392,0.984314,1,0.525,0.972549,0.988235,0.890196,0.55,0.917647,0.960784,0.835294,0.6,0.835294,0.921569,0.772549,0.65,0.768627,0.901961,0.737255,0.7,0.670588,0.831373,0.654902,0.75,0.576471,0.760784,0.584314,0.8,0.498039,0.678431,0.521569,0.85,0.392157,0.560784,0.427451,0.9,0.294118,0.45098,0.333333,0.95,0.211765,0.34902,0.254902,1,0.152941,0.278431,0.196078]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Green-Blue Asymmetric Divergent (62Blbc)","NanColor":[0.25,0,0],"RGBPoints":[0,0.121569,0.2,0.145098,0.05,0.196078,0.301961,0.223529,0.1,0.258824,0.4,0.278431,0.2,0.341176,0.54902,0.341176,0.25,0.419608,0.619608,0.376471,0.3,0.545098,0.701961,0.392157,0.35,0.643137,0.780392,0.403922,0.4,0.729412,0.819608,0.45098,0.45,0.811765,0.870588,0.521569,0.5,0.898039,0.909804,0.564706,0.55,0.941176,0.92549,0.686275,0.6,0.960784,0.94902,0.776471,0.64,1,1,1,0.65,0.890196,0.988235,0.972549,0.7,0.721569,0.894118,0.901961,0.75,0.631373,0.823529,0.839216,0.8,0.517647,0.662745,0.701961,0.85,0.384314,0.494118,0.54902,0.9,0.298039,0.360784,0.45098,0.95,0.223529,0.25098,0.34902,0.99,0.156863,0.172549,0.25098,1,0.137255,0.137255,0.188235]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Asymmtrical Earth Tones (6_21b)","NanColor":[0.25,0,0],"RGBPoints":[0,0.141176,0.14902,0.2,0.05,0.215686,0.258824,0.321569,0.1,0.243137,0.368627,0.380392,0.15,0.27451,0.439216,0.4,0.2,0.32549,0.501961,0.384314,0.25,0.403922,0.6,0.419608,0.3,0.486275,0.701961,0.454902,0.35,0.556863,0.74902,0.494118,0.4,0.670588,0.8,0.545098,0.5,0.854902,0.901961,0.631373,0.55,0.92549,0.941176,0.694118,0.6,0.960784,0.94902,0.776471,0.65,0.988235,0.968627,0.909804,0.7,0.839216,0.815686,0.772549,0.75,0.701961,0.662745,0.615686,0.8,0.6,0.529412,0.478431,0.85,0.501961,0.403922,0.360784,0.9,0.439216,0.313725,0.290196,1,0.301961,0.164706,0.176471]},{"ColorSpace":"Lab","Creator":"Francesca Samsel","Name":"Yellow 15","NanColor":[0.25,0,0],"RGBPoints":[0,1,1,0.988235,0.002,1,1,0.988235,0.05,0.984314,0.988235,0.843137,0.1,0.988235,0.988235,0.741176,0.15,0.980392,0.968627,0.654902,0.2,0.980392,0.945098,0.576471,0.25,0.968627,0.905882,0.486275,0.3,0.968627,0.862745,0.388235,0.35,0.960784,0.803922,0.286275,0.4,0.94902,0.741176,0.219608,0.45,0.941176,0.678431,0.14902,0.5,0.929412,0.607843,0.094118,0.55,0.921569,0.545098,0.054902,0.6,0.909804,0.486275,0.035294,0.65,0.890196,0.411765,0.019608,0.7,0.8,0.305882,0,0.75,0.760784,0.239216,0,0.8,0.678431,0.180392,0.011765,0.85,0.6,0.121569,0.023529,0.9,0.501961,0.054902,0.031373,0.95,0.4,0.039216,0.058824,1,0.301961,0.047059,0.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,0.001462,0.000466,0.013866,0.003922,0.002258,0.001295,0.018331,0.007843,0.003279,0.002305,0.023708,0.011765,0.004512,0.00349,0.029965,0.015686,0.00595,0.004843,0.03713,0.019608,0.007588,0.006356,0.044973,0.023529,0.009426,0.008022,0.052844,0.027451,0.011465,0.009828,0.06075,0.031373,0.013708,0.011771,0.068667,0.035294,0.016156,0.01384,0.076603,0.039216,0.018815,0.016026,0.084584,0.043137,0.021692,0.01832,0.09261,0.047059,0.024792,0.020715,0.100676,0.05098,0.028123,0.023201,0.108787,0.054902,0.031696,0.025765,0.116965,0.058824,0.03552,0.028397,0.125209,0.062745,0.039608,0.03109,0.133515,0.066667,0.04383,0.03383,0.141886,0.070588,0.048062,0.036607,0.150327,0.07451,0.05232,0.039407,0.158841,0.078431,0.056615,0.04216,0.167446,0.082353,0.060949,0.044794,0.176129,0.086275,0.06533,0.047318,0.184892,0.090196,0.069764,0.049726,0.193735,0.094118,0.074257,0.052017,0.20266,0.098039,0.078815,0.054184,0.211667,0.101961,0.083446,0.056225,0.220755,0.105882,0.088155,0.058133,0.229922,0.109804,0.092949,0.059904,0.239164,0.113725,0.097833,0.061531,0.248477,0.117647,0.102815,0.06301,0.257854,0.121569,0.107899,0.064335,0.267289,0.12549,0.113094,0.065492,0.276784,0.129412,0.118405,0.066479,0.286321,0.133333,0.123833,0.067295,0.295879,0.137255,0.12938,0.067935,0.305443,0.141176,0.135053,0.068391,0.315,0.145098,0.140858,0.068654,0.324538,0.14902,0.146785,0.068738,0.334011,0.152941,0.152839,0.068637,0.343404,0.156863,0.159018,0.068354,0.352688,0.160784,0.165308,0.067911,0.361816,0.164706,0.171713,0.067305,0.370771,0.168627,0.178212,0.066576,0.379497,0.172549,0.184801,0.065732,0.387973,0.176471,0.19146,0.064818,0.396152,0.180392,0.198177,0.063862,0.404009,0.184314,0.204935,0.062907,0.411514,0.188235,0.211718,0.061992,0.418647,0.192157,0.218512,0.061158,0.425392,0.196078,0.225302,0.060445,0.431742,0.2,0.232077,0.059889,0.437695,0.203922,0.238826,0.059517,0.443256,0.207843,0.245543,0.059352,0.448436,0.211765,0.25222,0.059415,0.453248,0.215686,0.258857,0.059706,0.45771,0.219608,0.265447,0.060237,0.46184,0.223529,0.271994,0.060994,0.46566,0.227451,0.278493,0.061978,0.46919,0.231373,0.284951,0.063168,0.472451,0.235294,0.291366,0.064553,0.475462,0.239216,0.29774,0.066117,0.478243,0.243137,0.304081,0.067835,0.480812,0.247059,0.310382,0.069702,0.483186,0.25098,0.316654,0.07169,0.48538,0.254902,0.322899,0.073782,0.487408,0.258824,0.329114,0.075972,0.489287,0.262745,0.335308,0.078236,0.491024,0.266667,0.341482,0.080564,0.492631,0.270588,0.347636,0.082946,0.494121,0.27451,0.353773,0.085373,0.495501,0.278431,0.359898,0.087831,0.496778,0.282353,0.366012,0.090314,0.49796,0.286275,0.372116,0.092816,0.499053,0.290196,0.378211,0.095332,0.500067,0.294118,0.384299,0.097855,0.501002,0.298039,0.390384,0.100379,0.501864,0.301961,0.396467,0.102902,0.502658,0.305882,0.402548,0.10542,0.503386,0.309804,0.408629,0.10793,0.504052,0.313725,0.414709,0.110431,0.504662,0.317647,0.420791,0.11292,0.505215,0.321569,0.426877,0.115395,0.505714,0.32549,0.432967,0.117855,0.50616,0.329412,0.439062,0.120298,0.506555,0.333333,0.445163,0.122724,0.506901,0.337255,0.451271,0.125132,0.507198,0.341176,0.457386,0.127522,0.507448,0.345098,0.463508,0.129893,0.507652,0.34902,0.46964,0.132245,0.507809,0.352941,0.47578,0.134577,0.507921,0.356863,0.481929,0.136891,0.507989,0.360784,0.488088,0.139186,0.508011,0.364706,0.494258,0.141462,0.507988,0.368627,0.500438,0.143719,0.50792,0.372549,0.506629,0.145958,0.507806,0.376471,0.512831,0.148179,0.507648,0.380392,0.519045,0.150383,0.507443,0.384314,0.52527,0.152569,0.507192,0.388235,0.531507,0.154739,0.506895,0.392157,0.537755,0.156894,0.506551,0.396078,0.544015,0.159033,0.506159,0.4,0.550287,0.161158,0.505719,0.403922,0.556571,0.163269,0.50523,0.407843,0.562866,0.165368,0.504692,0.411765,0.569172,0.167454,0.504105,0.415686,0.57549,0.16953,0.503466,0.419608,0.581819,0.171596,0.502777,0.423529,0.588158,0.173652,0.502035,0.427451,0.594508,0.175701,0.501241,0.431373,0.600868,0.177743,0.500394,0.435294,0.607238,0.179779,0.499492,0.439216,0.613617,0.181811,0.498536,0.443137,0.620005,0.18384,0.497524,0.447059,0.626401,0.185867,0.496456,0.45098,0.632805,0.187893,0.495332,0.454902,0.639216,0.189921,0.49415,0.458824,0.645633,0.191952,0.49291,0.462745,0.652056,0.193986,0.491611,0.466667,0.658483,0.196027,0.490253,0.470588,0.664915,0.198075,0.488836,0.47451,0.671349,0.200133,0.487358,0.478431,0.677786,0.202203,0.485819,0.482353,0.684224,0.204286,0.484219,0.486275,0.690661,0.206384,0.482558,0.490196,0.697098,0.208501,0.480835,0.494118,0.703532,0.210638,0.479049,0.498039,0.709962,0.212797,0.477201,0.501961,0.716387,0.214982,0.47529,0.505882,0.722805,0.217194,0.473316,0.509804,0.729216,0.219437,0.471279,0.513725,0.735616,0.221713,0.46918,0.517647,0.742004,0.224025,0.467018,0.521569,0.748378,0.226377,0.464794,0.52549,0.754737,0.228772,0.462509,0.529412,0.761077,0.231214,0.460162,0.533333,0.767398,0.233705,0.457755,0.537255,0.773695,0.236249,0.455289,0.541176,0.779968,0.238851,0.452765,0.545098,0.786212,0.241514,0.450184,0.54902,0.792427,0.244242,0.447543,0.552941,0.798608,0.24704,0.444848,0.556863,0.804752,0.249911,0.442102,0.560784,0.810855,0.252861,0.439305,0.564706,0.816914,0.255895,0.436461,0.568627,0.822926,0.259016,0.433573,0.572549,0.828886,0.262229,0.430644,0.576471,0.834791,0.26554,0.427671,0.580392,0.840636,0.268953,0.424666,0.584314,0.846416,0.272473,0.421631,0.588235,0.852126,0.276106,0.418573,0.592157,0.857763,0.279857,0.415496,0.596078,0.86332,0.283729,0.412403,0.6,0.868793,0.287728,0.409303,0.603922,0.874176,0.291859,0.406205,0.607843,0.879464,0.296125,0.403118,0.611765,0.884651,0.30053,0.400047,0.615686,0.889731,0.305079,0.397002,0.619608,0.8947,0.309773,0.393995,0.623529,0.899552,0.314616,0.391037,0.627451,0.904281,0.31961,0.388137,0.631373,0.908884,0.324755,0.385308,0.635294,0.913354,0.330052,0.382563,0.639216,0.917689,0.3355,0.379915,0.643137,0.921884,0.341098,0.377376,0.647059,0.925937,0.346844,0.374959,0.65098,0.929845,0.352734,0.372677,0.654902,0.933606,0.358764,0.370541,0.658824,0.937221,0.364929,0.368567,0.662745,0.940687,0.371224,0.366762,0.666667,0.944006,0.377643,0.365136,0.670588,0.94718,0.384178,0.363701,0.67451,0.95021,0.39082,0.362468,0.678431,0.953099,0.397563,0.361438,0.682353,0.955849,0.4044,0.360619,0.686275,0.958464,0.411324,0.360014,0.690196,0.960949,0.418323,0.35963,0.694118,0.96331,0.42539,0.359469,0.698039,0.965549,0.432519,0.359529,0.701961,0.967671,0.439703,0.35981,0.705882,0.96968,0.446936,0.360311,0.709804,0.971582,0.45421,0.36103,0.713725,0.973381,0.46152,0.361965,0.717647,0.975082,0.468861,0.363111,0.721569,0.97669,0.476226,0.364466,0.72549,0.97821,0.483612,0.366025,0.729412,0.979645,0.491014,0.367783,0.733333,0.981,0.498428,0.369734,0.737255,0.982279,0.505851,0.371874,0.741176,0.983485,0.51328,0.374198,0.745098,0.984622,0.520713,0.376698,0.74902,0.985693,0.528148,0.379371,0.752941,0.9867,0.535582,0.38221,0.756863,0.987646,0.543015,0.38521,0.760784,0.988533,0.550446,0.388365,0.764706,0.989363,0.557873,0.391671,0.768627,0.990138,0.565296,0.395122,0.772549,0.990871,0.572706,0.398714,0.776471,0.991558,0.580107,0.402441,0.780392,0.992196,0.587502,0.406299,0.784314,0.992785,0.594891,0.410283,0.788235,0.993326,0.602275,0.41439,0.792157,0.993834,0.609644,0.418613,0.796078,0.994309,0.616999,0.42295,0.8,0.994738,0.62435,0.427397,0.803922,0.995122,0.631696,0.431951,0.807843,0.99548,0.639027,0.436607,0.811765,0.99581,0.646344,0.441361,0.815686,0.996096,0.653659,0.446213,0.819608,0.996341,0.660969,0.45116,0.823529,0.99658,0.668256,0.456192,0.827451,0.996775,0.675541,0.461314,0.831373,0.996925,0.682828,0.466526,0.835294,0.997077,0.690088,0.471811,0.839216,0.997186,0.697349,0.477182,0.843137,0.997254,0.704611,0.482635,0.847059,0.997325,0.711848,0.488154,0.85098,0.997351,0.719089,0.493755,0.854902,0.997351,0.726324,0.499428,0.858824,0.997341,0.733545,0.505167,0.862745,0.997285,0.740772,0.510983,0.866667,0.997228,0.747981,0.516859,0.870588,0.997138,0.75519,0.522806,0.87451,0.997019,0.762398,0.528821,0.878431,0.996898,0.769591,0.534892,0.882353,0.996727,0.776795,0.541039,0.886275,0.996571,0.783977,0.547233,0.890196,0.996369,0.791167,0.553499,0.894118,0.996162,0.798348,0.55982,0.898039,0.995932,0.805527,0.566202,0.901961,0.99568,0.812706,0.572645,0.905882,0.995424,0.819875,0.57914,0.909804,0.995131,0.827052,0.585701,0.913725,0.994851,0.834213,0.592307,0.917647,0.994524,0.841387,0.598983,0.921569,0.994222,0.84854,0.605696,0.92549,0.993866,0.855711,0.612482,0.929412,0.993545,0.862859,0.619299,0.933333,0.99317,0.870024,0.626189,0.937255,0.992831,0.877168,0.633109,0.941176,0.99244,0.88433,0.640099,0.945098,0.992089,0.89147,0.647116,0.94902,0.991688,0.898627,0.654202,0.952941,0.991332,0.905763,0.661309,0.956863,0.99093,0.912915,0.668481,0.960784,0.99057,0.920049,0.675675,0.964706,0.990175,0.927196,0.682926,0.968627,0.989815,0.934329,0.690198,0.972549,0.989434,0.94147,0.697519,0.976471,0.989077,0.948604,0.704863,0.980392,0.988717,0.955742,0.712242,0.984314,0.988367,0.962878,0.719649,0.988235,0.988033,0.970012,0.727077,0.992157,0.987691,0.977154,0.734536,0.996078,0.987387,0.984288,0.742002,1,0.987053,0.991438,0.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,0.001462,0.000466,0.013866,0.003922,0.002267,0.00127,0.01857,0.007843,0.003299,0.002249,0.024239,0.011765,0.004547,0.003392,0.030909,0.015686,0.006006,0.004692,0.038558,0.019608,0.007676,0.006136,0.046836,0.023529,0.009561,0.007713,0.055143,0.027451,0.011663,0.009417,0.06346,0.031373,0.013995,0.011225,0.071862,0.035294,0.016561,0.013136,0.080282,0.039216,0.019373,0.015133,0.088767,0.043137,0.022447,0.017199,0.097327,0.047059,0.025793,0.019331,0.10593,0.05098,0.029432,0.021503,0.114621,0.054902,0.033385,0.023702,0.123397,0.058824,0.037668,0.025921,0.132232,0.062745,0.042253,0.028139,0.141141,0.066667,0.046915,0.030324,0.150164,0.070588,0.051644,0.032474,0.159254,0.07451,0.056449,0.034569,0.168414,0.078431,0.06134,0.03659,0.177642,0.082353,0.066331,0.038504,0.186962,0.086275,0.071429,0.040294,0.196354,0.090196,0.076637,0.041905,0.205799,0.094118,0.081962,0.043328,0.215289,0.098039,0.087411,0.044556,0.224813,0.101961,0.09299,0.045583,0.234358,0.105882,0.098702,0.046402,0.243904,0.109804,0.104551,0.047008,0.25343,0.113725,0.110536,0.047399,0.262912,0.117647,0.116656,0.047574,0.272321,0.121569,0.122908,0.047536,0.281624,0.12549,0.129285,0.047293,0.290788,0.129412,0.135778,0.046856,0.299776,0.133333,0.142378,0.046242,0.308553,0.137255,0.149073,0.045468,0.317085,0.141176,0.15585,0.044559,0.325338,0.145098,0.162689,0.043554,0.333277,0.14902,0.169575,0.042489,0.340874,0.152941,0.176493,0.041402,0.348111,0.156863,0.183429,0.040329,0.354971,0.160784,0.190367,0.039309,0.361447,0.164706,0.197297,0.0384,0.367535,0.168627,0.204209,0.037632,0.373238,0.172549,0.211095,0.03703,0.378563,0.176471,0.217949,0.036615,0.383522,0.180392,0.224763,0.036405,0.388129,0.184314,0.231538,0.036405,0.3924,0.188235,0.238273,0.036621,0.396353,0.192157,0.244967,0.037055,0.400007,0.196078,0.25162,0.037705,0.403378,0.2,0.258234,0.038571,0.406485,0.203922,0.26481,0.039647,0.409345,0.207843,0.271347,0.040922,0.411976,0.211765,0.27785,0.042353,0.414392,0.215686,0.284321,0.043933,0.416608,0.219608,0.290763,0.045644,0.418637,0.223529,0.297178,0.04747,0.420491,0.227451,0.303568,0.049396,0.422182,0.231373,0.309935,0.051407,0.423721,0.235294,0.316282,0.05349,0.425116,0.239216,0.32261,0.055634,0.426377,0.243137,0.328921,0.057827,0.427511,0.247059,0.335217,0.06006,0.428524,0.25098,0.3415,0.062325,0.429425,0.254902,0.347771,0.064616,0.430217,0.258824,0.354032,0.066925,0.430906,0.262745,0.360284,0.069247,0.431497,0.266667,0.366529,0.071579,0.431994,0.270588,0.372768,0.073915,0.4324,0.27451,0.379001,0.076253,0.432719,0.278431,0.385228,0.078591,0.432955,0.282353,0.391453,0.080927,0.433109,0.286275,0.397674,0.083257,0.433183,0.290196,0.403894,0.08558,0.433179,0.294118,0.410113,0.087896,0.433098,0.298039,0.416331,0.090203,0.432943,0.301961,0.422549,0.092501,0.432714,0.305882,0.428768,0.09479,0.432412,0.309804,0.434987,0.097069,0.432039,0.313725,0.441207,0.099338,0.431594,0.317647,0.447428,0.101597,0.43108,0.321569,0.453651,0.103848,0.430498,0.32549,0.459875,0.106089,0.429846,0.329412,0.4661,0.108322,0.429125,0.333333,0.472328,0.110547,0.428334,0.337255,0.478558,0.112764,0.427475,0.341176,0.484789,0.114974,0.426548,0.345098,0.491022,0.117179,0.425552,0.34902,0.497257,0.119379,0.424488,0.352941,0.503493,0.121575,0.423356,0.356863,0.50973,0.123769,0.422156,0.360784,0.515967,0.12596,0.420887,0.364706,0.522206,0.12815,0.419549,0.368627,0.528444,0.130341,0.418142,0.372549,0.534683,0.132534,0.416667,0.376471,0.54092,0.134729,0.415123,0.380392,0.547157,0.136929,0.413511,0.384314,0.553392,0.139134,0.411829,0.388235,0.559624,0.141346,0.410078,0.392157,0.565854,0.143567,0.408258,0.396078,0.572081,0.145797,0.406369,0.4,0.578304,0.148039,0.404411,0.403922,0.584521,0.150294,0.402385,0.407843,0.590734,0.152563,0.40029,0.411765,0.59694,0.154848,0.398125,0.415686,0.603139,0.157151,0.395891,0.419608,0.60933,0.159474,0.393589,0.423529,0.615513,0.161817,0.391219,0.427451,0.621685,0.164184,0.388781,0.431373,0.627847,0.166575,0.386276,0.435294,0.633998,0.168992,0.383704,0.439216,0.640135,0.171438,0.381065,0.443137,0.64626,0.173914,0.378359,0.447059,0.652369,0.176421,0.375586,0.45098,0.658463,0.178962,0.372748,0.454902,0.66454,0.181539,0.369846,0.458824,0.670599,0.184153,0.366879,0.462745,0.676638,0.186807,0.363849,0.466667,0.682656,0.189501,0.360757,0.470588,0.688653,0.192239,0.357603,0.47451,0.694627,0.195021,0.354388,0.478431,0.700576,0.197851,0.351113,0.482353,0.7065,0.200728,0.347777,0.486275,0.712396,0.203656,0.344383,0.490196,0.718264,0.206636,0.340931,0.494118,0.724103,0.20967,0.337424,0.498039,0.729909,0.212759,0.333861,0.501961,0.735683,0.215906,0.330245,0.505882,0.741423,0.219112,0.326576,0.509804,0.747127,0.222378,0.322856,0.513725,0.752794,0.225706,0.319085,0.517647,0.758422,0.229097,0.315266,0.521569,0.76401,0.232554,0.311399,0.52549,0.769556,0.236077,0.307485,0.529412,0.775059,0.239667,0.303526,0.533333,0.780517,0.243327,0.299523,0.537255,0.785929,0.247056,0.295477,0.541176,0.791293,0.250856,0.29139,0.545098,0.796607,0.254728,0.287264,0.54902,0.801871,0.258674,0.283099,0.552941,0.807082,0.262692,0.278898,0.556863,0.812239,0.266786,0.274661,0.560784,0.817341,0.270954,0.27039,0.564706,0.822386,0.275197,0.266085,0.568627,0.827372,0.279517,0.26175,0.572549,0.832299,0.283913,0.257383,0.576471,0.837165,0.288385,0.252988,0.580392,0.841969,0.292933,0.248564,0.584314,0.846709,0.297559,0.244113,0.588235,0.851384,0.30226,0.239636,0.592157,0.855992,0.307038,0.235133,0.596078,0.860533,0.311892,0.230606,0.6,0.865006,0.316822,0.226055,0.603922,0.869409,0.321827,0.221482,0.607843,0.873741,0.326906,0.216886,0.611765,0.878001,0.33206,0.212268,0.615686,0.882188,0.337287,0.207628,0.619608,0.886302,0.342586,0.202968,0.623529,0.890341,0.347957,0.198286,0.627451,0.894305,0.353399,0.193584,0.631373,0.898192,0.358911,0.18886,0.635294,0.902003,0.364492,0.184116,0.639216,0.905735,0.37014,0.17935,0.643137,0.90939,0.375856,0.174563,0.647059,0.912966,0.381636,0.169755,0.65098,0.916462,0.387481,0.164924,0.654902,0.919879,0.393389,0.16007,0.658824,0.923215,0.399359,0.155193,0.662745,0.92647,0.405389,0.150292,0.666667,0.929644,0.411479,0.145367,0.670588,0.932737,0.417627,0.140417,0.67451,0.935747,0.423831,0.13544,0.678431,0.938675,0.430091,0.130438,0.682353,0.941521,0.436405,0.125409,0.686275,0.944285,0.442772,0.120354,0.690196,0.946965,0.449191,0.115272,0.694118,0.949562,0.45566,0.110164,0.698039,0.952075,0.462178,0.105031,0.701961,0.954506,0.468744,0.099874,0.705882,0.956852,0.475356,0.094695,0.709804,0.959114,0.482014,0.089499,0.713725,0.961293,0.488716,0.084289,0.717647,0.963387,0.495462,0.079073,0.721569,0.965397,0.502249,0.073859,0.72549,0.967322,0.509078,0.068659,0.729412,0.969163,0.515946,0.063488,0.733333,0.970919,0.522853,0.058367,0.737255,0.97259,0.529798,0.053324,0.741176,0.974176,0.53678,0.048392,0.745098,0.975677,0.543798,0.043618,0.74902,0.977092,0.55085,0.03905,0.752941,0.978422,0.557937,0.034931,0.756863,0.979666,0.565057,0.031409,0.760784,0.980824,0.572209,0.028508,0.764706,0.981895,0.579392,0.02625,0.768627,0.982881,0.586606,0.024661,0.772549,0.983779,0.593849,0.02377,0.776471,0.984591,0.601122,0.023606,0.780392,0.985315,0.608422,0.024202,0.784314,0.985952,0.61575,0.025592,0.788235,0.986502,0.623105,0.027814,0.792157,0.986964,0.630485,0.030908,0.796078,0.987337,0.63789,0.034916,0.8,0.987622,0.64532,0.039886,0.803922,0.987819,0.652773,0.045581,0.807843,0.987926,0.66025,0.05175,0.811765,0.987945,0.667748,0.058329,0.815686,0.987874,0.675267,0.065257,0.819608,0.987714,0.682807,0.072489,0.823529,0.987464,0.690366,0.07999,0.827451,0.987124,0.697944,0.087731,0.831373,0.986694,0.70554,0.095694,0.835294,0.986175,0.713153,0.103863,0.839216,0.985566,0.720782,0.112229,0.843137,0.984865,0.728427,0.120785,0.847059,0.984075,0.736087,0.129527,0.85098,0.983196,0.743758,0.138453,0.854902,0.982228,0.751442,0.147565,0.858824,0.981173,0.759135,0.156863,0.862745,0.980032,0.766837,0.166353,0.866667,0.978806,0.774545,0.176037,0.870588,0.977497,0.782258,0.185923,0.87451,0.976108,0.789974,0.196018,0.878431,0.974638,0.797692,0.206332,0.882353,0.973088,0.805409,0.216877,0.886275,0.971468,0.813122,0.227658,0.890196,0.969783,0.820825,0.238686,0.894118,0.968041,0.828515,0.249972,0.898039,0.966243,0.836191,0.261534,0.901961,0.964394,0.843848,0.273391,0.905882,0.962517,0.851476,0.285546,0.909804,0.960626,0.859069,0.29801,0.913725,0.95872,0.866624,0.31082,0.917647,0.956834,0.874129,0.323974,0.921569,0.954997,0.881569,0.337475,0.92549,0.953215,0.888942,0.351369,0.929412,0.951546,0.896226,0.365627,0.933333,0.950018,0.903409,0.380271,0.937255,0.948683,0.910473,0.395289,0.941176,0.947594,0.917399,0.410665,0.945098,0.946809,0.924168,0.426373,0.94902,0.946392,0.930761,0.442367,0.952941,0.946403,0.937159,0.458592,0.956863,0.946903,0.943348,0.47497,0.960784,0.947937,0.949318,0.491426,0.964706,0.949545,0.955063,0.50786,0.968627,0.95174,0.960587,0.524203,0.972549,0.954529,0.965896,0.540361,0.976471,0.957896,0.971003,0.556275,0.980392,0.961812,0.975924,0.571925,0.984314,0.966249,0.980678,0.587206,0.988235,0.971162,0.985282,0.602154,0.992157,0.976511,0.989753,0.61676,0.996078,0.982257,0.994109,0.631017,1,0.988362,0.998364,0.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,0.050383,0.029803,0.527975,0.003922,0.063536,0.028426,0.533124,0.007843,0.075353,0.027206,0.538007,0.011765,0.086222,0.026125,0.542658,0.015686,0.096379,0.025165,0.547103,0.019608,0.10598,0.024309,0.551368,0.023529,0.115124,0.023556,0.555468,0.027451,0.123903,0.022878,0.559423,0.031373,0.132381,0.022258,0.56325,0.035294,0.140603,0.021687,0.566959,0.039216,0.148607,0.021154,0.570562,0.043137,0.156421,0.020651,0.574065,0.047059,0.16407,0.020171,0.577478,0.05098,0.171574,0.019706,0.580806,0.054902,0.17895,0.019252,0.584054,0.058824,0.186213,0.018803,0.587228,0.062745,0.193374,0.018354,0.59033,0.066667,0.200445,0.017902,0.593364,0.070588,0.207435,0.017442,0.596333,0.07451,0.21435,0.016973,0.599239,0.078431,0.221197,0.016497,0.602083,0.082353,0.227983,0.016007,0.604867,0.086275,0.234715,0.015502,0.607592,0.090196,0.241396,0.014979,0.610259,0.094118,0.248032,0.014439,0.612868,0.098039,0.254627,0.013882,0.615419,0.101961,0.261183,0.013308,0.617911,0.105882,0.267703,0.012716,0.620346,0.109804,0.274191,0.012109,0.622722,0.113725,0.280648,0.011488,0.625038,0.117647,0.287076,0.010855,0.627295,0.121569,0.293478,0.010213,0.62949,0.12549,0.299855,0.009561,0.631624,0.129412,0.30621,0.008902,0.633694,0.133333,0.312543,0.008239,0.6357,0.137255,0.318856,0.007576,0.63764,0.141176,0.32515,0.006915,0.639512,0.145098,0.331426,0.006261,0.641316,0.14902,0.337683,0.005618,0.643049,0.152941,0.343925,0.004991,0.64471,0.156863,0.35015,0.004382,0.646298,0.160784,0.356359,0.003798,0.64781,0.164706,0.362553,0.003243,0.649245,0.168627,0.368733,0.002724,0.650601,0.172549,0.374897,0.002245,0.651876,0.176471,0.381047,0.001814,0.653068,0.180392,0.387183,0.001434,0.654177,0.184314,0.393304,0.001114,0.655199,0.188235,0.399411,0.000859,0.656133,0.192157,0.405503,0.000678,0.656977,0.196078,0.41158,0.000577,0.65773,0.2,0.417642,0.000564,0.65839,0.203922,0.423689,0.000646,0.658956,0.207843,0.429719,0.000831,0.659425,0.211765,0.435734,0.001127,0.659797,0.215686,0.441732,0.00154,0.660069,0.219608,0.447714,0.00208,0.66024,0.223529,0.453677,0.002755,0.66031,0.227451,0.459623,0.003574,0.660277,0.231373,0.46555,0.004545,0.660139,0.235294,0.471457,0.005678,0.659897,0.239216,0.477344,0.00698,0.659549,0.243137,0.48321,0.00846,0.659095,0.247059,0.489055,0.010127,0.658534,0.25098,0.494877,0.01199,0.657865,0.254902,0.500678,0.014055,0.657088,0.258824,0.506454,0.016333,0.656202,0.262745,0.512206,0.018833,0.655209,0.266667,0.517933,0.021563,0.654109,0.270588,0.523633,0.024532,0.652901,0.27451,0.529306,0.027747,0.651586,0.278431,0.534952,0.031217,0.650165,0.282353,0.54057,0.03495,0.64864,0.286275,0.546157,0.038954,0.64701,0.290196,0.551715,0.043136,0.645277,0.294118,0.557243,0.047331,0.643443,0.298039,0.562738,0.051545,0.641509,0.301961,0.568201,0.055778,0.639477,0.305882,0.573632,0.060028,0.637349,0.309804,0.579029,0.064296,0.635126,0.313725,0.584391,0.068579,0.632812,0.317647,0.589719,0.072878,0.630408,0.321569,0.595011,0.07719,0.627917,0.32549,0.600266,0.081516,0.625342,0.329412,0.605485,0.085854,0.622686,0.333333,0.610667,0.090204,0.619951,0.337255,0.615812,0.094564,0.61714,0.341176,0.620919,0.098934,0.614257,0.345098,0.625987,0.103312,0.611305,0.34902,0.631017,0.107699,0.608287,0.352941,0.636008,0.112092,0.605205,0.356863,0.640959,0.116492,0.602065,0.360784,0.645872,0.120898,0.598867,0.364706,0.650746,0.125309,0.595617,0.368627,0.65558,0.129725,0.592317,0.372549,0.660374,0.134144,0.588971,0.376471,0.665129,0.138566,0.585582,0.380392,0.669845,0.142992,0.582154,0.384314,0.674522,0.147419,0.578688,0.388235,0.67916,0.151848,0.575189,0.392157,0.683758,0.156278,0.57166,0.396078,0.688318,0.160709,0.568103,0.4,0.69284,0.165141,0.564522,0.403922,0.697324,0.169573,0.560919,0.407843,0.701769,0.174005,0.557296,0.411765,0.706178,0.178437,0.553657,0.415686,0.710549,0.182868,0.550004,0.419608,0.714883,0.187299,0.546338,0.423529,0.719181,0.191729,0.542663,0.427451,0.723444,0.196158,0.538981,0.431373,0.72767,0.200586,0.535293,0.435294,0.731862,0.205013,0.531601,0.439216,0.736019,0.209439,0.527908,0.443137,0.740143,0.213864,0.524216,0.447059,0.744232,0.218288,0.520524,0.45098,0.748289,0.222711,0.516834,0.454902,0.752312,0.227133,0.513149,0.458824,0.756304,0.231555,0.509468,0.462745,0.760264,0.235976,0.505794,0.466667,0.764193,0.240396,0.502126,0.470588,0.76809,0.244817,0.498465,0.47451,0.771958,0.249237,0.494813,0.478431,0.775796,0.253658,0.491171,0.482353,0.779604,0.258078,0.487539,0.486275,0.783383,0.2625,0.483918,0.490196,0.787133,0.266922,0.480307,0.494118,0.790855,0.271345,0.476706,0.498039,0.794549,0.27577,0.473117,0.501961,0.798216,0.280197,0.469538,0.505882,0.801855,0.284626,0.465971,0.509804,0.805467,0.289057,0.462415,0.513725,0.809052,0.293491,0.45887,0.517647,0.812612,0.297928,0.455338,0.521569,0.816144,0.302368,0.451816,0.52549,0.819651,0.306812,0.448306,0.529412,0.823132,0.311261,0.444806,0.533333,0.826588,0.315714,0.441316,0.537255,0.830018,0.320172,0.437836,0.541176,0.833422,0.324635,0.434366,0.545098,0.836801,0.329105,0.430905,0.54902,0.840155,0.33358,0.427455,0.552941,0.843484,0.338062,0.424013,0.556863,0.846788,0.342551,0.420579,0.560784,0.850066,0.347048,0.417153,0.564706,0.853319,0.351553,0.413734,0.568627,0.856547,0.356066,0.410322,0.572549,0.85975,0.360588,0.406917,0.576471,0.862927,0.365119,0.403519,0.580392,0.866078,0.36966,0.400126,0.584314,0.869203,0.374212,0.396738,0.588235,0.872303,0.378774,0.393355,0.592157,0.875376,0.383347,0.389976,0.596078,0.878423,0.387932,0.3866,0.6,0.881443,0.392529,0.383229,0.603922,0.884436,0.397139,0.37986,0.607843,0.887402,0.401762,0.376494,0.611765,0.89034,0.406398,0.37313,0.615686,0.89325,0.411048,0.369768,0.619608,0.896131,0.415712,0.366407,0.623529,0.898984,0.420392,0.363047,0.627451,0.901807,0.425087,0.359688,0.631373,0.904601,0.429797,0.356329,0.635294,0.907365,0.434524,0.35297,0.639216,0.910098,0.439268,0.34961,0.643137,0.9128,0.444029,0.346251,0.647059,0.915471,0.448807,0.34289,0.65098,0.918109,0.453603,0.339529,0.654902,0.920714,0.458417,0.336166,0.658824,0.923287,0.463251,0.332801,0.662745,0.925825,0.468103,0.329435,0.666667,0.928329,0.472975,0.326067,0.670588,0.930798,0.477867,0.322697,0.67451,0.933232,0.48278,0.319325,0.678431,0.93563,0.487712,0.315952,0.682353,0.93799,0.492667,0.312575,0.686275,0.940313,0.497642,0.309197,0.690196,0.942598,0.502639,0.305816,0.694118,0.944844,0.507658,0.302433,0.698039,0.947051,0.512699,0.299049,0.701961,0.949217,0.517763,0.295662,0.705882,0.951344,0.52285,0.292275,0.709804,0.953428,0.52796,0.288883,0.713725,0.95547,0.533093,0.28549,0.717647,0.957469,0.53825,0.282096,0.721569,0.959424,0.543431,0.278701,0.72549,0.961336,0.548636,0.275305,0.729412,0.963203,0.553865,0.271909,0.733333,0.965024,0.559118,0.268513,0.737255,0.966798,0.564396,0.265118,0.741176,0.968526,0.5697,0.261721,0.745098,0.970205,0.575028,0.258325,0.74902,0.971835,0.580382,0.254931,0.752941,0.973416,0.585761,0.25154,0.756863,0.974947,0.591165,0.248151,0.760784,0.976428,0.596595,0.244767,0.764706,0.977856,0.602051,0.241387,0.768627,0.979233,0.607532,0.238013,0.772549,0.980556,0.613039,0.234646,0.776471,0.981826,0.618572,0.231287,0.780392,0.983041,0.624131,0.227937,0.784314,0.984199,0.629718,0.224595,0.788235,0.985301,0.63533,0.221265,0.792157,0.986345,0.640969,0.217948,0.796078,0.987332,0.646633,0.214648,0.8,0.98826,0.652325,0.211364,0.803922,0.989128,0.658043,0.2081,0.807843,0.989935,0.663787,0.204859,0.811765,0.990681,0.669558,0.201642,0.815686,0.991365,0.675355,0.198453,0.819608,0.991985,0.681179,0.195295,0.823529,0.992541,0.68703,0.19217,0.827451,0.993032,0.692907,0.189084,0.831373,0.993456,0.69881,0.186041,0.835294,0.993814,0.704741,0.183043,0.839216,0.994103,0.710698,0.180097,0.843137,0.994324,0.716681,0.177208,0.847059,0.994474,0.722691,0.174381,0.85098,0.994553,0.728728,0.171622,0.854902,0.994561,0.734791,0.168938,0.858824,0.994495,0.74088,0.166335,0.862745,0.994355,0.746995,0.163821,0.866667,0.994141,0.753137,0.161404,0.870588,0.993851,0.759304,0.159092,0.87451,0.993482,0.765499,0.156891,0.878431,0.993033,0.77172,0.154808,0.882353,0.992505,0.777967,0.152855,0.886275,0.991897,0.784239,0.151042,0.890196,0.991209,0.790537,0.149377,0.894118,0.990439,0.796859,0.14787,0.898039,0.989587,0.803205,0.146529,0.901961,0.988648,0.809579,0.145357,0.905882,0.987621,0.815978,0.144363,0.909804,0.986509,0.822401,0.143557,0.913725,0.985314,0.828846,0.142945,0.917647,0.984031,0.835315,0.142528,0.921569,0.982653,0.841812,0.142303,0.92549,0.98119,0.848329,0.142279,0.929412,0.979644,0.854866,0.142453,0.933333,0.977995,0.861432,0.142808,0.937255,0.976265,0.868016,0.143351,0.941176,0.974443,0.874622,0.144061,0.945098,0.97253,0.88125,0.144923,0.94902,0.970533,0.887896,0.145919,0.952941,0.968443,0.894564,0.147014,0.956863,0.966271,0.901249,0.14818,0.960784,0.964021,0.90795,0.14937,0.964706,0.961681,0.914672,0.15052,0.968627,0.959276,0.921407,0.151566,0.972549,0.956808,0.928152,0.152409,0.976471,0.954287,0.934908,0.152921,0.980392,0.951726,0.941671,0.152925,0.984314,0.949151,0.948435,0.152178,0.988235,0.946602,0.95519,0.150328,0.992157,0.944152,0.961916,0.146861,0.996078,0.941896,0.96859,0.140956,1,0.940015,0.975158,0.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,0.267004,0.004874,0.329415,0.003922,0.26851,0.009605,0.335427,0.007843,0.269944,0.014625,0.341379,0.011765,0.271305,0.019942,0.347269,0.015686,0.272594,0.025563,0.353093,0.019608,0.273809,0.031497,0.358853,0.023529,0.274952,0.037752,0.364543,0.027451,0.276022,0.044167,0.370164,0.031373,0.277018,0.050344,0.375715,0.035294,0.277941,0.056324,0.381191,0.039216,0.278791,0.062145,0.386592,0.043137,0.279566,0.067836,0.391917,0.047059,0.280267,0.073417,0.397163,0.05098,0.280894,0.078907,0.402329,0.054902,0.281446,0.08432,0.407414,0.058824,0.281924,0.089666,0.412415,0.062745,0.282327,0.094955,0.417331,0.066667,0.282656,0.100196,0.42216,0.070588,0.28291,0.105393,0.426902,0.07451,0.283091,0.110553,0.431554,0.078431,0.283197,0.11568,0.436115,0.082353,0.283229,0.120777,0.440584,0.086275,0.283187,0.125848,0.44496,0.090196,0.283072,0.130895,0.449241,0.094118,0.282884,0.13592,0.453427,0.098039,0.282623,0.140926,0.457517,0.101961,0.28229,0.145912,0.46151,0.105882,0.281887,0.150881,0.465405,0.109804,0.281412,0.155834,0.469201,0.113725,0.280868,0.160771,0.472899,0.117647,0.280255,0.165693,0.476498,0.121569,0.279574,0.170599,0.479997,0.12549,0.278826,0.17549,0.483397,0.129412,0.278012,0.180367,0.486697,0.133333,0.277134,0.185228,0.489898,0.137255,0.276194,0.190074,0.493001,0.141176,0.275191,0.194905,0.496005,0.145098,0.274128,0.199721,0.498911,0.14902,0.273006,0.20452,0.501721,0.152941,0.271828,0.209303,0.504434,0.156863,0.270595,0.214069,0.507052,0.160784,0.269308,0.218818,0.509577,0.164706,0.267968,0.223549,0.512008,0.168627,0.26658,0.228262,0.514349,0.172549,0.265145,0.232956,0.516599,0.176471,0.263663,0.237631,0.518762,0.180392,0.262138,0.242286,0.520837,0.184314,0.260571,0.246922,0.522828,0.188235,0.258965,0.251537,0.524736,0.192157,0.257322,0.25613,0.526563,0.196078,0.255645,0.260703,0.528312,0.2,0.253935,0.265254,0.529983,0.203922,0.252194,0.269783,0.531579,0.207843,0.250425,0.27429,0.533103,0.211765,0.248629,0.278775,0.534556,0.215686,0.246811,0.283237,0.535941,0.219608,0.244972,0.287675,0.53726,0.223529,0.243113,0.292092,0.538516,0.227451,0.241237,0.296485,0.539709,0.231373,0.239346,0.300855,0.540844,0.235294,0.237441,0.305202,0.541921,0.239216,0.235526,0.309527,0.542944,0.243137,0.233603,0.313828,0.543914,0.247059,0.231674,0.318106,0.544834,0.25098,0.229739,0.322361,0.545706,0.254902,0.227802,0.326594,0.546532,0.258824,0.225863,0.330805,0.547314,0.262745,0.223925,0.334994,0.548053,0.266667,0.221989,0.339161,0.548752,0.270588,0.220057,0.343307,0.549413,0.27451,0.21813,0.347432,0.550038,0.278431,0.21621,0.351535,0.550627,0.282353,0.214298,0.355619,0.551184,0.286275,0.212395,0.359683,0.55171,0.290196,0.210503,0.363727,0.552206,0.294118,0.208623,0.367752,0.552675,0.298039,0.206756,0.371758,0.553117,0.301961,0.204903,0.375746,0.553533,0.305882,0.203063,0.379716,0.553925,0.309804,0.201239,0.38367,0.554294,0.313725,0.19943,0.387607,0.554642,0.317647,0.197636,0.391528,0.554969,0.321569,0.19586,0.395433,0.555276,0.32549,0.1941,0.399323,0.555565,0.329412,0.192357,0.403199,0.555836,0.333333,0.190631,0.407061,0.556089,0.337255,0.188923,0.41091,0.556326,0.341176,0.187231,0.414746,0.556547,0.345098,0.185556,0.41857,0.556753,0.34902,0.183898,0.422383,0.556944,0.352941,0.182256,0.426184,0.55712,0.356863,0.180629,0.429975,0.557282,0.360784,0.179019,0.433756,0.55743,0.364706,0.177423,0.437527,0.557565,0.368627,0.175841,0.44129,0.557685,0.372549,0.174274,0.445044,0.557792,0.376471,0.172719,0.448791,0.557885,0.380392,0.171176,0.45253,0.557965,0.384314,0.169646,0.456262,0.55803,0.388235,0.168126,0.459988,0.558082,0.392157,0.166617,0.463708,0.558119,0.396078,0.165117,0.467423,0.558141,0.4,0.163625,0.471133,0.558148,0.403922,0.162142,0.474838,0.55814,0.407843,0.160665,0.47854,0.558115,0.411765,0.159194,0.482237,0.558073,0.415686,0.157729,0.485932,0.558013,0.419608,0.15627,0.489624,0.557936,0.423529,0.154815,0.493313,0.55784,0.427451,0.153364,0.497,0.557724,0.431373,0.151918,0.500685,0.557587,0.435294,0.150476,0.504369,0.55743,0.439216,0.149039,0.508051,0.55725,0.443137,0.147607,0.511733,0.557049,0.447059,0.14618,0.515413,0.556823,0.45098,0.144759,0.519093,0.556572,0.454902,0.143343,0.522773,0.556295,0.458824,0.141935,0.526453,0.555991,0.462745,0.140536,0.530132,0.555659,0.466667,0.139147,0.533812,0.555298,0.470588,0.13777,0.537492,0.554906,0.47451,0.136408,0.541173,0.554483,0.478431,0.135066,0.544853,0.554029,0.482353,0.133743,0.548535,0.553541,0.486275,0.132444,0.552216,0.553018,0.490196,0.131172,0.555899,0.552459,0.494118,0.129933,0.559582,0.551864,0.498039,0.128729,0.563265,0.551229,0.501961,0.127568,0.566949,0.550556,0.505882,0.126453,0.570633,0.549841,0.509804,0.125394,0.574318,0.549086,0.513725,0.124395,0.578002,0.548287,0.517647,0.123463,0.581687,0.547445,0.521569,0.122606,0.585371,0.546557,0.52549,0.121831,0.589055,0.545623,0.529412,0.121148,0.592739,0.544641,0.533333,0.120565,0.596422,0.543611,0.537255,0.120092,0.600104,0.54253,0.541176,0.119738,0.603785,0.5414,0.545098,0.119512,0.607464,0.540218,0.54902,0.119423,0.611141,0.538982,0.552941,0.119483,0.614817,0.537692,0.556863,0.119699,0.61849,0.536347,0.560784,0.120081,0.622161,0.534946,0.564706,0.120638,0.625828,0.533488,0.568627,0.12138,0.629492,0.531973,0.572549,0.122312,0.633153,0.530398,0.576471,0.123444,0.636809,0.528763,0.580392,0.12478,0.640461,0.527068,0.584314,0.126326,0.644107,0.525311,0.588235,0.128087,0.647749,0.523491,0.592157,0.130067,0.651384,0.521608,0.596078,0.132268,0.655014,0.519661,0.6,0.134692,0.658636,0.517649,0.603922,0.137339,0.662252,0.515571,0.607843,0.14021,0.665859,0.513427,0.611765,0.143303,0.669459,0.511215,0.615686,0.146616,0.67305,0.508936,0.619608,0.150148,0.676631,0.506589,0.623529,0.153894,0.680203,0.504172,0.627451,0.157851,0.683765,0.501686,0.631373,0.162016,0.687316,0.499129,0.635294,0.166383,0.690856,0.496502,0.639216,0.170948,0.694384,0.493803,0.643137,0.175707,0.6979,0.491033,0.647059,0.180653,0.701402,0.488189,0.65098,0.185783,0.704891,0.485273,0.654902,0.19109,0.708366,0.482284,0.658824,0.196571,0.711827,0.479221,0.662745,0.202219,0.715272,0.476084,0.666667,0.20803,0.718701,0.472873,0.670588,0.214,0.722114,0.469588,0.67451,0.220124,0.725509,0.466226,0.678431,0.226397,0.728888,0.462789,0.682353,0.232815,0.732247,0.459277,0.686275,0.239374,0.735588,0.455688,0.690196,0.24607,0.73891,0.452024,0.694118,0.252899,0.742211,0.448284,0.698039,0.259857,0.745492,0.444467,0.701961,0.266941,0.748751,0.440573,0.705882,0.274149,0.751988,0.436601,0.709804,0.281477,0.755203,0.432552,0.713725,0.288921,0.758394,0.428426,0.717647,0.296479,0.761561,0.424223,0.721569,0.304148,0.764704,0.419943,0.72549,0.311925,0.767822,0.415586,0.729412,0.319809,0.770914,0.411152,0.733333,0.327796,0.77398,0.40664,0.737255,0.335885,0.777018,0.402049,0.741176,0.344074,0.780029,0.397381,0.745098,0.35236,0.783011,0.392636,0.74902,0.360741,0.785964,0.387814,0.752941,0.369214,0.788888,0.382914,0.756863,0.377779,0.791781,0.377939,0.760784,0.386433,0.794644,0.372886,0.764706,0.395174,0.797475,0.367757,0.768627,0.404001,0.800275,0.362552,0.772549,0.412913,0.803041,0.357269,0.776471,0.421908,0.805774,0.35191,0.780392,0.430983,0.808473,0.346476,0.784314,0.440137,0.811138,0.340967,0.788235,0.449368,0.813768,0.335384,0.792157,0.458674,0.816363,0.329727,0.796078,0.468053,0.818921,0.323998,0.8,0.477504,0.821444,0.318195,0.803922,0.487026,0.823929,0.312321,0.807843,0.496615,0.826376,0.306377,0.811765,0.506271,0.828786,0.300362,0.815686,0.515992,0.831158,0.294279,0.819608,0.525776,0.833491,0.288127,0.823529,0.535621,0.835785,0.281908,0.827451,0.545524,0.838039,0.275626,0.831373,0.555484,0.840254,0.269281,0.835294,0.565498,0.84243,0.262877,0.839216,0.575563,0.844566,0.256415,0.843137,0.585678,0.846661,0.249897,0.847059,0.595839,0.848717,0.243329,0.85098,0.606045,0.850733,0.236712,0.854902,0.616293,0.852709,0.230052,0.858824,0.626579,0.854645,0.223353,0.862745,0.636902,0.856542,0.21662,0.866667,0.647257,0.8584,0.209861,0.870588,0.657642,0.860219,0.203082,0.87451,0.668054,0.861999,0.196293,0.878431,0.678489,0.863742,0.189503,0.882353,0.688944,0.865448,0.182725,0.886275,0.699415,0.867117,0.175971,0.890196,0.709898,0.868751,0.169257,0.894118,0.720391,0.87035,0.162603,0.898039,0.730889,0.871916,0.156029,0.901961,0.741388,0.873449,0.149561,0.905882,0.751884,0.874951,0.143228,0.909804,0.762373,0.876424,0.137064,0.913725,0.772852,0.877868,0.131109,0.917647,0.783315,0.879285,0.125405,0.921569,0.79376,0.880678,0.120005,0.92549,0.804182,0.882046,0.114965,0.929412,0.814576,0.883393,0.110347,0.933333,0.82494,0.88472,0.106217,0.937255,0.83527,0.886029,0.102646,0.941176,0.845561,0.887322,0.099702,0.945098,0.85581,0.888601,0.097452,0.94902,0.866013,0.889868,0.095953,0.952941,0.876168,0.891125,0.09525,0.956863,0.886271,0.892374,0.095374,0.960784,0.89632,0.893616,0.096335,0.964706,0.906311,0.894855,0.098125,0.968627,0.916242,0.896091,0.100717,0.972549,0.926106,0.89733,0.104071,0.976471,0.935904,0.89857,0.108131,0.980392,0.945636,0.899815,0.112838,0.984314,0.9553,0.901065,0.118128,0.988235,0.964894,0.902323,0.123941,0.992157,0.974417,0.90359,0.130215,0.996078,0.983868,0.904867,0.136897,1,0.993248,0.906157,0.143936]},{"ShowIndexedColorActiveValues":1,"IndexedColors":[0.07,0.5,0.7,1,1,1,0.85,1,1,0.8,0.5,1,0.76,1,0,1,0.71,0.71,0.5,0.5,0.5,0.05,0.05,1,1,0.05,0.05,0.7,1,1,0.7,0.89,0.96,0.67,0.36,0.95,0.54,1,0,0.75,0.65,0.65,0.5,0.6,0.6,1,0.5,0,1,1,0.19,0.12,0.94,0.12,0.5,0.82,0.89,0.56,0.25,0.83,0.24,1,0,0.9,0.9,0.9,0.75,0.76,0.78,0.65,0.65,0.67,0.54,0.6,0.78,0.61,0.48,0.78,0.5,0.48,0.78,0.44,0.48,0.78,0.36,0.48,0.76,1,0.48,0.38,0.49,0.5,0.69,0.76,0.56,0.56,0.4,0.56,0.56,0.74,0.5,0.89,1,0.63,0,0.65,0.16,0.16,0.36,0.72,0.82,0.44,0.18,0.69,0,1,0,0.58,1,1,0.58,0.88,0.88,0.45,0.76,0.79,0.33,0.71,0.71,0.23,0.62,0.62,0.14,0.56,0.56,0.04,0.49,0.55,0,0.41,0.52,0.88,0.88,1,1,0.85,0.56,0.65,0.46,0.45,0.4,0.5,0.5,0.62,0.39,0.71,0.83,0.48,0,0.58,0,0.58,0.26,0.62,0.69,0.34,0.09,0.56,0,0.79,0,0.44,0.83,1,1,1,0.78,0.85,1,0.78,0.78,1,0.78,0.64,1,0.78,0.56,1,0.78,0.38,1,0.78,0.27,1,0.78,0.19,1,0.78,0.12,1,0.78,0,1,0.61,0,0.9,0.46,0,0.83,0.32,0,0.75,0.22,0,0.67,0.14,0.3,0.76,1,0.3,0.65,1,0.13,0.58,0.84,0.15,0.49,0.67,0.15,0.4,0.59,0.09,0.33,0.53,0.96,0.93,0.82,0.8,0.82,0.12,0.71,0.71,0.76,0.65,0.33,0.3,0.34,0.35,0.38,0.62,0.31,0.71,0.67,0.36,0,0.46,0.31,0.27,0.26,0.51,0.59,0.26,0,0.4,0,0.49,0,0.44,0.67,0.98,0,0.73,1,0,0.63,1,0,0.56,1,0,0.5,1,0,0.42,1,0.33,0.36,0.95,0.47,0.36,0.89,0.54,0.31,0.89,0.63,0.21,0.83,0.7,0.12,0.83,0.7,0.12,0.73,0.7,0.05,0.65,0.74,0.05,0.53,0.78,0,0.4,0.8,0,0.35,0.82,0,0.31,0.85,0,0.27,0.88,0,0.22,0.9,0,0.18,0.91,0,0.15,0.92,0,0.14,0.93,0,0.13,0.94,0,0.12,0.95,0,0.11,0.96,0,0.1,0.97,0,0.09,0.98,0,0.08,0.99,0,0.07,1,0,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"}]'),sN=Object.create(null);aN.filter((function(e){return e.RGBPoints})).filter((function(e){return"CIELAB"!==e.ColorSpace})).forEach((function(e){sN[e.Name]=e}));var lN=Object.keys(sN);lN.sort();var uN={addPreset:function(e){e.RGBPoints&&"CIELAB"!==e.ColorSpace&&(sN[e.Name]||(lN.push(e.Name),lN.sort()),sN[e.Name]=e)},removePresetByName:function(e){var t=lN.indexOf(e);t>-1&&lN.splice(t,1),delete sN[e]},getPresetByName:function(e){return sN[e]},rgbPresetNames:lN};function cN(e,t){t.classHierarchy.push("vtkProperty2D")}var dN={color:[1,1,1],opacity:1,pointSize:1,lineWidth:1,displayLocation:"Foreground"};function pN(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dN,n),Ae.obj(e,t),Ae.setGet(e,t,["opacity","lineWidth","pointSize","displayLocation"]),Ae.setGetArray(e,t,["color"],3),cN(0,t)}var fN={newInstance:Ae.newInstance(pN,"vtkProperty2D"),extend:pN};function hN(e,t){t.classHierarchy.push("vtkActor2D"),e.getActors2D=function(){return e},e.getIsOpaque=function(){t.property||e.getProperty();var n=t.property.getOpacity()>=1;return n=(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=fN.newInstance,e.getProperty=function(){return null===t.property&&(t.property=e.makeProperty()),t.property},e.setDisplayPosition=function(e,n){t.positionCoordinate.setCoordinateSystem(Lx.DISPLAY),t.positionCoordinate.setValue(e,n,0)},e.setWidth=function(e){var n=t.position2Coordinate.getValue();t.position2Coordinate.setCoordinateSystemToNormalizedViewport(),t.position2Coordinate.setValue(e,n[1])},e.setHeight=function(e){var n=t.position2Coordinate.getValue();t.position2Coordinate.setCoordinateSystemToNormalizedViewport(),t.position2Coordinate.setValue(n[0],e)},e.getWidth=function(){return t.position2Coordinate.getValue()[0]},e.getHeight=function(){return t.position2Coordinate.getValue()[1]},e.getMTime=function(){var e=t.mtime;if(null!==t.property){var n=t.property.getMTime();e=n>e?n:e}return e=t.positionCoordinate.getMTime()>e?t.positionCoordinate.getMTime():e,e=t.positionCoordinate2.getMTime()>e?t.positionCoordinate2.getMTime():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.getBounds=function(){return"function"==typeof e.getMapper().getBounds?(t.useBounds=!0,e.getMapper().getBounds()):(t.useBounds=!1,[])},e.getActualPositionCoordinate=function(){return t.positionCoordinate},e.getActualPositionCoordinate2=function(){return t.positionCoordinate2}}var mN={mapper:null,property:null,layerNumber:0,positionCoordinate:null,positionCoordinate2:null};function gN(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mN,n),hv.extend(e,t,n),t.positionCoordinate=Kx.newInstance(),t.positionCoordinate.setCoordinateSystemToViewport(),t.positionCoordinate2=Kx.newInstance(),t.positionCoordinate2.setCoordinateSystemToNormalizedViewport(),t.positionCoordinate2.setValue(.5,.5),t.positionCoordinate2.setReferenceCoordinate(t.positionCoordinate),Ae.set(e,t,["property"]),Ae.setGet(e,t,["mapper"]),hN(e,t)}var vN={newInstance:Ae.newInstance(gN,"vtkActor2D"),extend:gN},yN={default:{defaultStyle:{fontStyle:"bold",fontFamily:"Arial",fontColor:"black",fontSizeScale:function(e){return e/2},faceColor:"white",edgeThickness:.1,edgeColor:"black",resolution:400},xMinusFaceProperty:{text:"X-",faceColor:"yellow"},xPlusFaceProperty:{text:"X+",faceColor:"yellow"},yMinusFaceProperty:{text:"Y-",faceColor:"red"},yPlusFaceProperty:{text:"Y+",faceColor:"red"},zMinusFaceProperty:{text:"Z-",faceColor:"#008000"},zPlusFaceProperty:{text:"Z+",faceColor:"#008000"}},lps:{xMinusFaceProperty:{text:"R",faceRotation:-90},xPlusFaceProperty:{text:"L",faceRotation:90},yMinusFaceProperty:{text:"A",faceRotation:0},yPlusFaceProperty:{text:"P",faceRotation:180},zMinusFaceProperty:{text:"I",faceRotation:180},zPlusFaceProperty:{text:"S",faceRotation:0}}};function bN(e,t){t.set(e)}var wN={applyDefinitions:bN,applyPreset:function(e,t){return bN(yN[e],t)},registerStylePreset:function(e,t){yN[e]=t}};function xN(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 SN(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:null;i&&Object.assign(t["".concat(n,"FaceProperty")],i);var a=SN(SN({},t.defaultStyle),t["".concat(n,"FaceProperty")]);r.width=a.resolution,r.height=a.resolution;var s=r.getContext("2d");s.fillStyle=a.faceColor,s.fillRect(0,0,r.width,r.height),a.edgeThickness>0&&(s.strokeStyle=a.edgeColor,s.lineWidth=a.edgeThickness*r.width,s.strokeRect(0,0,r.width,r.height)),s.save(),s.translate(0,r.height),s.scale(1,-1),s.translate(r.width/2,r.height/2),s.rotate(-Math.PI*(a.faceRotation/180));var l=a.fontSizeScale(a.resolution);s.fillStyle=a.fontColor,s.textAlign="center",s.textBaseline="middle",s.font="".concat(a.fontStyle," ").concat(l,'px "').concat(a.fontFamily,'"'),s.fillText(a.text,0,0),s.restore();var u=ms.canvasToImageData(r);o.setInputData(u,CN[n]),e.modified()}function s(){n=kf.newInstance({generate3DTextureCoordinates:!0}),i.setInputConnection(n.getOutputPort()),a("xPlus"),a("xMinus"),a("yPlus"),a("yMinus"),a("zPlus"),a("zMinus")}o.setInterpolate(!0),e.setDefaultStyle=function(e){t.defaultStyle=SN(SN({},t.defaultStyle),e),s()},e.setXPlusFaceProperty=function(e){return a("xPlus",e)},e.setXMinusFaceProperty=function(e){return a("xMinus",e)},e.setYPlusFaceProperty=function(e){return a("yPlus",e)},e.setYMinusFaceProperty=function(e){return a("yMinus",e)},e.setZPlusFaceProperty=function(e){return a("zPlus",e)},e.setZMinusFaceProperty=function(e){return a("zMinus",e)},s(),i.setInputConnection(n.getOutputPort()),e.setMapper(i),e.addTexture(o)}var PN={defaultStyle:{text:"",faceColor:"white",faceRotation:0,fontFamily:"Arial",fontColor:"black",fontStyle:"normal",fontSizeScale:function(e){return e/1.8},edgeThickness:.1,edgeColor:"black",resolution:200}};function _N(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PN,n),Rv.extend(e,t,n),Ae.get(e,t,["defaultStyle","xPlusFaceProperty","xMinusFaceProperty","yPlusFaceProperty","yMinusFaceProperty","zPlusFaceProperty","zMinusFaceProperty"]),AN(e,t)}var ON={newInstance:Ae.newInstance(_N,"vtkAnnotatedCubeActor"),extend:_N,Presets:wN};function TN(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 DN(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MN,n),Rv.extend(e,t,n),Ae.setGet(e,t,["config"]),Ae.setGetArray(e,t,["xAxisColor","yAxisColor","zAxisColor"],3,255),kN(e,t)}var RN={newInstance:Ae.newInstance(NN,"vtkAxesActor"),extend:NN},FN=Math.sqrt(50),BN=Math.sqrt(10),LN=Math.sqrt(2);function VN(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=FN?10:o>=BN?5:o>=LN?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=FN?10:o>=BN?5:o>=LN?2:1)}function jN(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function GN(e){let t=e,n=e,r=e;function i(e,t,i=0,o=e.length){if(i>>1;r(e[n],t)<0?i=n+1:o=n}while(ie(t)-n,n=jN,r=(t,n)=>jN(e(t),n)),{left:i,center:function(e,n,r=0,o=e.length){const a=i(e,n,r,o-1);return a>r&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,i=0,o=e.length){if(i>>1;r(e[n],t)<=0?i=n+1:o=n}while(i>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?dR(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?dR(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=eR.exec(e))?new hR(t[1],t[2],t[3],1):(t=tR.exec(e))?new hR(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=nR.exec(e))?dR(t[1],t[2],t[3],t[4]):(t=rR.exec(e))?dR(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=iR.exec(e))?yR(t[1],t[2]/100,t[3]/100,1):(t=oR.exec(e))?yR(t[1],t[2]/100,t[3]/100,t[4]):aR.hasOwnProperty(e)?cR(aR[e]):"transparent"===e?new hR(NaN,NaN,NaN,0):null}function cR(e){return new hR(e>>16&255,e>>8&255,255&e,1)}function dR(e,t,n,r){return r<=0&&(e=t=n=NaN),new hR(e,t,n,r)}function pR(e){return e instanceof XN||(e=uR(e)),e?new hR((e=e.rgb()).r,e.g,e.b,e.opacity):new hR}function fR(e,t,n,r){return 1===arguments.length?pR(e):new hR(e,t,n,null==r?1:r)}function hR(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function mR(){return"#"+vR(this.r)+vR(this.g)+vR(this.b)}function gR(){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 vR(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function yR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wR(e,t,n,r)}function bR(e){if(e instanceof wR)return new wR(e.h,e.s,e.l,e.opacity);if(e instanceof XN||(e=uR(e)),!e)return new wR;if(e instanceof wR)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new wR(a,s,l,e.opacity)}function wR(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function xR(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function SR(e,t,n,r,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*n+(1+3*e+3*o-3*a)*r+a*i)/6}HN(XN,uR,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:sR,formatHex:sR,formatHsl:function(){return bR(this).formatHsl()},formatRgb:lR,toString:lR}),HN(hR,fR,KN(XN,{brighter:function(e){return e=null==e?YN:Math.pow(YN,e),new hR(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?qN:Math.pow(qN,e),new hR(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:mR,formatHex:mR,formatRgb:gR,toString:gR})),HN(wR,(function(e,t,n,r){return 1===arguments.length?bR(e):new wR(e,t,n,null==r?1:r)}),KN(XN,{brighter:function(e){return e=null==e?YN:Math.pow(YN,e),new wR(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?qN:Math.pow(qN,e),new wR(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,i=2*n-r;return new hR(xR(e>=240?e-240:e+120,i,r),xR(e,i,r),xR(e<120?e+240:e-120,i,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 CR=e=>()=>e;function AR(e,t){return function(n){return e+n*t}}function PR(e){return 1==(e=+e)?_R: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):CR(isNaN(t)?n:t)}}function _R(e,t){var n=t-e;return n?AR(e,n):CR(isNaN(e)?t:e)}var OR=function e(t){var n=PR(t);function r(e,t){var r=n((e=fR(e)).r,(t=fR(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=_R(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function TR(e){return function(t){var n,r,i=t.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],o=e[r+1],a=r>0?e[r-1]:2*i-o,s=ro&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:IR(n,r)})),o=NR.lastIndex;return ot&&(n=e,e=t,t=n),u=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?WR:zR,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),IR)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,VR),c()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),c()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=LR,c()},d.clamp=function(e){return arguments.length?(u=!!e||GR,c()):u!==GR},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}function XR(){return KR()(GR,GR)}function qR(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var YR,ZR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function JR(e){if(!(t=ZR.exec(e)))throw new Error("invalid format: "+e);var t;return new QR({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 QR(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 $R(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 eF(e){return(e=$R(Math.abs(e)))?e[1]:NaN}function tF(e,t){var n=$R(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}JR.prototype=QR.prototype,QR.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 nF={"%":(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)=>tF(100*e,t),r:tF,s:function(e,t){var n=$R(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(YR=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+$R(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function rF(e){return e}var iF,oF,aF,sF=Array.prototype.map,lF=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function uF(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?rF:(t=sF.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?rF:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(sF.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",u=void 0===e.minus?"−":e.minus+"",c=void 0===e.nan?"NaN":e.nan+"";function d(e){var t=(e=JR(e)).fill,n=e.align,d=e.sign,p=e.symbol,f=e.zero,h=e.width,m=e.comma,g=e.precision,v=e.trim,y=e.type;"n"===y?(m=!0,y="g"):nF[y]||(void 0===g&&(g=12),v=!0,y="g"),(f||"0"===t&&"="===n)&&(f=!0,t="0",n="=");var b="$"===p?i:"#"===p&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===p?o:/[%p]/.test(y)?l:"",x=nF[y],S=/[defgprs%]/.test(y);function C(e){var i,o,l,p=b,C=w;if("c"===y)C=x(e)+C,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?c:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),A&&0==+e&&"+"!==d&&(A=!1),p=(A?"("===d?d:u:"-"===d||"("===d?"":d)+p,C=("s"===y?lF[8+YR/3]:"")+C+(A&&"("===d?")":""),S)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){C=(46===l?a+e.slice(i+1):e.slice(i))+C,e=e.slice(0,i);break}}m&&!f&&(e=r(e,1/0));var P=p.length+e.length+C.length,_=P>1)+p+e+C+_.slice(P);break;default:e=_+p+e+C}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),C.toString=function(){return e+""},C}return{format:d,formatPrefix:function(e,t){var n=d(((e=JR(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(eF(t)/3))),i=Math.pow(10,-r),o=lF[8+r/3];return function(e){return n(i*e)+o}}}}function cF(e,t,n,r){var i,o=function(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=FN?i*=10:o>=BN?i*=5:o>=LN&&(i*=2),t0)return[e];if((r=t0){let n=Math.round(e/a),r=Math.round(t/a);for(n*at&&--r,o=new Array(i=r-n+1);++st&&--r,o=new Array(i=r-n+1);++s0;){if((i=VN(l,u,n))===r)return o[a]=l,o[s]=u,t(o);if(i>0)l=Math.floor(l/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,u=Math.floor(u*i)/i}r=i}return e},e}function pF(){var e=XR();return e.copy=function(){return HR(e,pF())},qR.apply(e,arguments),dF(e)}function fF(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 hF(e){for(var t=1;ti,t.camera.getParallelProjection()||(co(CF,CF),a=po(CF,SF)>i)),a!==t.lastFacesToDraw[o]&&(t.lastFacesToDraw[o]=a,n=!0)}return n},e.updatePolyData=function(e,n,r){var i=0,o=0;i+=8;for(var a=0,s=0;s<12;s++)n[s]>0&&a++;if(o+=a,t.gridLines)for(var l=0;l<6;l++)e[l]&&(i+=2*r[bF[l][0]].length+2*r[bF[l][1]].length,o+=r[bF[l][0]].length+r[bF[l][1]].length);for(var u=new Float64Array(3*i),c=new Uint32Array(3*o),d=0,p=0,f=0;f<2;f++)for(var h=0;h<2;h++)for(var m=0;m<2;m++)u[3*d]=t.dataBounds[m],u[3*d+1]=t.dataBounds[2+h],u[3*d+2]=t.dataBounds[4+f],d++;for(var g=0;g<12;g++)n[g]>0&&(c[3*p]=2,c[3*p+1]=vF[g][0],c[3*p+2]=vF[g][1],p++);if(t.gridLines)for(var v=0;v<6;v++)if(e[v]){for(var y=Math.floor(v/2),b=r[bF[v][0]],w=0;w.5?ro(SF,AF,o[0]*a):ro(SF,AF,o[0]*a-l.width/2),qi(wF,wF,SF),ro(SF,PF,o[1]*a-l.height/2),qi(wF,wF,SF),s.points[3*p]=wF[0],s.points[3*p+1]=wF[1],s.points[3*p+2]=wF[2],s.tcoords[2*p]=l.tcoords[0],s.tcoords[2*p+1]=l.tcoords[1],p++,ro(SF,AF,l.width),qi(wF,wF,SF),s.points[3*p]=wF[0],s.points[3*p+1]=wF[1],s.points[3*p+2]=wF[2],s.tcoords[2*p]=l.tcoords[2],s.tcoords[2*p+1]=l.tcoords[3],p++,ro(SF,PF,l.height),qi(wF,wF,SF),s.points[3*p]=wF[0],s.points[3*p+1]=wF[1],s.points[3*p+2]=wF[2],s.tcoords[2*p]=l.tcoords[4],s.tcoords[2*p+1]=l.tcoords[5],p++,ro(SF,AF,l.width),Yi(wF,wF,SF),s.points[3*p]=wF[0],s.points[3*p+1]=wF[1],s.points[3*p+2]=wF[2],s.tcoords[2*p]=l.tcoords[6],s.tcoords[2*p+1]=l.tcoords[7],p++,s.polys[4*f]=3,s.polys[4*f+1]=p-4,s.polys[4*f+2]=p-3,s.polys[4*f+3]=p-2,f++,s.polys[4*f]=3,s.polys[4*f+1]=p-4,s.polys[4*f+2]=p-2,s.polys[4*f+3]=p-1,s.ptIdx+=4,s.cellIdx+=2}},e.updateTexturePolyData=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Wo(n,n);var r=t.textValues.length,i=4*r,o=2*r,a=new Float64Array(3*i),s=new Uint16Array(4*o),l=new Float32Array(2*i);Ho(_F,n);for(var u={ptIdx:0,cellIdx:0,polys:s,points:a,tcoords:l},c=0,d=0,p=0,f=t.textPolyData.getPoints().getData();c2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DF(n)),Rv.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._tmAtlas=new Map,t.mapper=cy.newInstance(),t.polyData=rc.newInstance(),t.mapper.setInputData(t.polyData),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t.textPolyData=rc.newInstance(),t.tmPolyData=rc.newInstance(),t.tmMapper=cy.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=PE.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=Rv.newInstance({parentProp:e}),t.tmActor.setMapper(t.tmMapper),t.tmActor.addTexture(t.tmTexture),t.tmCanvas=document.createElement("canvas"),t.tmContext=t.tmCanvas.getContext("2d"),t.pixelMapper=Rx.newInstance(),t.pixelMapperPolyData=rc.newInstance(),t.pixelMapper.setInputData(t.pixelMapperPolyData),t.pixelMapper.setCallback((function(e,n,r,i,o){t.lastSize=o,t.lastAspectRatio=o[0]/o[1]})),t.pixelActor=Rv.newInstance({parentProp:e}),t.pixelActor.setMapper(t.pixelMapper),Ae.setGet(e,t,["axisTitlePixelOffset","faceVisibilityAngle","gridLines","tickLabelPixelOffset"]),Ae.setGetArray(e,t,["dataBounds"],6),Ae.setGetArray(e,t,["axisLabels"],3),Ae.get(e,t,["axisTextStyle","tickTextStyle","camera"]),TF(e,t)}var IF={newInstance:Ae.newInstance(EF,"vtkCubeAxesActor"),extend:EF};function kF(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 MF(e,t){t.classHierarchy.push("vtkFollower");var n=function(e){for(var t=1;te?r:e}return e},e.computeMatrix=function(){if(e.getMTime()>t.matrixMTime.getMTime()){if(zo(t.matrix),t.userMatrix&&qo(t.matrix,t.matrix,t.userMatrix),Yo(t.matrix,t.matrix,t.origin),Yo(t.matrix,t.matrix,t.position),qo(t.matrix,t.matrix,t.rotation),Zo(t.matrix,t.matrix,t.scale),t.camera){var n=new Float64Array(t.viewUp);t.useViewUp||Xi.apply(i,[n].concat(w(t.camera.getViewUp())));var r=new Float64Array(3);t.camera.getParallelProjection()?Xi(r,t.camera.getViewPlaneNormal()):(Xi.apply(i,[r].concat(w(t.position))),Yi(r,t.camera.getPosition(),r),co(r,r));var o=new Float64Array(3);fo(o,n,r),co(o,o),fo(r,o,n),co(r,r),t.followerMatrix[0]=o[0],t.followerMatrix[1]=o[1],t.followerMatrix[2]=o[2],t.followerMatrix[4]=n[0],t.followerMatrix[5]=n[1],t.followerMatrix[6]=n[2],t.followerMatrix[8]=r[0],t.followerMatrix[9]=r[1],t.followerMatrix[10]=r[2],qo(t.matrix,t.followerMatrix,t.matrix)}Yo(t.matrix,t.matrix,[-t.origin[0],-t.origin[1],-t.origin[2]]),Wo(t.matrix,t.matrix),t.isIdentity=!1,t.matrixMTime.modified()}}}var NF={viewUp:[0,1,0],useViewUp:!1,camera:null};function RF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,NF,n),Rv.extend(e,t,n),t.followerMatrix=zo(new Float64Array(16)),Ae.setGet(e,t,["useViewUp","camera"]),Ae.setGetArray(e,t,["viewUp"],3),MF(e,t)}var FF={newInstance:Ae.newInstance(RF,"vtkFollower"),extend:RF},BF={OrientationModes:{DIRECTION:0,ROTATION:1,MATRIX:2},ScaleModes:{SCALE_BY_CONSTANT:0,SCALE_BY_MAGNITUDE:1,SCALE_BY_COMPONENTS:2}};function LF(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 VF=BF.OrientationModes,jF=BF.ScaleModes,GF=Ae.vtkErrorMacro;function UF(e,t){t.classHierarchy.push("vtkGlyph3DMapper"),e.getOrientationModeAsString=function(){return Ae.enumToString(VF,t.orientationMode)},e.setOrientationModeToDirection=function(){return e.setOrientationMode(VF.DIRECTION)},e.setOrientationModeToRotation=function(){return e.setOrientationMode(VF.ROTATION)},e.setOrientationModeToMatrix=function(){return e.setOrientationMode(VF.MATRIX)},e.getOrientationArrayData=function(){var n=e.getInputData(0);return n&&n.getPointData()?t.orientationArray?n.getPointData().getArray(t.orientationArray):n.getPointData().getVectors():null},e.getScaleModeAsString=function(){return Ae.enumToString(jF,t.scaleMode)},e.setScaleModeToScaleByMagnitude=function(){return e.setScaleMode(jF.SCALE_BY_MAGNITUDE)},e.setScaleModeToScaleByComponents=function(){return e.setScaleMode(jF.SCALE_BY_COMPONENTS)},e.setScaleModeToScaleByConstant=function(){return e.setScaleMode(jF.SCALE_BY_CONSTANT)},e.getScaleArrayData=function(){var n=e.getInputData(0);return n&&n.getPointData()?t.scaleArray?n.getPointData().getArray(t.scaleArray):n.getPointData().getScalars():null},e.getBounds=function(){var n=e.getInputData(0),r=e.getInputData(1);return n&&r?(e.buildArrays(),t.bounds):kn()},e.buildArrays=function(){var n=e.getInputData(0),r=e.getInputData(1);if(t.buildTime.getMTime()t.bounds[1]&&(t.bounds[1]=c[0]),c[1]>t.bounds[3]&&(t.bounds[3]=c[1]),c[2]>t.bounds[5]&&(t.bounds[5]=c[2]);var T=new Float32Array(v,36*b,9);ka(T,x),Va(T,T),La(T,T)}var D=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 E=e.getLookupTable();E&&D&&(E.build(),t.colorArray=E.mapScalars(D,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 zF={orient:!0,orientationMode:VF.DIRECTION,orientationArray:null,scaling:!0,scaleFactor:1,scaleMode:jF.SCALE_BY_MAGNITUDE,scaleArray:null,matrixArray:null,normalArray:null,colorArray:null};function WF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zF,n),cy.extend(e,t,n),Ae.algo(e,t,2,0),t.buildTime={},Ae.obj(t.buildTime,{mtime:0}),t.boundsTime={},Ae.obj(t.boundsTime,{mtime:0}),Ae.setGet(e,t,["orient","orientationMode","orientationArray","scaleArray","scaleFactor","scaleMode","scaling"]),Ae.get(e,t,["colorArray","matrixArray","normalArray","buildTime"]),UF(e,t)}var HF=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,JF,n),Ae.obj(e,t),Ae.setGet(e,t,["fieldAssociation","captureZValues"]),ZF(e,t)}var $F={newInstance:Ae.newInstance(QF,"vtkHardwareSelector"),extend:QF},eB=navigator.gpu?"WebGPU":"WebGL",tB=Object.create(null);function nB(e,t){tB[e]=t}function rB(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return tB[e]&&tB[e](t)}function iB(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 rB(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.preRender=function(){t.renderers.forEach((function(e){e.isActiveCameraCreated()||e.resetCamera()}))},e.render=function(){e.preRender(),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",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ae.setImmediate(e.render),t.views.map((function(e){return e.captureNextImage?e.captureNextImage(n,r):void 0})).filter((function(e){return!!e}))}}var oB={defaultViewAPI:eB,renderers:[],views:[],interactor:null,neverRendered:!0,numberOfLayers:1};function aB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oB,n),Ae.obj(e,t),Ae.setGet(e,t,["interactor","numberOfLayers","views","defaultViewAPI"]),Ae.get(e,t,["neverRendered"]),Ae.getArray(e,t,["renderers"]),Ae.event(e,t,"completion"),iB(e,t)}var sB={newInstance:Ae.newInstance(aB,"vtkRenderWindow"),extend:aB,registerViewConstructor:nB,listViewAPIs:function(){return Object.keys(tB)},newAPISpecificView:rB};function lB(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 uB(e){for(var t=1;t1?t.tickTextStyle.fontSize=Math.max(20*i,10):t.tickTextStyle.fontSize=Math.max(16*i,10);var o=e.updateTextureAtlas();if(t.topTitle=!1,t.lastAspectRatio>1){t.tickLabelPixelOffset=.4*t.tickTextStyle.fontSize;var a=2*(o.tickWidth+t.tickLabelPixelOffset)/t.lastSize[0];t.axisTitlePixelOffset=.8*t.axisTextStyle.fontSize;var s=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];a+.4*s>2*o.titleWidth/t.lastSize[0]?(t.topTitle=!0,t.boxSize[0]=a+.4*s,t.boxPosition=[.98-t.boxSize[0],-.92]):(t.boxSize[0]=a+1.4*s,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 l=2*(o.tickHeight+t.tickLabelPixelOffset)/t.lastSize[1],u=2*(o.titleHeight+t.axisTitlePixelOffset)/t.lastSize[1],c=2*o.tickWidth/t.lastSize[0];t.boxSize[0]=Math.min(1.9,Math.max(1.4,1.4*c*(t.ticks.length+3))),t.boxSize[1]=l+u,t.boxPosition=[-.5*t.boxSize[0],-.97]}e.recomputeBarSegments(o)}}function wB(e,t){t.classHierarchy.push("vtkScalarBarActor"),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=w(n),t.barMapper.setScalarRange(t.lastTickBounds);var r=pF().domain([t.lastTickBounds[0],t.lastTickBounds[1]]);t.ticks=r.ticks(5);var i=r.tickFormat(5);if(t.tickStrings=t.ticks.map(i),t.automated)t.autoLayout();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(n){t.nextImage&&t.nextImage.complete&&(t.tmTexture.setImage(t.nextImage),t.nextImage=null,t._tmAtlas=t._nextAtlas,t._nextAtlas=null,n&&(t.forceViewUpdate=!0,e.update()))},e.updateTextureAtlas=function(){t.tmContext.textBaseline="bottom",t.tmContext.textAlign="left";var n={},r=new Map,i=0,o=1;yB(t.tmContext,t.axisTextStyle);var a=t.tmContext.measureText(t.axisLabel),s={height:a.actualBoundingBoxAscent+2,startingHeight:o,width:a.width+2,textStyle:t.axisTextStyle};r.set(t.axisLabel,s),o+=s.height,i=s.width,n.titleWidth=s.width,n.titleHeight=s.height,n.tickWidth=0,n.tickHeight=0,yB(t.tmContext,t.tickTextStyle);for(var l=[].concat(w(t.tickStrings),["NaN","Below","Above"]),u=0;ut.boxSize[0];var n=2*e.tickHeight/t.lastSize[1],r=[1,1];if(t.vertical){var i=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]-i,t.barSize[1]=t.boxSize[1]-o}else{var a=2*(e.titleHeight+t.axisTitlePixelOffset)/t.lastSize[0];t.barSize[0]=t.boxSize[0]-a-i,t.barSize[1]=t.boxSize[1]}t.barPosition[0]=t.boxPosition[0]+i,t.barPosition[1]=t.boxPosition[1],r[1]=n}else{var s=(2*e.tickWidth-8)/t.lastSize[0],l=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]-l-n,t.barPosition[1]=t.boxPosition[1],r[0]=s}return r},e.recomputeBarSegments=function(n){var r=e.computeBarSize(n);t.barSegments=[];var i=[0,0],o=t.vertical?1:0,a=t.vertical?.01:.02;function s(e,n){t.barSegments.push({corners:[[].concat(i),[i[0]+r[0],i[1]],[i[0]+r[0],i[1]+r[1]],[i[0],i[1]+r[1]]],scalars:n,title:e}),i[o]+=r[o]+a}"function"==typeof t.scalarsToColors.getNanColor&&s("NaN",[NaN,NaN,NaN,NaN]),"function"==typeof t.scalarsToColors.getUseBelowRangeColor&&t.scalarsToColors.getUseBelowRangeColor()&&s("Below",[-.1,-.1,-.1,-.1]);var l="function"==typeof t.scalarsToColors.getUseAboveRangeColor&&t.scalarsToColors.getUseAboveRangeColor();i[o]+=a;var u=r[o];r[o]=l?1-2*a-r[o]-i[o]:1-a-i[o],s("ticks",t.vertical?[0,0,.995,.995]:[0,.995,.995,0]),l&&(r[o]=u,i[o]+=a,s("Above",[1.1,1.1,1.1,1.1]))},e.createPolyDataForOneLabel=function(e,n,r,i,o,a,s){var l=t._tmAtlas.get(e);if(l){var u=s.ptIdx,c=s.cellIdx;dB[0]=n[0],dB[1]=n[1],dB[2]=n[2],o[0]<-.5?ro(fB,r,o[0]*a-l.width):o[0]>.5?ro(fB,r,o[0]*a):ro(fB,r,o[0]*a-l.width/2),qi(dB,dB,fB),ro(fB,i,o[1]*a-l.height/2),qi(dB,dB,fB),s.points[3*u]=dB[0],s.points[3*u+1]=dB[1],s.points[3*u+2]=dB[2],s.tcoords[2*u]=l.tcoords[0],s.tcoords[2*u+1]=l.tcoords[1],u++,ro(fB,r,l.width),qi(dB,dB,fB),s.points[3*u]=dB[0],s.points[3*u+1]=dB[1],s.points[3*u+2]=dB[2],s.tcoords[2*u]=l.tcoords[2],s.tcoords[2*u+1]=l.tcoords[3],u++,ro(fB,i,l.height),qi(dB,dB,fB),s.points[3*u]=dB[0],s.points[3*u+1]=dB[1],s.points[3*u+2]=dB[2],s.tcoords[2*u]=l.tcoords[4],s.tcoords[2*u+1]=l.tcoords[5],u++,ro(fB,r,l.width),Yi(dB,dB,fB),s.points[3*u]=dB[0],s.points[3*u+1]=dB[1],s.points[3*u+2]=dB[2],s.tcoords[2*u]=l.tcoords[6],s.tcoords[2*u+1]=l.tcoords[7],u++,s.polys[4*c]=3,s.polys[4*c+1]=u-4,s.polys[4*c+2]=u-3,s.polys[4*c+3]=u-2,c++,s.polys[4*c]=3,s.polys[4*c+1]=u-4,s.polys[4*c+2]=u-2,s.polys[4*c+3]=u-1,s.ptIdx+=4,s.cellIdx+=2}},e.updatePolyDataForLabels=function(){var n=t.camera.getCompositeProjectionMatrix(t.lastAspectRatio,-1,1);Wo(n,n),Ho(vB,n);var r=t.lastSize;fB[0]=0,fB[1]=0,fB[2]=-.99,yo(dB,fB,vB),fB[0]+=.1,yo(pB,fB,vB),Yi(mB,pB,dB),fB[0]-=.1,fB[1]+=.1,yo(pB,fB,vB),Yi(gB,pB,dB);for(var i=0;i<3;i++)mB[i]/=.05*r[0],gB[i]/=.05*r[1];var o=t.tickStrings.length+t.barSegments.length,a=4*o,s=2*o,l=new Float64Array(3*a),u=new Uint16Array(4*s),c=new Float32Array(2*a),d={ptIdx:0,cellIdx:0,polys:u,points:l,tcoords:c},p=t.vertical?0:1,f=t.vertical?1:0,h=[0,1];t.vertical?(t.topTitle?(fB[0]=t.boxPosition[0]+.5*t.boxSize[0],fB[1]=t.barPosition[1]+t.barSize[1],yo(dB,fB,vB),e.createPolyDataForOneLabel(t.axisLabel,dB,mB,gB,[0,1],t.axisTitlePixelOffset,d)):(fB[0]=t.barPosition[0]+t.barSize[0],fB[1]=t.barPosition[1]+.5*t.barSize[1],yo(dB,fB,vB),ro(mB,mB,-1),e.createPolyDataForOneLabel(t.axisLabel,dB,gB,mB,[0,-1],t.axisTitlePixelOffset,d),ro(mB,mB,-1)),h=[-1,0]):(fB[0]=t.barPosition[0]+.5*t.barSize[0],fB[1]=t.barPosition[1]+t.barSize[1],yo(dB,fB,vB),e.createPolyDataForOneLabel(t.axisLabel,dB,mB,gB,h,t.axisTitlePixelOffset,d)),hB[2]=-.99,hB[p]=t.barPosition[p]+(.5*h[p]+.5)*t.barSize[p],hB[f]=t.barPosition[f]+.5*t.barSize[f];for(var m=null,g=0;g2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xB(n)),t.autoLayout||(t.autoLayout=bB(e,t)),Rv.extend(e,t,n),e.getProperty().setDiffuse(0),e.getProperty().setAmbient(1),t._tmAtlas=new Map,t.lastSize=[800,800],t.lastAspectRatio=1,t.textValues=[],t.lastTickBounds=[],t.barMapper=cy.newInstance(),t.barMapper.setInterpolateScalarsBeforeMapping(!0),t.polyData=rc.newInstance(),t.barMapper.setInputData(t.polyData),t.barActor=Rv.newInstance({parentProp:e}),t.barActor.setMapper(t.barMapper),t.barActor.setProperty(e.getProperty()),t.lastRedrawTime={},Ae.obj(t.lastRedrawTime,{mtime:0}),t.lastRebuildTime={},Ae.obj(t.lastRebuildTime,{mtime:0}),t.textPolyData=rc.newInstance(),t.tmPolyData=rc.newInstance(),t.tmMapper=cy.newInstance(),t.tmMapper.setInputData(t.tmPolyData),t.tmTexture=PE.newInstance(),t.tmTexture.setInterpolate(!1),t.tmActor=Rv.newInstance({parentProp:e}),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=Rx.newInstance(),t.pixelMapperPolyData=rc.newInstance(),t.mapper.setInputData(t.pixelMapperPolyData),t.mapper.setCallback((function(n,r,i,o,a){t.camera=r,t.lastSize[0]===a[0]&&t.lastSize[1]===a[1]||(t.lastSize[0]=a[0],t.lastSize[1]=a[1],t.lastAspectRatio=a[0]/a[1],t.forceUpdate=!0),e.update()})),Ae.setGet(e,t,["automated","autoLayout","axisTitlePixelOffset","axisLabel","scalarsToColors","tickLabelPixelOffset"]),Ae.get(e,t,["axisTextStyle","tickTextStyle"]),Ae.getArray(e,t,["boxPosition","boxSize"]),Ae.setArray(e,t,["boxPosition","boxSize"],2),wB(e,t)}var CB={newInstance:Ae.newInstance(SB,"vtkScalarBarActor"),extend:SB};function AB(e,t){t.classHierarchy.push("vtkSkybox"),e.getIsOpaque=function(){return!0},e.hasTranslucentPolygonalGeometry=function(){return!1},e.getSupportsSelection=function(){return!1}}var PB={format:"box"};function _B(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PB,n),Rv.extend(e,t,n),Ae.setGet(e,t,["format"]),AB(e,t)}var OB={newInstance:Ae.newInstance(_B,"vtkSkybox"),extend:_B};function TB(e,t){t.classHierarchy.push("vtkSphereMapper")}var DB={scaleArray:null,radius:.05};function EB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DB,n),cy.extend(e,t,n),Ae.setGet(e,t,["radius","scaleArray"]),TB(0,t)}var IB={newInstance:Ae.newInstance(EB,"vtkSphereMapper"),extend:EB};function kB(e,t){t.classHierarchy.push("vtkStickMapper")}var MB={scaleArray:null,orientationArray:null,radius:.025,length:.1};function NB(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,MB,n),cy.extend(e,t,n),Ae.setGet(e,t,["scaleArray","orientationArray","radius","length"]),kB(0,t)}var RB={newInstance:Ae.newInstance(NB,"vtkStickMapper"),extend:NB};function FB(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 BB={vtkAbstractMapper:Lv,vtkAbstractMapper3D:Gv,vtkAbstractPicker:hy,vtkActor:Rv,vtkActor2D:vN,vtkAnnotatedCubeActor:ON,vtkAxesActor:RN,vtkCamera:HC,vtkCellPicker:_S,vtkColorTransferFunction:function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jB,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",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",Ae.obj(e,t,n),Ae.get(e,t,["useBackgroundImage","renderable"]),Ae.setGet(e,t,["canvas","cursor","useOffScreen","interactor"]),Ae.setGetArray(e,t,["size"],2),Ae.getArray(e,t,["renderers"]),VB(e,t)}var UB={newInstance:Ae.newInstance(GB,"vtkCanvasView"),extend:GB},zB={CLAMP_TO_EDGE:0,REPEAT:1,MIRRORED_REPEAT:2},WB={NEAREST:0,LINEAR:1,NEAREST_MIPMAP_NEAREST:2,NEAREST_MIPMAP_LINEAR:3,LINEAR_MIPMAP_NEAREST:4,LINEAR_MIPMAP_LINEAR:5},HB={Wrap:zB,Filter:WB},KB=Ae.vtkErrorMacro;function XB(e,t){t.classHierarchy.push("vtkViewNode"),e.build=function(e){},e.render=function(e){},e.traverse=function(n){var r=n.getTraverseOperation(),i=e[r];if(i)i(n);else{e.apply(n,!0);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qB,n),Ae.obj(e,t),Ae.event(e,t,"event"),t._renderableChildMap=new Map,Ae.get(e,t,["visited"]),Ae.setGet(e,t,["parent","renderable","myFactory"]),Ae.getArray(e,t,["children"]),XB(e,t)}var ZB={newInstance:Ae.newInstance(YB,"vtkViewNode"),extend:YB,PASS_TYPES:["Build","Render"]};function JB(e,t){t.overrides||(t.overrides={}),t.classHierarchy.push("vtkViewNodeFactory"),e.createNode=function(n){if(n.isDeleted())return null;for(var r=0,i=n.getClassName(r++),o=!1,a=Object.keys(t.overrides);i&&!o;)-1!==a.indexOf(i)?o=!0:i=n.getClassName(r++);if(!o)return null;var s=t.overrides[i]();return s.setMyFactory(e),s},e.registerOverride=function(e,n){t.overrides[e]=n}}var QB={};function $B(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QB,n),Ae.obj(e,t),JB(e,t)}var eL={newInstance:Ae.newInstance($B,"vtkViewNodeFactory"),extend:$B},tL=Object.create(null);function nL(e,t){tL[e]=t}function rL(e,t){t.classHierarchy.push("vtkOpenGLViewNodeFactory")}var iL={};function oL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iL,n),t.overrides=tL,eL.extend(e,t,n),rL(0,t)}var aL={newInstance:Ae.newInstance(oL,"vtkOpenGLViewNodeFactory"),extend:oL};function sL(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 lL=HB.Wrap,uL=HB.Filter,cL=Jn.VtkDataTypes,dL=H,pL=K,fL=X;function hL(e,t){var n=this;function r(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],o=t.width*t.height*t.components;if(r&&(o*=t.depth),e!==cL.FLOAT&&t.openGLDataType===t.context.FLOAT)for(var a=0;a=i&&(b=i-1);var w=v-y,x=1-w;y=y*r*o,b=b*r*o;for(var S=0;S=r&&(_=r-1);var O=A-P;P*=o,_*=o;for(var T=0;Ti[l]&&(i[l]=n[a]),a++;for(var u=[],c=[],d=0;d2048||i<-2048||i>2048)return!1}return!0}(r,i)&&!o)}t.classHierarchy.push("vtkOpenGLTexture"),e.render=function(){var n=arguments.length>0&&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(uL.LINEAR_MIPMAP_LINEAR):e.setMinificationFilter(uL.LINEAR),e.setMagnificationFilter(uL.LINEAR)):(e.setMinificationFilter(uL.NEAREST),e.setMagnificationFilter(uL.NEAREST)),t.renderable.getRepeat()&&(e.setWrapR(lL.REPEAT),e.setWrapS(lL.REPEAT),e.setWrapT(lL.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(uL.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 i=r.getExtent(),o=r.getPointData().getScalars(),a=[],s=0;st.sendParametersTime.getMTime()&&e.sendParameters()},e.isBound=function(){var e=!1;if(t.context&&t.handle){var n=0;if(t.target===t.context.TEXTURE_2D)n=t.context.TEXTURE_BINDING_2D;else fL("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||dL("Unable to find suitable internal format for T=".concat(n," NC= ").concat(r)),t.internalFormat},e.getDefaultInternalFormat=function(e,r){var i=0;return(i=t.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!1))||(i=n.openGLRenderWindow.getDefaultTextureInternalFormat(e,r,!0))||(dL("Unsupported internal texture type!"),dL("Unable to find suitable internal format for T=".concat(e," NC= ").concat(r))),i},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){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t.openGLRenderWindow.getWebgl2())switch(e){case cL.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case n&&cL.SHORT:case n&&cL.UNSIGNED_SHORT:return t.context.HALF_FLOAT;case cL.FLOAT:case cL.VOID:default:return t.context.FLOAT}switch(e){case cL.UNSIGNED_CHAR:return t.context.UNSIGNED_BYTE;case cL.FLOAT:case cL.VOID:default:if(t.context.getExtension("OES_texture_float")&&t.context.getExtension("OES_texture_float_linear"))return t.context.FLOAT;var r=t.context.getExtension("OES_texture_half_float");return r&&t.context.getExtension("OES_texture_half_float_linear")?r.HALF_FLOAT_OES:t.context.UNSIGNED_BYTE}},e.getOpenGLDataType=function(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.openGLDataType=e.getDefaultDataType(n,r),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;case t.context.FLOAT:}return{shift:e,scale:n}},e.getOpenGLFilterMode=function(e){switch(e){case uL.NEAREST:return t.context.NEAREST;case uL.LINEAR:return t.context.LINEAR;case uL.NEAREST_MIPMAP_NEAREST:return t.context.NEAREST_MIPMAP_NEAREST;case uL.NEAREST_MIPMAP_LINEAR:return t.context.NEAREST_MIPMAP_LINEAR;case uL.LINEAR_MIPMAP_NEAREST:return t.context.LINEAR_MIPMAP_NEAREST;case uL.LINEAR_MIPMAP_LINEAR:return t.context.LINEAR_MIPMAP_LINEAR;default:return t.context.NEAREST}},e.getOpenGLWrapMode=function(e){switch(e){case lL.CLAMP_TO_EDGE:return t.context.CLAMP_TO_EDGE;case lL.REPEAT:return t.context.REPEAT;case lL.MIRRORED_REPEAT:return t.context.MIRRORED_REPEAT;default:return t.context.CLAMP_TO_EDGE}},e.create2DFromRaw=function(n,o,a,s,l){if(e.getOpenGLDataType(s),e.getInternalFormat(s,a),e.getFormat(s,a),!t.internalFormat||!t.format||!t.openGLDataType)return pL("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_2D,t.components=a,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var u=i(r(s,[l]));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,u[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.createCubeFromRaw=function(n,o,a,s,l){if(e.getOpenGLDataType(s),e.getInternalFormat(s,a),e.getFormat(s,a),!t.internalFormat||!t.format||!t.openGLDataType)return pL("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_CUBE_MAP,t.components=a,t.width=n,t.height=o,t.depth=1,t.numberOfDimensions=2,t.openGLRenderWindow.activateTexture(e),t.maxLevel=l.length/6-1,e.createTexture(),e.bind();for(var u=i(r(s,l)),c=[],d=t.width,p=t.height,f=0;f=1&&w>=1;){var x=null;y<=t.maxLevel&&(x=c[6*y+v]),t.context.texImage2D(t.context.TEXTURE_CUBE_MAP_POSITIVE_X+v,y,t.internalFormat,b,w,0,t.format,t.openGLDataType,x),y++,b/=2,w/=2}return e.deactivate(),!0},e.createDepthFromRaw=function(n,r,i,o){return e.getOpenGLDataType(i),t.format=t.context.DEPTH_COMPONENT,t.openGLRenderWindow.getWebgl2()?i===cL.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):(pL("Failed to determine texture parameters."),!1)},e.create2DFromImage=function(n){if(e.getOpenGLDataType(cL.UNSIGNED_CHAR),e.getInternalFormat(cL.UNSIGNED_CHAR,4),e.getFormat(cL.UNSIGNED_CHAR,4),!t.internalFormat||!t.format||!t.openGLDataType)return pL("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=!Je(n.width)||!Je(n.height),i=document.createElement("canvas");i.width=r?Ze(n.width):n.width,i.height=r?Ze(n.height):n.height;var o=i.getContext("2d");o.translate(0,i.height),o.scale(1,-1),o.drawImage(n,0,0,n.width,n.height,0,0,i.width,i.height),navigator.userAgent.indexOf("Chrome/69")>=0&&o.getImageData(0,0,1,1);var a=i;return t.context.texImage2D(t.target,0,t.internalFormat,t.format,t.openGLDataType,a),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFromRaw=function(n,o,a,s,l,u){if(e.getOpenGLDataType(l,!0),e.getInternalFormat(l,s),e.getFormat(l,s),!t.internalFormat||!t.format||!t.openGLDataType)return pL("Failed to determine texture parameters."),!1;t.target=t.context.TEXTURE_3D,t.components=s,t.width=n,t.height=o,t.depth=a,t.numberOfDimensions=3,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind();var c=i(r(l,[u],!0));return t.context.texImage3D(t.target,0,t.internalFormat,t.width,t.height,t.depth,0,t.format,t.openGLDataType,c[0]),t.generateMipmap&&t.context.generateMipmap(t.target),e.deactivate(),!0},e.create3DFilterableFromRaw=function(n,r,i,s,l,u){for(var c=arguments.length>6&&void 0!==arguments[6]&&arguments[6],d=n*r*i,p=[],f=[],h=0;h4096&&(O===cL.FLOAT||s>=3)&&(D=4096);var E=1,I=1;d>D*D&&(I=E=Math.ceil(Math.sqrt(d/(D*D))));var k=Math.sqrt(d)/E;k=Ze(k);var M,N=Math.floor(k*E/n),R=Math.ceil(i/N),F=Ze(r*R/I);t.width=k,t.height=F,t.openGLRenderWindow.activateTexture(e),e.createTexture(),e.bind(),t.volumeInfo.xreps=N,t.volumeInfo.yreps=R,t.volumeInfo.xstride=E,t.volumeInfo.ystride=I,t.volumeInfo.offset=P.offset,t.volumeInfo.scale=P.scale;var B=k*F*s;M=O===cL.FLOAT?new Float32Array(B):new Uint8Array(B);for(var L=0,V=Math.floor(n/E),j=Math.floor(r/I),G=0;G2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mL,n),ZB.extend(e,t,n),t.sendParametersTime={},re(t.sendParametersTime,{mtime:0}),t.textureBuildTime={},re(t.textureBuildTime,{mtime:0}),se(e,t,["format","openGLDataType"]),le(e,t,["keyMatrixTime","minificationFilter","magnificationFilter","wrapS","wrapT","wrapR","generateMipmap"]),ie(e,t,["width","height","volumeInfo","components","handle","target"]),hL(e,t)}var vL=me(gL,"vtkOpenGLTexture"),yL=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0,r=t.context,i=r.COLOR_ATTACHMENT0;if(n>0){if(!t.openGLRenderWindow.getWebgl2())return void K("Using multiple framebuffer attachments requires WebGL 2");i+=n}t.colorTexture=e,r.framebufferTexture2D(r.FRAMEBUFFER,i,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 K("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 K("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 K("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=yL.newInstance();r.setOpenGLRenderWindow(t.openGLRenderWindow),r.setMinificationFilter(WB.LINEAR),r.setMagnificationFilter(WB.LINEAR),r.create2DFromRaw(t.glFramebuffer.width,t.glFramebuffer.height,4,_e.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)}}nL("vtkTexture",vL);var wL={openGLRenderWindow:null,glFramebuffer:null,colorTexture:null,depthTexture:null,previousDrawBinding:0,previousReadBinding:0,previousDrawBuffer:0,previousReadBuffer:0,previousActiveFramebuffer:null};function xL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,wL,n),re(e,t),le(e,t,["colorTexture"]),bL(e,t)}var SL={newInstance:me(xL,"vtkFramebuffer"),extend:xL};function CL(e,t){t.classHierarchy.push("vtkRenderPass"),e.getOperation=function(){return t.currentOperation},e.setCurrentOperation=function(e){t.currentOperation=e,t.currentTraverseOperation="traverse".concat(Ae.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 AL={delegates:[],currentOperation:null,preDelegateOperations:[],postDelegateOperations:[],currentParent:null};function PL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AL,n),Ae.obj(e,t),Ae.get(e,t,["currentOperation"]),Ae.setGet(e,t,["delegates","currentParent","preDelegateOperations","postDelegateOperations"]),CL(e,t)}var _L={newInstance:Ae.newInstance(PL,"vtkRenderPass"),extend:PL};function OL(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 i=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),a=0;a0&&t.volumeCount>0||t.depthRequested){var c=n.getFramebufferSize();null===t.framebuffer&&(t.framebuffer=SL.newInstance()),t.framebuffer.setOpenGLRenderWindow(n),t.framebuffer.saveCurrentBindingsAndBuffers();var d=t.framebuffer.getSize();null!==d&&d[0]===c[0]&&d[1]===c[1]||(t.framebuffer.create(c[0],c[1]),t.framebuffer.populateFramebuffer()),t.framebuffer.bind(),e.setCurrentOperation("opaqueZBufferPass"),l.traverse(e),t.framebuffer.restorePreviousBindingsAndBuffers(),t.depthRequested=!1}e.setCurrentOperation("cameraPass"),l.traverse(e),t.opaqueActorCount>0&&(e.setCurrentOperation("opaquePass"),l.traverse(e)),t.translucentActorCount>0&&(e.setCurrentOperation("translucentPass"),l.traverse(e)),t.volumeCount>0&&(e.setCurrentOperation("volumePass"),l.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 TL={opaqueActorCount:0,translucentActorCount:0,volumeCount:0,framebuffer:null,depthRequested:!1};function DL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,TL,n),_L.extend(e,t,n),Ae.get(e,t,["framebuffer"]),OL(e,t)}var EL={newInstance:Ae.newInstance(DL,"vtkForwardPass"),extend:DL},IL=n(560),kL=n.n(IL),ML=Ae.vtkErrorMacro;function NL(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;if(0!==t.handle&&(t.context.deleteShader(t.handle),t.handle=0),"Fragment"===t.shaderType)e=t.context.FRAGMENT_SHADER;else 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 ML("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 RL={shaderType:"Unknown",source:"",error:"",handle:0,dirty:!1,context:null};function FL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,RL,n),Ae.obj(e,t),Ae.setGet(e,t,["shaderType","source","error","handle","context"]),NL(e,t)}var BL={newInstance:Ae.newInstance(FL,"vtkShader"),extend:FL},LL=Ae.vtkErrorMacro;function VL(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):(LL("Links failed: ".concat(t.error)),0):(LL(t.error),0):(LL(t.fragmentShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),LL(t.fragmentShader.getError()),0):(LL(t.vertexShader.getSource().split("\n").map((function(e,t){return"".concat(t,": ").concat(e)})).join("\n")),LL(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 LL("Error linking shader ".concat(n)),t.handle=0,!1}return e.setLinked(!0),t.attributeLocs={},!0},e.setUniformMatrix=function(n,r){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix4fv(i,!1,o),!0},e.setUniformMatrix3x3=function(n,r){var i=e.findUniform(n);if(-1===i)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;var o=new Float32Array(r);return t.context.uniformMatrix3fv(i,!1,o),!0},e.setUniformf=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1f(i,r),!0)},e.setUniformfv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1fv(i,r),!0)},e.setUniformi=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1i(i,r),!0)},e.setUniformiv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform1iv(i,r),!0)},e.setUniform2f=function(n,r,i){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===i)throw new RangeError("Invalid number of values for array");return t.context.uniform2f(o,r,i),!0},e.setUniform2fv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2fv(i,r),!0)},e.setUniform2i=function(n,r,i){var o=e.findUniform(n);if(-1===o)return t.error="Could not set uniform ".concat(n," . No such uniform."),!1;if(void 0===i)throw new RangeError("Invalid number of values for array");return t.context.uniform2i(o,r,i),!0},e.setUniform2iv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform2iv(i,r),!0)},e.setUniform3f=function(n,r,i,o){var a=e.findUniform(n);if(-1===a)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(a,r,i,o),!0},e.setUniform3fArray=function(n,r){var i=e.findUniform(n);if(-1===i)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(i,r[0],r[1],r[2]),!0},e.setUniform3fv=function(n,r){var i=e.findUniform(n);return-1===i?(t.error="Could not set uniform ".concat(n," . No such uniform."),!1):(t.context.uniform3fv(i,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 i=arguments.length,o=new Array(i>1?i-1:0),a=1;a1?i-1:0),a=1;a1?i-1:0),a=1;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jL,n),t.attributesLocs={},t.uniformLocs={},t.vertexShader=BL.newInstance(),t.vertexShader.setShaderType("Vertex"),t.fragmentShader=BL.newInstance(),t.fragmentShader.setShaderType("Fragment"),t.geometryShader=BL.newInstance(),t.geometryShader.setShaderType("Geometry"),Ae.obj(e,t),Ae.get(e,t,["lastCameraMTime"]),Ae.setGet(e,t,["error","handle","compiled","bound","md5Hash","vertexShader","fragmentShader","geometryShader","linked"]),VL(e,t)}var UL={newInstance:Ae.newInstance(GL,"vtkShaderProgram"),extend:GL,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var a="";r&&(a="g");var s=new RegExp(t,a),l=e.replace(s,i);return{replace:o,result:l}}},zL=["lastShaderBound","context","openGLRenderWindow"];function WL(e,t){t.classHierarchy.push("vtkShaderCache"),e.replaceShaderValues=function(e,n,r){var i=n;r.length>0&&(i=UL.substitute(i,"VSOut","GSOut").result);var o=t.openGLRenderWindow.getWebgl2(),a="\n",s="#version 100\n";o?s="#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")&&(a="#extension GL_EXT_frag_depth : enable\n"),t.context.getExtension("EXT_shader_texture_lod")&&(a+="#extension GL_EXT_shader_texture_lod : enable\n#define textureCubeLod textureCubeLodEXT\n#define texture2DLod texture2DLodEXT")),i=UL.substitute(i,"//VTK::System::Dec",["".concat(s,"\n"),o?"":"#extension GL_OES_standard_derivatives : enable\n",a,"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;var l=UL.substitute(e,"//VTK::System::Dec",["".concat(s,"\n"),"#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","precision highp int;","#else","precision mediump float;","precision mediump int;","#endif"]).result;return o&&(l=UL.substitute(l,"varying","out").result,i=UL.substitute(i,"varying","in").result,i=UL.substitute(i,"gl_FragData\\[0\\]","fragOutput0").result,i=UL.substitute(i,"//VTK::Output::Dec","layout(location = 0) out vec4 fragOutput0;").result),{VSSource:l,FSSource:i,GSSource:UL.substitute(r,"//VTK::System::Dec",s).result}},e.readyShaderProgramArray=function(t,n,r){var i=e.replaceShaderValues(t,n,r),o=e.getShaderProgram(i.VSSource,i.FSSource,i.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 i="".concat(e).concat(n).concat(r),o=kL()(i);if(-1===Object.keys(t.shaderPrograms).indexOf(o)){var a=UL.newInstance();return a.setContext(t.context),a.getVertexShader().setSource(e),a.getFragmentShader().setSource(n),r&&a.getGeometryShader().setSource(r),a.setMd5Hash(o),t.shaderPrograms[o]=a,a}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 HL={lastShaderBound:null,shaderPrograms:null,context:null,openGLRenderWindow:null};function KL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,HL,n),t.shaderPrograms={},Ae.obj(e,t),Ae.setGet(e,t,zL),WL(e,t)}var XL={newInstance:Ae.newInstance(KL,"vtkShaderCache"),extend:KL};function qL(e,t){t.classHierarchy.push("vtkRenderWindowViewNode"),e.getViewNodeFactory=function(){return null},e.getAspectRatio=function(){return t.size[0]/t.size[1]},e.getAspectRatioForRenderer=function(e){var n=e.getViewportByReference();return t.size[0]*(n[2]-n[0])/((n[3]-n[1])*t.size[1])},e.isInViewport=function(t,n,r){var i=r.getViewportByReference(),o=e.getFramebufferSize();return i[0]*o[0]<=t&&i[2]*o[0]>=t&&i[1]*o[1]<=n&&i[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 i=e.getFramebufferSize();return[t/i[0],n/i[1],r]},e.normalizedDisplayToDisplay=function(t,n,r){var i=e.getFramebufferSize();return[t*i[0],n*i[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,i){var o=i.worldToView(t,n,r),a=e.getViewportSize(i),s=i.viewToProjection(o[0],o[1],o[2],a[0]/a[1]),l=i.projectionToNormalizedDisplay(s[0],s[1],s[2]);return e.normalizedDisplayToDisplay(l[0],l[1],l[2])},e.displayToWorld=function(t,n,r,i){var o=e.displayToNormalizedDisplay(t,n,r),a=i.normalizedDisplayToProjection(o[0],o[1],o[2]),s=e.getViewportSize(i),l=i.projectionToView(a[0],a[1],a[2],s[0]/s[1]);return i.viewToWorld(l[0],l[1],l[2])},e.normalizedDisplayToViewport=function(t,n,r,i){var o=i.getViewportByReference();o=e.normalizedDisplayToDisplay(o[0],o[1],0);var a=e.normalizedDisplayToDisplay(t,n,r);return[a[0]-o[0]-.5,a[1]-o[1]-.5,r]},e.viewportToNormalizedViewport=function(t,n,r,i){var o=e.getViewportSize(i);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,i){var o=e.getViewportSize(i);return[t*(o[0]-1),n*(o[1]-1),r]},e.displayToLocalDisplay=function(t,n,r){return[t,e.getFramebufferSize()[1]-n-1,r]},e.viewportToNormalizedDisplay=function(t,n,r,i){var o=i.getViewportByReference(),a=t+(o=e.normalizedDisplayToDisplay(o[0],o[1],0))[0]+.5,s=n+o[1]+.5;return e.displayToNormalizedDisplay(a,s,r)},e.getPixelData=function(e,t,n,r){Ae.vtkErrorMacro("not implemented")}}var YL={size:void 0,selector:void 0};function ZL(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,YL,n),t.size||(t.size=[300,300]),Ae.getArray(e,t,["size"],2),Ae.get(e,t,["selector"]),ZB.extend(e,t,n),qL(e,t)}var JL={newInstance:Ae.newInstance(ZL,"vtkRenderWindowViewNode"),extend:ZL},QL=Ae.vtkErrorMacro;function $L(e,t){t.classHierarchy.push("vtkOpenGLTextureUnitManager"),e.deleteTable=function(){for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eV,n),Ae.obj(e,t),t.textureUnits=[],Ae.get(e,t,["numberOfTextureUnits"]),Ae.setGet(e,t,["context"]),$L(e,t)}var nV={newInstance:Ae.newInstance(tV,"vtkOpenGLTextureUnitManager"),extend:tV},rV={PassTypes:{MIN_KNOWN_PASS:0,ACTOR_PASS:0,COMPOSITE_INDEX_PASS:1,ID_LOW24:2,MAX_KNOWN_PASS:2}};function iV(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 oV=rV.PassTypes,aV=uc.SelectionContent,sV=uc.SelectionField,lV=Ii.FieldAssociations,uV=Ae.vtkErrorMacro;function cV(e){return"".concat(e.propID," ").concat(e.compositeID)}function dV(e,t,n,r){if(!n)return 0;var i=4*(t*(r[2]-r[0]+1)+e),o=[];o[0]=n[i],o[1]=n[i+1],o[2]=n[i+2];var a=o[2];return a*=256,a+=o[1],a*=256,a+=o[0]}function pV(e,t,n,r){var i=n<0?0:n;if(0===i){if(r[0]=t[0],r[1]=t[1],t[0]e.area[2]||t[1]e.area[3])return null;var o=[t[0]-e.area[0],t[1]-e.area[1]],a=dV(o[0],o[1],e.pixBuffer[oV.ACTOR_PASS],e.area);if(a<=0)return null;var s={valid:!0};s.propID=a-1,s.prop=e.props[s.propID];var l=dV(o[0],o[1],e.pixBuffer[oV.COMPOSITE_INDEX_PASS],e.area);if((l<0||l>16777215)&&(l=0),s.compositeID=l-1,e.captureZValues){var u=4*(o[1]*(e.area[2]-e.area[0]+1)+o[0]);s.zValue=(256*e.zBuffer[u]+e.zBuffer[u+1])/65535,s.displayPosition=t}return s}var c=[t[0],t[1]],d=[0,0],p=pV(e,t,0,r);if(p&&p.valid)return p;for(var f=1;ff?c[1]-f:0;h<=c[1]+f;++h){if(d[1]=h,c[0]>=f&&(d[0]=c[0]-f,(p=pV(e,d,0,r))&&p.valid))return p;if(d[0]=c[0]+f,(p=pV(e,d,0,r))&&p.valid)return p}for(var m=c[0]>=f?c[0]-(f-1):0;m<=c[0]+(f-1);++m){if(d[0]=m,c[1]>=f&&(d[1]=c[1]-f,(p=pV(e,d,0,r))&&p.valid))return p;if(d[1]=c[1]+f,(p=pV(e,d,0,r))&&p.valid)return p}}return r[0]=t[0],r[1]=t[1],null}function fV(e,t,n,r,i){var o=[],a=0;return t.forEach((function(t,s){var l=uc.newInstance();switch(l.setContentType(aV.INDICES),e){case lV.FIELD_ASSOCIATION_CELLS:l.setFieldType(sV.CELL);break;case lV.FIELD_ASSOCIATION_POINTS:l.setFieldType(sV.POINT);break;default:uV("Unknown field association")}l.getProperties().propID=t.info.propID,l.getProperties().prop=t.info.prop,l.getProperties().compositeID=t.info.compositeID,l.getProperties().pixelCount=t.pixelCount,n&&(l.getProperties().displayPosition=[t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue],l.getProperties().worldPosition=i.displayToWorld(t.info.displayPosition[0],t.info.displayPosition[1],t.info.zValue,r)),l.setSelectionList(t.attributeIDs),o[a]=l,a++})),o}function hV(e,t,n,r,i){for(var o=Math.floor(t),a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=new Map,c=[0,0],d=a;d<=l;d++)for(var p=o;p<=s;p++){var f=pV(e,[p,d],0,c);if(f&&f.valid){var h=cV(f);if(u.has(h)){var m=u.get(h);m.pixelCount++,e.captureZValues&&f.zValue0&&(--i in t.hitProps||(t.hitProps[i]=!0))}},e.renderProp=function(n){t.currentPass===oV.ACTOR_PASS&&(e.setPropColorValueFromInt(t.props.length+1),t.props.push(n))},e.renderCompositeIndex=function(n){t.currentPass===oV.COMPOSITE_INDEX_PASS&&e.setPropColorValueFromInt(n+1)},e.renderAttributeId=function(e){e<0||(t.maxAttributeId=e>t.maxAttributeId?e:t.maxAttributeId)},e.passTypeToString=function(e){return Ae.enumToString(oV,e)},e.isPropHit=function(e){return Boolean(t.hitProps[e])},e.setPropColorValueFromInt=function(e){t.propColorValue[0]=e%256/255,t.propColorValue[1]=Math.floor(e/256)%256/255,t.propColorValue[2]=Math.floor(e/65536)%256/255},e.getPixelInformation=function(n,r,i){var o=r<0?0:r;if(0===o){if(i[0]=n[0],i[1]=n[1],n[0]t.area[2]||n[1]t.area[3])return null;var a=[n[0]-t.area[0],n[1]-t.area[1]],s=dV(a[0],a[1],t.pixBuffer[oV.ACTOR_PASS],t.area);if(s<=0)return null;var l={valid:!0};l.propID=s-1,l.prop=t.props[l.propID];var u=dV(a[0],a[1],t.pixBuffer[oV.COMPOSITE_INDEX_PASS],t.area);if((u<0||u>16777215)&&(u=0),l.compositeID=u-1,t.captureZValues){var c=4*(a[1]*(t.area[2]-t.area[0]+1)+a[0]);l.zValue=(256*t.zBuffer[c]+t.zBuffer[c+1])/65535,l.displayPosition=n}return l}var d=[n[0],n[1]],p=[0,0],f=e.getPixelInformation(n,0,i);if(f&&f.valid)return f;for(var h=1;hh?d[1]-h:0;m<=d[1]+h;++m){if(p[1]=m,d[0]>=h&&(p[0]=d[0]-h,(f=e.getPixelInformation(p,0,i))&&f.valid))return f;if(p[0]=d[0]+h,(f=e.getPixelInformation(p,0,i))&&f.valid)return f}for(var g=d[0]>=h?d[0]-(h-1):0;g<=d[0]+(h-1);++g){if(p[0]=g,d[1]>=h&&(p[1]=d[1]-h,(f=e.getPixelInformation(p,0,i))&&f.valid))return f;if(p[1]=d[1]+h,(f=e.getPixelInformation(p,0,i))&&f.valid)return f}}return i[0]=n[0],i[1]=n[1],null},e.generateSelection=function(n,r,i,o){for(var a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=Math.floor(o),c=new Map,d=[0,0],p=s;p<=u;p++)for(var f=a;f<=l;f++){var h=[f,p],m=e.getPixelInformation(h,0,d);if(m&&m.valid){var g=cV(m);if(c.has(g)){var v=c.get(g);v.pixelCount++,t.captureZValues&&m.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,gV,n),$F.extend(e,t,n),t.propColorValue=[0,0,0],t.props=[],t.area||(t.area=[0,0,0,0]),Ae.setGetArray(e,t,["area"],4),Ae.setGet(e,t,["renderer","currentPass","openGLRenderWindow"]),Ae.setGetArray(e,t,["propColorValue"],3),Ae.event(e,t,"event"),mV(e,t)}var yV=function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{preserveDrawingBuffer:!1,depth:!0,alpha:!0},r=null,i="undefined"!=typeof WebGL2RenderingContext;return t.webgl2=!1,t.defaultToWebgl2&&i&&(r=t.canvas.getContext("webgl2",n))&&(t.webgl2=!0,bV("using webgl2")),r||(bV("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"),i=Math.floor(n.renderWidth+r.renderWidth),o=Math.floor(Math.max(n.renderHeight,r.renderHeight));e.setSize(i,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),xV&&(t.vrSceneFrame=t.vrDisplay.requestAnimationFrame(e.vrRender))})).catch((function(){console.error("failed to requestPresent")})):wV("vrDisplay is not connected")},e.stopVR=function(){t.renderable.getInteractor().returnFromVRAnimation(),t.vrDisplay.exitPresent(),t.vrDisplay.cancelAnimationFrame(t.vrSceneFrame),e.setSize.apply(e,w(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=_L.newInstance();t.setCurrentOperation("Release"),t.traverse(e,null)},e.activateTexture=function(n){var r=t._textureResourceIds.get(n);if(void 0===r){var i=e.getTextureUnitManager().allocate();i<0?wV("Hardware does not support the number of textures defined."):(t._textureResourceIds.set(n,i),t.context.activeTexture(t.context.TEXTURE0+i))}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){if(e===_e.UNSIGNED_CHAR)switch(n){case 1:return t.context.R8;case 2:return t.context.RG8;case 3:return t.context.RGB8;default:return t.context.RGBA8}switch(n){case 1:return t.context.R16F;case 2:return t.context.RG16F;case 3:return t.context.RGB16F;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;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",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.resetCamera,o=void 0!==i&&i,a=r.size,s=void 0===a?null:a,l=r.scale,u=void 0===l?1:l;if(t.deleted)return null;t.imageFormat=n;var c=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:s||1!==u?s||t.size.map((function(e){return e*u})):null},new Promise((function(n,r){var i=e.onImageReady((function(r){if(null===t._screenshot.size)t.notifyStartCaptureImage=c,i.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach((function(e){return(0,e.restoreParamsFn)(e.arg)})),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),n(r);else{var a=document.createElement("img");a.style=SV,a.src=r,t._screenshot.placeHolder=t.el.appendChild(a),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),o&&(t._screenshot.cameras=t.renderable.getRenderers().map((function(e){var t=e.getActiveCamera(),n=t.get("focalPoint","position","parallelScale");return{resetCameraFn:e.resetCamera,restoreParamsFn:t.set,arg:JSON.parse(JSON.stringify(n))}})),t._screenshot.cameras.forEach((function(e){return(0,e.resetCameraFn)()}))),e.traverseAllPasses()}}))}))},e.getGLInformations=function(){for(var n=e.get3DContext(),r=n.getExtension("OES_texture_float"),i=n.getExtension("OES_texture_half_float"),o=n.getExtension("WEBGL_debug_renderer_info"),a=n.getExtension("WEBGL_draw_buffers"),s=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),l=[["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&&CV(n,n.RGBA,n.UNSIGNED_BYTE)?"RGBA":"",r&&CV(n,n.RGB,n.UNSIGNED_BYTE)?"RGB":"",r&&CV(n,n.LUMINANCE,n.UNSIGNED_BYTE)?"LUMINANCE":"",r&&CV(n,n.ALPHA,n.UNSIGNED_BYTE)?"ALPHA":"",r&&CV(n,n.LUMINANCE_ALPHA,n.UNSIGNED_BYTE)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Half Float Render Targets","HALF FLOAT RENDER TARGET FORMATS",[i&&CV(n,n.RGBA,i.HALF_FLOAT_OES)?"RGBA":"",i&&CV(n,n.RGB,i.HALF_FLOAT_OES)?"RGB":"",i&&CV(n,n.LUMINANCE,i.HALF_FLOAT_OES)?"LUMINANCE":"",i&&CV(n,n.ALPHA,i.HALF_FLOAT_OES)?"ALPHA":"",i&&CV(n,n.LUMINANCE_ALPHA,i.HALF_FLOAT_OES)?"LUMINANCE_ALPHA":""].join(" ")],["Supported Formats for Full Float Render Targets","FLOAT RENDER TARGET FORMATS",[r&&CV(n,n.RGBA,n.FLOAT)?"RGBA":"",r&&CV(n,n.RGB,n.FLOAT)?"RGB":"",r&&CV(n,n.LUMINANCE,n.FLOAT)?"LUMINANCE":"",r&&CV(n,n.ALPHA,n.FLOAT)?"ALPHA":"",r&&CV(n,n.LUMINANCE_ALPHA,n.FLOAT)?"LUMINANCE_ALPHA":""].join(" ")],["Max Multiple Render Targets Buffers","MAX_DRAW_BUFFERS_WEBGL",a?n.getParameter(a.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",o&&n.getParameter(o.UNMASKED_RENDERER_WEBGL)],["Unmasked Vendor","UNMASKED_VENDOR",o&&n.getParameter(o.UNMASKED_VENDOR_WEBGL)],["WebGL Version","WEBGL_VERSION",t.webgl2?2:1]],u={};l.length;){var c=y(l.pop(),3),d=c[0],p=c[1],f=c[2];p&&(u[p]={label:d,value:f})}return u},e.traverseAllPasses=function(){if(t.renderPasses)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:t.imageFormat,r=document.createElement("canvas"),i=r.getContext("2d");r.width=t.canvas.width,r.height=t.canvas.height,i.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,DV,n),JL.extend(e,t,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",_V(),t.selector||(t.selector=yV.newInstance(),t.selector.setOpenGLRenderWindow(e)),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,t.myFactory=aL.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",IV),t.shaderCache=XL.newInstance(),t.shaderCache.setOpenGLRenderWindow(e),t.renderPasses[0]=EL.newInstance(),Ae.event(e,t,"imageReady"),Ae.event(e,t,"haveVRDisplay"),Ae.get(e,t,["shaderCache","textureUnitManager","webgl2","vrDisplay","useBackgroundImage"]),Ae.setGet(e,t,["initialized","context","canvas","renderPasses","notifyStartCaptureImage","defaultToWebgl2","cursor","queryVRSize","hideCanvasInVR","useOffScreen","activeFramebuffer"]),Ae.setGetArray(e,t,["size","vrResolution"],2),TV(e,t)}var IV=Ae.newInstance(EV,"vtkOpenGLRenderWindow");nB("WebGL",IV);var kV={newInstance:IV,extend:EV,pushMonitorGLContextCount:function(e){PV.push(e)},popMonitorGLContextCount:function(e){return PV.pop()}};function MV(e,t){t.classHierarchy.push("vtkWebGPUShaderModule"),e.initialize=function(e,n){t.device=e,t.handle=t.device.getHandle().createShaderModule({code:n.getCode()})}}var NV={device:null,handle:null};function RV(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,NV,n),Ae.obj(e,t),Ae.get(e,t,["lastCameraMTime"]),Ae.setGet(e,t,["device","handle"]),MV(e,t)}var FV={newInstance:Ae.newInstance(RV,"vtkWebGPUShaderModule"),extend:RV};function BV(e,t){t.classHierarchy.push("vtkWebGPUShaderCache"),e.getShaderModule=function(e){for(var n=e.getType(),r=e.getHash(),i=t._shaderModules.keys(),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,LV,n),t._shaderModules=new Map,Ae.obj(e,t),Ae.setGet(e,t,["device","window"]),BV(e,t)}var jV={newInstance:Ae.newInstance(VV,"vtkWebGPUShaderCache"),extend:VV,substitute:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=Array.isArray(n)?n.join("\n"):n,o=!1;-1!==e.search(t)&&(o=!0);var a="";r&&(a="g");var s=new RegExp(t,a),l=e.replace(s,i);return{replace:o,result:l}}},GV=["setBindGroup","setVertexBuffer","draw"];function UV(e,t){t.classHierarchy.push("vtkWebGPURenderEncoder"),e.begin=function(e){t.handle=e.beginRenderPass(t.description)},e.end=function(){t.handle.endPass()},e.setPipeline=function(e){t.handle.setPipeline(e.getHandle());var n=e.getPipelineDescription();if(t.colorTextureViews.length!==n.fragment.targets.length)console.log("mismatched attachment counts on pipeline ".concat(n.fragment.targets.length," while encoder has ").concat(t.colorTextureViews.length)),console.trace();else for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zV,n),re(e,t),t.description={colorAttachments:[{view:void 0,loadValue:"load",storeOp:"store"}],depthStencilAttachment:{view:void 0,depthLoadValue:0,depthStoreOp:"store",stencilLoadValue:0,stencilStoreOp:"store"}},t.replaceShaderCodeFunction=function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");var n=t.getCode();n=jV.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = computedColor;"]).result,t.setCode(n)},t.pipelineSettings={primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"greater-equal",format:"depth32float"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}},t.colorTextureViews=[],ie(e,t,["boundPipeline","colorTextureViews"]),le(e,t,["depthTextureView","description","handle","pipelineHash","pipelineSettings","replaceShaderCodeFunction"]),UV(e,t)}var HV={newInstance:me(WV,"vtkWebGPURenderEncoder"),extend:WV},KV={BufferUsage:{Verts:0,Lines:1,Triangles:2,Strips:3,LinesFromStrips:4,LinesFromTriangles:5,Points:6,UniformArray:7,PointArray:8,NormalsFromPoints:9,Texture:10,RawVertex:11,Storage:12},PrimitiveTypes:{Start:0,Points:0,Lines:1,Triangles:2,TriangleStrips:3,TriangleEdges:4,TriangleStripEdges:5,End:6}};function XV(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 qV=["getMappedRange","mapAsync","unmap"];function YV(e,t){t.classHierarchy.push("vtkWebGPUBuffer"),e.create=function(e,n){t.handle=t.device.getHandle().createBuffer({size:e,usage:n}),t.sizeInBytes=e,t.usage=n},e.write=function(e){!function(e,t,n,r){var i=r.byteLength,o=e.createBuffer({size:i,usage:GPUBufferUsage.COPY_SRC,mappedAtCreation:!0}),a=o.getMappedRange(0,i);new Uint8Array(a).set(new Uint8Array(r)),o.unmap();var s=e.createCommandEncoder();s.copyBufferToBuffer(o,0,t,n,i);var l=s.finish();e.queue.submit([l]),o.destroy()}(t.device.getHandle(),t.handle,0,e.buffer)},e.createAndWrite=function(e,n){t.handle=t.device.getHandle().createBuffer({size:e.byteLength,usage:n,mappedAtCreation:!0}),t.sizeInBytes=e.byteLength,t.usage=n,new Uint8Array(t.handle.getMappedRange()).set(new Uint8Array(e.buffer)),t.handle.unmap()};for(var n=function(n){e[qV[n]]=function(){var e;return(e=t.handle)[qV[n]].apply(e,arguments)}},r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZV,n),Ae.obj(e,t),Ae.get(e,t,["handle","sizeInBytes","usage"]),Ae.setGet(e,t,["strideInBytes","device","arrayInformation","sourceTime"]),YV(e,t)}var QV=function(e){for(var t=1;t"):3===n?"vec3<".concat(t,">"):2===n?"vec2<".concat(t,">"):t},getByteStrideFromShaderFormat:function(e){if(!e)return 0;var t=1;return"vec"===e.substring(0,3)?t=e[3]:"mat"===e.substring(0,3)&&(t=e[3]*e[5]),4*t},getNativeTypeFromShaderFormat:function(e){if(e)return e.includes("f32")?"Float32Array":e.includes("i32")?"Int32Array":e.includes("u32")?"Uint32Array":void K("unknown format ".concat(e))}};function tj(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 nj(e){for(var t=1;t1?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 numPoints>2?3*(e-2):0}};function uj(e){switch(e){case ij.Points:return"points";case ij.Lines:return"lines";case ij.Triangles:case ij.TriangleEdges:return"polys";case ij.TriangleStripEdges:case ij.TriangleStrips:return"strips";default:return""}}function cj(e,t,n){var r=null;r=t===oj.POINTS||"points"===n?lj.anythingToPoints:t===oj.WIREFRAME||"lines"===n?lj["".concat(n,"ToWireframe")]:lj["".concat(n,"ToSurface")];for(var i=e.getData(),o=i.length,a=0,s=0;s2)for(var i=0;i2){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fj,n),re(e,t),t.buffers=new WeakMap,le(e,t,["device"]),pj(e,t)}var mj=nj(nj({newInstance:me(hj),extend:hj},{}),KV);function gj(e,t){t.classHierarchy.push("vtkWebGPUSampler"),e.create=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.device=e,t.options.magFilter=n.magFilter?n.magFilter:"nearest",t.options.minFilter=n.minFilter?n.minFilter:"nearest",t.handle=t.device.getHandle().createSampler(t.options),t.bindGroupTime.modified()},e.getShaderCode=function(e,n){return"[[binding(".concat(e,"), group(").concat(n,")]] var ").concat(t.name,": sampler;")},e.getBindGroupEntry=function(){return{resource:t.handle}}}var vj={device:null,handle:null,name:null,options:null};function yj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vj,n),Ae.obj(e,t),t.options={},t.bindGroupLayoutEntry={visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,sampler:{}},t.bindGroupTime={},Ae.obj(t.bindGroupTime,{mtime:0}),Ae.get(e,t,["bindGroupTime","handle","options"]),Ae.setGet(e,t,["bindGroupLayoutEntry","device","name"]),gj(e,t)}var bj={newInstance:Ae.newInstance(yj),extend:yj};function wj(e,t){t.classHierarchy.push("vtkWebGPUTextureView"),e.create=function(e,n){t.texture=e,t.options=n,t.options.dimension=t.options.dimension||"2d",t.textureHandle=e.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupLayoutEntry.texture.viewDimension=t.options.dimension;var r=ej.getDetailsFromTextureFormat(t.texture.getFormat());t.bindGroupLayoutEntry.texture.sampleType=r.sampleType},e.getBindGroupEntry=function(){return{resource:e.getHandle()}},e.getShaderCode=function(e,n){var r="f32";"sint"===t.bindGroupLayoutEntry.texture.sampleType?r="i32":"uint"===t.bindGroupLayoutEntry.texture.sampleType&&(r="u32");var i="[[binding(".concat(e,"), group(").concat(n,")]] var ").concat(t.name,": texture_").concat(t.options.dimension,"<").concat(r,">;");return"depth"===t.bindGroupLayoutEntry.texture.sampleType&&(i="[[binding(".concat(e,"), group(").concat(n,")]] var ").concat(t.name,": texture_depth_").concat(t.options.dimension,";")),i},e.addSampler=function(n,r){var i=bj.newInstance();i.create(n,r),e.setSampler(i),t.sampler.setName("".concat(t.name,"Sampler"))},e.setName=function(n){t.sampler&&t.sampler.setName("".concat(n,"Sampler")),t.name!==n&&(t.name=n,e.modified())},e.getBindGroupTime=function(){return t.texture.getHandle()!==t.textureHandle&&(t.textureHandle=t.texture.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupTime.modified()),t.bindGroupTime},e.getHandle=function(){return t.texture.getHandle()!==t.textureHandle&&(t.textureHandle=t.texture.getHandle(),t.handle=t.textureHandle.createView(t.options),t.bindGroupTime.modified()),t.handle}}var xj={texture:null,handle:null,name:null,sampler:null};function Sj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xj,n),Ae.obj(e,t),t.bindGroupLayoutEntry={visibility:GPUShaderStage.VERTEX|GPUShaderStage.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d"}},t.bindGroupTime={},Ae.obj(t.bindGroupTime,{mtime:0}),Ae.get(e,t,["bindGroupTime","name","texture"]),Ae.setGet(e,t,["bindGroupLayoutEntry","sampler"]),wj(e,t)}var Cj={newInstance:Ae.newInstance(Sj),extend:Sj},Aj=mj.BufferUsage;function Pj(e,t){t.classHierarchy.push("vtkWebGPUTexture"),e.create=function(e,n){t.device=e,t.width=n.width,t.height=n.height,t.depth=n.depth?n.depth:1;var r=1===t.depth?"2d":"3d";t.format=n.format?n.format:"rgbaunorm",t.usage=n.usage?n.usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST,t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage,dimension:r})},e.assignFromHandle=function(e,n,r){t.device=e,t.handle=n,t.width=r.width,t.height=r.height,t.depth=r.depth?r.depth:1,t.format=r.format?r.format:"rgbaunorm",t.usage=r.usage?r.usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST},e.writeImageData=function(e){var n=ej.getDetailsFromTextureFormat(t.format),r=t.width*n.stride;if(e.nativeArray){var i={usage:Aj.Texture};e.dataArray&&(i.dataArray=e.dataArray,i.time=e.dataArray.getMTime()),i.nativeArray=e.nativeArray;var o=e.nativeArray.length/(t.height*t.depth)*e.nativeArray.BYTES_PER_ELEMENT,a=2===n.elementSize&&"float"===n.sampleType;if(a||o%256){for(var s=e.nativeArray,l=o/s.BYTES_PER_ELEMENT,u=n.elementSize,c=256*Math.floor((l*u+255)/256),d=c/u,p=Ae.newTypedArray(a?"Uint16Array":s.constructor.name,d*t.height*t.depth),f=0;f2&&void 0!==arguments[2]?arguments[2]:1;e===t.width&&n===t.height&&r===t.depth||(t.width=e,t.height=n,t.depth=r,t.handle=t.device.getHandle().createTexture({size:[t.width,t.height,t.depth],format:t.format,usage:t.usage}))},e.createView=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.dimension||(n.dimension=1===t.depth?"2d":"3d");var r=Cj.newInstance();return r.create(e,n),r}}var _j={device:null,handle:null,buffer:null,ready:!1};function Oj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_j,n),Ae.obj(e,t),Ae.get(e,t,["handle","ready","width","height","depth","format","usage"]),Ae.setGet(e,t,["device"]),Pj(e,t)}var Tj={newInstance:Ae.newInstance(Oj),extend:Oj};function Dj(e,t){t.classHierarchy.push("vtkWebGPUOpaquePass"),e.traverse=function(n,r){if(!t.deleted){t.currentParent=r;var i=r.getDevice();if(t.renderEncoder)t.colorTexture.resize(r.getCanvas().width,r.getCanvas().height),t.depthTexture.resize(r.getCanvas().width,r.getCanvas().height);else{e.createRenderEncoder(),t.colorTexture=Tj.newInstance(),t.colorTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"bgra8unorm",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC});var o=t.colorTexture.createView();o.setName("opaquePassColorTexture"),t.renderEncoder.setColorTextureView(0,o),t.depthFormat="depth32float",t.depthTexture=Tj.newInstance(),t.depthTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:t.depthFormat,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_SRC});var a=t.depthTexture.createView();a.setName("opaquePassDepthTexture"),t.renderEncoder.setDepthTextureView(a)}t.renderEncoder.attachTextureViews(),e.setCurrentOperation("opaquePass"),n.setRenderEncoder(t.renderEncoder),n.traverse(e)}},e.getColorTextureView=function(){return t.renderEncoder.getColorTextureViews()[0]},e.getDepthTextureView=function(){return t.renderEncoder.getDepthTextureView()},e.createRenderEncoder=function(){t.renderEncoder=HV.newInstance(),t.renderEncoder.setPipelineHash("op")}}var Ej={renderEncoder:null,colorTexture:null,depthTexture:null};function Ij(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Ej,n),_L.extend(e,t,n),Ae.get(e,t,["colorTexture","depthTexture"]),Dj(e,t)}var kj={newInstance:Ae.newInstance(Ij,"vtkWebGPUOpaquePass"),extend:Ij};function Mj(e,t){t.classHierarchy.push("vtkWebGPUBindGroup"),e.setBindables=function(n){if(t.bindables.length===n.length){for(var r=!0,i=0;ir?o:r}if(r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Nj,n),Ae.obj(e,t),t.bindables=[],t.bindGroupTime={},Ae.obj(t.bindGroupTime,{mtime:0}),Ae.get(e,t,["bindGroupTime","handle","sizeInBytes","usage"]),Ae.setGet(e,t,["name","device","arrayInformation","sourceTime"]),Mj(e,t)}var Fj={newInstance:Ae.newInstance(Rj),extend:Rj};function Bj(e,t){t.classHierarchy.push("vtkWebGPUPipeline"),e.getShaderDescriptions=function(){return t.shaderDescriptions},e.initialize=function(e){t.pipelineDescription=t.renderEncoder.getPipelineSettings(),t.pipelineDescription.primitive.topology=t.topology,t.pipelineDescription.vertex=t.vertexState;for(var n=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lj,n),re(e,t),t.layouts=[],t.shaderDescriptions=[],ie(e,t,["handle","pipelineDescription"]),le(e,t,["device","renderEncoder","topology","vertexState"]),Bj(e,t)}var jj={newInstance:me(Vj,"vtkWebGPUPipeline"),extend:Vj};function Gj(e,t){t.classHierarchy.push("vtkWebGPUShaderDescription"),e.hasOutput=function(e){return t.outputNames.includes(e)},e.addOutput=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;t.outputTypes.push(e),t.outputNames.push(n),t.outputInterpolations.push(r)},e.addBuiltinOutput=function(e,n){t.builtinOutputTypes.push(e),t.builtinOutputNames.push(n)},e.addBuiltinInput=function(e,n){t.builtinInputTypes.push(e),t.builtinInputNames.push(n)},e.replaceShaderCode=function(e,n){var r=[],i=[];if(n&&r.push(n.getShaderCode()),e||t.builtinInputNames.length){var o=[];if(o.push("struct ".concat(t.type,"Input\n{")),e)for(var a=e.getOutputNamesByReference(),s=e.getOutputTypesByReference(),l=e.getOutputInterpolationsByReference(),u=0;u1&&(o.push("};"),i=o,r[r.length-1]+=",",r.push("input: ".concat(t.type,"Input")))}if(r.length&&(t.code=jV.substitute(t.code,"//VTK::IOStructs::Input",r).result),t.outputNames.length+t.builtinOutputNames.length){for(var d=["struct ".concat(t.type,"Output\n{")],p=0;p ".concat(t.type,"Output")]).result}t.code=jV.substitute(t.code,"//VTK::IOStructs::Dec",i).result}}var Uj={type:null,hash:null,code:null,outputNames:null,outputTypes:null};function zj(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Uj,n),t.outputNames=[],t.outputTypes=[],t.outputInterpolations=[],t.builtinOutputNames=[],t.builtinOutputTypes=[],t.builtinInputNames=[],t.builtinInputTypes=[],Ae.obj(e,t),Ae.setGet(e,t,["type","hash","code"]),Ae.getArray(e,t,["outputTypes","outputNames","outputInterpolations"]),Gj(e,t)}var Wj={newInstance:Ae.newInstance(zj,"vtkWebGPUShaderDescription"),extend:zj};function Hj(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"vertex",i=n;Array.isArray(i)||(i=[i]);for(var o=0;ot.names[0]?1:0}))},e.removeBufferIfPresent=function(e){for(var n=0;n0&&(e+=",\n"),e="".concat(e," [[location(").concat(n,")]] ").concat(t.inputs[r].names[i]," : ").concat(a),n++}return e},e.getVertexInputInformation=function(){var e={};if(t.inputs.length){for(var n=[],r=0,i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Xj,n),re(e,t),t.bindingDescriptions=[],t.attributeDescriptions=[],t.inputs=[],le(e,t,["created","device","handle"]),Kj(e,t)}var Yj={newInstance:me(qj,"vtkWebGPUVertexInput"),extend:qj},Zj="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(vertex)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : vertexOutput;\n\n // var vertex: vec4 = vertexBC;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n //VTK::Position::Impl\n\n return output;\n}\n",Jj="\n//VTK::Renderer::Dec\n\n//VTK::Color::Dec\n\n//VTK::Normal::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Select::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n //VTK::Color::Impl\n\n //VTK::Normal::Impl\n\n //VTK::Light::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::Select::Impl\n\n // var computedColor:vec4 = vec4(1.0,0.5,0.5,1.0);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n";function Qj(e,t){t.classHierarchy.push("vtkWebGPUMapperHelper"),e.generateShaderDescriptions=function(n,r,i){var o=Wj.newInstance({type:"vertex",hash:n,code:t.vertexShaderTemplate}),a=Wj.newInstance({type:"fragment",hash:n,code:t.fragmentShaderTemplate}),s=r.getShaderDescriptions();s.push(o),s.push(a);for(var l=t.vertexShaderTemplate+t.fragmentShaderTemplate,u=new RegExp("//VTK::[^:]*::","g"),c=l.match(u).filter((function(e,t,n){return n.indexOf(e)===t})),d=c.map((function(e){return"replaceShader".concat(e.substring(7,e.length-2))})),p=0;p","[[builtin(position)]] Position");var i=r.getCode();i=jV.substitute(i,"//VTK::Position::Impl",[" output.Position = rendererUBO.SCPCMatrix*vertexBC;"]).result,r.setCode(i)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderTCoord=function(e,t,n){t.getShaderDescription("vertex").addOutput("vec2","tcoordVS")},t.shaderReplacements.set("replaceShaderTCoord",e.replaceShaderTCoord),e.addTextureView=function(e){t.textureViews.includes(e)||t.textureViews.push(e)},e.renderForPipeline=function(e){var n=e.getBoundPipeline();e.activateBindGroup(t.bindGroup),n.bindVertexInput(e,t.vertexInput),e.draw(t.numberOfVertices,t.numberOfInstances,0,0)},e.registerToDraw=function(){t.pipeline&&t.WebGPURenderer.registerPipelineCallback(t.pipeline,e.renderForPipeline)},e.render=function(n,r){e.build(n,r),n.setPipeline(t.pipeline),t.WebGPURenderer&&t.WebGPURenderer.bindUBO(n),e.renderForPipeline(n)},e.getBindables=function(){var e=w(t.additionalBindables);t.UBO&&e.push(t.UBO),t.SSBO&&e.push(t.SSBO);for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$j,n),Ae.obj(e,t),t.textureViews=[],t.vertexInput=Yj.newInstance(),t.bindGroup=Fj.newInstance(),t.bindGroup.setName("mapperBG"),t.additionalBindables=[],t.fragmentShaderTemplate=t.fragmentShaderTemplate||Jj,t.vertexShaderTemplate=t.vertexShaderTemplate||Zj,t.shaderReplacements=new Map,Ae.get(e,t,["vertexInput"]),Ae.setGet(e,t,["additionalBindables","device","fragmentShaderTemplate","interpolate","numberOfInstances","numberOfVertices","pipelineHash","shaderReplacements","SSBO","textureViews","topology","UBO","vertexShaderTemplate","WebGPURenderer"]),Qj(e,t)}var tG={newInstance:Ae.newInstance(eG,"vtkWebGPUMapperHelper"),extend:eG};function nG(e,t){t.classHierarchy.push("vtkWebGPUFullScreenQuad"),e.replaceShaderPosition=function(e,t,n){var r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","[[builtin(position)]] Position");var i=r.getCode();i=jV.substitute(i,"//VTK::Position::Impl",["output.tcoordVS = vec2(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4(vertexBC, 1.0);"]).result,r.setCode(i)},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition);var n=e.build;e.build=function(e,r){var i=r.getBufferManager().getFullScreenQuadBuffer();t.vertexInput.addBuffer(i,["vertexBC"]),t.numberOfVertices=6,n(e,r)}}var rG={};function iG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,rG,n),tG.extend(e,t,n),nG(e,t)}var oG={newInstance:Ae.newInstance(iG,"vtkWebGPUFullScreenQuad"),extend:iG};function aG(e,t){t.classHierarchy.push("vtkWebGPUOrderIndependentTranslucentPass"),e.traverse=function(n,r){if(!t.deleted){t.currentParent=r;var i=r.getDevice();if(t.translucentRenderEncoder)t.translucentColorTexture.resizeToMatch(t.colorTextureView.getTexture()),t.translucentAccumulateTexture.resizeToMatch(t.colorTextureView.getTexture());else{e.createRenderEncoder(),e.createFinalEncoder(),t.translucentColorTexture=Tj.newInstance(),t.translucentColorTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"rgba16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});var o=t.translucentColorTexture.createView();o.setName("oitpColorTexture"),t.translucentRenderEncoder.setColorTextureView(0,o),t.translucentAccumulateTexture=Tj.newInstance(),t.translucentAccumulateTexture.create(i,{width:r.getCanvas().width,height:r.getCanvas().height,format:"r16float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.TEXTURE_BINDING});var a=t.translucentAccumulateTexture.createView();a.setName("oitpAccumTexture"),t.translucentRenderEncoder.setColorTextureView(1,a),t.fullScreenQuad=oG.newInstance(),t.fullScreenQuad.setDevice(r.getDevice()),t.fullScreenQuad.setPipelineHash("oitpfsq"),t.fullScreenQuad.setTextureViews(t.translucentRenderEncoder.getColorTextureViews()),t.fullScreenQuad.setFragmentShaderTemplate("\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var tcoord: vec2 = vec2(i32(input.fragPos.x), i32(input.fragPos.y));\n var reveal: f32 = textureLoad(oitpAccumTexture, tcoord, 0).r;\n if (reveal == 1.0) { discard; }\n var tcolor: vec4 = textureLoad(oitpColorTexture, tcoord, 0);\n var total: f32 = max(tcolor.a, 0.01);\n var computedColor: vec4 = vec4(tcolor.r/total, tcolor.g/total, tcolor.b/total, 1.0 - reveal);\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n")}t.translucentRenderEncoder.setDepthTextureView(t.depthTextureView),t.translucentRenderEncoder.attachTextureViews(),e.setCurrentOperation("translucentPass"),n.setRenderEncoder(t.translucentRenderEncoder),n.traverse(e),e.finalPass(r,n)}},e.finalPass=function(e,n){t.translucentFinalEncoder.setColorTextureView(0,t.colorTextureView),t.translucentFinalEncoder.attachTextureViews(),n.setRenderEncoder(t.translucentFinalEncoder),t.translucentFinalEncoder.begin(e.getCommandEncoder()),n.scissorAndViewport(t.translucentFinalEncoder),t.fullScreenQuad.render(t.translucentFinalEncoder,e.getDevice()),t.translucentFinalEncoder.end()},e.getTextures=function(){return[t.translucentColorTexture,t.translucentAccumulateTexture]},e.createRenderEncoder=function(){t.translucentRenderEncoder=HV.newInstance();var e=t.translucentRenderEncoder.getDescription();e.colorAttachments=[{view:void 0,loadValue:[0,0,0,0],storeOp:"store"},{view:void 0,loadValue:[1,0,0,0],storeOp:"store"}],e.depthStencilAttachment={view:void 0,depthLoadValue:"load",depthStoreOp:"store",stencilLoadValue:"load",stencilStoreOp:"store"},t.translucentRenderEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor"),t.addOutput("f32","outAccum"),t.addBuiltinInput("vec4","[[builtin(position)]] fragPos");var n=t.getCode();n=jV.substitute(n,"//VTK::RenderEncoder::Impl",["var w: f32 = 1.0 - input.fragPos.z * 0.9;","output.outColor = vec4(computedColor.rgb*computedColor.a, computedColor.a) * w;","output.outAccum = computedColor.a;"]).result,t.setCode(n)})),t.translucentRenderEncoder.setPipelineHash("oitpr"),t.translucentRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!1,depthCompare:"greater",format:"depth32float"},fragment:{targets:[{format:"rgba16float",blend:{color:{srcFactor:"one",dstFactor:"one"},alpha:{srcfactor:"one",dstFactor:"one"}}},{format:"r16float",blend:{color:{srcFactor:"zero",dstFactor:"one-minus-src"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.createFinalEncoder=function(){t.translucentFinalEncoder=HV.newInstance(),t.translucentFinalEncoder.setDescription({colorAttachments:[{view:null,loadValue:"load",storeOp:"store"}]}),t.translucentFinalEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor"),t.addBuiltinInput("vec4","[[builtin(position)]] fragPos");var n=t.getCode();n=jV.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(computedColor.rgb*computedColor.a, computedColor.a);"]).result,t.setCode(n)})),t.translucentFinalEncoder.setPipelineHash("oitpf"),t.translucentFinalEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})}}var sG={colorTextureView:null,depthTextureView:null};function lG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sG,n),_L.extend(e,t,n),Ae.setGet(e,t,["colorTextureView","depthTextureView"]),aG(e,t)}var uG={newInstance:Ae.newInstance(lG,"vtkWebGPUOrderIndependentTranslucentPass"),extend:lG},cG=mj.BufferUsage,dG=Ae.vtkErrorMacro;function pG(e,t){t.classHierarchy.push("vtkWebGPUUniformBuffer"),e.addEntry=function(e,n){t._bufferEntryNames.has(e)?dG("entry named ".concat(e," already exists")):(t.sortDirty=!0,t._bufferEntryNames.set(e,t.bufferEntries.length),t.bufferEntries.push({name:e,type:n,sizeInBytes:ej.getByteStrideFromShaderFormat(n),offset:-1,nativeType:ej.getNativeTypeFromShaderFormat(n),packed:!1}))},e.sortBufferEntries=function(){if(t.sortDirty){for(var e=0,n=[],r=0;r4&&(x.packed=!0,x.offset=e,n.push(x),e+=x.sizeInBytes)}for(var S=0;S ").concat(t.name,": ").concat(t.name,"Struct;")),i.join("\n")}}var fG={bufferEntries:null,bufferEntryNames:null,sizeInBytes:0,name:null,bindGroupLayoutEntry:null,bindGroupEntry:null};function hG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fG,n),Ae.obj(e,t),t._bufferEntryNames=new Map,t.bufferEntries=[],t.bindGroupLayoutEntry=t.bindGroupLayoutEntry||{buffer:{type:"uniform"}},t.sendTime={},Ae.obj(t.sendTime,{mtime:0}),t.bindGroupTime={},Ae.obj(t.bindGroupTime,{mtime:0}),t.sendDirty=!0,t.sortDirty=!0,Ae.get(e,t,["binding","bindGroupTime"]),Ae.setGet(e,t,["bindGroupLayoutEntry","device","name","sizeInBytes"]),pG(e,t)}var mG={newInstance:Ae.newInstance(hG,"vtkWebGPUUniformBuffer"),extend:hG},gG=mj.BufferUsage,vG=Ae.vtkErrorMacro;function yG(e,t){t.classHierarchy.push("vtkWebGPUStorageBuffer"),e.addEntry=function(e,n){if(t._bufferEntryNames.has(e))vG("entry named ".concat(e," already exists"));else{t._bufferEntryNames.set(e,t.bufferEntries.length);var r=ej.getByteStrideFromShaderFormat(n);t.bufferEntries.push({name:e,type:n,sizeInBytes:r,offset:t.sizeInBytes,nativeType:ej.getNativeTypeFromShaderFormat(n)}),t.sizeInBytes+=r}},e.send=function(e){if(!t._buffer){var n={nativeArray:t.Float32Array,time:0,usage:gG.Storage};return t._buffer=e.getBufferManager().getBuffer(n),t.bindGroupTime.modified(),void t._sendTime.modified()}e.getHandle().queue.writeBuffer(t._buffer.getHandle(),0,t.arrayBuffer,0,t.sizeInBytes*t.numberOfInstances),t._sendTime.modified()},e.createView=function(e){e in t==!1&&(t.arrayBuffer||(t.arrayBuffer=new ArrayBuffer(t.sizeInBytes*t.numberOfInstances)),t[e]=Ae.newTypedArray(e,t.arrayBuffer))},e.setValue=function(n,r,i){var o=t._bufferEntryNames.get(n);if(void 0!==o){var a=t.bufferEntries[o];e.createView(a.nativeType);var s=t[a.nativeType];s[(a.offset+r*t.sizeInBytes)/s.BYTES_PER_ELEMENT]=i}else vG("entry named ".concat(n," not found in UBO"))},e.setArray=function(n,r,i){var o=t._bufferEntryNames.get(n);if(void 0!==o){var a=t.bufferEntries[o];e.createView(a.nativeType);for(var s=t[a.nativeType],l=(a.offset+r*t.sizeInBytes)/s.BYTES_PER_ELEMENT,u=0;u;\n};\n[[binding(").concat(e,"), group(").concat(n,")]] var ").concat(t.name,": ").concat(t.name,"Struct;\n")),r.join("\n")},e.getBindGroupEntry=function(){return{resource:{buffer:t._buffer.getHandle()}}},e.clearData=function(){t.numberOfInstances=0,t.sizeInBytes=0,t.bufferEntries=[],t._bufferEntryNames=new Map,t._buffer=null,delete t.arrayBuffer,delete t.Float32Array}}var bG={bufferEntries:null,bufferEntryNames:null,sizeInBytes:0,name:null,numberOfInstances:1};function wG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bG,n),Ae.obj(e,t),t._bufferEntryNames=new Map,t.bufferEntries=[],t._sendTime={},Ae.obj(t._sendTime,{mtime:0}),t.bindGroupTime={},Ae.obj(t.bindGroupTime,{mtime:0}),t.bindGroupLayoutEntry=t.bindGroupLayoutEntry||{buffer:{type:"read-only-storage"}},Ae.get(e,t,["bindGroupTime"]),Ae.setGet(e,t,["device","bindGroupLayoutEntry","name","numberOfInstances","sizeInBytes"]),yG(e,t)}var xG={newInstance:Ae.newInstance(wG,"vtkWebGPUStorageBuffer"),extend:wG},SG="\n//VTK::Renderer::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::Volume::TraverseDec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::IOStructs::Dec\n\nfn getTextureValue(vTex: texture_3d, tpos: vec4) -> f32\n{\n // todo multicomponent support\n return textureSampleLevel(vTex, clampSampler, tpos.xyz, 0.0).r;\n}\n\nfn getGradient(vTex: texture_3d, tpos: vec4, vNum: i32, scalar: f32) -> vec4\n{\n var result: vec4;\n\n var tstep: vec4 = volumeSSBO.values[vNum].tstep;\n result.x = getTextureValue(vTex, tpos + vec4(tstep.x, 0.0, 0.0, 1.0)) - scalar;\n result.y = getTextureValue(vTex, tpos + vec4(0.0, tstep.y, 0.0, 1.0)) - scalar;\n result.z = getTextureValue(vTex, tpos + vec4(0.0, 0.0, tstep.z, 1.0)) - scalar;\n\n // divide by spacing\n result = result / volumeSSBO.values[vNum].spacing;\n\n var grad: f32 = length(result.xyz);\n\n // // rotate to View Coords, needed for lighting and shading\n // result.xyz =\n // result.x * vPlaneNormal0 +\n // result.y * vPlaneNormal2 +\n // result.z * vPlaneNormal4;\n\n if (grad > 0.0)\n {\n result = result * (1.0 / grad);\n }\n\n result.w = grad;\n\n return result;\n}\n\nfn processVolume(vTex: texture_3d, vNum: i32, cNum: i32, posSC: vec4, tfunRows: f32) -> vec4\n{\n var outColor: vec4 = vec4(0.0, 0.0, 0.0, 0.0);\n\n // convert to tcoords and reject if outside the volume\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*posSC;\n if (tpos.x < 0.0 || tpos.y < 0.0 || tpos.z < 0.0 ||\n tpos.x > 1.0 || tpos.y > 1.0 || tpos.z > 1.0) { return outColor; }\n\n var scalar: f32 = getTextureValue(vTex, tpos);\n\n var coord: vec2 =\n vec2(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,\n (0.5 + 2.0 * f32(vNum)) / tfunRows);\n var color: vec4 = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);\n\n var gofactor: f32 = 1.0;\n if (componentSSBO.values[cNum].gomin < 1.0)\n {\n var normal: vec4 = getGradient(vTex, tpos, vNum, scalar);\n gofactor = clamp(normal.a*componentSSBO.values[cNum].goScale + componentSSBO.values[cNum].goShift,\n componentSSBO.values[cNum].gomin, componentSSBO.values[cNum].gomax);\n }\n\n coord.x = (scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift);\n var opacity: f32 = textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;\n\n outColor = vec4(color.rgb, gofactor * opacity);\n\n//VTK::Volume::Process\n\n return outColor;\n}\n\n// adjust the start and end point of a raycast such that it intersects the unit cube.\n// This function is used to take a raycast starting point and step vector\n// and numSteps and return the startijng and ending steps for intersecting the\n// unit cube. Recall for a 3D texture, the unit cube is the range of texture coordsinates\n// that have valid values. So this funtion can be used to take a ray in texture coordinates\n// and bound it to intersecting the texture.\n//\nfn adjustBounds(tpos: vec4, tstep: vec4, numSteps: f32) -> vec2\n{\n var result: vec2 = vec2(0.0, numSteps);\n var tpos2: vec4 = tpos + tstep*numSteps;\n\n // move tpos to the start of the volume\n var adjust: f32 =\n min(\n max(tpos.x/tstep.x, (tpos.x - 1.0)/tstep.x),\n min(\n max((tpos.y - 1.0)/tstep.y, tpos.y/tstep.y),\n max((tpos.z - 1.0)/tstep.z, tpos.z/tstep.z)));\n if (adjust < 0.0)\n {\n result.x = result.x - adjust;\n }\n\n // adjust length to the end\n adjust =\n max(\n min(tpos2.x/tstep.x, (tpos2.x - 1.0)/tstep.x),\n max(\n min((tpos2.y - 1.0)/tstep.y, tpos2.y/tstep.y),\n min((tpos2.z - 1.0)/tstep.z, tpos2.z/tstep.z)));\n if (adjust > 0.0)\n {\n result.y = result.y - adjust;\n }\n\n return result;\n}\n\nfn getSimpleColor(scalar: f32, vNum: i32, cNum: i32) -> vec4\n{\n // how many rows (tfuns) do we have in our tfunTexture\n var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);\n\n var coord: vec2 =\n vec2(scalar * componentSSBO.values[cNum].cScale + componentSSBO.values[cNum].cShift,\n (0.5 + 2.0 * f32(vNum)) / tfunRows);\n var color: vec4 = textureSampleLevel(tfunTexture, clampSampler, coord, 0.0);\n coord.x = (scalar * componentSSBO.values[cNum].oScale + componentSSBO.values[cNum].oShift);\n var opacity: f32 = textureSampleLevel(ofunTexture, clampSampler, coord, 0.0).r;\n return vec4(color.rgb, opacity);\n}\n\nfn traverseMax(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var maxVal: f32 = -1.0e37;\n loop\n {\n var scalar: f32 = getTextureValue(vTex, tpos);\n if (scalar > maxVal)\n {\n maxVal = scalar;\n }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(maxVal, vNum, cNum);\n}\n\nfn traverseMin(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var minVal: f32 = 1.0e37;\n loop\n {\n var scalar: f32 = getTextureValue(vTex, tpos);\n if (scalar < minVal)\n {\n minVal = scalar;\n }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(minVal, vNum, cNum);\n}\n\nfn traverseAverage(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n let ipRange: vec4 = volumeSSBO.values[vNum].ipScalarRange;\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var avgVal: f32 = 0.0;\n var sampleCount: f32 = 0.0;\n loop\n {\n var sample: f32 = getTextureValue(vTex, tpos);\n // right now leave filtering off until WebGL changes get merged\n // if (ipRange.z == 0.0 || sample >= ipRange.x && sample <= ipRange.y)\n // {\n avgVal = avgVal + sample;\n sampleCount = sampleCount + 1.0;\n // }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n if (sampleCount <= 0.0)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(avgVal/sampleCount, vNum, cNum);\n}\n\nfn traverseAdditive(vTex: texture_3d, vNum: i32, cNum: i32, rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4)\n{\n // convert to tcoords and reject if outside the volume\n var numSteps: f32 = rayLengthSC/mapperUBO.SampleDistance;\n var tpos: vec4 = volumeSSBO.values[vNum].SCTCMatrix*minPosSC;\n var tpos2: vec4 = volumeSSBO.values[vNum].SCTCMatrix*(minPosSC + rayStepSC);\n var tstep: vec4 = tpos2 - tpos;\n\n var rayBounds: vec2 = adjustBounds(tpos, tstep, numSteps);\n\n // did we hit anything\n if (rayBounds.x >= rayBounds.y)\n {\n traverseVals[vNum] = vec4(0.0,0.0,0.0,0.0);\n return;\n }\n\n let ipRange: vec4 = volumeSSBO.values[vNum].ipScalarRange;\n tpos = tpos + tstep*rayBounds.x;\n var curDist: f32 = rayBounds.x;\n var sumVal: f32 = 0.0;\n loop\n {\n var sample: f32 = getTextureValue(vTex, tpos);\n // right now leave filtering off until WebGL changes get merged\n // if (ipRange.z == 0.0 || sample >= ipRange.x && sample <= ipRange.y)\n // {\n sumVal = sumVal + sample;\n // }\n\n // increment position\n curDist = curDist + 1.0;\n tpos = tpos + tstep;\n\n // check if we have reached a terminating condition\n if (curDist > rayBounds.y) { break; }\n }\n\n // process to get the color and opacity\n traverseVals[vNum] = getSimpleColor(sumVal, vNum, cNum);\n}\n\nfn composite(rayLengthSC: f32, minPosSC: vec4, rayStepSC: vec4) -> vec4\n{\n // initial ray position is at the beginning\n var rayPosSC: vec4 = minPosSC;\n\n // how many rows (tfuns) do we have in our tfunTexture\n var tfunRows: f32 = f32(textureDimensions(tfunTexture).y);\n\n var curDist: f32 = 0.0;\n var computedColor: vec4 = vec4(0.0, 0.0, 0.0, 0.0);\n var sampleColor: vec4;\n//VTK::Volume::TraverseCalls\n\n loop\n {\n // for each volume, sample and accumulate color\n//VTK::Volume::CompositeCalls\n\n // increment position\n curDist = curDist + mapperUBO.SampleDistance;\n rayPosSC = rayPosSC + rayStepSC;\n\n // check if we have reached a terminating condition\n if (curDist > rayLengthSC) { break; }\n if (computedColor.a > 0.98) { break; }\n }\n return computedColor;\n}\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output: fragmentOutput;\n\n var rayMax: f32 = textureSampleLevel(maxTexture, clampSampler, input.tcoordVS, 0.0).r;\n var rayMin: f32 = textureSampleLevel(minTexture, clampSampler, input.tcoordVS, 0.0).r;\n\n // discard empty rays\n if (rayMax <= rayMin) { discard; }\n else\n {\n var winDimsI32: vec2 = textureDimensions(minTexture);\n var winDims: vec2 = vec2(f32(winDimsI32.x), f32(winDimsI32.y));\n\n // compute start and end ray positions in view coordinates\n var minPosSC: vec4 = rendererUBO.PCSCMatrix*vec4(2.0*input.fragPos.x/winDims.x - 1.0, 1.0 - 2.0 * input.fragPos.y/winDims.y, rayMax, 1.0);\n minPosSC = minPosSC * (1.0 / minPosSC.w);\n var maxPosSC: vec4 = rendererUBO.PCSCMatrix*vec4(2.0*input.fragPos.x/winDims.x - 1.0, 1.0 - 2.0 * input.fragPos.y/winDims.y, rayMin, 1.0);\n maxPosSC = maxPosSC * (1.0 / maxPosSC.w);\n\n var rayLengthSC: f32 = distance(minPosSC.xyz, maxPosSC.xyz);\n var rayStepSC: vec4 = (maxPosSC - minPosSC)*(mapperUBO.SampleDistance/rayLengthSC);\n rayStepSC.w = 0.0;\n\n var computedColor: vec4;\n\n//VTK::Volume::Loop\n\n//VTK::RenderEncoder::Impl\n }\n\n return output;\n}\n",CG=new Float64Array(16),AG=new Float64Array(16);function PG(e,t){t.classHierarchy.push("vtkWebGPUVolumePassFSQ"),e.replaceShaderPosition=function(e,t,n){var r=t.getShaderDescription("vertex");r.addBuiltinOutput("vec4","[[builtin(position)]] Position");var i=r.getCode();i=jV.substitute(i,"//VTK::Position::Impl",["output.tcoordVS = vec2(vertexBC.x * 0.5 + 0.5, 1.0 - vertexBC.y * 0.5 - 0.5);","output.Position = vec4(vertexBC, 1.0);"]).result,r.setCode(i),t.getShaderDescription("fragment").addBuiltinInput("vec4","[[builtin(position)]] fragPos")},t.shaderReplacements.set("replaceShaderPosition",e.replaceShaderPosition),e.replaceShaderVolume=function(e,n,r){for(var i=n.getShaderDescription("fragment"),o=i.getCode(),a=[],s=[],l=0;l(\n sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,\n (1.0 - computedColor.a)*sampleColor.a + computedColor.a);")):(s.push(" sampleColor = traverseVals[".concat(l,"];")),s.push(" computedColor = vec4(\n sampleColor.a * sampleColor.rgb * (1.0 - computedColor.a) + computedColor.rgb,\n (1.0 - computedColor.a)*sampleColor.a + computedColor.a);"))}o=jV.substitute(o,"//VTK::Volume::CompositeCalls",a).result,o=jV.substitute(o,"//VTK::Volume::TraverseCalls",s).result,o=jV.substitute(o,"//VTK::Volume::TraverseDec",["var traverseVals: array,".concat(t.volumes.length,">;")]).result;for(var u=!1,c=0;c"),t.SSBO.addEntry("tstep","vec4"),t.SSBO.addEntry("spacing","vec4"),t.SSBO.addEntry("ipScalarRange","vec4"),t.SSBO.setAllInstancesFromArray("SCTCMatrix",u),t.SSBO.setAllInstancesFromArray("tstep",c),t.SSBO.setAllInstancesFromArray("spacing",d),t.SSBO.setAllInstancesFromArray("ipScalarRange",p),t.SSBO.send(n),t.componentSSBO.clearData(),t.componentSSBO.setNumberOfInstances(t.numRows);for(var A=new Float64Array(t.numRows),P=new Float64Array(t.numRows),_=new Float64Array(t.numRows),O=new Float64Array(t.numRows),T=new Float64Array(t.numRows),D=new Float64Array(t.numRows),E=new Float64Array(t.numRows),I=new Float64Array(t.numRows),k=0,M=0;M2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_G,n),oG.extend(e,t,n),t.fragmentShaderTemplate=SG,t.UBO=mG.newInstance(),t.UBO.setName("mapperUBO"),t.UBO.addEntry("SampleDistance","f32"),t.SSBO=xG.newInstance(),t.SSBO.setName("volumeSSBO"),t.componentSSBO=xG.newInstance(),t.componentSSBO.setName("componentSSBO"),t.lutBuildTime={},Ae.obj(t.lutBuildTime,{mtime:0}),PG(e,t)}var TG={newInstance:Ae.newInstance(OG,"vtkWebGPUVolumePassFSQ"),extend:OG},DG=Dv.Representation,EG=mj.BufferUsage,IG=mj.PrimitiveTypes,kG=[[0,4,6],[0,6,2],[1,3,7],[1,7,5],[0,5,4],[0,1,5],[2,6,7],[2,7,3],[0,3,1],[0,2,3],[4,5,7],[4,7,6]],MG="\n//VTK::Renderer::Dec\n\n//VTK::Select::Dec\n\n//VTK::VolumePass::Dec\n\n//VTK::TCoord::Dec\n\n//VTK::RenderEncoder::Dec\n\n//VTK::Mapper::Dec\n\n//VTK::IOStructs::Dec\n\n[[stage(fragment)]]\nfn main(\n//VTK::IOStructs::Input\n)\n//VTK::IOStructs::Output\n{\n var output : fragmentOutput;\n\n //VTK::Select::Impl\n\n //VTK::TCoord::Impl\n\n //VTK::VolumePass::Impl\n\n // use the maximum (closest) of the current value and the zbuffer\n // the blend func will then take the min to find the farthest stop value\n var stopval: f32 = max(input.fragPos.z, textureLoad(opaquePassDepthTexture, vec2(i32(input.fragPos.x), i32(input.fragPos.y)), 0));\n\n //VTK::RenderEncoder::Impl\n return output;\n}\n";function NG(e,t){t.classHierarchy.push("vtkWebGPUVolumePass"),e.traverse=function(n,r){t.deleted||(t.currentParent=r,e.renderDepthBounds(n,r),t.finalEncoder||e.createFinalEncoder(r),e.finalPass(r,n))},e.finalPass=function(e,n){t.finalEncoder.setColorTextureView(0,t.colorTextureView),t.finalEncoder.attachTextureViews(),n.setRenderEncoder(t.finalEncoder),t.finalEncoder.begin(e.getCommandEncoder()),n.scissorAndViewport(t.finalEncoder),t.fullScreenQuad.setWebGPURenderer(n),t.fullScreenQuad.setVolumes(t.volumes),t.fullScreenQuad.render(t.finalEncoder,e.getDevice()),t.finalEncoder.end()},e.renderDepthBounds=function(n,r){e.updateDepthPolyData(n);var i=t._boundsPoly,o=i.getPolys(),a=o.getMTime(),s=i.getPoints(),l={hash:a+s.getMTime(),dataArray:s,source:s,cells:o,primitiveType:IG.Triangles,representation:DG.SURFACE,time:Math.max(s.getMTime(),o.getMTime()),usage:EG.PointArray,format:"float32x4",packExtra:!0},u=r.getDevice().getBufferManager().getBuffer(l);t._mapper.getVertexInput().addBuffer(u,["vertexBC"]),t._mapper.setNumberOfVertices(u.getSizeInBytes()/u.getStrideInBytes()),e.drawDepthRange(n,r)},e.updateDepthPolyData=function(e){for(var n=!1,r=0;r","outColor1"),t.addOutput("vec4","outColor2");var n=t.getCode();n=jV.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor1 = vec4(stopval, 0.0, 0.0, 0.0);","output.outColor2 = vec4(input.fragPos.z, 0.0, 0.0, 0.0);"]).result,t.setCode(n)})),t.depthRangeEncoder.setDescription({colorAttachments:[{view:null,loadValue:[0,0,0,0],storeOp:"store"},{view:null,loadValue:[1,1,1,1],storeOp:"store"}]}),t.depthRangeEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"max"},alpha:{srcfactor:"one",dstFactor:"one",operation:"max"}}},{format:"r16float",blend:{color:{srcFactor:"one",dstFactor:"one",operation:"min"},alpha:{srcfactor:"one",dstFactor:"one",operation:"min"}}}]}})},e.createFinalEncoder=function(e){t.fullScreenQuad=TG.newInstance(),t.fullScreenQuad.setDevice(e.getDevice()),t.fullScreenQuad.setTextureViews(w(t.depthRangeEncoder.getColorTextureViews())),t.finalEncoder=HV.newInstance(),t.finalEncoder.setDescription({colorAttachments:[{view:null,loadValue:"load",storeOp:"store"}]}),t.finalEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");var n=t.getCode();n=jV.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(computedColor.rgb*computedColor.a, computedColor.a);"]).result,t.setCode(n)})),t.finalEncoder.setPipelineHash("volpf"),t.finalEncoder.setPipelineSettings({primitive:{cullMode:"none"},fragment:{targets:[{format:"bgra8unorm",blend:{color:{srcFactor:"one",dstFactor:"one-minus-src-alpha"},alpha:{srcfactor:"one",dstFactor:"one-minus-src-alpha"}}}]}})},e.setVolumes=function(n){if(!t.volumes||t.volumes.length!==n.length)return t.volumes=w(n),void e.modified();for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,RG,n),_L.extend(e,t,n),t._mapper=tG.newInstance(),t._mapper.setFragmentShaderTemplate(MG),t._mapper.getShaderReplacements().set("replaceShaderVolumePass",(function(e,t,n){t.getShaderDescription("fragment").addBuiltinInput("vec4","[[builtin(position)]] fragPos")})),t._boundsPoly=rc.newInstance(),t._lastMTimes=[],Ae.setGet(e,t,["colorTextureView","depthTextureView"]),NG(e,t)}var BG={newInstance:Ae.newInstance(FG,"vtkWebGPUVolumePass"),extend:FG};function LG(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),t.opaquePass||(t.opaquePass=kj.newInstance());for(var i=n.getRenderable().getNumberOfLayers(),o=n.getChildren(),a=0;a0&&(t.translucentPass||(t.translucentPass=uG.newInstance()),t.translucentPass.setColorTextureView(t.opaquePass.getColorTextureView()),t.translucentPass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.translucentPass.traverse(l,n)),t.volumes.length>0&&(t.volumePass||(t.volumePass=BG.newInstance()),t.volumePass.setColorTextureView(t.opaquePass.getColorTextureView()),t.volumePass.setDepthTextureView(t.opaquePass.getDepthTextureView()),t.volumePass.setVolumes(t.volumes),t.volumePass.traverse(l,n)))}var c=n.getCurrentTexture(),d=t.opaquePass.getColorTexture(),p=n.getCommandEncoder();p.copyTextureToTexture({texture:d.getHandle()},{texture:c},{width:d.getWidth(),height:d.getHeight(),depthOrArrayLayers:1})}},e.incrementOpaqueActorCount=function(){return t.opaqueActorCount++},e.incrementTranslucentActorCount=function(){return t.translucentActorCount++},e.addVolume=function(e){t.volumes.push(e)}}var VG={opaqueActorCount:0,translucentActorCount:0,volumes:null,opaqueRenderEncoder:null,translucentPass:null,volumePass:null};function jG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,VG,n),_L.extend(e,t,n),Ae.setGet(e,t,["opaquePass","translucentPass","volumePass"]),LG(e,t)}var GG={newInstance:Ae.newInstance(jG,"vtkForwardPass"),extend:jG},UG=Jn.VtkDataTypes;function zG(e,t){t.classHierarchy.push("vtkWebGPUTextureManager"),e.getTexture=function(e){if(e.imageData){e.dataArray=e.imageData.getPointData().getScalars(),e.time=e.dataArray.getMTime(),e.nativeArray=e.dataArray.getData();var n=e.imageData.getDimensions();switch(e.width=n[0],e.height=n[1],e.depth=n[2],e.dataArray.getNumberOfComponents()){case 1:e.format="r";break;case 2:e.format="rg";break;default:e.format="rgba"}switch(e.dataArray.getDataType()){case UG.UNSIGNED_CHAR:e.format+="8unorm";break;case UG.FLOAT:case UG.UNSIGNED_INT:case UG.INT:case UG.DOUBLE:case UG.UNSIGNED_SHORT:case UG.SHORT:default:e.format+="16float"}}if(e.image&&(e.time=0,e.width=e.image.width,e.height=e.image.height,e.depth=1,e.format="rgba8unorm"),e.source&&t.textures.has(e.source))for(var r=t.textures.get(e.source),i=0;i2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,WG,n),Ae.obj(e,t),t.textures=new WeakMap,Ae.setGet(e,t,["device"]),zG(e,t)}var KG={newInstance:Ae.newInstance(HG),extend:HG};function XG(e,t){t.classHierarchy.push("vtkWebGPUDevice"),e.initialize=function(e){t.handle=e},e.createCommandEncoder=function(){return t.handle.createCommandEncoder()},e.submitCommandEncoder=function(e){t.handle.queue.submit([e.finish()])},e.getShaderModule=function(e){return t.shaderCache.getShaderModule(e)},e.getBindGroupLayout=function(e){if(!e.entries)return null;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,qG,n),re(e,t),le(e,t,["handle"]),ie(e,t,["bufferManager","shaderCache","textureManager"]),t.shaderCache=jV.newInstance(),t.shaderCache.setDevice(e),t.bindGroupLayouts=[],t.bufferManager=mj.newInstance(),t.bufferManager.setDevice(e),t.textureManager=KG.newInstance(),t.textureManager.setDevice(e),t.pipelines={},XG(e,t)}var ZG={newInstance:me(YG,"vtkWebGPUDevice"),extend:YG};function JG(e,t){t.classHierarchy.push("vtkWebGPUHardwareSelectionPass"),e.traverse=function(n,r){if(!t.deleted){t.currentParent=null,e.setCurrentOperation("buildPass"),n.traverse(e);var i=n.getDevice();if(t.selectionRenderEncoder)t.colorTexture.resize(n.getCanvas().width,n.getCanvas().height),t.depthTexture.resizeToMatch(t.colorTexture);else{e.createRenderEncoder(),t.colorTexture=Tj.newInstance(),t.colorTexture.create(i,{width:n.getCanvas().width,height:n.getCanvas().height,format:"rgba32uint",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});var o=t.colorTexture.createView();o.setName("hardwareSelectColorTexture"),t.selectionRenderEncoder.setColorTextureView(0,o),t.depthTexture=Tj.newInstance(),t.depthTexture.create(i,{width:n.getCanvas().width,height:n.getCanvas().height,format:"depth32float",usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});var a=t.depthTexture.createView();a.setName("hardwareSelectDepthTexture"),t.selectionRenderEncoder.setDepthTextureView(a)}t.selectionRenderEncoder.attachTextureViews(),r.setRenderEncoder(t.selectionRenderEncoder),e.setCurrentOperation("cameraPass"),r.traverse(e),e.setCurrentOperation("opaquePass"),r.traverse(e)}},e.createRenderEncoder=function(){t.selectionRenderEncoder=HV.newInstance(),t.selectionRenderEncoder.setPipelineHash("sel"),t.selectionRenderEncoder.setReplaceShaderCodeFunction((function(e){var t=e.getShaderDescription("fragment");t.addOutput("vec4","outColor");var n=t.getCode();n=jV.substitute(n,"//VTK::RenderEncoder::Impl",["output.outColor = vec4(mapperUBO.PropID, compositeID, 0u, 0u);"]).result,t.setCode(n)}));var e=t.selectionRenderEncoder.getDescription();e.colorAttachments[0].loadValue=[0,0,0,0],e.depthStencilAttachment.stencilLoadValue="load",t.selectionRenderEncoder.setPipelineSettings({primitive:{cullMode:"none"},depthStencil:{depthWriteEnabled:!0,depthCompare:"greater",format:"depth32float"},fragment:{targets:[{format:"rgba32uint",blend:void 0}]}})}}var QG={selectionRenderEncoder:null,colorTexture:null,depthTexture:null};function $G(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,QG,n),_L.extend(e,t,n),Ae.get(e,t,["colorTexture","depthTexture"]),JG(e,t)}var eU={newInstance:Ae.newInstance($G,"vtkWebGPUHardwareSelectionPass"),extend:$G},tU=uc.SelectionContent,nU=uc.SelectionField,rU=Ii.FieldAssociations,iU=Ae.vtkErrorMacro;function oU(e){return"".concat(e.propID," ").concat(e.compositeID)}function aU(e,t,n,r){var i=4*((n.height-t-1)*n.colorBufferWidth+e)+r;return n.colorValues[i]}function sU(e,t,n,r){var i=n<0?0:n;if(0===i){if(r[0]=t[0],r[1]=t[1],t[0]<0||t[0]>=e.width||t[1]<0||t[1]>=e.height)return null;var o=aU(t[0],t[1],e,0);if(o<=0)return null;var a={};a.propID=o;var s=aU(t[0],t[1],e,1);if((s<0||s>16777215)&&(s=0),a.compositeID=s,e.captureZValues){var l=(e.height-t[1]-1)*e.zbufferBufferWidth+t[0];a.zValue=e.depthValues[l],a.zValue=e.webGPURenderer.convertToOpenGLDepth(a.zValue),a.displayPosition=t}return a}var u=[t[0],t[1]],c=[0,0],d=sU(e,t,0,r);if(d)return d;for(var p=1;pp?u[1]-p:0;f<=u[1]+p;++f){if(c[1]=f,u[0]>=p&&(c[0]=u[0]-p,d=sU(e,c,0,r)))return d;if(c[0]=u[0]+p,d=sU(e,c,0,r))return d}for(var h=u[0]>=p?u[0]-(p-1):0;h<=u[0]+(p-1);++h){if(c[0]=h,u[1]>=p&&(c[1]=u[1]-p,d=sU(e,c,0,r)))return d;if(c[1]=u[1]+p,d=sU(e,c,0,r))return d}}return r[0]=t[0],r[1]=t[1],null}function lU(e,t,n,r,i){for(var o=Math.floor(t),a=Math.floor(n),s=Math.floor(r),l=Math.floor(i),u=new Map,c=[0,0],d=a;d<=l;d++)for(var p=o;p<=s;p++){var f=sU(e,[p,d],0,c);if(f){var h=oU(f);if(u.has(h)){var m=u.get(h);m.pixelCount++,e.captureZValues&&f.zValue2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,cU,n),$F.extend(e,t,n),t._selectionPass=eU.newInstance(),Ae.setGet(e,t,["WebGPURenderWindow"]),uU(e,t)}var pU={newInstance:Ae.newInstance(dU,"vtkWebGPUHardwareSelector"),extend:dU},fU=Object.create(null);function hU(e,t){t.classHierarchy.push("vtkWebGPUViewNodeFactory")}var mU={};function gU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mU,n),t.overrides=fU,eL.extend(e,t,n),hU(0,t)}var vU={newInstance:Ae.newInstance(gU,"vtkWebGPUViewNodeFactory"),extend:gU},yU=Ae.vtkErrorMacro,bU={position:"absolute",top:0,left:0,width:"100%",height:"100%"};function wU(e,t){t.classHierarchy.push("vtkWebGPURenderWindow"),e.getViewNodeFactory=function(){return t.myFactory};var n=[0,0];function r(){return r=XF(YF().mark((function n(){var r,i,o,a,s,l,u,c,d=arguments;return YF().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=d.length>0&&void 0!==d[0]?d[0]:t.imageFormat,i=document.createElement("canvas"),o=i.getContext("2d"),i.width=t.canvas.width,i.height=t.canvas.height,n.next=7,e.getPixelsAsync();case 7:a=n.sent,s=new ImageData(a.colorValues,a.width,a.height),o.putImageData(s,0,0),l=t.canvas.getBoundingClientRect(),u=t.renderable,u.getRenderers().forEach((function(e){e.getViewProps().forEach((function(e){if(e.getContainer)for(var t=e.getContainer().getElementsByTagName("canvas"),n=0;n0&&void 0!==arguments[0]?arguments[0]:"image/png",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.resetCamera,o=void 0!==i&&i,a=r.size,s=void 0===a?null:a,l=r.scale,u=void 0===l?1:l;if(t.deleted)return null;t.imageFormat=n;var c=t.notifyStartCaptureImage;return t.notifyStartCaptureImage=!0,t._screenshot={size:s||1!==u?s||t.size.map((function(e){return e*u})):null},new Promise((function(n,r){var i=e.onImageReady((function(r){if(null===t._screenshot.size)t.notifyStartCaptureImage=c,i.unsubscribe(),t._screenshot.placeHolder&&(t.size=t._screenshot.originalSize,e.modified(),t._screenshot.cameras&&t._screenshot.cameras.forEach((function(e){return(0,e.restoreParamsFn)(e.arg)})),e.traverseAllPasses(),t.el.removeChild(t._screenshot.placeHolder),t._screenshot.placeHolder.remove(),t._screenshot=null),n(r);else{var a=document.createElement("img");a.style=bU,a.src=r,t._screenshot.placeHolder=t.el.appendChild(a),t.canvas.style.display="none",t._screenshot.originalSize=t.size,t.size=t._screenshot.size,t._screenshot.size=null,e.modified(),o&&(t._screenshot.cameras=t.renderable.getRenderers().map((function(e){var t=e.getActiveCamera(),n=t.get("focalPoint","position","parallelScale");return{resetCameraFn:e.resetCamera,restoreParamsFn:t.set,arg:JSON.parse(JSON.stringify(n))}})),t._screenshot.cameras.forEach((function(e){return(0,e.resetCameraFn)()}))),e.traverseAllPasses()}}))}))},e.traverseAllPasses=function(){if(!t.deleted)if(t.initialized){if(t.renderPasses)for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,xU,n),t.canvas=document.createElement("canvas"),t.canvas.style.width="100%",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",JL.extend(e,t,n),t.myFactory=vU.newInstance(),t.myFactory.registerOverride("vtkRenderWindow",CU),t.renderPasses[0]=GG.newInstance(),t.selector||(t.selector=pU.newInstance(),t.selector.setWebGPURenderWindow(e)),Ae.event(e,t,"imageReady"),Ae.event(e,t,"initialized"),Ae.get(e,t,["commandEncoder","device","useBackgroundImage"]),Ae.setGet(e,t,["initialized","context","canvas","device","renderPasses","notifyStartCaptureImage","cursor","useOffScreen"]),Ae.setGetArray(e,t,["size"],2),wU(e,t)}var CU=Ae.newInstance(SU,"vtkWebGPURenderWindow");nB("WebGPU",CU);var AU={newInstance:CU,extend:SU},PU=al.extractURLParameters(),_U={margin:"0",padding:"0",position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden"},OU={position:"absolute",left:"25px",top:"25px",backgroundColor:"white",borderRadius:"5px",listStyle:"none",padding:"5px 10px",margin:"0",display:"block",border:"solid 1px black",maxWidth:"calc(100% - 70px)",maxHeight:"calc(100% - 60px)",overflow:"auto"};function TU(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function DU(e,t){t.classHierarchy.push("vtkFullScreenRenderWindow");var n=document.querySelector("body");t.rootContainer||(t.rootContainer=n),t.container||(t.container=document.createElement("div"),TU(t.container,t.containerStyle||_U),t.rootContainer.appendChild(t.container)),t.rootContainer===n&&(document.documentElement.style.height="100%",n.style.height="100%",n.style.padding="0",n.style.margin="0"),t.renderWindow=sB.newInstance(),t.renderer=lA.newInstance(),t.renderWindow.addRenderer(t.renderer),t.apiSpecificRenderWindow=t.renderWindow.newAPISpecificView(PU.viewAPI),t.apiSpecificRenderWindow.setContainer(t.container),t.renderWindow.addView(t.apiSpecificRenderWindow),t.interactor=Ym.newInstance(),t.interactor.setInteractorStyle(kb.newInstance()),t.interactor.setView(t.apiSpecificRenderWindow),t.interactor.initialize(),t.interactor.bindEvents(t.container),e.setBackground=t.renderer.setBackground,e.removeController=function(){var e=t.controlContainer;e&&e.parentNode.removeChild(e)},e.setControllerVisibility=function(e){t.controllerVisibility=e,t.controlContainer&&(t.controlContainer.style.display=e?"block":"none")},e.toggleControllerVisibility=function(){e.setControllerVisibility(!t.controllerVisibility)},e.addController=function(n){t.controlContainer=document.createElement("div"),TU(t.controlContainer,t.controlPanelStyle||OU),t.rootContainer.appendChild(t.controlContainer),t.controlContainer.innerHTML=n,e.setControllerVisibility(t.controllerVisibility),t.rootContainer.addEventListener("keypress",(function(t){"c"===String.fromCharCode(t.charCode)&&e.toggleControllerVisibility()}))},e.setBackground.apply(e,w(t.background)),e.addRepresentation=function(e){e.getActors().forEach((function(e){t.renderer.addActor(e)}))},e.removeRepresentation=function(e){e.getActors().forEach((function(e){return t.renderer.removeActor(e)}))},e.delete=Ae.chain(e.setContainer,t.apiSpecificRenderWindow.delete,e.delete),e.resize=function(){var e=t.container.getBoundingClientRect(),n=window.devicePixelRatio||1;t.apiSpecificRenderWindow.setSize(Math.floor(e.width*n),Math.floor(e.height*n)),t.resizeCallback&&t.resizeCallback(e),t.renderWindow.render()},e.setResizeCallback=function(n){t.resizeCallback=n,e.resize()},t.listenWindowResize&&window.addEventListener("resize",e.resize),e.resize()}var EU={background:[.32,.34,.43],containerStyle:null,controlPanelStyle:null,listenWindowResize:!0,resizeCallback:null,controllerVisibility:!0};function IU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,EU,n),Ae.obj(e,t),Ae.get(e,t,["renderWindow","renderer","apiSpecificRenderWindow","interactor","rootContainer","container","controlContainer"]),DU(e,t)}var kU={newInstance:Ae.newInstance(IU),extend:IU};function MU(e,t){var n=e.invokeResize;delete e.invokeResize,t.renderWindow=sB.newInstance(),t.renderer=lA.newInstance(),t.renderWindow.addRenderer(t.renderer),t.openGLRenderWindow=kV.newInstance(),t.renderWindow.addView(t.openGLRenderWindow),t.interactor=Ym.newInstance(),t.interactor.setInteractorStyle(kb.newInstance()),t.interactor.setView(t.openGLRenderWindow),t.interactor.initialize(),e.setBackground=t.renderer.setBackground,e.setBackground.apply(e,w(t.background)),e.resize=function(){if(t.container){var e=t.container.getBoundingClientRect(),r=window.devicePixelRatio||1;t.openGLRenderWindow.setSize(Math.floor(e.width*r),Math.floor(e.height*r)),n(),t.renderWindow.render()}},e.setContainer=function(e){t.container&&t.interactor.unbindEvents(t.container),t.container=e,t.openGLRenderWindow.setContainer(t.container),t.container&&t.interactor.bindEvents(t.container)},e.delete=Ae.chain(e.setContainer,t.openGLRenderWindow.delete,e.delete),t.listenWindowResize&&window.addEventListener("resize",e.resize),e.resize()}var NU={background:[.32,.34,.43],listenWindowResize:!0,container:null};function RU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,NU,n),Ae.obj(e,t),Ae.get(e,t,["renderWindow","renderer","openGLRenderWindow","interactor","container"]),Ae.event(e,t,"resize"),MU(e,t)}var FU={newInstance:Ae.newInstance(RU),extend:RU},BU=yI.newInstance(),LU=BU.connect,VU=BU.disconnect;function jU(e,t){t.classHierarchy.push("vtkRemoteView"),t.canvasView=UB.newInstance(),t.interactorStyle=Zb.newInstance(),t.interactor=Ym.newInstance(),t.interactor.setView(t.canvasView),t.interactor.initialize(),t.interactor.setInteractorStyle(t.interactorStyle),t.interactorStyle.onRemoteMouseEvent((function(e){t.session&&t.rpcMouseEvent&&t.session.call(t.rpcMouseEvent,[e])})),t.interactorStyle.onRemoteWheelEvent((function(e){t.session&&t.rpcWheelEvent&&t.session.call(t.rpcWheelEvent,[e])})),t.interactorStyle.onRemoteGestureEvent((function(e){t.session&&t.rpcGestureEvent&&t.session.call(t.rpcGestureEvent,[e])})),e.delete=Ae.chain((function(){t.session=null,t.canvasView&&(t.canvasView.setViewStream(null),t.canvasView.delete()),t.interactor&&t.interactor.delete(),t.viewStream&&t.viewStream.delete()}),e.delete),e.setViewStream=function(n){t.viewStream=n,t.canvasView.setViewStream(t.viewStream),t.viewStream.setStillQuality(t.stillQuality),t.viewStream.setStillRatio(t.stillRatio),t.viewStream.setInteractiveQuality(t.interactiveQuality),t.viewStream.setInteractiveRatio(t.interactiveRatio),t.interactor.onStartAnimation(t.viewStream.startInteraction),t.interactor.onEndAnimation(t.viewStream.endInteraction),e.setViewId(n.getViewId())},e.setViewId=function(n){t.viewStream||e.setViewStream(BU.createViewStream(n)),t.viewStream.setViewId(n),t.interactorStyle.setRemoteEventAddOn({view:n}),e.modified()},e.setContainer=function(n){t.container&&t.interactor.unbindEvents(n),t.container=n,t.canvasView.setContainer(t.container),n&&(t.interactor.bindEvents(n),e.resize())},e.resize=function(){if(t.container&&t.canvasView){var n=t.container.getBoundingClientRect(),r=n.width,i=n.height;t.canvasView.setSize(r,i),e.render()}},e.render=function(){t.viewStream&&t.viewStream.render()},e.resetCamera=function(){t.viewStream&&t.viewStream.resetCamera()};var n={modified:e.modified};Ae.set(n,t,["interactiveQuality","interactiveRatio","stillQuality","stillRatio"]),e.setInteractiveQuality=function(e){var r=n.setInteractiveQuality(e);return t.viewStream&&r&&t.viewStream.setInteractiveQuality(t.interactiveQuality),r},e.setInteractiveRatio=function(e){var r=n.setInteractiveRatio(e);return t.viewStream&&r&&t.viewStream.setInteractiveRatio(t.interactiveRatio),r},e.setStillQuality=function(e){var r=n.setStillQuality(e);return t.viewStream&&r&&t.viewStream.setStillQuality(t.stillQuality),r},e.setStillRatio=function(e){var r=n.setStillRatio(e);return t.viewStream&&r&&t.viewStream.setStillRatio(t.stillRatio),r},t.viewStream&&e.setViewStream(t.viewStream)}var GU={viewId:"-1",interactiveQuality:60,interactiveRatio:1/window.devicePixelRatio,stillQuality:100,stillRatio:1,rpcMouseEvent:"viewport.mouse.interaction",rpcGestureEvent:null,rpcWheelEvent:null};function UU(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,GU,n),Ae.obj(e,t,n),Ae.get(e,t,["container","viewStream","canvasView","interactor","interactorStyle","interactiveQuality","interactiveRatio","stillQuality","stillRatio"]),Ae.setGet(e,t,["session","rpcMouseEvent","rpcGestureEvent","rpcWheelEvent"]),jU(e,t)}var zU={newInstance:Ae.newInstance(UU,"vtkRemoteView"),extend:UU,SHARED_IMAGE_STREAM:BU,connectImageStream:LU,disconnectImageStream:VU},WU=n(406),HU={};HU.styleTagTransform=uw(),HU.setAttributes=ow(),HU.insert=rw().bind(null,"head"),HU.domAPI=tw(),HU.insertStyleElement=sw();$b()(WU.Z,HU);var KU=WU.Z&&WU.Z.locals?WU.Z.locals:void 0;function XU(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 qU={left:function(e){return{top:"0",left:"0",bottom:"0",right:"unset",height:"unset",width:"".concat(e,"px")}},right:function(e){return{top:"0",right:"0",bottom:"0",left:"unset",height:"unset",width:"".concat(e,"px")}},top:function(e){return{top:"0",left:"0",right:"0",bottom:"unset",width:"unset",height:"".concat(e,"px")}},bottom:function(e){return{bottom:"0",left:"0",right:"0",top:"unset",width:"unset",height:"".concat(e,"px")}}};function YU(e,t){var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZU,n),FU.extend(e,t),Ae.get(e,t,["rootContainer","controlContainer","renderWindowContainer"]),YU(e,t)}var QU={newInstance:Ae.newInstance(JU,"vtkRenderWindowWithControlBar"),extend:JU};function $U(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 ez(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[];return e.dependencies&&e.dependencies.forEach((function(e){t.push(e.id),lz(e,t)})),t}function uz(e,t,n,r){if(!t)return Promise.reject(new Error("No instance provided."));var i=tz[e];return i&&i.update?i.update(t,n,r):Promise.reject(new Error("No updater for ".concat(e)))}function cz(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=tz[e];return n&&n.build?n.build(t):(console.log("No builder for",e),null)}function dz(){Object.keys(tz).forEach((function(e){delete tz[e]}))}function pz(){Object.keys(rz).forEach((function(e){delete rz[e]}))}function fz(e){if(1===e[1].length)return-1===iz.indexOf(e[1][0]);for(var t=!1,n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return function(t,n,r){var i;r.start(),n.arrays||(n.arrays=[]),e.forEach((function(e){if(n.properties[e]){var t=n.properties[e];t.registration="set".concat(Q(e)),n.arrays.push(t),delete n.properties[e]}}));var o=n.properties.fields||[];(i=n.arrays).push.apply(i,w(o)),delete n.properties.fields,t.getPointData().removeAllArrays(),t.getCellData().removeAllArrays();var a=hz(t,n,r);return r.end(),a}}var vz=gz(["points","polys","verts","lines","strips"]),yz=gz([]);function bz(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:hz;cz||uz?tz[e]={build:t,update:n}:delete tz[e]}var wz={vtkMapper:["vtkOpenGLPolyDataMapper","vtkCompositePolyDataMapper2","vtkDataSetMapper"],vtkProperty:["vtkOpenGLProperty"],vtkRenderer:["vtkOpenGLRenderer"],vtkCamera:["vtkOpenGLCamera"],vtkColorTransferFunction:["vtkPVDiscretizableColorTransferFunction"],vtkActor:["vtkOpenGLActor","vtkPVLODActor"],vtkLight:["vtkOpenGLLight","vtkPVLight"],vtkTexture:["vtkOpenGLTexture"],vtkImageMapper:["vtkOpenGLImageSliceMapper"],vtkVolumeMapper:["vtkFixedPointVolumeRayCastMapper"]},xz={vtkRenderWindow:{build:sB.newInstance,update:function(e,t,n){t.calls&&t.calls.filter(fz).filter((function(e){return"removeRenderer"===e[0]})).forEach((function(e){sz(e[1]).forEach((function(e){var t=n.getInstance(e);t.getViewProps().forEach((function(e){var t=e.get("flattenedDepIds").flattenedDepIds;t&&t.forEach((function(e){return n.unregisterInstance(e)})),n.unregisterInstance(n.getInstanceId(e))})),t.removeAllViewProps()}))})),e.render(),hz(e,t,n)}},vtkRenderer:{build:lA.newInstance,update:function(e,t,n){hz(e,t,n);var r=new Set;t.dependencies&&t.dependencies.forEach((function(e){var t=n.getInstance(e.id);if(t){var i=lz(e);t.set({flattenedDepIds:i},!0),i.forEach((function(e){return r.add(e)}))}}));var i=new Set;t.calls&&t.calls.filter(fz).filter((function(e){return"removeViewProp"===e[0]})).forEach((function(e){sz(e[1]).forEach((function(e){var t=n.getInstance(e).get("flattenedDepIds").flattenedDepIds;t&&t.forEach((function(e){return i.add(e)})),i.add(e)}))})),w(i).filter((function(e){return!r.has(e)})).forEach((function(e){return n.unregisterInstance(e)}))}},vtkLookupTable:{build:Fs.newInstance,update:hz},vtkCamera:{build:HC.newInstance,update:mz},vtkPolyData:{build:rc.newInstance,update:vz},vtkImageData:{build:fs.newInstance,update:yz},vtkMapper:{build:cy.newInstance,update:hz},vtkGlyph3DMapper:{build:HF.newInstance,update:hz},vtkProperty:{build:Dv.newInstance,update:hz},vtkActor:{build:Rv.newInstance,update:hz},vtkLight:{build:YC.newInstance,update:hz},vtkColorTransferFunction:{build:$D.newInstance,update:function(e,t,n){n.start();var r=t.properties.nodes.map((function(e){var t=y(e,6);return{x:t[0],r:t[1],g:t[2],b:t[3],midpoint:t[4],sharpness:t[5]}}));e.set(ez(ez({},t.properties),{},{nodes:r}),!0),e.sortAndUpdateRange(),e.modified(),n.end()}},vtkTexture:{build:PE.newInstance,update:hz},vtkVolume:{build:mE.newInstance,update:hz},vtkVolumeMapper:{build:UE.newInstance,update:hz},vtkVolumeProperty:{build:cE.newInstance,update:hz},vtkImageSlice:{build:iP.newInstance,update:hz},vtkImageMapper:{build:KA.newInstance,update:hz},vtkImageProperty:{build:$A.newInstance,update:hz},vtkPiecewiseFunction:{build:Pu.newInstance,update:function(e,t,n){n.start();var r=t.properties.nodes.map((function(e){var t=y(e,4);return{x:t[0],y:t[1],midpoint:t[2],sharpness:t[3]}}));e.set(ez(ez({},t.properties),{},{nodes:r}),!0),e.sortAndUpdateRange(),e.modified(),n.end()}},vtkCubeAxesActor:{build:IF.newInstance,update:hz},vtkScalarBarActor:{build:CB.newInstance,update:hz}};function Sz(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&dz(),Object.keys(xz).forEach((function(e){var t=xz[e];bz(e,t.build,t.update)}))}function Cz(){Object.keys(wz).forEach((function(e){wz[e].forEach((function(t){tz[t]=tz[e]}))}))}Sz(),Cz(),oz.vtkOpenGLLight={},oz.vtkPVLight={},oz.vtkLight={};var Az={build:cz,update:uz,genericUpdater:hz,oneTimeGenericUpdater:mz,setTypeMapping:bz,clearTypeMapping:dz,getSupportedTypes:function(){return Object.keys(tz)},clearOneTimeUpdaters:function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:"default",t=Oz[e];return t||(t=_z(_z(_z(_z({},Tz()),Dz()),Ez()),Iz()),Oz[e]=t),t}function Mz(e,t){var n=-1,r=100,i=function(e){return e.get("managedInstanceId").managedInstanceId},o=function(){return ye(e,i)};function a(t){e.set({synchronizedViewId:t},!0,!0)}function s(){return e.get("synchronizedViewId").synchronizedViewId}return{synchronize:function(i){s()||a(i.id);var o=i.mtime||0;return s()===i.id&&n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Rz,n),sB.extend(e,t),ie(e,t,["synchronizerContext"]),Nz(e,t)}var Bz={newInstance:me(Fz,"vtkSynchronizableRenderWindow"),extend:Fz,getSynchronizerContext:kz,setSynchronizerContext:function(e,t){Oz[e]=t},decorate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=Mz(e,kz(t));return _z(_z(_z({},n),e),{},{delete:ge(e.delete,n.delete)})},createInstanceMap:Dz,createArrayHandler:Tz,createProgressHandler:Ez,createSceneMtimeHandler:Iz,vtkObjectManager:Az},Lz={vtkCanvasView:UB,vtkFullScreenRenderWindow:kU,vtkGenericRenderWindow:FU,vtkRemoteView:zU,vtkRenderWindowWithControlBar:QU,vtkSynchronizableRenderWindow:Bz,vtkTextureLODsDownloader:EE};function Vz(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(),jo(t.keyMatrices.mcwc,t.renderable.getMatrix()),Wo(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.renderable.getIsIdentity()?Ba(t.keyMatrices.normalMatrix):(ka(t.keyMatrices.normalMatrix,t.keyMatrices.mcwc),Va(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),La(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix)),t.keyMatrixTime.modified()),t.keyMatrices}}var jz={context:null,keyMatrixTime:null,keyMatrices:null,activeTextures:null};function Gz(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jz,n),ZB.extend(e,t,n),t.keyMatrixTime={},re(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:Ba(new Float64Array(9)),mcwc:zo(new Float64Array(16))},le(e,t,["context"]),ie(e,t,["activeTextures"]),Vz(e,t)}var Uz=me(Gz),zz={newInstance:Uz,extend:Gz};function Wz(e,t){t.classHierarchy.push("vtkOpenGLActor2D"),e.buildPass=function(n){if(n){if(!t.renderable)return;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()}},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(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.getNestedVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getNestedPickable()||(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.depthMask(!0),e.activateTextures()):t.activeTextures.forEach((function(e){e.deactivate()}))},e.translucentPass=function(n,r){n?(t.context.depthMask(!1),e.activateTextures()):(t.activeTextures.forEach((function(e){e.deactivate()})),t.context.depthMask(!0))}}nL("vtkActor",Uz);var Hz={context:null,activeTextures:[]};function Kz(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Hz,n),ZB.extend(e,t,n),le(e,t,["context"]),ie(e,t,["activeTextures"]),Wz(e,t)}var Xz=me(Kz),qz={newInstance:Xz,extend:Kz};nL("vtkActor2D",Xz);var Yz={ARRAY_BUFFER:0,ELEMENT_ARRAY_BUFFER:1,TEXTURE_BUFFER:2},Zz={ObjectType:Yz};function Jz(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 Qz(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tW,n),Ae.obj(e,t),Ae.get(e,t,["openGLRenderWindow"]),eW(e,t)}var rW=Qz(Qz({newInstance:Ae.newInstance(nW),extend:nW},{}),Zz);function iW(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()){jo(t.keyMatrices.wcvc,t.renderable.getViewMatrix()),ka(t.keyMatrices.normalMatrix,t.keyMatrices.wcvc),Va(t.keyMatrices.normalMatrix,t.keyMatrices.normalMatrix),Wo(t.keyMatrices.wcvc,t.keyMatrices.wcvc);var r=t.openGLRenderer.getAspectRatio();jo(t.keyMatrices.vcpc,t.renderable.getProjectionMatrix(r,-1,1)),Wo(t.keyMatrices.vcpc,t.keyMatrices.vcpc),qo(t.keyMatrices.wcpc,t.keyMatrices.vcpc,t.keyMatrices.wcvc),t.keyMatrixTime.modified(),t.lastRenderer=n}return t.keyMatrices}}var oW={context:null,lastRenderer:null,keyMatrixTime:null,keyMatrices:null};function aW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,oW,n),ZB.extend(e,t,n),t.keyMatrixTime={},re(t.keyMatrixTime),t.keyMatrices={normalMatrix:new Float64Array(9),vcpc:new Float64Array(16),wcvc:new Float64Array(16),wcpc:new Float64Array(16)},le(e,t,["context","keyMatrixTime"]),iW(e,t)}var sW=me(aW),lW={newInstance:sW,extend:aW};nL("vtkCamera",sW);var uW=Ae.vtkErrorMacro;function cW(e,t){t.classHierarchy.push("vtkOpenGLCellArrayBufferObject"),e.setType(Yz.ARRAY_BUFFER),e.createVBO=function(n,r,i,o){if(!n.getData()||!n.getData().length)return t.elementCount=0,0;t.blockSize=3,t.vertexOffset=0,t.normalOffset=0,t.tCoordOffset=0,t.tCoordComponents=0,t.colorComponents=0,t.colorOffset=0,t.customData=[];var a=o.points.getData(),s=null,l=null,u=null,c=o.colors?o.colors.getNumberOfComponents():0,d=o.tcoords?o.tcoords.getNumberOfComponents():0;o.normals&&(t.normalOffset=4*t.blockSize,t.blockSize+=3,s=o.normals.getData()),o.customAttributes&&o.customAttributes.forEach((function(e){e&&(t.customData.push({data:e.getData(),offset:4*t.blockSize,components:e.getNumberOfComponents(),name:e.getName()}),t.blockSize+=e.getNumberOfComponents())})),o.tcoords&&(t.tCoordOffset=4*t.blockSize,t.tCoordComponents=d,t.blockSize+=d,l=o.tcoords.getData()),o.colors?(t.colorComponents=o.colors.getNumberOfComponents(),t.colorOffset=0,u=o.colors.getData(),t.colorBO||(t.colorBO=rW.newInstance()),t.colorBO.setOpenGLRenderWindow(t.openGLRenderWindow)):t.colorBO=null,t.stride=4*t.blockSize;var p,f=0,h=0,m=0,g=0,v=0,y=0,b={anythingToPoints:function(e,t,n){for(var r=0;r2)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}},x=null,S=null;i===wv.POINTS||"verts"===r?(x=b.anythingToPoints,S=w.anythingToPoints):i===wv.WIREFRAME||"lines"===r?(x=b["".concat(r,"ToWireframe")],S=w["".concat(r,"ToWireframe")]):(x=b["".concat(r,"ToSurface")],S=w["".concat(r,"ToSurface")]);for(var C=n.getData(),A=C.length,P=0,_=0;_0&&(Math.abs(k)/I>1e6||Math.abs(Math.log10(I))>3||0===I&&k>1e6)){for(var B=new Float64Array(3),L=new Float64Array(3),V=0;V<3;++V){var j=o.points.getRange(V),G=j[1]-j[0];B[V]=.5*(j[1]+j[0]),L[V]=G>0?1/G:1}e.setCoordShiftAndScale(B,L)}else!0===t.coordShiftAndScaleEnabled&&e.setCoordShiftAndScale(null,null);p=function(e){if(f=3*e,t.coordShiftAndScaleEnabled?(T[D++]=(a[f++]-t.coordShift[0])*t.coordScale[0],T[D++]=(a[f++]-t.coordShift[1])*t.coordScale[1],T[D++]=(a[f++]-t.coordShift[2])*t.coordScale[2]):(T[D++]=a[f++],T[D++]=a[f++],T[D++]=a[f++]),null!==s&&(h=o.haveCellNormals?3*(y+o.cellOffset):3*e,T[D++]=s[h++],T[D++]=s[h++],T[D++]=s[h++]),t.customData.forEach((function(t){v=e*t.components;for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dW,n),rW.extend(e,t,n),Ae.setGet(e,t,["colorBO","elementCount","stride","colorBOStride","vertexOffset","normalOffset","tCoordOffset","tCoordComponents","colorOffset","colorComponents","customData"]),Ae.get(e,t,["coordShift","coordScale","coordShiftAndScaleEnabled","inverseShiftAndScaleMatrix"]),cW(e,t)}var fW={newInstance:Ae.newInstance(pW),extend:pW};function hW(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(a.index+l,1):n.vertexAttribDivisor(a.index+l,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(a.index+l,0):n.vertexAttribDivisor(a.index+l,0)),n.disableVertexAttribArray(a.index+l)}},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,i,o,a,s,l){return e.addAttributeArrayWithDivisor(t,n,r,i,o,a,s,l,0,!1)},e.addAttributeArrayWithDivisor=function(n,r,i,o,a,s,l,u,c,d){if(!n)return!1;if(!n.isBound()||0===r.getHandle()||r.getType()!==Yz.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 p=t.context,f={};if(f.name=i,f.index=p.getAttribLocation(t.handleProgram,i),f.offset=o,f.stride=a,f.type=s,f.size=l,f.normalize=u,f.isMatrix=d,f.divisor=c,-1===f.Index)return!1;if(r.bind(),p.enableVertexAttribArray(f.index),p.vertexAttribPointer(f.index,f.size,f.type,f.normalize,f.stride,f.offset),c>0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(f.index,1):p.vertexAttribDivisor(f.index,1)),f.buffer=r.getHandle(),!t.supported){for(var h=!1,m=0;m0&&(t.instancingExtension?t.instancingExtension.vertexAttribDivisorANGLE(f+h,1):p.vertexAttribDivisor(f+h,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,mW,n),t.buffers=[],Ae.obj(e,t),Ae.get(e,t,["supported"]),Ae.setGet(e,t,["forceEmulation"]),hW(e,t)}var vW={newInstance:Ae.newInstance(gW,"vtkOpenGLVertexArrayObject"),extend:gW};function yW(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 bW={program:null,shaderSourceTime:null,VAO:null,attributeUpdateTime:null,CABO:null,primitiveType:0};function wW(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bW,n),Ae.obj(e,t),t.shaderSourceTime={},Ae.obj(t.shaderSourceTime),t.attributeUpdateTime={},Ae.obj(t.attributeUpdateTime),Ae.setGet(e,t,["program","shaderSourceTime","VAO","attributeUpdateTime","CABO","primitiveType"]),t.program=UL.newInstance(),t.VAO=vW.newInstance(),t.CABO=fW.newInstance(),yW(e,t)}var xW={newInstance:Ae.newInstance(wW),extend:wW},SW=Ae.vtkErrorMacro;function CW(e,t){t.classHierarchy.push("vtkConvolution2DPass"),e.computeKernelWeight=function(e){var t=e.reduce((function(e,t){return e+t}));return t<=0?1:t},e.traverse=function(n){if(!t.deleted)if(t.kernelDimension%2==1){null===t.kernel&&(t.kernel=new Float32Array(t.kernelDimension),t.kernel[Math.floor(t.kernelDimension/2)]=1);var r=t.kernelDimension*t.kernelDimension;if(t.kernel.length===r){null===t.framebuffer&&(t.framebuffer=SL.newInstance());var i=n.getSize(),o=n.getContext();if(null!==o){t.VBOBuildTime.getMTime()2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AW,n),_L.extend(e,t,n),t.VBOBuildTime={},Ae.obj(t.VBOBuildTime,{mtime:0}),t.tris=xW.newInstance(),Ae.setGet(e,t,["kernel","kernelDimension"]),Ae.get(e,t,["framebuffer"]),CW(e,t)}var _W={newInstance:Ae.newInstance(PW,"vtkConvolution2DPass"),extend:PW},OW=n(516),TW=n.n(OW),DW=n(158),EW=n.n(DW);var IW={implementReplaceShaderCoincidentOffset:function(e,t){e.replaceShaderCoincidentOffset=function(n,r,i){var o=e.getCoincidentParameters(r,i);if(o&&(0!==o.factor||0!==o.offset)){var a=n.Fragment;a=UL.substitute(a,"//VTK::Coincident::Dec",["uniform float cfactor;","uniform float coffset;"]).result,t.context.getExtension("EXT_frag_depth")&&(0!==o.factor?(a=UL.substitute(a,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,a=UL.substitute(a,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):a=UL.substitute(a,"//VTK::Depth::Impl","gl_FragDepthEXT = gl_FragCoord.z + 0.000016*coffset;").result),t.openGLRenderWindow.getWebgl2()&&(0!==o.factor?(a=UL.substitute(a,"//VTK::UniformFlow::Impl",["float cscale = length(vec2(dFdx(gl_FragCoord.z),dFdy(gl_FragCoord.z)));","//VTK::UniformFlow::Impl"],!1).result,a=UL.substitute(a,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + cfactor*cscale + 0.000016*coffset;").result):a=UL.substitute(a,"//VTK::Depth::Impl","gl_FragDepth = gl_FragCoord.z + 0.000016*coffset;").result),n.Fragment=a}}}},kW={Start:0,Points:0,Lines:1,Tris:2,TriStrips:3,TrisEdges:4,TriStripsEdges:5,End:6},MW=Dv.Representation,NW=Dv.Shading,RW=cy.ScalarMode,FW=yL.Filter,BW=yL.Wrap,LW=K,VW={type:"StartEvent"},jW={type:"EndEvent"};function GW(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=kW.Start;r= cos(radians(lightConeAngle".concat(d,")))")," {"," attenuation = attenuation * pow(coneDot, lightExponent".concat(d,");")," }"," else"," {"," attenuation = 0.0;"," }"," }"," }"," df = max(0.0, attenuation*dot(normalVCVSOutput, -vertLightDirectionVC));"," diffuseL += ((df".concat("",") * lightColor").concat(d,");")," if (dot(normalVCVSOutput, vertLightDirectionVC) < 0.0)"," {"," float sf = attenuation*pow( max(0.0, dot(lightHalfAngleVC".concat(d,",normalVCVSOutput)), specularPower);")," specularL += ((sf".concat("",") * lightColor").concat(d,");")," }"]);s=s.concat([" diffuseL = diffuseL * diffuseColor;"," specularL = specularL * specularColor;"," gl_FragData[0] = vec4(ambientColor * ambient + diffuseL * diffuse + specularL * specular, opacity);"," //VTK::Light::Impl"]),i=UL.substitute(i,"//VTK::Light::Impl",s,!1).result;break;default:LW("bad light complexity")}e.Fragment=i},e.replaceShaderNormal=function(n,r,i){if(t.lastBoundBO.getReferenceByName("lastLightComplexity")>0){var o=n.Vertex,a=n.Geometry,s=n.Fragment;t.lastBoundBO.getCABO().getNormalOffset()?(o=UL.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=UL.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * normalMC;"]).result,a=UL.substitute(a,"//VTK::Normal::Dec",["in vec3 normalVCVSOutput[];","out vec3 normalVCGSOutput;"]).result,a=UL.substitute(a,"//VTK::Normal::Impl",["normalVCGSOutput = normalVCVSOutput[i];"]).result,s=UL.substitute(s,"//VTK::Normal::Dec",["varying vec3 normalVCVSOutput;"]).result,s=UL.substitute(s,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalVCVSOutput);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):t.haveCellNormals?(s=UL.substitute(s,"//VTK::Normal::Dec",["uniform mat3 normalMatrix;","uniform samplerBuffer textureN;"]).result,s=UL.substitute(s,"//VTK::Normal::Impl",["vec3 normalVCVSOutput = normalize(normalMatrix *"," texelFetchBuffer(textureN, gl_PrimitiveID + PrimitiveIDOffset).xyz);"," if (gl_FrontFacing == false) { normalVCVSOutput = -normalVCVSOutput; }"]).result):e.getOpenGLMode(i.getProperty().getRepresentation(),t.lastBoundBO.getPrimitiveType())===t.context.LINES?(s=UL.substitute(s,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,s=UL.substitute(s,"//VTK::Normal::Impl",["vec3 normalVCVSOutput;"," if (abs(fdx.x) > 0.0)"," { fdx = normalize(fdx); normalVCVSOutput = normalize(cross(vec3(fdx.y, -fdx.x, 0.0), fdx)); }"," else { fdy = normalize(fdy); normalVCVSOutput = normalize(cross(vec3(fdy.y, -fdy.x, 0.0), fdy));}"]).result):(s=UL.substitute(s,"//VTK::Normal::Dec",["uniform int cameraParallel;"]).result,s=UL.substitute(s,"//VTK::UniformFlow::Impl",[" vec3 fdx = dFdx(vertexVC.xyz);"," vec3 fdy = dFdy(vertexVC.xyz);"," //VTK::UniformFlow::Impl"]).result,s=UL.substitute(s,"//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=a,n.Fragment=s}},e.replaceShaderPositionVC=function(e,n,r){var i=e.Vertex,o=e.Geometry,a=e.Fragment;r.getProperty().getRepresentation()!==MW.POINTS&&t.lastBoundBO.getPrimitiveType()!==kW.Points||(i=UL.substitute(i,"//VTK::PositionVC::Impl",["//VTK::PositionVC::Impl"," gl_PointSize = ".concat(r.getProperty().getPointSize(),".0;")],!1).result),t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(i=UL.substitute(i,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,i=UL.substitute(i,"//VTK::PositionVC::Impl",["vertexVCVSOutput = MCVCMatrix * vertexMC;"," gl_Position = MCPCMatrix * vertexMC;"]).result,i=UL.substitute(i,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result,o=UL.substitute(o,"//VTK::PositionVC::Dec",["in vec4 vertexVCVSOutput[];","out vec4 vertexVCGSOutput;"]).result,o=UL.substitute(o,"//VTK::PositionVC::Impl",["vertexVCGSOutput = vertexVCVSOutput[i];"]).result,a=UL.substitute(a,"//VTK::PositionVC::Dec",["varying vec4 vertexVCVSOutput;"]).result,a=UL.substitute(a,"//VTK::PositionVC::Impl",["vec4 vertexVC = vertexVCVSOutput;"]).result):(i=UL.substitute(i,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,i=UL.substitute(i,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result),e.Vertex=i,e.Geometry=o,e.Fragment=a},e.replaceShaderTCoord=function(e,n,r){if(t.lastBoundBO.getCABO().getTCoordOffset()){var i=e.Vertex,o=e.Geometry,a=e.Fragment;if(t.drawingEdges)return;i=UL.substitute(i,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result;var s=t.openGLActor.getActiveTextures(),l=2,u=2;if(s&&s.length>0&&(l=s[0].getComponents(),s[0].getTarget()===t.context.TEXTURE_CUBE_MAP&&(u=3)),t.renderable.getColorTextureMap()&&(l=t.renderable.getColorTextureMap().getPointData().getScalars().getNumberOfComponents(),u=2),2===u){if(i=UL.substitute(i,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result,o=UL.substitute(o,"//VTK::TCoord::Dec",["in vec2 tcoordVCVSOutput[];","out vec2 tcoordVCGSOutput;"]).result,o=UL.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,a=UL.substitute(a,"//VTK::TCoord::Dec",["varying vec2 tcoordVCVSOutput;","uniform sampler2D texture1;"]).result,s&&s.length>=1)switch(l){case 1:a=UL.substitute(a,"//VTK::TCoord::Impl",[" vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"]).result;break;case 2:a=UL.substitute(a,"//VTK::TCoord::Impl",[" vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"," opacity = opacity * tcolor.g;"]).result;break;default:a=UL.substitute(a,"//VTK::TCoord::Impl",[" vec4 tcolor = texture2D(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.rgb;"," diffuseColor = diffuseColor*tcolor.rgb;"," opacity = opacity * tcolor.a;"]).result}}else switch(i=UL.substitute(i,"//VTK::TCoord::Dec","attribute vec3 tcoordMC; varying vec3 tcoordVCVSOutput;").result,o=UL.substitute(o,"//VTK::TCoord::Dec",["in vec3 tcoordVCVSOutput[];","out vec3 tcoordVCGSOutput;"]).result,o=UL.substitute(o,"//VTK::TCoord::Impl","tcoordVCGSOutput = tcoordVCVSOutput[i];").result,a=UL.substitute(a,"//VTK::TCoord::Dec",["varying vec3 tcoordVCVSOutput;","uniform samplerCube texture1;"]).result,l){case 1:a=UL.substitute(a,"//VTK::TCoord::Impl",[" vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"]).result;break;case 2:a=UL.substitute(a,"//VTK::TCoord::Impl",[" vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.r;"," diffuseColor = diffuseColor*tcolor.r;"," opacity = opacity * tcolor.g;"]).result;break;default:a=UL.substitute(a,"//VTK::TCoord::Impl",[" vec4 tcolor = textureCube(texture1, tcoordVCVSOutput);"," ambientColor = ambientColor*tcolor.rgb;"," diffuseColor = diffuseColor*tcolor.rgb;"," opacity = opacity * tcolor.a;"]).result}e.Vertex=i,e.Geometry=o,e.Fragment=a}},e.replaceShaderClip=function(e,n,r){var i=e.Vertex,o=e.Fragment;if(t.renderable.getNumberOfClippingPlanes()){var a=t.renderable.getNumberOfClippingPlanes();a>6&&(K("OpenGL has a limit of 6 clipping planes"),a=6),i=UL.substitute(i,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,i=UL.substitute(i,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=UL.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=UL.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=i,e.Fragment=o},e.getCoincidentParameters=function(e,n){var r=null,i=n.getProperty();if(t.renderable.getResolveCoincidentTopology()||i.getEdgeVisibility()&&i.getRepresentation()===MW.SURFACE){var o=t.lastBoundBO.getPrimitiveType();o===kW.Points||i.getRepresentation()===MW.POINTS?r=t.renderable.getCoincidentTopologyPointOffsetParameter():o===kW.Lines||i.getRepresentation()===MW.WIREFRAME?r=t.renderable.getCoincidentTopologyLineOffsetParameters():o!==kW.Tris&&o!==kW.TriStrips||(r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()),o!==kW.TrisEdges&&o!==kW.TriStripsEdges||((r=t.renderable.getCoincidentTopologyPolygonOffsetParameters()).factor/=2,r.offset/=2)}return r},e.replaceShaderPicking=function(e,t,n){var r=e.Fragment;r=UL.substitute(r,"//VTK::Picking::Dec",["uniform vec3 mapperIndex;","uniform int picking;"]).result,r=UL.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,i){if(e.replaceShaderColor(n,r,i),e.replaceShaderNormal(n,r,i),e.replaceShaderLight(n,r,i),e.replaceShaderTCoord(n,r,i),e.replaceShaderPicking(n,r,i),e.replaceShaderClip(n,r,i),e.replaceShaderCoincidentOffset(n,r,i),e.replaceShaderPositionVC(n,r,i),t.haveSeenDepthRequest){var o=n.Fragment;o=UL.substitute(o,"//VTK::ZBuffer::Dec","uniform int depthRequest;").result,o=UL.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,i){var o=0,a=0,s=n.getPrimitiveType(),l=t.currentInput,u=!1,c=l.getPointData().getNormals(),d=l.getCellData().getNormals(),p=i.getProperty().getInterpolation()===NW.FLAT,f=i.getProperty().getRepresentation(),h=e.getOpenGLMode(f,s);if(h===t.context.TRIANGLES||d&&!c||!p&&c?u=!0:p||h!==t.context.LINES||(u=!0),i.getProperty().getLighting()&&u){o=0;for(var m=r.getLightsByReference(),g=0;g0&&(a++,0===o&&(o=1)),1===o&&(a>1||1!==v.getIntensity()||!v.lightTypeIsHeadLight())&&(o=2),o<3&&v.getPositional()&&(o=3)}}var y=!1,b=t.lastBoundBO.getReferenceByName("lastLightComplexity"),w=t.lastBoundBO.getReferenceByName("lastLightCount");return b===o&&w===a||(t.lastBoundBO.set({lastLightComplexity:o},!0),t.lastBoundBO.set({lastLightCount:a},!0),y=!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)||LW("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)||LW("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)||LW("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)||LW("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)||LW("Error setting scalarColor in shader VAO."):n.getVAO().removeAttributeArray("scalarColor"),n.getAttributeUpdateTime().modified()}if(t.renderable.getNumberOfClippingPlanes()){var a=t.renderable.getNumberOfClippingPlanes();a>6&&(K("OpenGL has a limit of 6 clipping planes"),a=6);for(var s=[],l=0;l0){var c=u.getColorByReference(),d=u.getIntensity();t.lightColor[0]=c[0]*d,t.lightColor[1]=c[1]*d,t.lightColor[2]=c[2]*d;var p=u.getDirection(),f=n.getActiveCamera().getViewMatrix(),h=w(p);u.lightTypeIsSceneLight()&&(h[0]=f[0]*p[0]+f[1]*p[1]+f[2]*p[2],h[1]=f[4]*p[0]+f[5]*p[1]+f[6]*p[2],h[2]=f[8]*p[0]+f[9]*p[1]+f[10]*p[2],mt(h)),t.lightDirection[0]=h[0],t.lightDirection[1]=h[1],t.lightDirection[2]=h[2],t.lightHalfAngle[0]=-t.lightDirection[0],t.lightHalfAngle[1]=-t.lightDirection[1],t.lightHalfAngle[2]=1-t.lightDirection[2],mt(t.lightDirection),o.setUniform3fArray("lightColor".concat(a),t.lightColor),o.setUniform3fArray("lightDirectionVC".concat(a),t.lightDirection),o.setUniform3fArray("lightHalfAngleVC".concat(a),t.lightHalfAngle),a++}}if(!(i<3)){var m=n.getActiveCamera().getViewMatrix();Wo(m,m),a=0;for(var g=0;g0){var y=v.getTransformedPosition(),b=new Float64Array(3);yo(b,y,m),o.setUniform3fArray("lightAttenuation".concat(a),v.getAttenuationValuesByReference()),o.setUniformi("lightPositional".concat(a),v.getPositional()),o.setUniformf("lightExponent".concat(a),v.getExponent()),o.setUniformf("lightConeAngle".concat(a),v.getConeAngle()),o.setUniform3fArray("lightPositionVC".concat(a),[b[0],b[1],b[2]]),a++}}}}},e.setCameraShaderParameters=function(e,r,i){var s=e.getProgram(),l=t.openGLCamera.getKeyMatrices(r),u=r.getActiveCamera(),c=t.openGLCamera.getKeyMatrixTime().getMTime(),d=s.getLastCameraMTime(),p=e.getCABO().getCoordShiftAndScaleEnabled()?e.getCABO().getInverseShiftAndScaleMatrix():null,f=i.getIsIdentity(),h=f?{mcwc:null,normalMatrix:null}:t.openGLActor.getKeyMatrices();s.setUniformMatrix("MCPCMatrix",n([l.wcpc,h.mcwc,p],o,t.tmpMat4)),s.isUniformUsed("MCVCMatrix")&&s.setUniformMatrix("MCVCMatrix",n([l.wcvc,h.mcwc,p],o,t.tmpMat4)),s.isUniformUsed("normalMatrix")&&s.setUniformMatrix3x3("normalMatrix",n([l.normalMatrix,h.normalMatrix],a,t.tmpMat3)),d!==c&&(s.isUniformUsed("cameraParallel")&&s.setUniformi("cameraParallel",u.getParallelProjection()),s.setLastCameraMTime(c)),f||s.setLastCameraMTime(0)},e.setPropertyShaderParameters=function(e,n,r){var i=e.getProgram(),o=r.getProperty(),a=o.getOpacity(),s=t.drawingEdges?o.getEdgeColorByReference():o.getAmbientColorByReference(),l=t.drawingEdges?o.getEdgeColorByReference():o.getDiffuseColorByReference(),u=t.drawingEdges?1:o.getAmbient(),c=t.drawingEdges?0:o.getDiffuse(),d=t.drawingEdges?0:o.getSpecular(),p=o.getSpecularPower();i.setUniformf("opacityUniform",a),i.setUniform3fArray("ambientColorUniform",s),i.setUniform3fArray("diffuseColorUniform",l),i.setUniformf("ambient",u),i.setUniformf("diffuse",c);var f=t.lastBoundBO.getReferenceByName("lastLightComplexity");if(!(f<1)){var h=o.getSpecularColorByReference();if(i.setUniform3fArray("specularColorUniform",h),i.setUniformf("specularPowerUniform",p),i.setUniformf("specular",d),i.isUniformUsed("ambientIntensityBF")){if(a=(o=r.getBackfaceProperty()).getOpacity(),s=o.getAmbientColor(),u=o.getAmbient(),l=o.getDiffuseColor(),c=o.getDiffuse(),h=o.getSpecularColor(),d=o.getSpecular(),i.setUniformf("ambientIntensityBF",u),i.setUniformf("diffuseIntensityBF",c),i.setUniformf("opacityUniformBF",a),i.setUniform3fArray("ambientColorUniformBF",s),i.setUniform3fArray("diffuseColorUniformBF",l),f<1)return;i.setUniformf("specularIntensityBF",d),i.setUniform3fArray("specularColorUniformBF",h),i.setUniformf("specularPowerUniformBF",p)}}},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 i=r.getProperty().getRepresentation(),o=t.context,a=r.getProperty().getEdgeVisibility()&&i===MW.SURFACE;o.lineWidth(r.getProperty().getLineWidth());for(var s=kW.Start;s2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,UW,n),ZB.extend(e,t,n),IW.implementReplaceShaderCoincidentOffset(e,t,n),t.primitives=[],t.primTypes=kW,t.tmpMat3=Ba(new Float64Array(9)),t.tmpMat4=zo(new Float64Array(16));for(var r=kW.Start;r0){var o=e.Vertex;t.lastBoundBO.getCABO().getNormalOffset()&&(o=UL.substitute(o,"//VTK::Normal::Dec",["attribute vec3 normalMC;","attribute mat3 gNormal;","uniform mat3 normalMatrix;","varying vec3 normalVCVSOutput;"]).result,o=UL.substitute(o,"//VTK::Normal::Impl",["normalVCVSOutput = normalMatrix * gNormal * normalMC;"]).result),e.Vertex=o}n.replaceShaderNormal(e,r,i)},e.replaceShaderColor=function(e,r,i){if(t.hardwareSupport&&t.renderable.getColorArray()){var o=e.Vertex,a=e.Geometry,s=e.Fragment,l=t.lastBoundBO.getReferenceByName("lastLightComplexity"),u=["uniform float ambient;","uniform float diffuse;","uniform float specular;","uniform float opacityUniform; // the fragment opacity"];l&&(u=u.concat(["uniform vec3 specularColorUniform;","uniform float specularPowerUniform;"]));var c=["vec3 ambientColor;"," vec3 diffuseColor;"," float opacity;"];l&&(c=c.concat([" vec3 specularColor;"," float specularPower;"])),c=c.concat([" opacity = opacityUniform;"]),l&&(c=c.concat([" specularColor = specularColorUniform;"," specularPower = specularPowerUniform;"])),t.drawingEdges||(u=u.concat(["varying vec4 vertexColorVSOutput;"]),o=UL.substitute(o,"//VTK::Color::Dec",["attribute vec4 gColor;","varying vec4 vertexColorVSOutput;"]).result,o=UL.substitute(o,"//VTK::Color::Impl",["vertexColorVSOutput = gColor;"]).result,a=UL.substitute(a,"//VTK::Color::Dec",["in vec4 vertexColorVSOutput[];","out vec4 vertexColorGSOutput;"]).result,a=UL.substitute(a,"//VTK::Color::Impl",["vertexColorGSOutput = vertexColorVSOutput[i];"]).result,c=c.concat([" diffuseColor = vertexColorVSOutput.rgb;"," ambientColor = vertexColorVSOutput.rgb;"," opacity = opacity*vertexColorVSOutput.a;"])),s=UL.substitute(s,"//VTK::Color::Impl",c).result,s=UL.substitute(s,"//VTK::Color::Dec",u).result,e.Vertex=o,e.Geometry=a,e.Fragment=s}n.replaceShaderColor(e,r,i)},e.replaceShaderPositionVC=function(e,r,i){if(t.hardwareSupport){var o=e.Vertex;t.lastBoundBO.getReferenceByName("lastLightComplexity")>0?(o=UL.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;","vertexVCVSOutput = MCVCMatrix * gVertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result,o=UL.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;","uniform mat4 MCVCMatrix;"]).result):(o=UL.substitute(o,"//VTK::Camera::Dec",["attribute mat4 gMatrix;","uniform mat4 MCPCMatrix;"]).result,o=UL.substitute(o,"//VTK::PositionVC::Impl",["vec4 gVertexMC = gMatrix * vertexMC;"," gl_Position = MCPCMatrix * gVertexMC;"]).result),e.Vertex=o}n.replaceShaderPositionVC(e,r,i)},e.replaceShaderPicking=function(e,r,i){if(t.hardwareSupport){var o=e.Fragment,a=e.Vertex;a=UL.substitute(a,"//VTK::Picking::Dec",["attribute vec3 mapperIndexVS;","varying vec3 mapperIndexVSOutput;"]).result,a=UL.substitute(a,"//VTK::Picking::Impl"," mapperIndexVSOutput = mapperIndexVS;").result,e.Vertex=a,o=UL.substitute(o,"//VTK::Picking::Dec",["varying vec3 mapperIndexVSOutput;","uniform vec3 mapperIndex;","uniform int picking;"]).result,o=UL.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,i)},e.updateGlyphShaderParameters=function(n,r,i,o,a,s,l,u){var c=i.getProgram();if(n){var d=t.normalMatrix,p=s,f=9*l,h=t.tmpMat3,m=d[0],g=d[1],v=d[2],y=d[3],b=d[4],w=d[5],x=d[6],S=d[7],C=d[8],A=p[f],P=p[f+1],_=p[f+2],O=p[f+3],T=p[f+4],D=p[f+5],E=p[f+6],I=p[f+7],k=p[f+8];h[0]=A*m+P*y+_*x,h[1]=A*g+P*b+_*S,h[2]=A*v+P*w+_*C,h[3]=O*m+T*y+D*x,h[4]=O*g+T*b+D*S,h[5]=O*v+T*w+D*C,h[6]=E*m+I*y+k*x,h[7]=E*g+I*b+k*S,h[8]=E*v+I*w+k*C,c.setUniformMatrix3x3("normalMatrix",t.tmpMat3)}if(e.multiply4x4WithOffset(t.tmpMat4,t.mcpcMatrix,a,16*l),c.setUniformMatrix("MCPCMatrix",t.tmpMat4),r&&(e.multiply4x4WithOffset(t.tmpMat4,t.mcvcMatrix,a,16*l),c.setUniformMatrix("MCVCMatrix",t.tmpMat4)),o){var M=o.getData();t.tmpColor[0]=M[4*l]/255,t.tmpColor[1]=M[4*l+1]/255,t.tmpColor[2]=M[4*l+2]/255,c.setUniform3fArray("ambientColorUniform",t.tmpColor),c.setUniform3fArray("diffuseColorUniform",t.tmpColor)}u&&c.setUniform3fArray("mapperIndex",u.getPropColorValue())},e.renderPieceDraw=function(n,r){var i=r.getProperty().getRepresentation(),o=t.context,a=r.getProperty().getEdgeVisibility()&&i===qW.SURFACE,s=t.openGLCamera.getKeyMatrices(n),l=t.openGLActor.getKeyMatrices();Ua(t.normalMatrix,s.normalMatrix,l.normalMatrix),qo(t.mcpcMatrix,s.wcpc,l.mcwc),qo(t.mcvcMatrix,s.wcvc,l.mcwc);var u=t.renderable.getMatrixArray(),c=t.renderable.getNormalArray(),d=t.renderable.getColorArray(),p=u.length/16,f=!1;t.openGLRenderer.getSelector()&&t.openGLRenderer.getSelector().getCurrentPass()===ZW.COMPOSITE_INDEX_PASS&&(f=!0);for(var h=t.primTypes.Start;he.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)||XW("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)||XW("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)||XW("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)||XW("Error setting mapperIndexVS in shader VAO."):e.getVAO().removeAttributeArray("mapperIndexVS"),n.setMapperShaderParameters(e,r,i),void e.getAttributeUpdateTime().modified();n.setMapperShaderParameters(e,r,i)},e.getNeedToRebuildBufferObjects=function(e,r){return t.renderable.buildArrays(),t.VBOBuildTime.getMTime()t.glyphBOBuildTime.getMTime()){t.matrixBuffer.upload(i,YW.ARRAY_BUFFER),t.normalBuffer.upload(o,YW.ARRAY_BUFFER),a?t.colorBuffer.upload(a.getData(),YW.ARRAY_BUFFER):t.colorBuffer.releaseGraphicsResources();for(var s=i.length/16,l=new Uint8Array(4*s),u=0;u2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eH,n),HW.extend(e,t,n),t.tmpMat3=Ba(new Float64Array(9)),t.normalMatrix=Ba(new Float64Array(9)),t.mcpcMatrix=zo(new Float64Array(16)),t.mcvcMatrix=zo(new Float64Array(16)),t.tmpColor=[],t.glyphBOBuildTime={},re(t.glyphBOBuildTime,{mtime:0}),$W(e,t)}var nH=me(tH,"vtkOpenGLGlyph3DMapper"),rH={newInstance:nH,extend:tH};nL("vtkGlyph3DMapper",nH);var iH=K,oH=FA.SlicingMode;function aH(e,t,n){if(t.apply(e)){var r=e.getIndependentComponents();return"".concat(e.getMTime(),"-").concat(r,"-").concat(n)}return"0"}function sH(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=TW(),e.Fragment=EW(),e.Geometry=""},e.replaceShaderValues=function(n,r,i){var o=n.Vertex,a=n.Fragment;o=UL.substitute(o,"//VTK::Camera::Dec",["uniform mat4 MCPCMatrix;"]).result,o=UL.substitute(o,"//VTK::PositionVC::Impl",[" gl_Position = MCPCMatrix * vertexMC;"]).result,o=UL.substitute(o,"//VTK::TCoord::Impl","tcoordVCVSOutput = tcoordMC;").result,o=UL.substitute(o,"//VTK::TCoord::Dec","attribute vec2 tcoordMC; varying vec2 tcoordVCVSOutput;").result;var s=t.openGLTexture.getComponents(),l=i.getProperty().getIndependentComponents(),u=["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(l){for(var c=1;c6&&(K("OpenGL has a limit of 6 clipping planes"),a=6),i=UL.substitute(i,"//VTK::Clip::Dec",["uniform int numClipPlanes;","uniform vec4 clipPlanes[6];","varying float clipDistancesVSOutput[6];"]).result,i=UL.substitute(i,"//VTK::Clip::Impl",["for (int planeNum = 0; planeNum < 6; planeNum++)"," {"," if (planeNum >= numClipPlanes)"," {"," break;"," }"," clipDistancesVSOutput[planeNum] = dot(clipPlanes[planeNum], vertexMC);"," }"]).result,o=UL.substitute(o,"//VTK::Clip::Dec",["uniform int numClipPlanes;","varying float clipDistancesVSOutput[6];"]).result,o=UL.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=i,e.Fragment=o},e.getNeedToRebuildShaders=function(e,n,r){var i=t.openGLTexture.getComponents(),o=r.getProperty().getIndependentComponents();return(t.lastHaveSeenDepthRequest!==t.haveSeenDepthRequest||0===e.getProgram()||t.lastTextureComponents!==i||t.lastIndependentComponents!==o)&&(t.lastHaveSeenDepthRequest=t.haveSeenDepthRequest,t.lastTextureComponents=i,t.lastIndependentComponents=o,!0)},e.updateShaders=function(n,r,i){if(t.lastBoundBO=n,e.getNeedToRebuildShaders(n,r,i)){var o={Vertex:null,Fragment:null,Geometry:null};e.buildShaders(o,r,i);var a=t.openGLRenderWindow.getShaderCache().readyShaderProgramArray(o.Vertex,o.Fragment,o.Geometry);a!==n.getProgram()&&(n.setProgram(a),n.getVAO().releaseGraphicsResources()),n.getShaderSourceTime().modified()}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(n.getProgram());n.getVAO().bind(),e.setMapperShaderParameters(n,r,i),e.setCameraShaderParameters(n,r,i),e.setPropertyShaderParameters(n,r,i)},e.setMapperShaderParameters=function(n,r,i){n.getCABO().getElementCount()&&(t.VBOBuildTime>n.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)||iH("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)||iH("Error setting tcoordMC in shader VAO.")),n.getAttributeUpdateTime().modified());var o=t.openGLTexture.getTextureUnit();n.getProgram().setUniformi("texture1",o);var a=t.openGLTexture.getComponents(),s=i.getProperty().getIndependentComponents();if(s)for(var l=0;l6&&(K("OpenGL has a limit of 6 clipping planes"),D=6);var E=t.currentInput.getWorldToIndex();qo(t.imagematinv,E,i.getMatrix());for(var I=[],k=0;k1?1:0;var W=o.getData(),H=null;if(M===oH.I){H=new W.constructor(V[2]*V[1]*l);for(var K=0,X=0;X2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,lH,n),ZB.extend(e,t,n),IW.implementReplaceShaderCoincidentOffset(e,t,n),t.tris=xW.newInstance(),t.openGLTexture=yL.newInstance(),t.colorTexture=yL.newInstance(),t.pwfTexture=yL.newInstance(),t.imagemat=zo(new Float64Array(16)),t.imagematinv=zo(new Float64Array(16)),le(e,t,[]),t.VBOBuildTime={},re(t.VBOBuildTime),sH(e,t)}var cH=me(uH,"vtkOpenGLImageMapper"),dH={newInstance:cH,extend:uH};function pH(e,t){t.classHierarchy.push("vtkOpenGLImageSlice"),e.buildPass=function(n){if(t.renderable&&t.renderable.getVisibility()&&n){if(!t.renderable)return;t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),e.prepareNodes(),e.addMissingNode(t.renderable.getMapper()),e.removeUnusedNodes()}},e.traverseOpaqueZBufferPass=function(t){e.traverseOpaquePass(t)},e.traverseOpaquePass=function(n){t.renderable&&t.renderable.getNestedVisibility()&&t.renderable.getIsOpaque()&&(!t.openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children.forEach((function(e){e.traverse(n)})),e.apply(n,!1))},e.traverseTranslucentPass=function(n){!t.renderable||!t.renderable.getNestedVisibility()||t.renderable.getIsOpaque()||t.openGLRenderer.getSelector()&&!t.renderable.getNestedPickable()||(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(e,n){e&&t.context.depthMask(!0)},e.translucentPass=function(e,n){t.context.depthMask(!e)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(jo(t.keyMatrices.mcwc,t.renderable.getMatrix()),Wo(t.keyMatrices.mcwc,t.keyMatrices.mcwc),t.keyMatrixTime.modified()),t.keyMatrices}}nL("vtkImageMapper",cH);var fH={context:null,keyMatrixTime:null,keyMatrices:null};function hH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fH,n),ZB.extend(e,t,n),t.keyMatrixTime={},re(t.keyMatrixTime,{mtime:0}),t.keyMatrices={mcwc:zo(new Float64Array(16))},le(e,t,["context"]),pH(e,t)}var mH=me(hH,"vtkOpenGLImageSlice"),gH={newInstance:mH,extend:hH};nL("vtkImageSlice",mH);var vH=H;function yH(e,t){t.classHierarchy.push("vtkOpenGLPixelSpaceCallbackMapper"),e.opaquePass=function(n,r){t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.openGLRenderWindow=t.openGLRenderer.getParent();var i=t.openGLRenderer.getAspectRatio(),o=t.openGLRenderer?t.openGLRenderer.getRenderable().getActiveCamera():null,a=t.openGLRenderer.getTiledSizeAndOrigin(),s=null;if(t.renderable.getUseZValues()){var l=r.getZBufferTexture(),u=Math.floor(l.getWidth()),c=Math.floor(l.getHeight()),d=t.openGLRenderWindow.getContext();l.bind();var p=r.getFramebuffer();p?p.saveCurrentBindingsAndBuffers():vH("No framebuffer to save/restore");var f=d.createFramebuffer();d.bindFramebuffer(d.FRAMEBUFFER,f),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,l.getHandle(),0),d.checkFramebufferStatus(d.FRAMEBUFFER)===d.FRAMEBUFFER_COMPLETE&&(s=new Uint8Array(u*c*4),d.viewport(0,0,u,c),d.readPixels(0,0,u,c,d.RGBA,d.UNSIGNED_BYTE,s)),p&&p.restorePreviousBindingsAndBuffers(),d.deleteFramebuffer(f)}t.renderable.invokeCallback(t.renderable.getInputData(),o,i,a,s)},e.queryPass=function(e,n){e&&t.renderable.getUseZValues()&&n.requestDepth()}}var bH={};function wH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bH,n),ZB.extend(e,t,n),yH(e,t)}var xH=me(wH,"vtkOpenGLPixelSpaceCallbackMapper"),SH={newInstance:xH,extend:wH};nL("vtkPixelSpaceCallbackMapper",xH);var CH=H;function AH(e,t){t.classHierarchy.push("vtkOpenGLRenderer"),e.buildPass=function(n){if(n){if(!t.renderable)return;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||(CH("No lights are on, creating one."),t.renderable.createLight()),e},e.opaqueZBufferPass=function(n){if(n){var r=0,i=t.context;t.renderable.getTransparent()||(t.context.clearColor(1,0,0,1),r|=i.COLOR_BUFFER_BIT),t.renderable.getPreserveDepthBuffer()||(i.clearDepth(1),r|=i.DEPTH_BUFFER_BIT,t.context.depthMask(!0));var o=e.getTiledSizeAndOrigin();i.enable(i.SCISSOR_TEST),i.scissor(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),i.viewport(o.lowerLeftU,o.lowerLeftV,o.usize,o.vsize),i.colorMask(!0,!0,!0,!0),i.clear(r),i.enable(i.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=e[0]-n[0],i=e[1]-n[1],o=t.parent.normalizedDisplayToDisplay(r,i),a=Math.round(o[0]),s=Math.round(o[1]),l=e[2]-n[0],u=e[3]-n[1],c=t.parent.normalizedDisplayToDisplay(l,u),d=Math.round(c[0])-a,p=Math.round(c[1])-s;return d<0&&(d=0),p<0&&(p=0),{usize:d,vsize:p,lowerLeftU:a,lowerLeftV:s}},e.clear=function(){var n=0,r=t.context;if(!t.renderable.getTransparent()){var i=t.renderable.getBackgroundByReference();t.context.clearColor(i[0],i[1],i[2],i[3]),n|=r.COLOR_BUFFER_BIT}t.renderable.getPreserveDepthBuffer()||(r.clearDepth(1),n|=r.DEPTH_BUFFER_BIT,t.context.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 PH={context:null,openGLRenderWindow:null,selector:null};function _H(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,PH,n),ZB.extend(e,t,n),ie(e,t,["shaderCache"]),le(e,t,["selector"]),AH(e,t)}var OH=me(_H,"vtkOpenGLRenderer"),TH={newInstance:OH,extend:_H};nL("vtkRenderer",OH);var DH=K;function EH(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.context.depthMask(!0),t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.tris.getProgram()),t.openGLTexture.render(t.openGLRenderWindow);var i=t.openGLTexture.getTextureUnit();t.tris.getProgram().setUniformi("sbtexture",i);var o=t.openGLRenderer.getRenderable(),a=t.openGLCamera.getKeyMatrices(o),s=new Float64Array(16);if(Ho(s,a.wcpc),t.tris.getProgram().setUniformMatrix("IMCPCMatrix",s),"box"===t.lastFormat){var l=o.getActiveCamera().getPosition();t.tris.getProgram().setUniform3f("camPos",l[0],l[1],l[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=Jn.newInstance({numberOfComponents:3,values:e});r.setName("points");var i=new Uint16Array(8);i[0]=3,i[1]=0,i[2]=1,i[3]=3,i[4]=3,i[5]=0,i[6]=3,i[7]=2;var o=Jn.newInstance({numberOfComponents:1,values:i});t.tris.getCABO().createVBO(o,"polys",wv.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)||DH("Error setting vertexMC in shader VAO."));var a=t.renderable.getTextures();a.length||DH("vtkSkybox requires a texture map"),t.openGLTexture.getRenderable()!==a[0]&&(t.openGLTexture.releaseGraphicsResources(t.openGLRenderWindow),t.openGLTexture.setRenderable(a[0]))}}var IH={context:null};function kH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,IH,n),ZB.extend(e,t,n),t.openGLTexture=yL.newInstance(),t.tris=xW.newInstance(),t.keyMatrixTime={},re(t.keyMatrixTime,{mtime:0}),t.keyMatrices={normalMatrix:Ba(new Float64Array(9)),mcwc:zo(new Float64Array(16))},le(e,t,["context"]),ie(e,t,["activeTextures"]),EH(e,t)}var MH=me(kH),NH={newInstance:MH,extend:kH};nL("vtkSkybox",MH);var RH=n(714),FH=n.n(RH);function BH(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 LH=K;function VH(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",s]).result,a=UL.substitute(a,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(a=UL.substitute(a,"//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=a,n.replaceShaderValues(e,r,i)},e.setMapperShaderParameters=function(e,r,i){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)||LH("Error setting 'offsetMC' in shader VAO.")),e.getProgram().isUniformUsed("invertedDepth")&&e.getProgram().setUniformf("invertedDepth",t.invert?-1:1),n.setMapperShaderParameters(e,r,i)},e.setCameraShaderParameters=function(e,n,r){var i=e.getProgram(),o=n.getActiveCamera(),a=t.openGLCamera.getKeyMatrices(n);if(i.isUniformUsed("VCPCMatrix")&&i.setUniformMatrix("VCPCMatrix",a.vcpc),i.isUniformUsed("MCVCMatrix"))if(r.getIsIdentity())i.setUniformMatrix("MCVCMatrix",a.wcvc);else{var s=t.openGLActor.getKeyMatrices(),l=new Float64Array(16);qo(l,a.wcvc,s.mcwc),i.setUniformMatrix("MCVCMatrix",l)}i.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 i=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),a=r.getPointData(),s=r.getPoints(),l=s.getNumberOfPoints(),u=s.getData(),c=null;null!=t.renderable.getScaleArray()&&a.hasArray(t.renderable.getScaleArray())&&(c=a.getArray(t.renderable.getScaleArray()).getData());var d=null,p=0,f=null;i?(p=i.getNumberOfComponents(),o.setColorOffset(0),o.setColorBOStride(4),d=i.getData(),f=new Uint8Array(3*l*4),o.getColorBO()||o.setColorBO(rW.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow)):o.getColorBO()&&o.setColorBO(null),o.setColorComponents(p);var h=new Float32Array(5*l*3);o.setStride(20);for(var m=Math.cos(Le(30)),g=0,v=0,y=0,b=0,w=0;w2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jH,n),HW.extend(e,t,n),VH(e,t)}var UH=me(GH,"vtkOpenGLSphereMapper"),zH={newInstance:UH,extend:GH};nL("vtkSphereMapper",UH);var WH=n(961),HH=n.n(WH);function KH(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 XH=K;function qH(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",s]).result,a=UL.substitute(a,"//VTK::Normal::Impl","").result,t.haveSeenDepthRequest&&(a=UL.substitute(a,"//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=a,n.replaceShaderValues(e,r,i)},e.setMapperShaderParameters=function(e,r,i){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)||XH("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)||XH("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)||XH("Error setting 'radiusMC' in shader VAO."))),n.setMapperShaderParameters(e,r,i)},e.setCameraShaderParameters=function(e,n,r){var i=e.getProgram(),o=n.getActiveCamera(),a=t.openGLCamera.getKeyMatrices(n);if(i.isUniformUsed("VCPCMatrix")&&i.setUniformMatrix("VCPCMatrix",a.vcpc),r.getIsIdentity())i.isUniformUsed("MCVCMatrix")&&i.setUniformMatrix("MCVCMatrix",a.wcvc),i.isUniformUsed("normalMatrix")&&i.setUniformMatrix3x3("normalMatrix",a.normalMatrix);else{var s=t.openGLActor.getKeyMatrices();if(i.isUniformUsed("MCVCMatrix")){var l=new Float64Array(16);qo(l,a.wcvc,s.mcwc),i.setUniformMatrix("MCVCMatrix",l)}if(i.isUniformUsed("normalMatrix")){var u=new Float64Array(9);Ua(u,a.normalMatrix,s.normalMatrix),i.setUniformMatrix3x3("normalMatrix",u)}}i.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 i=t.renderable.getColorMapColors(),o=t.primitives[t.primTypes.Tris].getCABO(),a=r.getPointData(),s=r.getPoints(),l=s.getNumberOfPoints(),u=s.getData();4;var c=null,d=0;o.setColorBOStride(4),o.getColorBO()||o.setColorBO(rW.newInstance()),o.getColorBO().setOpenGLRenderWindow(t.openGLRenderWindow),i&&(d=i.getNumberOfComponents(),o.setColorOffset(4),c=i.getData(),o.setColorBOStride(8)),o.setColorComponents(d),o.setStride(28);var p=new Float32Array(7*l*12),f=new Uint8Array(12*l*(c?8:4)),h=null,m=null;null!=t.renderable.getScaleArray()&&a.hasArray(t.renderable.getScaleArray())&&(h=a.getArray(t.renderable.getScaleArray()).getData()),null!=t.renderable.getOrientationArray()&&a.hasArray(t.renderable.getOrientationArray())?m=a.getArray(t.renderable.getOrientationArray()).getData():XH(["Error setting orientationArray.\n","You have to specify the stick orientation"]);for(var g=[0,1,3,0,3,2,2,3,5,2,5,4],v=0,y=0,b=0,w=0,x=0;x=4?255:0,f[w++]=g[A]>=2?255:0,f[w++]=255,y=x*d,c&&(f[w++]=c[y],f[w++]=c[y+1],f[w++]=c[y+2],f[w++]=c[y+3])}o.setElementCount(b/7),o.upload(p,Yz.ARRAY_BUFFER),o.getColorBO().upload(f,Yz.ARRAY_BUFFER),t.VBOBuildTime.modified()}}}var YH={};function ZH(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,YH,n),HW.extend(e,t,n),qH(e,t)}var JH=me(ZH,"vtkOpenGLStickMapper"),QH={newInstance:JH,extend:ZH};function $H(e,t){t.classHierarchy.push("vtkOpenGLVolume"),e.buildPass=function(n){t.renderable&&t.renderable.getVisibility()&&n&&(t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer"),t.context=t.openGLRenderWindow.getContext(),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.getNestedVisibility()&&(!t.openGLRenderer.getSelector()||t.renderable.getNestedPickable())&&(e.apply(n,!0),t.children[0].traverse(n),e.apply(n,!1))},e.volumePass=function(e){t.renderable&&t.renderable.getVisibility()&&t.context.depthMask(!e)},e.getKeyMatrices=function(){return t.renderable.getMTime()>t.keyMatrixTime.getMTime()&&(t.renderable.computeMatrix(),jo(t.MCWCMatrix,t.renderable.getMatrix()),Wo(t.MCWCMatrix,t.MCWCMatrix),t.renderable.getIsIdentity()?Ba(t.normalMatrix):(ka(t.normalMatrix,t.MCWCMatrix),Va(t.normalMatrix,t.normalMatrix)),t.keyMatrixTime.modified()),{mcwc:t.MCWCMatrix,normalMatrix:t.normalMatrix}}}nL("vtkStickMapper",JH);var eK={};function tK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eK,n),ZB.extend(e,t,n),t.keyMatrixTime={},re(t.keyMatrixTime,{mtime:0}),t.normalMatrix=new Float64Array(9),t.MCWCMatrix=new Float64Array(16),le(e,t,["context"]),$H(e,t)}var nK=me(tK,"vtkOpenGLVolume"),rK={newInstance:nK,extend:tK};nL("vtkVolume",nK);var iK=n(123),oK=n.n(iK),aK=n(115),sK=n.n(aK);function lK(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 uK=X,cK=K;function dK(e,t){t.classHierarchy.push("vtkOpenGLVolumeMapper"),e.buildPass=function(){t.zBufferTexture=null},e.opaqueZBufferPass=function(e,n){if(e){var r=n.getZBufferTexture();r!==t.zBufferTexture&&(t.zBufferTexture=r)}},e.volumePass=function(n,r){if(n){t.openGLRenderWindow=e.getFirstAncestorOfType("vtkOpenGLRenderWindow"),t.context=t.openGLRenderWindow.getContext(),t.tris.setOpenGLRenderWindow(t.openGLRenderWindow),t.jitterTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.framebuffer.setOpenGLRenderWindow(t.openGLRenderWindow),t.scalarTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.colorTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.opacityTexture.setOpenGLRenderWindow(t.openGLRenderWindow),t.openGLVolume=e.getFirstAncestorOfType("vtkOpenGLVolume");var i=t.openGLVolume.getRenderable();t.openGLRenderer=e.getFirstAncestorOfType("vtkOpenGLRenderer");var o=t.openGLRenderer.getRenderable();t.openGLCamera=t.openGLRenderer.getViewNodeFor(o.getActiveCamera()),e.renderPiece(o,i)}},e.buildShaders=function(t,n,r){e.getShaderTemplate(t,n,r),e.replaceShaderValues(t,n,r)},e.getShaderTemplate=function(e,t,n){e.Vertex=oK(),e.Fragment=sK(),e.Geometry=""},e.replaceShaderValues=function(n,r,i){var o=n.Fragment;i.getProperty().getInterpolationType()===eE.LINEAR&&(o=UL.substitute(o,"//VTK::TrilinearOn","#define vtkTrilinearOn").result),!0===i.getProperty().getUseLabelOutline()&&(o=UL.substitute(o,"//VTK::ImageLabelOutlineOn","#define vtkImageLabelOutlineOn").result);var a=t.scalarTexture.getComponents();o=UL.substitute(o,"//VTK::NumComponents","#define vtkNumComponents ".concat(a)).result;var s=i.getProperty().getIndependentComponents();if(s){o=UL.substitute(o,"//VTK::IndependentComponentsOn","#define vtkIndependentComponentsOn").result;for(var l=[],u=0;u0&&(o=UL.substitute(o,"//VTK::vtkProportionalComponents",l.join("\n")).result)}var c=t.currentInput.getExtent(),d=t.currentInput.getSpacing(),p=new Float64Array(3);Xi(p,(c[1]-c[0])*d[0],(c[3]-c[2])*d[1],(c[5]-c[4])*d[2]);var f=Wi(p)/t.renderable.getSampleDistance();o=UL.substitute(o,"//VTK::MaximumSamplesValue","".concat(Math.ceil(f))).result,o=UL.substitute(o,"//VTK::LightComplexity","#define vtkLightComplexity ".concat(t.lastLightComplexity)).result,t.gopacity=i.getProperty().getUseGradientOpacity(0);for(var h=1;s&&!t.gopacity&&h0&&(i=UL.substitute(i,"//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,i=UL.substitute(i,"//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=i},e.replaceShaderClippingPlane=function(e,n,r){var i=e.Fragment;if(t.renderable.getClippingPlanes().length>0){var o=t.renderable.getClippingPlanes().length;i=UL.substitute(i,"//VTK::ClipPlane::Dec",["uniform vec3 vClipPlaneNormals[6];","uniform float vClipPlaneDistances[6];","//VTK::ClipPlane::Dec"],!1).result,i=UL.substitute(i,"//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=i},e.getNeedToRebuildShaders=function(n,r,i){var o=0;i.getProperty().getShade()&&t.renderable.getBlendMode()===FE.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 a=!1;t.lastLightComplexity!==o&&(t.lastLightComplexity=o,a=!0);var s=t.scalarTexture.getComponents(),l=i.getProperty().getIndependentComponents(),u=!1,c=[];if(l){for(var d=0;d0&&(u=!0)}var p=t.currentInput.getExtent(),f=t.currentInput.getSpacing(),h=new Float64Array(3);Xi(h,(p[1]-p[0])*f[0],(p[3]-p[2])*f[1],(p[5]-p[4])*f[2]);var g=Wi(h)/t.renderable.getSampleDistance(),v={interpolationType:i.getProperty().getInterpolationType(),useLabelOutline:i.getProperty().getUseLabelOutline(),numComp:s,usesProportionalComponents:u,iComps:l,maxSamples:g,useGradientOpacity:i.getProperty().getUseGradientOpacity(0),blendMode:t.renderable.getBlendMode(),proportionalComponents:c};return t.previousState&&t.previousState.interpolationType===v.interpolationType&&t.previousState.useLabelOutline===v.useLabelOutline&&t.previousState.numComp===v.numComp&&t.previousState.usesProportionalComponents===v.usesProportionalComponents&&t.previousState.iComps===v.iComps&&t.previousState.maxSamples===v.maxSamples&&t.previousState.useGradientOpacity===v.useGradientOpacity&&t.previousState.blendMode===v.blendMode&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;nn.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)||cK("Error setting vertexDC in shader VAO.")),n.getAttributeUpdateTime().modified()),o.setUniformi("texture1",t.scalarTexture.getTextureUnit()),o.setUniformf("sampleDistance",t.renderable.getSampleDistance());for(var a=t.scalarTexture.getVolumeInfo(),s=t.renderable.getIpScalarRange(),l=[],u=[],c=0;c<4;c++)l[c]=s[0]*a.dataComputedScale[c]+a.dataComputedOffset[c],u[c]=s[1]*a.dataComputedScale[c]+a.dataComputedOffset[c],l[c]=(l[c]-a.offset[c])/a.scale[c],u[c]=(u[c]-a.offset[c])/a.scale[c];if(o.setUniform4f("ipScalarRangeMin",l[0],l[1],l[2],l[3]),o.setUniform4f("ipScalarRangeMax",u[0],u[1],u[2],u[3]),null!==t.zBufferTexture){o.setUniformi("zBufferTexture",t.zBufferTexture.getTextureUnit());var d=e.getRenderTargetSize();o.setUniformf("vpWidth",d[0]),o.setUniformf("vpHeight",d[1])}},e.setCameraShaderParameters=function(n,r,i){var o=t.openGLCamera.getKeyMatrices(r),a=t.openGLVolume.getKeyMatrices();qo(t.modelToView,o.wcvc,a.mcwc);var s=n.getProgram(),l=t.openGLCamera.getRenderable(),u=l.getClippingRange();s.setUniformf("camThick",u[1]-u[0]),s.setUniformf("camNear",u[0]),s.setUniformf("camFar",u[1]);for(var c=t.currentInput.getBounds(),d=t.currentInput.getDimensions(),p=new Float64Array(3),f=new Float64Array(3),h=1,m=-1,g=1,v=-1,y=0;y<8;++y){if(Xi(p,c[y%2],c[2+Math.floor(y/2)%2],c[4+Math.floor(y/4)]),yo(p,p,t.modelToView),!l.getParallelProjection())co(f,p),ro(p,f,-u[0]/p[2]);yo(p,p,o.vcpc),h=Math.min(p[0],h),m=Math.max(p[0],m),g=Math.min(p[1],g),v=Math.max(p[1],v)}s.setUniformf("dcxmin",h),s.setUniformf("dcxmax",m),s.setUniformf("dcymin",g),s.setUniformf("dcymax",v),s.isUniformUsed("cameraParallel")&&s.setUniformi("cameraParallel",l.getParallelProjection());var b=t.currentInput.getExtent(),w=t.currentInput.getSpacing(),x=new Float64Array(3);Xi(x,(b[1]-b[0]+1)*w[0],(b[3]-b[2]+1)*w[1],(b[5]-b[4]+1)*w[2]),s.setUniform3f("vSpacing",w[0],w[1],w[2]),Xi(p,b[0],b[2],b[4]),t.currentInput.indexToWorldVec3(p,p),yo(p,p,t.modelToView),s.setUniform3f("vOriginVC",p[0],p[1],p[2]);var S=t.currentInput.getIndexToWorld();qo(t.idxToView,t.modelToView,S),Ua(t.idxNormalMatrix,o.normalMatrix,a.normalMatrix),Ua(t.idxNormalMatrix,t.idxNormalMatrix,t.currentInput.getDirection());var C=Wi(x)/t.renderable.getSampleDistance();C>t.renderable.getMaximumSamplesPerRay()&&uK("The number of steps required ".concat(Math.ceil(C)," 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 A=new Float64Array(3);if(Xi(A,1,1,1),Ji(A,A,x),s.setUniform3f("vVCToIJK",A[0],A[1],A[2]),s.setUniform3i("volumeDimensions",d[0],d[1],d[2]),!t.openGLRenderWindow.getWebgl2()){var P=t.scalarTexture.getVolumeInfo();s.setUniformf("texWidth",t.scalarTexture.getWidth()),s.setUniformf("texHeight",t.scalarTexture.getHeight()),s.setUniformi("xreps",P.xreps),s.setUniformi("xstride",P.xstride),s.setUniformi("ystride",P.ystride)}for(var _=new Float64Array(3),O=new Float64Array(3),T=0;T<6;++T){switch(T){default:Xi(_,1,0,0),Xi(O,b[1],b[3],b[5]);break;case 1:Xi(_,-1,0,0),Xi(O,b[0],b[2],b[4]);break;case 2:Xi(_,0,1,0),Xi(O,b[1],b[3],b[5]);break;case 3:Xi(_,0,-1,0),Xi(O,b[0],b[2],b[4]);break;case 4:Xi(_,0,0,1),Xi(O,b[1],b[3],b[5]);break;case 5:Xi(_,0,0,-1),Xi(O,b[0],b[2],b[4])}bo(_,_,t.idxNormalMatrix),yo(O,O,t.idxToView);var D=-1*po(O,_);if(s.setUniform3f("vPlaneNormal".concat(T),_[0],_[1],_[2]),s.setUniformf("vPlaneDistance".concat(T),D),i.getProperty().getUseLabelOutline()){var E=t.currentInput.getWorldToIndex();s.setUniformMatrix("vWCtoIDX",E),Ho(t.projectionToWorld,o.wcpc),s.setUniformMatrix("PCWCMatrix",t.projectionToWorld);var I=e.getRenderTargetSize();s.setUniformf("vpWidth",I[0]),s.setUniformf("vpHeight",I[1])}}switch(Ho(t.projectionToView,o.vcpc),s.setUniformMatrix("PCVCMatrix",t.projectionToView),t.lastLightComplexity){default:break;case 1:case 2:case 3:var k=0,M=[];r.getLights().forEach((function(e){if(e.getSwitch()>0){var t=e.getColor(),n=e.getIntensity();M[0]=t[0]*n,M[1]=t[1]*n,M[2]=t[2]*n,s.setUniform3fArray("lightColor".concat(k),M);var r=e.getDirection();Xi(_,r[0],r[1],r[2]),bo(_,_,o.normalMatrix),s.setUniform3f("lightDirectionVC".concat(k),_[0],_[1],_[2]);var i=[-.5*_[0],-.5*_[1],-.5*(_[2]-1)];s.setUniform3fArray("lightHalfAngleVC".concat(k),i),k++}}))}},e.setPropertyShaderParameters=function(e,n,r){var i=e.getProgram();i.setUniformi("ctexture",t.colorTexture.getTextureUnit()),i.setUniformi("otexture",t.opacityTexture.getTextureUnit()),i.setUniformi("jtexture",t.jitterTexture.getTextureUnit());var o=t.scalarTexture.getVolumeInfo(),a=r.getProperty(),s=t.scalarTexture.getComponents(),l=r.getProperty().getIndependentComponents();if(l&&s>=2)for(var u=0;u0&&(i.setUniformf("vAmbient",a.getAmbient()),i.setUniformf("vDiffuse",a.getDiffuse()),i.setUniformf("vSpecular",a.getSpecular()),i.setUniformf("vSpecularPower",a.getSpecularPower()))},e.getClippingPlaneShaderParameters=function(e,n,r){if(t.renderable.getClippingPlanes().length>0){for(var i=t.openGLCamera.getKeyMatrices(n),o=[],a=[],s=t.renderable.getClippingPlanes(),l=s.length,u=0;u1.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 i=n.getVTKWindow().getInteractor(),o=i.getLastFrameTime();if(t.avgFrameTime=.97*t.avgFrameTime+.03*o,t.avgWindowArea=.97*t.avgWindowArea+.03/(t.lastXYF*t.lastXYF),n.getVTKWindow().getInteractor().isAnimating()){var a=Math.sqrt(t.avgFrameTime*i.getDesiredUpdateRate()/t.avgWindowArea);a>10&&(a=10),t.targetXYF=a}else t.targetXYF=Math.sqrt(t.avgFrameTime*i.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 s=t.lastXYF,l=t.openGLRenderWindow.getFramebufferSize();if(s>1.43){if(t.framebuffer.saveCurrentBindingsAndBuffers(),null===t.framebuffer.getGLFramebuffer())t.framebuffer.create(Math.floor(.7*l[0]),Math.floor(.7*l[1])),t.framebuffer.populateFramebuffer();else{var u=t.framebuffer.getSize();u[0]===Math.floor(.7*l[0])&&u[1]===Math.floor(.7*l[1])||(t.framebuffer.create(Math.floor(.7*l[0]),Math.floor(.7*l[1])),t.framebuffer.populateFramebuffer())}t.framebuffer.bind();var c=t.context;c.clearColor(0,0,0,0),c.colorMask(!0,!0,!0,!0),c.clear(c.COLOR_BUFFER_BIT),c.viewport(0,0,l[0]/s,l[1]/s),t.fvp=[Math.floor(l[0]/s)/Math.floor(.7*l[0]),Math.floor(l[1]/s)/Math.floor(.7*l[1])]}t.context.disable(t.context.DEPTH_TEST),e.updateBufferObjects(n,r),r.getProperty().getInterpolationType()===eE.NEAREST?(t.scalarTexture.setMinificationFilter(WB.NEAREST),t.scalarTexture.setMagnificationFilter(WB.NEAREST)):(t.scalarTexture.setMinificationFilter(WB.LINEAR),t.scalarTexture.setMagnificationFilter(WB.LINEAR)),t.lastBoundBO=null,null!==t.zBufferTexture&&t.zBufferTexture.activate()},e.renderPieceDraw=function(n,r){var i=t.context;t.scalarTexture.activate(),t.opacityTexture.activate(),t.colorTexture.activate(),t.jitterTexture.activate(),e.updateShaders(t.tris,n,r),i.drawArrays(i.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=vW.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)||cK("Error setting vertexDC in copy shader VAO.")}else t.openGLRenderWindow.getShaderCache().readyShaderProgram(t.copyShader);var i=t.openGLRenderWindow.getFramebufferSize();t.context.viewport(0,0,i[0],i[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 a=t.context;a.blendFuncSeparate(a.ONE,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.ONE_MINUS_SRC_ALPHA),t.context.drawArrays(t.context.TRIANGLES,0,t.tris.getCABO().getElementCount()),o.deactivate(),a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.ONE,a.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)):cK("No input!")},e.computeBounds=function(n,r){e.getInput()?t.bounds=e.getInput().getBounds():hn(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,E[3*I+2]=-1;var k=new Uint16Array(8);k[0]=3,k[1]=0,k[2]=1,k[3]=3,k[4]=3,k[5]=0,k[6]=3,k[7]=2;var M=Jn.newInstance({numberOfComponents:3,values:E});M.setName("points");var N=Jn.newInstance({numberOfComponents:1,values:k});t.tris.getCABO().createVBO(N,"polys",wv.SURFACE,{points:M,cellOffset:0})}t.VBOBuildTime.modified()}}}}var pK={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 fK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pK,n),ZB.extend(e,t,n),t.VBOBuildTime={},re(t.VBOBuildTime,{mtime:0}),t.tris=xW.newInstance(),t.scalarTexture=yL.newInstance(),t.opacityTexture=yL.newInstance(),t.colorTexture=yL.newInstance(),t.jitterTexture=yL.newInstance(),t.jitterTexture.setWrapS(zB.REPEAT),t.jitterTexture.setWrapT(zB.REPEAT),t.framebuffer=SL.newInstance(),t.idxToView=zo(new Float64Array(16)),t.idxNormalMatrix=Ba(new Float64Array(9)),t.modelToView=zo(new Float64Array(16)),t.projectionToView=zo(new Float64Array(16)),t.projectionToWorld=zo(new Float64Array(16)),le(e,t,["context"]),dK(e,t)}var hK=me(fK,"vtkOpenGLVolumeMapper"),mK={newInstance:hK,extend:fK};nL("vtkVolumeMapper",hK);var gK={Core:BB,Misc:Lz,OpenGL:{vtkActor:zz,vtkActor2D:qz,vtkBufferObject:rW,vtkCamera:lW,vtkCellArrayBufferObject:fW,vtkConvolution2DPass:_W,vtkForwardPass:EL,vtkFramebuffer:SL,vtkGlyph3DMapper:rH,vtkHardwareSelector:yV,vtkHelper:xW,vtkImageMapper:dH,vtkImageSlice:gH,vtkPixelSpaceCallbackMapper:SH,vtkPolyDataMapper:HW,vtkRenderer:TH,vtkRenderWindow:kV,vtkShader:BL,vtkShaderCache:XL,vtkShaderProgram:UL,vtkSkybox:NH,vtkSphereMapper:zH,vtkStickMapper:QH,vtkTexture:yL,vtkTextureUnitManager:nV,vtkVertexArrayObject:vW,vtkViewNodeFactory:aL,vtkVolume:rK,vtkVolumeMapper:mK},SceneGraph:{vtkRenderPass:_L,vtkRenderWindowViewNode:JL,vtkViewNode:ZB,vtkViewNodeFactory:eL},WebGPU:{vtkRenderWindow:AU}};function vK(e,t){function n(){if(t.input)for(var e=0;e2&&void 0!==arguments[2]?arguments[2]:-1,o=e.getDataArray(n,r),a=o.getRange(i);t.proxyManager.rescaleTransferFunctionToDataRange(n,a)},e.isVisible=function(){return t.actors.length?t.actors[0].getVisibility():!!t.volumes.length&&t.volumes[0].getVisibility()},e.setVisibility=function(n){for(var r=0,i=t.actors.length;i--;)r+=t.actors[i].setVisibility(n);for(i=t.volumes.length;i--;)r+=t.volumes[i].setVisibility(n);r&&e.modified()},e.setColorBy=function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,o=cy.ColorMode.DEFAULT,a=cy.ScalarMode.DEFAULT,s=n,l=e.getDataArray(n,r),u=!!l,c=n?e.getLookupTableProxy(n).getLookupTable():null;c&&(-1===i?c.setVectorModeToMagnitude():(c.setVectorModeToComponent(),c.setVectorComponent(i))),u&&(o=cy.ColorMode.MAP_SCALARS,a="pointData"===r?cy.ScalarMode.USE_POINT_FIELD_DATA:cy.ScalarMode.USE_CELL_FIELD_DATA,t.mapper.setLookupTable&&t.mapper.setLookupTable(c),t.rescaleOnColorBy&&e.rescaleTransferFunctionToDataRange(n,r,i)),t.mapper.set({colorByArrayName:s,colorMode:o,scalarMode:a,scalarVisibility:u},!0)},e.getColorBy=function(){if(!t.mapper.getColorByArrayName){var n=e.getInputDataSet();return n.getPointData().getScalars()?[n.getPointData().getScalars().getName(),"pointData",-1]:n.getCellData().getScalars()?[n.getCellData().getScalars().getName(),"cellData",-1]:n.getPointData().getNumberOfArrays()?[n.getPointData().getArrayByIndex(0).getName(),"pointData",-1]:n.getCellData().getNumberOfArrays()?[n.getCellData().getArrayByIndex(0).getName(),"cellData",-1]:[]}var r=[],i=t.mapper.get("colorByArrayName","colorMode","scalarMode","scalarVisibility"),o=i.colorByArrayName,a=i.colorMode,s=i.scalarMode;if(i.scalarVisibility&&o&&(r.push(o),r.push(s===cy.ScalarMode.USE_POINT_FIELD_DATA?"pointData":"cellData")),a===cy.ColorMode.MAP_SCALARS&&o){var l=e.getLookupTableProxy(o).getLookupTable(),u=l.getVectorMode()===Is.VectorMode.MAGNITUDE?-1:l.getVectorComponent();r.push(u)}return r},e.listDataArrays=function(){var n=[];if(!t.input)return n;for(var r=e.getInputDataSet(),i=r.getPointData(),o=i.getNumberOfArrays(),a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,yK,n),hv.extend(e,t,n),le(e,t,["rescaleOnColorBy"]),ie(e,t,["input","mapper","actors","volumes"]),vK(e,t),Se(e,t)}},wK={Preset:0,RGBPoints:1,HSVPoints:2,Nodes:3},xK={Preset:"Cool to Warm",RGBPoints:[[0,0,0,0],[1,1,1,1]],HSVPoints:[[0,0,0,0],[1,0,0,1]],Nodes:[{x:0,r:0,g:0,b:0,midpoint:.5,sharpness:0},{x:1,r:1,g:1,b:1,midpoint:.5,sharpness:0}]};function SK(e,t){t.classHierarchy.push("vtkLookupTableProxy"),t.lookupTable=t.lookupTable||$D.newInstance(),t.lookupTable.setVectorModeToMagnitude(),e.setPresetName=function(n){t.presetName!==n&&(t.presetName=n,t.mode=wK.Preset,e.applyMode())},e.setRGBPoints=function(n){t.rgbPoints!==n&&(t.rgbPoints=(n||xK.RGBPoints).slice(),e.applyMode())},e.setHSVPoints=function(n){t.hsvPoints!==n&&(t.hsvPoints=(n||xK.HSVPoints).slice(),e.applyMode())},e.setNodes=function(n){t.nodes!==n&&(t.nodes=(n||xK.Nodes).slice(),e.applyMode())},e.setMode=function(n){t.mode!==n&&(t.mode=n,e.applyMode())},e.applyMode=function(){switch(t.mode){case wK.Preset:var n=uN.getPresetByName(t.presetName);n&&t.lookupTable.applyColorMap(n);break;case wK.RGBPoints:t.lookupTable.removeAllPoints(),t.rgbPoints.forEach((function(e){var n;return(n=t.lookupTable).addRGBPointLong.apply(n,w(e))}));break;case wK.HSVPoints:t.lookupTable.removeAllPoints(),t.hsvPoints.forEach((function(e){var n;return(n=t.lookupTable).addHSVPointLong.apply(n,w(e))}));break;case wK.Nodes:t.lookupTable.setNodes(t.nodes)}t.lookupTable.setMappingRange(t.dataRange[0],t.dataRange[1]),t.lookupTable.updateRange(),e.modified()},e.setDataRange=function(n,r){t.dataRange[0]===n&&t.dataRange[1]===r||(t.dataRange[0]=n,t.dataRange[1]=r,t.lookupTable.setMappingRange(t.dataRange[0],t.dataRange[1]),t.lookupTable.updateRange(),e.applyMode())},e.applyMode()}var CK={mode:wK.Preset,presetName:xK.Preset,rgbPoints:xK.RGBPoints,hsvPoints:xK.HSVPoints,nodes:xK.Nodes,arrayName:"No array associated",arrayLocation:"pointData",dataRange:[0,1]};function AK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,CK,n),Ae.obj(e,t),Ae.setGet(e,t,["arrayName"]),Ae.get(e,t,["mode","lookupTable","presetName","rgbPoints","hsvPoints","nodes","dataRange"]),SK(e,t),Ae.proxy(e,t)}var PK={newInstance:Ae.newInstance(AK,"vtkLookupTableProxy"),extend:AK,Mode:wK,Defaults:xK};function _K(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 OK(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kK,n),Ae.obj(e,t),Ae.setGet(e,t,["arrayName"]),Ae.get(e,t,["piecewiseFunction","gaussians","nodes","points","mode","dataRange"]),IK(e,t),Ae.proxy(e,t)}var NK={newInstance:Ae.newInstance(MK,"vtkPiecewiseFunctionProxy"),extend:MK,Mode:TK,Defaults:DK};function RK(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 FK(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,i){var o={},a={},s={},l=n.datasetHandler||T,u=[];t.sources.forEach((function(t){var n=t.id,r=t.group,i=t.name,a=t.props;u.push(Promise.resolve(l(a.dataset)).then((function(t){if(t){var s=e.createProxy(r,i);return s.setName(a.name),s.setInputData(t,a.type),o[n]=s,s}return null})))})),Promise.all(u).then((function(){var n=e.getViews();function i(e){o[e]&&s[e]&&o[e].resetOrientation().then((function(){o[e].getCamera().set(s[e]),o[e].getRenderer().updateLightsGeometryToFollowCamera(),o[e].renderLater()}))}t.views.forEach((function(r){var i=r.id,a=r.group,l=r.name,u=r.props,c=r.camera,d=null;t.options.recycleViews&&(d=n.find((function(e){return e.getProxyGroup()===a&&e.getProxyName()===l&&e.getName()===u.name}))),d?d.setDisableAnimation(!0):d=e.createProxy(a,l,{disableAnimation:!0}),d.set(u,!0),o[i]=d,s[i]=c})),t.representations.forEach((function(t){var n=t.source,r=t.view,a=t.props;e.getRepresentation(o[n],o[r]).set(a,!0),i(r)})),Object.keys(t.fields).forEach((function(n){var r=t.fields[n],i=r.lookupTable,o=r.piecewiseFunction,a=e.getLookupTable(n,i);a.setPresetName(i.presetName),a.setDataRange.apply(a,w(i.dataRange));var s=e.getPiecewiseFunction(n,o);switch(o.mode){case NK.Mode.Gaussians:s.setGaussians(o.gaussians);break;case NK.Mode.Points:s.setPoints(o.points);break;case NK.Mode.Nodes:s.setNodes(o.nodes)}s.setMode(o.mode),s.setDataRange.apply(s,w(o.dataRange))})),Object.keys(s).forEach(i),Object.keys(o).forEach((function(e){var t=o[e].getProxyId();a[e]=t})),t.views.forEach((function(e){var t=e.id;o[t].setDisableAnimation(!1)})),r(jK(jK({},t.userData),{},{$oldToNewIdMapping:a}))})).catch(i)}))},e.saveState=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,i){var o=e.getSources(),a=e.getViews(),s=t.datasetHandler||function(e){return e.getState()};delete t.datasetHandler;var l=[],u=new Set,c={userData:n,options:t,sources:[],views:[],representations:[],fields:{}};o.forEach((function(e){var t=Promise.resolve(s(e.getDataset(),e));l.push(t),c.sources.push({id:e.getProxyId(),group:e.getProxyGroup(),name:e.getProxyName(),props:{name:e.getName(),type:e.getType(),dataset:t}})})),a.forEach((function(e){var t=e.getCamera().get("position","viewUp","focalPoint");c.views.push({id:e.getProxyId(),group:e.getProxyGroup(),name:e.getProxyName(),props:Object.assign(GK(e),e.get("axis","orientation","viewUp")),camera:t}),e.getRepresentations().forEach((function(t){c.representations.push({source:t.getInput().getProxyId(),view:e.getProxyId(),props:GK(t)}),u.add(t.getColorBy()[0])}))})),u.forEach((function(t){c.fields[t]={lookupTable:e.getLookupTable(t).get("mode","presetName","rgbPoints","hsvPoints","nodes","arrayName","arrayLocation","dataRange"),piecewiseFunction:e.getPiecewiseFunction(t).get("mode","gaussians","points","nodes","arrayName","arrayLocation","dataRange")}})),Promise.all(l).then((function(){for(var e=function(e){c.sources[e].props.dataset.then((function(t){c.sources[e].props.dataset=t}))},t=0;t0&&void 0!==arguments[0]&&arguments[0],n=e.getViews(),r=0;r0&&void 0!==arguments[0]&&arguments[0],n=e.getViews().filter((function(e){return!t||e.getContainer()})),r=0;r0&&void 0!==arguments[0]?arguments[0]:250;if(!t.animating){t.animating=!0;for(var i=e.getViews().filter((function(e){return e.getContainer()})),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,{proxyIdMapping:{},proxyByGroup:{},proxyConfiguration:{},sv2rMapping:{},r2svMapping:{},collapseState:{},lookupTables:{},piecewiseFunctions:{},animating:!1},n),Ae.obj(e,t),Ae.setGet(e,t,["proxyConfiguration","activeSource","activeView"]),Ae.event(e,t,"ActiveSourceChange"),Ae.event(e,t,"ActiveViewChange"),Ae.event(e,t,"ProxyRegistrationChange"),LK(e,t),UK(e),zK(e,t),KK(e,t),Ae.proxy(e,t),t.classHierarchy.push("vtkProxyManager")}var qK={newInstance:Ae.newInstance(XK,"vtkProxyManager"),extend:XK};function YK(e,t){t.classHierarchy.push("vtkSourceProxy"),e.setInputProxy=function(n){t.inputSubscription&&(t.inputSubscription(),t.inputSubscription=null),t.inputProxy=n,t.inputProxy&&(t.inputSubscription=n.onModified(e.update,-1).unsubscribe),e.update()},e.setInputData=function(n,r){t.dataset!==n&&(t.dataset=n,t.type=r||n.getClassName(),e.modified(),e.invokeDatasetChange())},e.setInputAlgorithm=function(n,r){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.type=r,t.algo!==n&&(t.algo=n,t.algoSubscription&&(t.algoSubscription(),t.algoSubscription=null),n&&i&&(t.algoSubscription=n.onModified((function(){e.update()}),-1).unsubscribe,e.update()))},e.update=function(){t.algo&&t.inputProxy&&t.algo.setInputData(t.inputProxy.getDataset()),t.updateDomain&&t.inputProxy&&t.updateDomain(e,t.inputProxy.getDataset()),t.algo&&e.setInputData(t.algo.getOutputData(),t.type)},e.getUpdate=function(){return t.algo.getMTime()>t.dataset.getMTime()},e.delete=Ae.chain((function(){t.algoSubscription&&(t.algoSubscription(),t.algoSubscription=null),t.inputSubscription&&(t.inputSubscription(),t.inputSubscription=null)}),e.delete),t.inputProxy&&(t.inputSubscription=t.inputProxy.onModified((function(){e.update()}),-1).unsubscribe),t.algoFactory&&e.setInputAlgorithm(t.algoFactory.newInstance(),null,t.autoUpdate),e.update()}var ZK={name:"Default source"};function JK(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZK,n),Ae.obj(e,t),Ae.get(e,t,["name","type","dataset","algo","inputProxy"]),Ae.set(e,t,["name"]),Ae.event(e,t,"DatasetChange"),Ae.proxy(e,t),YK(e,t),t.proxyPropertyMapping&&Ae.proxyPropertyMapping(e,t,t.proxyPropertyMapping)}var QK={newInstance:Ae.newInstance(JK,"vtkSourceProxy"),extend:JK};function $K(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var eX={slice:wb.vtkMouseCameraSliceManipulator,multiRotate:wb.vtkMouseCameraTrackballMultiRotateManipulator,pan:wb.vtkMouseCameraTrackballPanManipulator,roll:wb.vtkMouseCameraTrackballRollManipulator,rotate:wb.vtkMouseCameraTrackballRotateManipulator,axisRotate:wb.vtkMouseCameraAxisRotateManipulator,zoom:wb.vtkMouseCameraTrackballZoomManipulator,zoomToMouse:wb.vtkMouseCameraTrackballZoomToMouseManipulator,range:wb.vtkMouseRangeManipulator,vrPan:wb.vtkVRButtonPanManipulator,gestureCamera:wb.vtkGestureCameraManipulator,movement:wb.vtkKeyboardCameraManipulator,freeLook:wb.vtkMouseCameraTrackballFirstPersonManipulator,unicam:wb.vtkMouseCameraUnicamManipulator,unicamRotate:wb.vtkMouseCameraUnicamRotateManipulator},tX={"3D":[{type:"rotate"},{type:"pan",options:{shift:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}},{type:"roll",options:{shift:!0,control:!0}},{type:"roll",options:{shift:!0,alt:!0}},{type:"roll",options:{shift:!0,button:3}},{type:"vrPan"},{type:"gestureCamera"}],"2D":[{type:"pan",options:{shift:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{button:3}},{type:"roll",options:{shift:!0,alt:!0}},{type:"roll",options:{shift:!0,button:3}},{type:"roll",options:{shift:!0}},{type:"vrPan"},{type:"gestureCamera"}],FirstPerson:[{type:"movement"},{type:"freeLook"}],Unicam:[{type:"unicam"}],zRotateTop:[{type:"pan",options:{shift:!0}},{type:"axisRotate",options:{rotationAxis:[0,0,1],useHalfAxis:!0}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}}],zRotateAll:[{type:"pan",options:{shift:!0}},{type:"axisRotate",options:{rotationAxis:[0,0,1],useHalfAxis:!1}},{type:"zoom",options:{control:!0}},{type:"zoom",options:{alt:!0}},{type:"zoom",options:{dragEnabled:!1,scrollEnabled:!0}},{type:"zoom",options:{button:3}}]};function nX(e,t){t.removeAllManipulators();for(var n=0;n1.5?"black":"white"}t.classHierarchy.push("vtkViewProxy"),t.renderWindow=sB.newInstance(),t.renderer=lA.newInstance({background:[0,0,0]}),t.renderWindow.addRenderer(t.renderer),t.openglRenderWindow=t.renderWindow.newAPISpecificView(),t.renderWindow.addView(t.openglRenderWindow),t.interactor=Ym.newInstance(),t.interactor.setView(t.openglRenderWindow),t.interactorStyle3D=Pg.newInstance(),t.interactorStyle2D=Pg.newInstance(),rX.applyPreset("3D",t.interactorStyle3D),rX.applyPreset("2D",t.interactorStyle2D),t.cornerAnnotation=yw.newInstance(),t.interactor.setInteractorStyle(t.useParallelRendering?t.interactorStyle2D:t.interactorStyle3D),t.camera=t.renderer.getActiveCamera(),t.camera.setParallelProjection(!!t.useParallelRendering),t.orientationAxesArrow=RN.newInstance(),t.orientationAxesCube=ON.newInstance(),wN.applyPreset("default",t.orientationAxesCube),wN.applyPreset("lps",t.orientationAxesCube),t.orientationAxesMap={arrow:t.orientationAxesArrow,cube:t.orientationAxesCube},t.orientationWidget=vA.newInstance({actor:t.orientationAxesArrow,interactor:t.renderWindow.getInteractor()}),t.orientationWidget.setEnabled(!0),t.orientationWidget.setViewportCorner(vA.Corners.BOTTOM_LEFT),t.orientationWidget.setViewportSize(.1),e.setPresetToInteractor3D=function(e){return Array.isArray(e)?rX.applyDefinitions(e,t.interactorStyle3D):rX.applyPreset(e,t.interactorStyle3D)},e.setPresetToInteractor2D=function(e){return Array.isArray(e)?rX.applyDefinitions(e,t.interactorStyle2D):rX.applyPreset(e,t.interactorStyle2D)},e.setOrientationAxesType=function(n){var r=t.orientationAxesMap[n];r&&(t.orientationAxesType=n,t.orientationWidget.setActor(r),e.renderLater())},e.registerOrientationAxis=function(e,n){t.orientationAxesMap[e]=n},e.unregisterOrientationAxis=function(e){delete t.orientationAxesMap[e]},e.listOrientationAxis=function(){return Object.keys(t.orientationAxesMap)},e.setPresetToOrientationAxes=function(n){var r=!1;return"string"==typeof n?(t.presetToOrientationAxes!==n&&(t.presetToOrientationAxes=n,r=wN.applyPreset(n,t.orientationAxesCube),e.modified()),r):(t.presetToOrientationAxes="Custom",r=wN.applyDefinitions(n,t.orientationAxesCube),e.modified(),r)},e.setContainer=function(e){t.container&&(t.interactor.unbindEvents(t.container),t.openglRenderWindow.setContainer(null),t.cornerAnnotation.setContainer(null)),t.container=e,e&&(t.openglRenderWindow.setContainer(e),t.cornerAnnotation.setContainer(e),t.interactor.initialize(),t.interactor.bindEvents(e))},e.resize=function(){if(t.container){var n=t.container.getBoundingClientRect();if(n.width===n.height&&0===n.width)return;var r=window.devicePixelRatio||1,i=Math.max(10,Math.floor(r*n.width)),o=Math.max(10,Math.floor(r*n.height));t.openglRenderWindow.setSize(i,o),e.invokeResize({width:i,height:o}),e.renderLater()}},e.renderLater=function(){e.render(!1)},e.render=function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.representations.length>0&&t.resetCameraOnFirstRender&&(t.resetCameraOnFirstRender=!1,e.resetCamera()),t.orientationWidget.updateMarkerOrientation(),t.renderer.resetCameraClippingRange(),n?t.renderWindow.render():setTimeout(t.renderWindow.render,0)},e.addRepresentation=function(e){e&&-1===t.representations.indexOf(e)&&(t.representations.push(e),t.renderer.addViewProp(e))},e.removeRepresentation=function(e){e&&(-1!==t.representations.indexOf(e)&&(t.representations=t.representations.filter((function(t){return t!==e})),t.renderer.removeViewProp(e)),0===t.representations.length&&(t.resetCameraOnFirstRender=!0))},e.resetCamera=function(){t.renderer.resetCamera(),t.renderer.resetCameraClippingRange(),t.interactorStyle2D.setCenterOfRotation(t.camera.getFocalPoint()),t.interactorStyle3D.setCenterOfRotation(t.camera.getFocalPoint()),e.renderLater()},e.captureImage=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.format,r=void 0===n?"image/png":n,i=$K(e,iX);return t.renderWindow.captureImages(r,i)[0]},e.openCaptureImage=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"_blank",n=new Image;return e.captureImage().then((function(e){n.src=e;var r=window.open("",t);r.document.write(n.outerHTML),r.document.title="vtk.js Image Capture",window.focus()}))},e.setCornerAnnotation=function(e,n){t.cornerAnnotation.updateTemplates(m({},e,(function(e){return yw.applyTemplate(n,e)})))},e.setCornerAnnotations=function(n){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r?Object.keys(n).forEach((function(t){e.setCornerAnnotation(t,n[t])})):t.cornerAnnotation.updateTemplates(n)},e.updateCornerAnnotation=function(e){return t.cornerAnnotation.updateMetadata(e)},e.setAnnotationOpacity=function(n){t.annotationOpacity!==Number(n)&&(t.annotationOpacity=Number(n),t.cornerAnnotation.getAnnotationContainer().style.opacity=n,e.modified())},e.setBackground=ge(t.renderer.setBackground,n),e.getBackground=t.renderer.getBackground,e.setAnimation=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!t.disableAnimation||!n)if(n)t.renderWindow.getInteractor().requestAnimation(r);else{var i=r===e||0==="".concat(r).indexOf("ViewProxy.moveCamera.");t.renderWindow.getInteractor().cancelAnimation(r,i)}},e.updateOrientation=function(n,r,i){var o,a,s,l,u,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(void 0===n)return Promise.resolve();var d=t.camera.getPosition(),p=t.camera.getViewUp(),f=t.camera.getFocalPoint();t.axis=n,t.orientation=r,t.viewUp=i;var h=t.camera.getFocalPoint();h[t.axis]+=t.orientation,(o=t.camera).setPosition.apply(o,w(h)),(a=t.camera).setViewUp.apply(a,w(i)),t.renderer.resetCamera();var m=t.camera.getFocalPoint(),g=t.camera.getPosition(),v=t.camera.getViewUp();return(s=t.camera).setFocalPoint.apply(s,w(f)),(l=t.camera).setPosition.apply(l,w(d)),(u=t.camera).setViewUp.apply(u,w(p)),e.moveCamera(m,g,v,c)},e.moveCamera=function(n,r,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=t.camera.getFocalPoint(),s=t.camera.getPosition(),l=t.camera.getViewUp(),u=[{focalPoint:n,position:r,viewUp:i}];if(o){var c=[(a[0]-n[0])/o,(a[1]-n[1])/o,(a[2]-n[2])/o],d=[(s[0]-r[0])/o,(s[1]-r[1])/o,(s[2]-r[2])/o],p=[(l[0]-i[0])/o,(l[1]-i[1])/o,(l[2]-i[2])/o],f=c[0]||c[1]||c[2]||d[0]||d[1]||d[2]||p[0]||p[1]||p[2],h=c.map((function(e){return Math.abs(e)0&&void 0!==arguments[0]?arguments[0]:0;return e.updateOrientation(t.axis,t.orientation,t.viewUp,n)},e.rotate=function(e){var n,r=t.camera.get("viewUp","focalPoint","position"),i=r.viewUp,o=r.focalPoint,a=r.position,s=[o[0]-a[0],o[1]-a[1],o[2]-a[2]];Gs.buildFromDegree().rotate(Number.isNaN(e)?90:e,s).apply(i),(n=t.camera).setViewUp.apply(n,w(i)),t.camera.modified(),t.orientationWidget.updateMarkerOrientation(),t.renderWindow.render()},e.focusTo=ge(t.camera.setFocalPoint,t.interactorStyle2D.setCenterOfRotation,t.interactorStyle3D.setCenterOfRotation),e.delete=ge(e.setContainer,t.openglRenderWindow.delete,e.delete),e.resetOrientation(),n()}var sX={representations:[],sectionName:"view",annotationOpacity:1,resetCameraOnFirstRender:!0,presetToOrientationAxes:"lps",orientationAxesType:"arrow",disableAnimation:!1,axis:1,orientation:0,viewUp:[0,0,1]};function lX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sX,n),re(e,t),le(e,t,["name","disableAnimation"]),ie(e,t,["annotationOpacity","camera","container","cornerAnnotation","interactor","interactorStyle2D","interactorStyle3D","openglRenderWindow","orientationAxesType","presetToOrientationAxes","renderer","renderWindow","representations","useParallelRendering"]),he(e,t,"Resize"),aX(e,t),Se(e,t),Ce(e,t,{orientationAxesVisibility:{modelKey:"orientationWidget",property:"enabled"},orientationAxesCorner:{modelKey:"orientationWidget",property:"viewportCorner"},orientationAxesSize:{modelKey:"orientationWidget",property:"viewportSize"},cameraViewUp:{modelKey:"camera",property:"viewUp",modified:!1},cameraPosition:{modelKey:"camera",property:"position",modified:!1},cameraFocalPoint:{modelKey:"camera",property:"focalPoint",modified:!1}})}var uX={newInstance:me(lX,"vtkViewProxy"),extend:lX};function cX(e){return Array.isArray(e)?e.map(cX).join(", "):Number.isInteger(e)?e:Number.isFinite(e)?Math.abs(e)<.01?"0":e.toFixed(2):e}function dX(e,t){t.classHierarchy.push("vtkView2DProxy"),e.updateWidthHeightAnnotation=function(){var n=t.cornerAnnotation.getMetadata(),r=n.ijkOrientation,i=n.dimensions;if(r&&i){var o=i;i.length>3&&(o=i.split(",").map(Number));var a=t.camera.getDirectionOfProjection(),s=t.camera.getViewUp(),l=[0,0,0];ft(a,s,l);var u=Mn(l),c=Mn(s),d=o["IJK".indexOf(r[u])],p=o["IJK".indexOf(r[c])];e.updateCornerAnnotation({sliceWidth:d,sliceHeight:p})}};var n=e.updateOrientation;e.updateOrientation=function(r,i,o){for(var a=n(r,i,o),s=t.representations.length;s--;){var l=t.representations[s],u="XYZ"[r];l.setSlicingMode&&l.setSlicingMode(u)}return e.updateCornerAnnotation({axis:"XYZ"[r]}),a};var r=e.addRepresentation;e.addRepresentation=function(n){r(n),n.setSlicingMode&&(n.setSlicingMode("XYZ"[t.axis]),e.bindRepresentationToManipulator(n))};var i=e.removeRepresentation;function o(n){e.updateCornerAnnotation({windowWidth:n}),t.sliceRepresentation&&t.sliceRepresentation.setWindowWidth&&t.sliceRepresentation.setWindowWidth(n)}function a(n){e.updateCornerAnnotation({windowLevel:n}),t.sliceRepresentation&&t.sliceRepresentation.setWindowLevel&&t.sliceRepresentation.setWindowLevel(n)}function s(n){var r=Number(n),i={slice:Number.isInteger(r)?n:r.toFixed(2)};if(t.sliceRepresentation&&t.sliceRepresentation.setSlice&&t.sliceRepresentation.setSlice(r),t.sliceRepresentation&&t.sliceRepresentation.getAnnotations){var o=t.sliceRepresentation.getAnnotations();Object.keys(o).forEach((function(e){i[e]=cX(o[e])}))}e.updateCornerAnnotation(i)}e.removeRepresentation=function(n){if(i(n),n===t.sliceRepresentation){e.bindRepresentationToManipulator(null);for(var r=t.representations.length;r--;)e.bindRepresentationToManipulator(t.representations[r])&&(r=0)}},t.rangeManipulator=mb.newInstance({button:1,scrollEnabled:!0}),t.interactorStyle2D.addMouseManipulator(t.rangeManipulator),e.bindRepresentationToManipulator=function(n){var r=0;for(t.rangeManipulator.removeAllListeners(),t.sliceRepresentation=n;t.sliceRepresentationSubscriptions.length;)t.sliceRepresentationSubscriptions.pop().unsubscribe();if(n){if(t.sliceRepresentationSubscriptions.push(t.camera.onModified(e.updateWidthHeightAnnotation)),n.getWindowWidth){var i=function(){return o(n.getWindowWidth())},l=n.getPropertyDomainByName("windowWidth"),u=l.min,c=l.max,d=l.step;d&&"any"!==d||(d=1/512),t.rangeManipulator.setVerticalListener(u,c,d,n.getWindowWidth,o),t.sliceRepresentationSubscriptions.push(n.onModified(i)),i(),r++}if(n.getWindowLevel){var p=function(){return a(n.getWindowLevel())},f=n.getPropertyDomainByName("windowLevel"),h=f.min,m=f.max,g=f.step;g&&"any"!==g||(g=1/512),t.rangeManipulator.setHorizontalListener(h,m,g,n.getWindowLevel,a),t.sliceRepresentationSubscriptions.push(n.onModified(p)),p(),r++}var v=n.getPropertyDomainByName("slice");if(n.getSlice&&v){var y=function(){return s(n.getSlice())};t.rangeManipulator.setScrollListener(v.min,v.max,v.step,n.getSlice,s),t.sliceRepresentationSubscriptions.push(n.onModified(y)),y(),r++}}return r}}var pX={axis:2,orientation:-1,viewUp:[0,1,0],useParallelRendering:!0,sliceRepresentationSubscriptions:[]};function fX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,pX,n),uX.extend(e,t,n),Ae.get(e,t,["axis"]),dX(e,t)}var hX=Ae.newInstance(fX,"vtkView2DProxy"),mX={vtkAbstractRepresentationProxy:bK,vtkLookupTableProxy:PK,vtkPiecewiseFunctionProxy:NK,vtkProxyManager:qK,vtkSourceProxy:QK,vtkView2DProxy:{newInstance:hX,extend:fX},vtkViewProxy:uX},gX={representation:{"Surface with edges":{property:{edgeVisibility:!0,representation:2}},Surface:{property:{edgeVisibility:!1,representation:2}},Wireframe:{property:{edgeVisibility:!1,representation:1}},Points:{property:{edgeVisibility:!1,representation:0}}}},vX={representation:"Surface"};function yX(e,t){t.classHierarchy.push("vtkGeometryRepresentationProxy"),t.mapper=cy.newInstance({interpolateScalarsBeforeMapping:!0,useLookupTableScalarRange:!0,scalarVisibility:!1}),t.actor=Rv.newInstance(),t.property=t.actor.getProperty(),t.sourceDependencies.push(t.mapper),t.actor.setMapper(t.mapper),t.actors.push(t.actor)}var bX={representation:"Surface"};function wX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bX,n),bK.extend(e,t,n),yX(0,t),Ae.proxyPropertyState(e,t,gX,vX),Ae.proxyPropertyMapping(e,t,{opacity:{modelKey:"property",property:"opacity"},visibility:{modelKey:"actor",property:"visibility"},color:{modelKey:"property",property:"diffuseColor"},interpolateScalarsBeforeMapping:{modelKey:"mapper",property:"interpolateScalarsBeforeMapping"},pointSize:{modelKey:"property",property:"pointSize"},useShadow:{modelKey:"property",property:"lighting"},useBounds:{modelKey:"actor",property:"useBounds"}})}var xX={newInstance:Ae.newInstance(wX,"vtkGeometryRepresentationProxy"),extend:wX};function SX(e,t){t.classHierarchy.push("vtkGlyphRepresentationProxy"),t.property=Dv.newInstance(),t.sourceDependencies.push({setInputData:function(e){t.actors.length=0;var n=$D.newInstance();n.applyColorMap({RGBPoints:e.rgbPoints}),t.glyph={};for(var r=e.glyph.length;r--;){var i=e.glyph[r];t.glyph[i.id]=T(i)}for(r=e.mapping.length;r--;){var o=e.mapping[r],a=t.glyph[o.glyphId],s=rc.newInstance();s.getPoints().setData(Float32Array.from(o.coordinates),3),o.scale&&s.getPointData().addArray(Jn.newInstance({name:"scaling",values:Float32Array.from(o.scale),numberOfComponents:3}));var l=HF.newInstance({useLookupTableScalarRange:!0,lookupTable:n,orient:!1,scaling:!!o.scale,scaleArray:"scaling",scaleMode:HF.ScaleModes.SCALE_BY_COMPONENTS}),u=Rv.newInstance();t.property&&u.setProperty(t.property),u.setMapper(l),l.setInputData(s,0),l.setInputConnection(a.getOutputPort(),1),t.actors.push(u)}}}),e.setColorBy=function(){},e.getColorBy=function(){return[]},e.listDataArrays=function(){return[]}}var CX={};function AX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,CX,n),bK.extend(e,t,n),SX(e,t),Ae.proxyPropertyMapping(e,t,{edgeVisibility:{modelKey:"property",property:"edgeVisibility"}})}var PX={newInstance:Ae.newInstance(AX,"vtkGlyphRepresentationProxy"),extend:AX};function _X(e,t){t.classHierarchy.push("vtkMoleculeRepresentationProxy"),t.filter=op.newInstance(),t.sphereMapper=IB.newInstance(),t.stickMapper=RB.newInstance(),t.sphereActor=Rv.newInstance(),t.stickActor=Rv.newInstance(),t.sourceDependencies.push(t.filter),t.sphereMapper.setInputConnection(t.filter.getOutputPort(0)),t.sphereMapper.setScaleArray(t.filter.getSphereScaleArrayName()),t.sphereActor.setMapper(t.sphereMapper),t.stickMapper.setInputConnection(t.filter.getOutputPort(1)),t.stickMapper.setScaleArray("stickScales"),t.stickMapper.setOrientationArray("orientation"),t.stickActor.setMapper(t.stickMapper),t.actors.push(t.sphereActor),t.actors.push(t.stickActor),e.setColorBy=function(){},e.getColorBy=function(){return[]},e.listDataArrays=function(){return[]}}var OX={};function TX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OX,n),bK.extend(e,t,n),_X(e,t),Ae.proxyPropertyMapping(e,t,{tolerance:{modelKey:"filter",property:"tolerance"},atomicRadiusScaleFactor:{modelKey:"filter",property:"atomicRadiusScaleFactor"},bondRadius:{modelKey:"filter",property:"bondRadius"},deltaBondFactor:{modelKey:"filter",property:"deltaBondFactor"},radiusType:{modelKey:"filter",property:"radiusType"},hideElements:{modelKey:"filter",property:"hideElements"}})}var DX={newInstance:Ae.newInstance(TX,"vtkMoleculeRepresentationProxy"),extend:TX};function EX(e,t){t.classHierarchy.push("vtkSkyboxRepresentationProxy"),t.actor=OB.newInstance(),t.actors.push(t.actor),t.sourceDependencies.push({setInputData:function(n){t.actor.removeAllTextures(),t.actor.addTexture(n);var r=t.input.getAlgo().getPositions();e.updateProxyProperty("position",{values:r})}}),e.setColorBy=function(){},e.getColorBy=function(){return[]},e.listDataArrays=function(){return[]},e.setPosition=function(e){t.input.getAlgo().setPosition(e)},e.getPosition=function(){return t.input.getAlgo().getPosition()}}var IX={};function kX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,IX,n),bK.extend(e,t,n),EX(e,t)}var MX={newInstance:Ae.newInstance(kX,"vtkSkyboxRepresentationProxy"),extend:kX};function NX(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 RX(e,t){return e+t}function FX(){for(var e=arguments.length,t=new Array(e),n=0;nNumber.EPSILON&&(c[0]="IJK"[d]),f[3]-f[2]>Number.EPSILON&&(c[1]="IJK"[d]),f[5]-f[4]>Number.EPSILON&&(c[2]="IJK"[d])}n.ijkOrientation=c.join("")}return function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:-1;if(null===n)t.property.setRGBTransferFunction(null),t.property.setPiecewiseFunction(null);else{r(n,i,o);var a=e.getLookupTableProxy(n),s=e.getPiecewiseFunctionProxy(n);t.property.setRGBTransferFunction(a.getLookupTable()),t.property.setPiecewiseFunction(s.getPiecewiseFunction())}},n(t.slicingMode||"X")}var VX={};function jX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,VX,n),bK.extend(e,t,n),Ae.get(e,t,["slicingMode"]),LX(e,t),Ae.proxyPropertyMapping(e,t,{visibility:{modelKey:"actor",property:"visibility"},windowWidth:{modelKey:"property",property:"colorWindow"},windowLevel:{modelKey:"property",property:"colorLevel"},interpolationType:{modelKey:"property",property:"interpolationType"},slice:{modelKey:"mapper",property:"slice"}})}var GX={newInstance:Ae.newInstance(jX,"vtkSliceRepresentationProxy"),extend:jX};function UX(e,t){t.classHierarchy.push("vtkSlicedGeometryRepresentationProxy"),t.plane=Pr.newInstance(),t.cutter=qc.newInstance(),t.cutter.setCutFunction(t.plane),t.mapper=cy.newInstance(),t.actor=Rv.newInstance(),t.property=t.actor.getProperty(),t.property.setLighting(!1),t.mapper.setInputConnection(t.cutter.getOutputPort()),t.actor.setMapper(t.mapper),t.actors.push(t.actor),t.sourceDependencies.push(t.cutter),e.setSlice=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=t.slice!==n;t.slice=n;var i=t.plane.getNormal(),o=t.plane.setOrigin(i[0]*n,i[1]*n,i[2]*n);return!(!o&&!r)&&(e.modified(),!0)},e.setOffset=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=t.offset!==n;t.offset=n;var i=t.plane.getNormal(),o=t.actor.setPosition(n*i[0],n*i[1],n*i[2]);return!(!o&&!r)&&(e.modified(),!0)},e.setSlicingMode=function(n){if(t.slicingMode!==n&&n){switch(t.slicingMode=n,KA.SlicingMode[n]){case KA.SlicingMode.X:t.plane.setNormal(1,0,0);break;case KA.SlicingMode.Y:t.plane.setNormal(0,1,0);break;case KA.SlicingMode.Z:t.plane.setNormal(0,0,1);break;default:return}var r=e.setSlice(t.slice);(r=e.setOffset(t.offset)||r)||e.modified()}else console.log("skip setSlicingMode",n)}}var zX={slicingMode:KA.SlicingMode.NONE,slice:0,offset:0};function WX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zX,n),bK.extend(e,t,n),Ae.get(e,t,["slicingMode","slice","offset"]),UX(e,t),Ae.proxyPropertyState(e,t),Ae.proxyPropertyMapping(e,t,{opacity:{modelKey:"property",property:"opacity"},visibility:{modelKey:"actor",property:"visibility"},color:{modelKey:"property",property:"diffuseColor"},useShadow:{modelKey:"property",property:"lighting"},useBounds:{modelKey:"actor",property:"useBounds"}})}var HX=Ae.newInstance(WX,"vtkSlicedGeometryRepresentationProxy");function KX(e,t){return e+t}function XX(){for(var e=arguments.length,t=new Array(e),n=0;n1)&&e.setSampleDistance(),(t.edgeGradient<0||t.edgeGradient>1)&&e.setEdgeGradient();var l=function(e,t,n,r){var i=t.getRange(),o=e.getSpacing(),a=e.getBounds(),s=n.mapperX.getClosestIJKAxis().ijkMode,l=n.mapperY.getClosestIJKAxis().ijkMode,u=n.mapperZ.getClosestIJKAxis().ijkMode,c={xSlice:{domain:{min:a[0],max:a[1],step:o[s]}},ySlice:{domain:{min:a[2],max:a[3],step:o[l]}},zSlice:{domain:{min:a[4],max:a[5],step:o[u]}},windowWidth:{domain:{min:0,max:i[1]-i[0],step:"any"}},windowLevel:{domain:{min:i[0],max:i[1],step:"any"}}};return r("xSlice",c.xSlice),r("ySlice",c.ySlice),r("zSlice",c.zSlice),r("windowWidth",c.windowWidth),r("windowLevel",c.windowLevel),{xSlice:XX(c.xSlice.domain.min,c.xSlice.domain.max),ySlice:XX(c.ySlice.domain.min,c.ySlice.domain.max),zSlice:XX(c.zSlice.domain.min,c.zSlice.domain.max),windowWidth:c.windowWidth.domain.max,windowLevel:Math.floor(XX(c.windowLevel.domain.min,c.windowLevel.domain.max))}}(n,e.getDataArray(),t,e.updateProxyProperty);e.set(l);var u=n.getDimensions().reduce((function(e,t){return e+(t>1?1:0)}),0);2===u&&e.setIs2DVolume(!0)}}),e.setIs2DVolume=function(n){t.is2DVolume=n,n&&(e.getVisibility()&&e.setSliceVisibility(!0),t.volume.setVisibility(!1))},e.isVisible=function(){return t.volume.getVisibility()},e.setVisibility=function(n){n?t.is2DVolume?e.setSliceVisibility(!0):t.volume.setVisibility(!0):(t.volume.setVisibility(!1),e.setSliceVisibility(!1))},e.getVisibility=function(){return t.volume.getVisibility()||e.getSliceVisibility()},e.isVisible=e.getVisibility,e.setSliceVisibility=function(n){if(n&&t.is2DVolume){var r=e.getInputDataSet().getDimensions().indexOf(1);t.actors[r]&&t.actors[r].setVisibility(!0)}else t.actors.forEach((function(e){return e.setVisibility(n)}))},e.getSliceVisibility=function(){return t.actorX.getVisibility()||t.actorY.getVisibility()||t.actorZ.getVisibility()},e.setSampleDistance=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.4;if(t.sampleDistance!==n){t.sampleDistance=n;var r=e.getInputDataSet(),i=.7*Math.sqrt(r.getSpacing().map((function(e){return e*e})).reduce((function(e,t){return e+t}),0));t.mapper.setSampleDistance(i*Math.pow(2,3*n-1.5)),e.modified()}},e.setEdgeGradient=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.2;if(t.edgeGradient!==n){t.edgeGradient=n;var r=e.getDataArray(),i=r.getNumberOfComponents();if(0===n)for(var o=0;o0?t.volume.getProperty().setGradientOpacityMinimumValue(a,Math.exp(Math.log(.2*(s[1]-s[0]))*l*l)):t.volume.getProperty().setGradientOpacityMinimumValue(a,0),t.volume.getProperty().setGradientOpacityMaximumValue(a,Math.exp(Math.log(1*(s[1]-s[0]))*n*n))}e.modified()}};var n=e.setColorBy;e.setColorBy=function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;n(r,i,o);var a=e.getLookupTableProxy(r),s=e.getPiecewiseFunctionProxy(r);t.property.setRGBTransferFunction(0,a.getLookupTable()),t.property.setScalarOpacity(0,s.getPiecewiseFunction())}}var ZX={sampleDistance:-1,edgeGradient:-1,disableSolidColor:!0,is2DVolume:!1};function JX(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,ZX,n),bK.extend(e,t,n),Ae.get(e,t,["sampleDistance","edgeGradient","cropFilter","is2DVolume"]),YX(e,t),Ae.proxyPropertyMapping(e,t,{xSlice:{modelKey:"mapperX",property:"slice"},ySlice:{modelKey:"mapperY",property:"slice"},zSlice:{modelKey:"mapperZ",property:"slice"},volumeVisibility:{modelKey:"volume",property:"visibility"},xSliceVisibility:{modelKey:"actorX",property:"visibility"},ySliceVisibility:{modelKey:"actorY",property:"visibility"},zSliceVisibility:{modelKey:"actorZ",property:"visibility"},windowWidth:{modelKey:"propertySlices",property:"colorWindow"},windowLevel:{modelKey:"propertySlices",property:"colorLevel"},useShadow:{modelKey:"property",property:"shade"},croppingPlanes:{modelKey:"cropFilter",property:"croppingPlanes"}})}var QX={Core:mX,Representations:{vtkGeometryRepresentationProxy:xX,vtkGlyphRepresentationProxy:PX,vtkMoleculeRepresentationProxy:DX,vtkSkyboxRepresentationProxy:MX,vtkSliceRepresentationProxy:GX,vtkSlicedGeometryRepresentationProxy:{newInstance:HX,extend:WX},vtkVolumeRepresentationProxy:{newInstance:Ae.newInstance(JX,"vtkVolumeRepresentationProxy"),extend:JX,updateConfiguration:qX}}},$X={JSZip:mD(),pako:JT};function eq(e,t){t.classHierarchy.push("vtkAbstractWidget"),t.actorToRepresentationMap=new WeakMap,e.getBounds=t.widgetState.getBounds,e.getNestedProps=function(){return t.representations},e.activateHandle=function(n){var r=n.selectedState,i=n.representation;t.widgetState.activateOnly(r),t.activeState=r,r&&r.updateManipulator&&r.updateManipulator(),e.invokeActivateHandle({selectedState:r,representation:i}),e.updateCursor&&e.updateCursor()},e.deactivateAllHandles=function(){t.widgetState.deactivate()},e.hasActor=function(e){return t.actorToRepresentationMap.has(e)},e.grabFocus=function(){t.hasFocus=!0},e.loseFocus=function(){t.hasFocus=!1},e.hasFocus=function(){return t.hasFocus},e.placeWidget=function(e){return t.widgetState.placeWidget(e)},e.getPlaceFactor=function(){return t.widgetState.getPlaceFactor()},e.setPlaceFactor=function(e){return t.widgetState.setPlaceFactor(e)},e.getRepresentationFromActor=function(e){return t.actorToRepresentationMap.get(e)},e.updateRepresentationForRender=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:aP.FRONT_BUFFER,n=0;n2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,tq,n),hv.extend(e,t,n),ig.extend(e,t,n),Ae.setGet(e,t,["contextVisibility","handleVisibility","widgetManager"]),Ae.get(e,t,["representations","widgetState"]),Ae.event(e,t,"ActivateHandle"),eq(e,t)}var rq={newInstance:Ae.newInstance(nq,"vtkAbstractWidget"),extend:nq},iq={HANDLE:0,CONTEXT:1},oq=Ae.vtkErrorMacro,aq=Ae.vtkWarningMacro,sq=["active","inactive","static"];function lq(e,t){t.classHierarchy.push("vtkWidgetRepresentation");var n={mtimes:{},states:[]};function r(e,t){e&&e.setResolveCoincidentTopologyToPolygonOffset&&(e.setResolveCoincidentTopologyToPolygonOffset(),qv.forEach((function(n){if(t[n]){var r="setRelativeCoincidentTopology".concat(n,"OffsetParameters");if(e[r]){var i=t[n],o=i.factor,a=i.offset;e[r](o,a)}}})))}e.getActors=function(){return t.actors},e.getNestedProps=e.getActors,e.setLabels=function(){for(var n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]?arguments[0]:t.inputData[0];return n.mtimes.representation===e.getMTime()&&n.mtimes.input===r.getMTime()||(n.mtimes.representation=e.getMTime(),n.mtimes.input=r.getMTime(),n.states=[],t.labels.forEach((function(e){n.states=n.states.concat(r.getStatesWithLabel(e)||[])}))),n.states},e.getSelectedState=function(t,n){var r=e.getRepresentationStates();return n0&&void 0!==arguments[0]?arguments[0]:aP.FRONT_BUFFER,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!0;switch(t.behavior){case iq.HANDLE:i=e===aP.PICKING_BUFFER||r;break;case iq.CONTEXT:i=n;break;default:i=!0}for(var o=i,a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uq,n),hv.extend(e,t,n),Ae.algo(e,t,1,1),Ae.get(e,t,["labels","coincidentTopologyParameters"]),Ae.set(e,t,["displayScaleParams"]),Ae.setGet(e,t,["scaleInPixels"]),lq(e,t)},mergeStyles:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.behavior===iq.CONTEXT?e.setVisibility(n):t.behavior===iq.HANDLE&&e.setVisibility(r)},e.render=function(){throw new Error("Not implemented")}}var fq={visibility:!0};var hq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fq,n),cq.extend(e,t,n),Ae.setGet(e,t,["visibility","hover"]),pq(e,t)},createSvgElement:dq,createSvgDomElement:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}};function mq(e){for(var t=document.createElementNS("http://www.w3.org/2000/svg",e.name),n=Object.keys(e.attrs),r=0;r=s;f--)p(f)}return n}var vq=sP.ViewTypes,yq=sP.RenderingTypes,bq=sP.CaptureOn,wq=Ae.vtkErrorMacro,xq=hq.createSvgElement,Sq=hq.createSvgDomElement,Cq=1;function Aq(e){var t=e.getActiveCamera(),n=e.getRenderWindow(),r=n.getInteractor(),i=r.getView();return{renderer:e,renderWindow:n,interactor:r,apiSpecificRenderWindow:i,camera:t}}function Pq(e,t){t.viewId||(t.viewId="view-".concat(Cq++)),t.classHierarchy.push("vtkWidgetManager");var n,r=new WeakMap,i=new WeakMap,o=new WeakMap,a=[];function s(e){return e&&(e.isA("vtkAbstractWidget")?e:e.getWidgetForView({viewId:t.viewId}))}t.svgRoot=(t.viewId,(n=Sq("svg")).setAttribute("style","position: absolute; top: 0; left: 0; width: 100%; height: 100%;"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n);var l=new WeakMap;function u(){var e=t.apiSpecificRenderWindow.getReferenceByName("el"),n=t.apiSpecificRenderWindow.getCanvas();e.insertBefore(t.svgRoot,n.nextSibling),"static"===window.getComputedStyle(e).position&&(e.style.position="relative")}function c(){var e=y(t.apiSpecificRenderWindow.getSize(),2),n=e[0],r=e[1],i=window.devicePixelRatio||1,o=String(n/i),a=String(r/i),s="0 0 ".concat(n," ").concat(r),l=t.svgRoot.getAttribute("width"),u=t.svgRoot.getAttribute("height"),c=t.svgRoot.getAttribute("viewBox");l!==o&&t.svgRoot.setAttribute("width",o),u!==a&&t.svgRoot.setAttribute("height",a),c!==s&&t.svgRoot.setAttribute("viewBox",s)}function d(){if(t.useSvgLayer)for(var e=function(e){var n=t.widgets[e],r=n.getRepresentations().filter((function(e){return e.isA("vtkSVGRepresentation")})),a=[];n.getVisibility()&&(a=r.filter((function(e){return e.getVisibility()})).map((function(e){return e.render()})));var s=Promise.all(a),u=l.get(n)||[];u.push(s),l.set(n,u),s.then((function(e){var r=l.get(n)||[],a=r.indexOf(s);if(!t.deleted&&!n.isDeleted()&&-1!==a){r=r.slice(a+1),l.set(n,r);for(var u=o.get(n),c=xq("g"),d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_q,n),Ae.obj(e,t),Ae.setGet(e,t,["captureOn",{type:"enum",name:"viewType",enum:vq}]),Ae.get(e,t,["selections","widgets","viewId","pickingEnabled","useSvgLayer"]),Pq(e,t)}var Tq={newInstance:Ae.newInstance(Oq,"vtkWidgetManager"),extend:Oq,Constants:sP};function Dq(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 Eq(e){for(var t=1;t1&&(f[e]=Ae.chain.apply(Ae,w(t)))}))})),f.delete=Ae.chain((function(){delete n[i]}),f.delete),f.setInteractor(u);var g=Object.freeze(f);return n[i]=g,g}return n[i]},e.getViewIds=function(){return Object.keys(n)},e.setVisibility=function(e){for(var t=Object.keys(n),r=0;r1&&void 0!==arguments[1]?arguments[1]:[Rq];if(t.nestedStates.push(r),n.push(r.onModified(e.modified)),Array.isArray(i)&&i.length)for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Lq,n),Ae.obj(e,t),Ae.setGet(e,t,["active"]),Bq(e,t)}};function jq(e,t){var n=[],r=w(si.INIT_BOUNDS);e.containsPoint=function(e,t,n){return Array.isArray(e)?si.containsPoint(r,e[0],e[1],e[2]):si.containsPoint(r,e,t,n)},e.placeWidget=function(i){t.bounds=[];for(var o=[(i[0]+i[1])/2,(i[2]+i[3])/2,(i[4]+i[5])/2],a=0;a<6;a++){var s=o[Math.floor(a/2)];n[a]=i[a],t.bounds[a]=(i[a]-s)*t.placeFactor+s}si.setBounds(r,t.bounds),e.invokeBoundsChange(t.bounds),e.modified()},e.setPlaceFactor=function(i){if(t.placeFactor!==i){t.placeFactor=i,t.bounds=[];for(var o=[(n[0]+n[1])/2,(n[2]+n[3])/2,(n[4]+n[5])/2],a=0;a<6;a++){var s=o[Math.floor(a/2)];t.bounds[a]=(n[a]-s)*t.placeFactor+s}si.setBounds(r,t.bounds),e.invokeBoundsChange(t.bounds),e.modified()}}}var Gq={bounds:[-1,1,-1,1,-1,1],placeFactor:1};var Uq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Gq,n),Ae.setGetArray(e,t,["bounds"],6),Ae.get(e,t,["placeFactor"]),Ae.event(e,t,"BoundsChange"),t.bounds=t.bounds.slice(),jq(e,t)}},zq={color:.5};var Wq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,zq,n),Ae.setGet(e,t,["color"])}};function Hq(e,t){e.translate=function(t,n,r){var i=y(e.getCornerByReference(),3),o=i[0],a=i[1],s=i[2];e.setCorner(o+t,a+n,s+r)}}var Kq={corner:[0,0,0]};var Xq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Kq,n),Ae.setGetArray(e,t,["corner"],3),Hq(e)}};function qq(e,t){var n="degree"===t.angleUnit?Gs.buildFromDegree():Gs.buildFromRadian();e.rotateFromDirections=function(r,i){n.identity().rotateFromDirections(r,i).apply(t.direction),e.modified()},e.rotate=function(e,r){n.identity().rotate(e,r).apply(t.direction)},e.rotateX=function(e){n.identity().rotateX(e).apply(t.direction)},e.rotateY=function(e){n.identity().rotateY(e).apply(t.direction)},e.rotateZ=function(e){n.identity().rotateZ(e).apply(t.direction)}}var Yq={direction:[1,0,0]};var Zq={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Yq,n),Ae.setGetArray(e,t,["direction"],3),qq(e,t)}};function Jq(e,t){e.updateManipulator=function(){if(t.manipulator){var e=t.origin,n=t.normal,r=t.direction,i=t.manipulator,o=i.setOrigin,a=i.setCenter,s=i.setNormal,l=i.setDirection;e&&o?o(e):e&&a&&a(e),r&&l?l(r):r&&!n&&s?s(r):n&&l&&l(n)}}}var Qq={manipulator:null};var $q={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,Qq,n),Ae.setGet(e,t,["manipulator"]),Jq(e,t)}},eY={name:""};var tY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eY,n),Ae.setGet(e,t,["name"])}};function nY(e,t){return 3===e.length&&3===t.length&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function rY(e,t){var n={o:[],p1:[],p2:[]};e.normalize=function(){mt(t.up),mt(t.right),mt(t.direction),e.modified()},e.updateFromOriginRightUp=function(r,i,o){(function(e,t,n,r){return nY(e,r.o)&&nY(t,r.p1)&&nY(n,r.p2)})(r,i,o,n)||(n.o=r.slice(),n.p1=i.slice(),n.p2=o.slice(),t.up=[o[0]-r[0],o[1]-r[1],o[2]-r[2]],t.right=[i[0]-r[0],i[1]-r[1],i[2]-r[2]],ft(t.up,t.right,t.direction),ft(t.direction,t.up,t.right),e.normalize(),e.modified())}}var iY={up:[0,1,0],right:[1,0,0],direction:[0,0,1]};var oY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,iY,n),Ae.setGetArray(e,t,["up","right","direction"],3),rY(e,t)}};function aY(e,t){e.translate=function(t,n,r){var i=y(e.getOriginByReference(),3),o=i[0],a=i[1],s=i[2];e.setOrigin(o+t,a+n,s+r)}}var sY={origin:null};var lY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,sY,n),Ae.setGetArray(e,t,["origin"],3),aY(e)}},uY={scale1:.5};var cY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,uY,n),Ae.setGet(e,t,["scale1"])}},dY={scale3:[1,1,1]};var pY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dY,n),Ae.setGetArray(e,t,["scale3"],3)}},fY={text:"DefaultText"};var hY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,fY,n),Ae.setGet(e,t,["text"])}},mY={visible:!0};var gY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mY,n),Ae.setGet(e,t,["visible"]),e.isVisible=e.getVisible}},vY={shape:""};var yY={extend:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,vY,n),Ae.setGet(e,t,["shape"])}},bY=Ae.vtkErrorMacro,wY={bounds:Uq,color:Wq,corner:Xq,direction:Zq,manipulator:$q,name:tY,orientation:oY,origin:lY,scale1:cY,scale3:pY,text:hY,visible:gY,shape:yY};function xY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];i||Vq.extend(n,r,t);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,OY,n),Ae.obj(e,t),Ae.setGetArray(e,t,["origin","normal"],3),_Y(e,t)}var DY={projectDisplayToLine:PY,extend:TY,newInstance:Ae.newInstance(TY,"vtkLineManipulator")};function EY(e,t,n,r,i,o){var a=o.displayToWorld(e,t,0,i),s=o.displayToWorld(e,t,1,i);return Pr.intersectWithLine(a,s,n,r).x}function IY(e,t){t.classHierarchy.push("vtkPlaneManipulator"),e.handleEvent=function(e,n){return EY(e.position.x,e.position.y,t.origin,t.normal,e.pokedRenderer,n)}}var kY={normal:[0,0,1],origin:[0,0,0]};function MY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,kY,n),Ae.obj(e,t),Ae.setGetArray(e,t,["normal","origin"],3),IY(e,t)}var NY={intersectDisplayWithPlane:EY,extend:MY,newInstance:Ae.newInstance(MY,"vtkPlaneManipulator")};function RY(e,t,n,r,i,o,a,s){var l=n-e,u=r-t,c=a.getActiveCamera(),d=c.getViewUp(),p=c.getDirectionOfProjection(),f=a.getRenderWindow().getInteractor().getView().getSize(),h=360*l/f[0],m=360*u/f[1],g=new Float64Array([o[0],o[1],o[2]]),v=d,y=[0,0,0];ft(p,d,y);var b=zo(new Float64Array(16));return Jo(b,b,Le(h),v),Jo(b,b,Le(-m),y),yo(g,g,b),g}function FY(e,t){t.classHierarchy.push("vtkTrackballManipulator");var n=0,r=0;e.handleEvent=function(e,i){var o=RY(n,r,e.position.x,e.position.y,t.origin,t.normal,e.pokedRenderer);return n=e.position.x,r=e.position.y,o},e.reset=function(e){n=e.position.x,r=e.position.y}}var BY={normal:[0,0,1]};function LY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,BY,n),Ae.obj(e,t),Ae.setGetArray(e,t,["normal"],3),FY(e,t)}var VY={trackballRotate:RY,extend:LY,newInstance:Ae.newInstance(LY,"vtkTrackballManipulator")},jY={vtkLineManipulator:DY,vtkPlaneManipulator:NY,vtkTrackballManipulator:VY};function GY(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 UY(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=UY(UY({},WY),n);cq.extend(e,t,r),zY(0,t)}};function KY(e,t){t.classHierarchy.push("vtkCircleContextRepresentation"),t.internalPolyData=rc.newInstance({mtime:0}),t.internalArrays={points:t.internalPolyData.getPoints(),scale:Jn.newInstance({name:"scale",numberOfComponents:3,empty:!0}),color:Jn.newInstance({name:"color",numberOfComponents:1,empty:!0}),direction:Jn.newInstance({name:"direction",numberOfComponents:9,empty:!0})},t.internalPolyData.getPointData().addArray(t.internalArrays.scale),t.internalPolyData.getPointData().addArray(t.internalArrays.color),t.internalPolyData.getPointData().addArray(t.internalArrays.direction),t.pipelines={circle:{source:e,glyph:Af.newInstance({resolution:t.glyphResolution,radius:1,lines:t.drawBorder,face:t.drawFace}),mapper:HF.newInstance({orientationArray:"direction",scaleArray:"scale",scaleMode:HF.ScaleModes.SCALE_BY_COMPONENTS,colorByArrayName:"color",scalarMode:ys.USE_POINT_FIELD_DATA}),actor:Rv.newInstance({pickable:!1,parentProp:e})}},t.pipelines.circle.actor.getProperty().setOpacity(.2),t.pipelines.circle.mapper.setOrientationModeToMatrix(),t.pipelines.circle.mapper.setResolveCoincidentTopology(!0),t.pipelines.circle.mapper.setResolveCoincidentTopologyPolygonOffsetParameters(-1,-1),cq.connectPipeline(t.pipelines.circle),e.addActor(t.pipelines.circle.actor),t.transform=Gs.buildFromDegree(),e.setGlyphResolution=Ae.chain(e.setGlyphResolution,(function(e){return t.pipelines.circle.glyph.setResolution(e)})),e.setDrawBorder=function(e){t.pipelines.circle.glyph.setLines(e)},e.setDrawFace=function(e){t.pipelines.circle.glyph.setFace(e)},e.setOpacity=function(e){t.pipelines.circle.actor.getProperty().setOpacity(e)},e.requestData=function(n,r){var i=t.internalArrays,o=i.points,a=i.scale,s=i.color,l=i.direction,u=e.getRepresentationStates(n[0]).filter((function(e){return e.getOrigin&&e.getOrigin()&&e.isVisible&&e.isVisible()})),c=u.length;s.getNumberOfValues()!==c&&(o.setData(new Float32Array(3*c)),a.setData(new Float32Array(3*c)),l.setData(new Float32Array(9*c)),s.setData(new Float32Array(c)));for(var d={points:o.getData(),scale:a.getData(),color:s.getData(),direction:l.getData()},p=0;p2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,XY,n),HY.extend(e,t,n),Ae.setGet(e,t,["glyphResolution","defaultScale"]),Ae.get(e,t,["glyph","mapper","actor"]),KY(e,t)}var YY={newInstance:Ae.newInstance(qY,"vtkCircleContextRepresentation"),extend:qY};function ZY(e,t){t.classHierarchy.push("vtkConvexFaceContextRepresentation"),t.internalPolyData=rc.newInstance({mtime:0}),t.points=new Float32Array(12),t.cells=new Uint8Array([4,0,1,2,3]),t.internalPolyData.getPoints().setData(t.points,3),t.internalPolyData.getPolys().setData(t.cells),t.mapper=cy.newInstance({scalarVisibility:!1}),t.actor=Rv.newInstance({parentProp:e}),t.actor.getProperty().setOpacity(t.opacity),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){for(var i=e.getRepresentationStates(n[0]).filter((function(e){return e.getOrigin()})),o=function(e){if(t.cells.length-1!==e){t.points=new Float32Array(3*e),t.cells=new Uint8Array(e+1),t.cells[0]=e;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:aP.FRONT_BUFFER,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t.behavior===iq.HANDLE)e===aP.PICKING_BUFFER?t.actor.getProperty().setOpacity(1):t.actor.getProperty().setOpacity(t.opacity);else t.actor.getProperty().setOpacity(t.opacity);n(e,r,i)}}var JY={defaultColor:[1,0,.5],opacity:.2};function QY(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,JY,n),HY.extend(e,t,n),Ae.setGetArray(e,t,["defaultColor"],3),Ae.get(e,t,["mapper","actor"]),Ae.setGet(e,t,["opacity"]),ZY(e,t)}var $Y={newInstance:Ae.newInstance(QY,"vtkConvexFaceContextRepresentation"),extend:QY};function eZ(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 tZ(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=tZ(tZ({},rZ),n);cq.extend(e,t,r),Ae.setGet(e,t,["activeScaleFactor","activeColor","useActiveColor"]),nZ(0,t)}};function oZ(e,t){t.classHierarchy.push("vtkCubeHandleRepresentation"),t.internalPolyData=rc.newInstance({mtime:0}),t.internalArrays={points:t.internalPolyData.getPoints(),scale:Jn.newInstance({name:"scale",numberOfComponents:3,empty:!0}),color:Jn.newInstance({name:"color",numberOfComponents:1,empty:!0})},t.internalPolyData.getPointData().addArray(t.internalArrays.scale),t.internalPolyData.getPointData().addArray(t.internalArrays.color),t.mapper=HF.newInstance({scaleArray:"scale",colorByArrayName:"color",scalarMode:ys.USE_POINT_FIELD_DATA}),t.actor=Rv.newInstance({parentProp:e}),t.glyph=kf.newInstance(),t.mapper.setInputConnection(e.getOutputPort(),0),t.mapper.setInputConnection(t.glyph.getOutputPort(),1),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){var i=t.internalArrays,o=i.points,a=i.scale,s=i.color,l=e.getRepresentationStates(n[0]).filter((function(e){return e.getOrigin&&e.getOrigin()&&e.isVisible&&e.isVisible()})),u=l.length;s.getNumberOfValues()!==u&&(o.setData(new Float32Array(3*u)),a.setData(new Float32Array(3*u)),s.setData(new Float32Array(u)));for(var c={points:o.getData(),scale:a.getData(),color:s.getData()},d=0;d2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,aZ,n),iZ.extend(e,t,n),Ae.get(e,t,["glyph","mapper","actor","defaultScale"]),oZ(e,t)}var lZ={newInstance:Ae.newInstance(sZ,"vtkCubeHandleRepresentation"),extend:sZ},uZ=sP.RenderingTypes,cZ=xv.Interpolation,dZ=xv.Representation;var pZ=["plane","outline","normal","origin","display2D"],fZ={active:{plane:{opacity:1,color:[0,.9,0]},normal:{opacity:1,color:[0,.9,0]},origin:{opacity:1,color:[0,.9,0]}},inactive:{plane:{opacity:.6,color:[1,1,1]},normal:{opacity:1,color:[.9,0,0]},origin:{opacity:1,color:[1,0,0]}},static:{display2D:{representation:dZ.POINT},outline:{color:[1,1,1],opacity:1,representation:dZ.WIREFRAME,interpolation:cZ.FLAT}}};function hZ(e,t){t.classHierarchy.push("vtkImplicitPlaneRepresentation"),t.plane=Pr.newInstance(),t.matrix=Gs.buildFromDegree(),t.pipelines={},t.pipelines.outline={source:kf.newInstance(),mapper:cy.newInstance(),actor:Rv.newInstance({pickable:!1,parentProp:e})},t.pipelines.plane={source:fd.newInstance(),mapper:cy.newInstance(),actor:Rv.newInstance({pickable:!0,parentProp:e})},t.pipelines.origin={source:ph.newInstance(),mapper:cy.newInstance(),actor:Rv.newInstance({pickable:!0,parentProp:e})},t.pipelines.normal={source:mf.newInstance(),mapper:cy.newInstance(),actor:Rv.newInstance({pickable:!0,parentProp:e})},t.pipelines.display2D={source:e,mapper:Rx.newInstance(),actor:Rv.newInstance({pickable:!1,parentProp:e})};var n=qc.newInstance({cutFunction:t.plane});n.setInputConnection(t.pipelines.outline.source.getOutputPort()),t.pipelines.plane.source.setInputConnection(n.getOutputPort()),cq.connectPipeline(t.pipelines.outline),cq.connectPipeline(t.pipelines.plane),cq.connectPipeline(t.pipelines.origin),cq.connectPipeline(t.pipelines.normal),cq.connectPipeline(t.pipelines.display2D),e.addActor(t.pipelines.outline.actor),e.addActor(t.pipelines.plane.actor),e.addActor(t.pipelines.origin.actor),e.addActor(t.pipelines.normal.actor),e.addActor(t.pipelines.display2D.actor),e.requestData=function(e,n){var r=e[0],i=r.getOrigin();if(i){var o=r.getNormal(),a=r.getBounds();t.plane.setOrigin(i),t.plane.setNormal(o),t.pipelines.outline.source.setCenter(.5*(a[0]+a[1]),.5*(a[2]+a[3]),.5*(a[4]+a[5]));var s=a[1]-a[0],l=a[3]-a[2],u=a[5]-a[4];t.pipelines.outline.source.setXLength(s),t.pipelines.outline.source.setYLength(l),t.pipelines.outline.source.setZLength(u),t.pipelines.normal.source.set({height:Math.max(s,l,u),radius:t.handleSizeRatio*Math.min(s,l,u)*t.axisScale,resolution:t.sphereResolution});var c=t.pipelines.normal.source.getOutputData(),d=rc.newInstance();d.shallowCopy(c),d.getPoints().setData(Float32Array.from(c.getPoints().getData()),3),d.getPointData().removeAllArrays(),t.matrix.identity().translate(i[0],i[1],i[2]).rotateFromDirections([0,1,0],o).apply(d.getPoints().getData()),t.pipelines.normal.mapper.setInputData(d),t.pipelines.origin.actor.setPosition(i);var p=t.handleSizeRatio*Math.min(s,l,u);t.pipelines.origin.actor.setScale(p,p,p),cq.applyStyles(t.pipelines,t.representationStyle,r.getActive()&&r.getActiveHandle());var f=rc.newInstance();f.shallowCopy(t.pipelines.plane.source.getOutputData()),n[0]=f}},e.setSphereResolution=function(e){return t.sphereResolution=e,t.pipelines.origin.source.setPhiResolution(e)&&t.pipelines.origin.source.setThetaResolution(e)},e.setRepresentationStyle=function(n){t.representationStyle=cq.mergeStyles(pZ,t.representationStyle,n),cq.applyStyles(t.pipelines,t.representationStyle),e.modified()},e.updateActorVisibility=function(e,n,r){var i=t.planeVisible,o=t.originVisible,a=t.normalVisible,s=t.outlineVisible;if(e===uZ.PICKING_BUFFER)t.pipelines.plane.actor.setVisibility(i),t.pipelines.origin.actor.setVisibility(o),t.pipelines.normal.actor.setVisibility(a),t.pipelines.plane.actor.getProperty().setOpacity(1);else{t.pipelines.outline.actor.setVisibility(s&&n),t.pipelines.plane.actor.setVisibility(i&&r),t.pipelines.origin.actor.setVisibility(o&&r),t.pipelines.normal.actor.setVisibility(a&&r);var l=t.inputData[0];l&&cq.applyStyles(t.pipelines,t.representationStyle,l.getActive()&&l.getActiveHandle())}},e.getSelectedState=function(e,n){var r=t.inputData[0];switch(r.setActiveHandle(e),e){case t.pipelines.plane.actor:r.setUpdateMethodName("updateFromPlane");break;case t.pipelines.origin.actor:r.setUpdateMethodName("updateFromOrigin");break;case t.pipelines.normal.actor:r.setUpdateMethodName("updateFromNormal");break;default:r.setUpdateMethodName("updateFromPlane")}return r},e.setRepresentationStyle(fZ),e.setSphereResolution(t.sphereResolution)}var mZ={sphereResolution:24,handleSizeRatio:.05,axisScale:.1,normalVisible:!0,originVisible:!0,planeVisible:!0,outlineVisible:!0};function gZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,mZ,n),cq.extend(e,t,n),Ae.get(e,t,["sphereResolution","representationStyle"]),Ae.setGet(e,t,["handleSizeRatio","axisScale","normalVisible","originVisible","planeVisible","outlineVisible"]),hZ(e,t)}var vZ={newInstance:Ae.newInstance(gZ,"vtkImplicitPlaneRepresentation"),extend:gZ,generateState:function(){return CY.createBuilder().addField({name:"origin",initialValue:[0,0,0]}).addField({name:"normal",initialValue:[0,0,1]}).addField({name:"activeHandle",initialValue:null}).addField({name:"updateMethodName"}).build()}};function yZ(e,t){var n;t.classHierarchy.push("vtkOutlineContextRepresentation"),t.bbox=w(si.INIT_BOUNDS),t.internalPolyData=rc.newInstance({mtime:0}),t.points=new Float32Array(24),t.internalPolyData.getPoints().setData(t.points,3),t.internalPolyData.getLines().setData(Uint16Array.from(lp)),t.mapper=cy.newInstance({scalarVisibility:!1}),t.actor=Rv.newInstance({parentProp:e}),(n=t.actor.getProperty()).setEdgeColor.apply(n,w(t.edgeColor)),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){var i=e.getRepresentationStates(n[0]).filter((function(e){return e.getOrigin&&e.getOrigin()}));si.reset(t.bbox);for(var o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,bZ,n),HY.extend(e,t,n),Ae.setGetArray(e,t,["edgeColor"],3),Ae.get(e,t,["mapper","actor"]),yZ(e,t)}var xZ={newInstance:Ae.newInstance(wZ,"vtkOutlineContextRepresentation"),extend:wZ};function SZ(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 CZ(e){for(var t=1;t1){var l=a[a.length-1],u=wt(l.getOrigin(),a[a.length-2].getOrigin())>t.threshold?0:1;u||!l.isVisible||l.isVisible()||u++,s-=u}var c=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e<2)t.internalPolyData.getPoints().setData(new Float32Array([0,0,0])),t.internalPolyData.getLines().setData(new Uint8Array(0));else if(!t.points||t.points.length!==3*e){t.points=new Float32Array(3*e),t.cells=new Uint8Array(e+1+(n?1:0)),t.cells[0]=t.cells.length-1;for(var r=1;r2);if(c)for(var d=0;d3;return n.updateActorVisibility(e,i&&l,o&&l)}}var PZ={threshold:Number.EPSILON,closePolyLine:!1,lineThickness:2,scaleInPixels:!0};function _Z(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=CZ(CZ({},PZ),n);cq.extend(e,t,r),Ae.setGet(e,t,["threshold","closePolyLine","lineThickness"]),AZ(e,t)}var OZ={newInstance:Ae.newInstance(_Z,"vtkPolyLineRepresentation"),extend:_Z};function TZ(e,t){function n(n){if(t.displayCallback){for(var r=[],i=e.getRepresentationStates(),o=0;o2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,DZ,n),iZ.extend(e,t,n),Ae.get(e,t,["glyph","mapper","actor"]),TZ(e,t)}var IZ={newInstance:Ae.newInstance(EZ,"vtkSphereHandleRepresentation"),extend:EZ},kZ={vtkCircleContextRepresentation:YY,vtkContextRepresentation:HY,vtkConvexFaceContextRepresentation:$Y,vtkCubeHandleRepresentation:lZ,vtkHandleRepresentation:iZ,vtkImplicitPlaneRepresentation:vZ,vtkOutlineContextRepresentation:xZ,vtkPolyLineRepresentation:OZ,vtkSphereHandleRepresentation:IZ,vtkWidgetRepresentation:cq};function MZ(e,t){t.classHierarchy.push("vtkAngleWidgetProp");var n=null,r=_y.newInstance();function i(e){return e.altKey||e.controlKey||e.shiftKey}r.setPickFromList(1),e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleLeftButtonPress=function(o){if(!t.activeState||!t.activeState.getActive()||!t.pickable||i(o))return Ae.VOID;if(r.initializePickList(),r.setPickList(e.getNestedProps()),t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<3){var a=t.widgetState.getMoveHandle(),s=t.widgetState.addHandle();s.setOrigin.apply(s,w(a.getOrigin())),s.setColor(a.getColor()),s.setScale1(a.getScale1())}else n=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),Ae.EVENT_ABORT},e.handleMouseMove=function(r){if(t.pickable&&t.dragable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!i(r)){t.manipulator.setOrigin(t.activeState.getOrigin()),t.manipulator.setNormal(t.camera.getDirectionOfProjection());var o=t.manipulator.handleEvent(r,t.apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||n))return t.activeState.setOrigin(o),e.invokeInteractionEvent(),Ae.EVENT_ABORT}return t.hasFocus&&t.widgetManager.disablePicking(),Ae.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable?(t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(e.invokeEndInteractionEvent(),t.widgetManager.enablePicking(),t.interactor.render()),3===t.widgetState.getHandleList().length&&e.loseFocus(),n=!1},e.grabFocus=function(){!t.hasFocus&&t.widgetState.getHandleList().length<3&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t.widgetManager.enablePicking(),t.interactor.render()}}function NZ(e,t){t.classHierarchy.push("vtkAngleWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","glyphResolution","defaultScale"],t.behavior=MZ,t.widgetState=CY.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:.1,visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:.1}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:IZ,labels:["handles"]},{builder:IZ,labels:["moveHandle"]},{builder:OZ,labels:["handles","moveHandle"]}]},e.getAngle=function(){var e=t.widgetState.getHandleList();if(3!==e.length)return 0;if(!e[0].getOrigin()||!e[1].getOrigin()||!e[2].getOrigin())return 0;var n=[0,0,0],r=[0,0,0];return at(e[0].getOrigin(),e[1].getOrigin(),n),at(e[2].getOrigin(),e[1].getOrigin(),r),xt(n,r)},t.widgetState.onBoundsChange((function(e){var n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),t.manipulator=NY.newInstance()}var RZ={};function FZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,RZ,n),Nq.extend(e,t,n),Ae.setGet(e,t,["manipulator"]),NZ(e,t)}var BZ={newInstance:Ae.newInstance(FZ,"vtkAngleWidget"),extend:FZ};function LZ(e,t){t.classHierarchy.push("vtkDistanceWidgetProp");var n=null;function r(e){return e.altKey||e.controlKey||e.shiftKey}e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleLeftButtonPress=function(i){if(!t.activeState||!t.activeState.getActive()||!t.pickable||r(i))return Ae.VOID;if(t.activeState===t.widgetState.getMoveHandle()&&t.widgetState.getHandleList().length<2){var o=t.widgetState.getMoveHandle(),a=t.widgetState.addHandle();a.setOrigin.apply(a,w(o.getOrigin())),a.setColor(o.getColor()),a.setScale1(o.getScale1())}else n=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),Ae.EVENT_ABORT},e.handleMouseMove=function(i){if(t.hasFocus&&2===t.widgetState.getHandleList().length)return e.loseFocus(),Ae.VOID;if(t.pickable&&t.dragable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!r(i)){var o=t.manipulator.handleEvent(i,t.apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||n))return t.activeState.setOrigin(o),e.invokeInteractionEvent(),Ae.EVENT_ABORT}return Ae.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable?(t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(e.invokeEndInteractionEvent(),t.widgetManager.enablePicking(),t.interactor.render()),n=!1},e.grabFocus=function(){!t.hasFocus&&t.widgetState.getHandleList().length<2&&(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t.widgetManager.enablePicking(),t.interactor.render()}}function VZ(e,t){t.classHierarchy.push("vtkDistanceWidget"),t.methodsToLink=["activeScaleFactor","activeColor","useActiveColor","glyphResolution","defaultScale"],t.behavior=LZ,t.widgetState=CY.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:.1,visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:.1}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:IZ,labels:["handles"]},{builder:IZ,labels:["moveHandle"]},{builder:OZ,labels:["handles","moveHandle"]}]},e.getDistance=function(){var e=t.widgetState.getHandleList();return 2!==e.length?0:e[0].getOrigin()&&e[1].getOrigin()?Math.sqrt(wt(e[0].getOrigin(),e[1].getOrigin())):0},t.widgetState.onBoundsChange((function(e){var n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),t.manipulator=NY.newInstance()}var jZ={};function GZ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jZ,n),Nq.extend(e,t,n),Ae.setGet(e,t,["manipulator"]),VZ(e,t)}var UZ,zZ={newInstance:Ae.newInstance(GZ,"vtkDistanceWidget"),extend:GZ},WZ="POINTS",HZ="PLACEMENT",KZ="RATIO",XZ=(m(UZ={},WZ,{CORNER_TO_CORNER:0,CENTER_TO_CORNER:1,RADIUS:2,DIAMETER:3}),m(UZ,HZ,{CLICK:0,DRAG:1,CLICK_AND_DRAG:2}),m(UZ,KZ,{FIXED:0,FREE:1}),UZ),qZ="MIN",YZ="CENTER",ZZ="MAX";function JZ(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 QZ(e,t){t.classHierarchy.push("vtkShapeWidget"),t.methodsToLink=["scaleInPixels","textProps","fontProperties"]}function $Z(e){var t;return function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$Z(n)),Nq.extend(e,t,n),Ae.setGet(e,t,["modifierBehavior","resetAfterPointPlacement"]),QZ(0,t)}var tJ={newInstance:Ae.newInstance(eJ,"vtkShapeWidget"),extend:eJ},nJ={TOP:"TOP",BOTTOM:"BOTTOM",MIDDLE:"MIDDLE"};function rJ(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 iJ(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:16;if(null!=e&&e.fontSize){if("string"!=typeof e.fontSize)return window.devicePixelRatio*e.fontSize;if("px"===e.fontSize.slice(-2))return window.devicePixelRatio*parseInt(e.fontSize,10)}return window.devicePixelRatio*t}(t.fontProperties);d.forEach((function(r,i){var o=e.createListenableSvgElement("text",n);Object.keys(t.textProps||{}).forEach((function(e){o.setAttribute(e,t.textProps[e])})),o.setAttribute("x",l),o.setAttribute("y",u);var s=t.textProps.dy?t.textProps.dy:0;switch(t.textProps.verticalAlign){case nJ.MIDDLE:s-=p*(.5*d.length-i-1);break;case nJ.TOP:s+=p*(i+1);break;default:s-=p*(d.length-i-1)}o.setAttribute("dy",s),o.setAttribute("font-size",p),null!=t.fontProperties&&(o.setAttribute("font-family",t.fontProperties.fontFamily),o.setAttribute("font-weight",t.fontProperties.fontStyle),o.setAttribute("fill",t.fontProperties.fontColor)),o.textContent=r,a.appendChild(o)}))},l=0;l2&&void 0!==arguments[2]?arguments[2]:{};hq.extend(e,t,sJ(n)),Ae.setGet(e,t,["circleProps","fontProperties","name","textProps"]),aJ(e,t)}var uJ={extend:lJ,newInstance:Ae.newInstance(lJ,"vtkSVGLandmarkRepresentation")};function cJ(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 dJ=Ae.vtkErrorMacro,pJ=1e-6;function fJ(e,t){t.classHierarchy.push("vtkShapeWidgetProp"),t.keysDown={};var n=function(e){for(var t=1;td?u=u/d*c:l=l/c*d,[e[0]+l*o[0]+u*a[0]+s*i[0],e[1]+l*o[1]+u*a[1]+s*i[1],e[2]+l*o[2]+u*a[2]+s*i[2]]};var r=function(e,n){var r=oo(e,n),i=t.shapeHandle.getUp(),o=t.shapeHandle.getRight();return{point1:[e[0]+(i[0]-o[0])*r,e[1]+(i[1]-o[1])*r,e[2]+(i[2]-o[2])*r],point2:[e[0]+(o[0]-i[0])*r,e[1]+(o[1]-i[1])*r,e[2]+(o[2]-i[2])*r]}};e.getBounds=function(){return t.point1&&t.point2?Ln.computeBoundsFromPoints(t.point1,t.point2,[]):Ln.uninitializeBounds([])},e.setCorners=function(t,n){e.updateTextPosition(t,n)},e.updateShapeBounds=function(){if(t.point1&&t.point2){var n=w(t.point1),i=w(t.point2);switch(e.isRatioFixed()&&(i=e.makeSquareFromPoints(n,i)),e.getActiveBehaviorFromCategory(WZ)){case XZ[WZ].CORNER_TO_CORNER:e.setCorners(n,i);break;case XZ[WZ].CENTER_TO_CORNER:var o=[0,0,0];Yi(o,n,i),qi(n,n,o),e.setCorners(n,i);break;case XZ[WZ].RADIUS:var a=r(n,i);e.setCorners(a.point1,a.point2);break;case XZ[WZ].DIAMETER:var s=function(e,t){var n=[.5*(e[0]+t[0]),.5*(e[1]+t[1]),.5*(e[2]+t[2])];return r(n,e)}(n,i);e.setCorners(s.point1,s.point2);break;default:dJ("vtk internal error")}}};var i=function(e,t,n){var r=[0,0,0];switch(e){case qZ:break;case ZZ:Ln.subtract(n,t,r);break;default:Ln.subtract(n,t,r),Ln.multiplyScalar(r,.5)}return r};e.updateTextPosition=function(e,n){var r=function(e,n){var r,o,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=t.manipulator.getOrigin(),u=t.manipulator.getNormal(),c=t.renderer.getActiveCamera().getViewUp(),d=Array.isArray(s)?w(s):[s,s,l?s:0],p=(r=t.apiSpecificRenderWindow).worldToDisplay.apply(r,w(si.getMinPoint(e)).concat([t.renderer])),f=(o=t.apiSpecificRenderWindow).worldToDisplay.apply(o,w(si.getMaxPoint(e)).concat([t.renderer])),h=Ln.computeBoundsFromPoints(p,f,[]),m=[],g=[],v=[],y=[];if(l&&u&&c&&si.intersectPlane(h,l,u)){var b,x,S=(b=t.apiSpecificRenderWindow).worldToDisplay.apply(b,w(l).concat([t.renderer])),C=Ln.add(l,u,[]),A=(x=t.apiSpecificRenderWindow).worldToDisplay.apply(x,w(C).concat([t.renderer])),P=Ln.subtract(A,S),_=10*si.getDiagonalLength(h);Pr.projectPoint(si.getCenter(h),S,P,m);var O=Ln.cross(c,P,[]);Ln.normalize(O),Ln.normalize(c),Ln.normalize(P),Ln.multiplyAccumulate(m,c,-_,m),Ln.multiplyAccumulate(m,O,-_,m),y=m,lP(h,m,g=Ln.multiplyAccumulate(m,O,2*_,[]),v=Ln.multiplyAccumulate(m,c,2*_,[]))}else m=[h[0],h[2],h[4]],g=[h[1],h[2],h[4]],v=[h[0],h[3],h[4]],y=[h[0],h[2],h[5]];var T=i(n[0],m,g),D=i(n[1],m,v),E=i(n[2],m,y),I=m;return Ln.add(I,T,I),Ln.add(I,D,I),Ln.add(I,E,I),Ln.add(I,d,I),(a=t.apiSpecificRenderWindow).displayToWorld.apply(a,I.concat([t.renderer]))}(Ln.computeBoundsFromPoints(e,n,[]),t.widgetState.getTextPosition(),t.widgetState.getTextWorldMargin());t.widgetState.getText().setOrigin(r)},e.reset=function(){t.point1=null,t.point2=null,t.widgetState.getText().setVisible(!1),t.point1Handle.setOrigin(null),t.point2Handle.setOrigin(null),t.shapeHandle.setOrigin(null),t.shapeHandle.setVisible(!1),t.point2Handle.setVisible(!1),t.point2Handle.deactivate(),t.hasFocus?(t.point1Handle.activate(),t.activeState=t.point1Handle):(t.point1Handle.setVisible(!1),t.point1Handle.deactivate(),t.activeState=null),e.updateShapeBounds()},e.handleMouseMove=function(n){if(!(t.activeState&&t.activeState.getActive()&&t.pickable&&t.dragable&&t.manipulator))return Ae.VOID;if(!t.point2){var r=t.camera.getDirectionOfProjection(),i=t.camera.getViewUp(),o=[];fo(o,i,r),t.shapeHandle.setUp(i),t.shapeHandle.setRight(o),t.shapeHandle.setDirection(r),t.manipulator.setNormal(r)}var a=t.manipulator.handleEvent(n,t.apiSpecificRenderWindow);return a.length?(t.hasFocus?t.point1?(t.point2Handle.setOrigin(a),t.point2=a,e.updateShapeBounds(),e.invokeInteractionEvent()):t.point1Handle.setOrigin(a):t.isDragging&&(t.activeState===t.point1Handle?(t.point1Handle.setOrigin(a),t.point1=a):(t.point2Handle.setOrigin(a),t.point2=a),e.updateShapeBounds(),e.invokeInteractionEvent()),t.hasFocus?Ae.EVENT_ABORT:Ae.VOID):Ae.VOID},e.handleLeftButtonPress=function(n){return t.activeState&&t.activeState.getActive()&&t.pickable?t.hasFocus?(t.point1?(e.placePoint2(t.point2Handle.getOrigin()),e.invokeInteractionEvent(),e.invokeEndInteractionEvent(),e.getResetAfterPointPlacement()?e.reset():e.loseFocus()):(e.placePoint1(t.point1Handle.getOrigin()),e.invokeStartInteractionEvent()),Ae.EVENT_ABORT):!t.point1||t.activeState!==t.point1Handle&&t.activeState!==t.point2Handle?Ae.VOID:(t.isDragging=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent(),Ae.EVENT_ABORT):Ae.VOID},e.handleLeftButtonRelease=function(n){if(t.isDragging)return t.isDragging=!1,t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent(),Ae.EVENT_ABORT;if(!t.hasFocus||!t.pickable)return Ae.VOID;var r=t.apiSpecificRenderWindow.getSize();if(n.position.x<0||n.position.x>r[0]-1||n.position.y<0||n.position.y>r[1]-1)return Ae.VOID;if(t.point1&&(e.placePoint2(t.point2Handle.getOrigin()),e.isDraggingEnabled())){(ao(t.point1,t.point2)>100||e.isDraggingForced())&&(e.invokeInteractionEvent(),e.invokeEndInteractionEvent(),e.getResetAfterPointPlacement()?e.reset():e.loseFocus())}return Ae.EVENT_ABORT},e.handleKeyDown=function(n){var r=n.key;"Escape"===r?t.hasFocus&&(e.reset(),e.loseFocus(),e.invokeEndInteractionEvent()):t.keysDown[r]=!0,t.hasFocus&&t.point1&&(t.point2=t.point2Handle.getOrigin(),e.updateShapeBounds())},e.handleKeyUp=function(n){var r=n.key;t.keysDown[r]=!1,t.hasFocus&&t.point1&&(t.point2=t.point2Handle.getOrigin(),e.updateShapeBounds())},e.grabFocus=function(){t.hasFocus||(e.reset(),t.point1Handle.activate(),t.activeState=t.point1Handle,t.point1Handle.setVisible(!0),t.shapeHandle.setVisible(!1),t.interactor.requestAnimation(e)),n.grabFocus()},e.loseFocus=function(){t.hasFocus&&t.interactor.cancelAnimation(e),t.point1||(t.point1Handle.setVisible(!1),t.point2Handle.setVisible(!1)),t.widgetState.deactivate(),t.point1Handle.deactivate(),t.point2Handle.deactivate(),t.activeState=null,t.interactor.render(),t.widgetManager.enablePicking(),n.loseFocus()}}function hJ(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 mJ(e,t){t.shapeHandle=t.widgetState.getEllipseHandle(),t.point1Handle=t.widgetState.getPoint1Handle(),t.point2Handle=t.widgetState.getPoint2Handle(),t.point1Handle.setManipulator(t.manipulator),t.point2Handle.setManipulator(t.manipulator),fJ(e,t);var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};tJ.extend(e,t,yJ(n)),Ae.setGet(e,t,["manipulator","widgetState"]),vJ(e,t)}var wJ={newInstance:Ae.newInstance(bJ,"vtkEllipseWidget"),extend:bJ},xJ=Ae.vtkErrorMacro,SJ=[2,0,1,2,0,2,2,0,4,2,1,3,2,1,5,2,2,3,2,2,6,2,3,7,2,4,5,2,4,6,2,5,7,2,6,7];function CJ(e,t){var n;t.classHierarchy.push("vtkCroppingOutlineRepresentation"),t.internalPolyData=rc.newInstance({mtime:0}),t.points=new Float32Array(24),t.internalPolyData.getPoints().setData(t.points,3),t.internalPolyData.getLines().setData(Uint16Array.from(SJ)),t.mapper=cy.newInstance({scalarVisibility:!1}),t.actor=Rv.newInstance({parentProp:e}),(n=t.actor.getProperty()).setEdgeColor.apply(n,w(t.edgeColor)),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),e.addActor(t.actor),e.requestData=function(n,r){var i=e.getRepresentationStates(n[0]).filter((function(e){return e.getOrigin&&e.getOrigin()}));if(8===i.length){for(var o=0,a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,AJ,n),HY.extend(e,t,n),Ae.setGetArray(e,t,["edgeColor"],3),Ae.get(e,t,["mapper","actor"]),CJ(e,t)}var _J={newInstance:Ae.newInstance(PJ,"vtkCroppingOutlineRepresentation"),extend:PJ},OJ=["-","=","+"];function TJ(e,t){var n=new Float64Array(3);return yo(n,e,t),n}function DJ(e,t){var n=Ui(),r=Qg();return da(r,t),wo(n,e,r),n}function EJ(e){var t=y(e.split("").map((function(e){return OJ.indexOf(e)-1})),3),n=t[0],r=t[1],i=t[2];return n*r*i!=0?"corners":n*r!=0||r*i!=0||i*n!=0?"edges":"faces"}function IJ(e,t){var n=null;e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleLeftButtonPress=function(){return t.activeState&&t.activeState.getActive()&&t.pickable?(n=!0,t.interactor.requestAnimation(e),Ae.EVENT_ABORT):Ae.VOID},e.handleMouseMove=function(r){return n&&t.pickable&&t.dragable?e.handleEvent(r):Ae.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable&&(n=!1,t.interactor.cancelAnimation(e),t.widgetState.deactivate())},e.handleEvent=function(e){if(t.pickable&&t.activeState&&t.activeState.getActive()){var n=t.activeState.getManipulator();if(n){var r=t.activeState.getName(),i=EJ(r),o=r.split("").map((function(e){return OJ.indexOf(e)})),a=t.widgetState.getCroppingPlanes().getPlanes(),s=t.widgetState.getIndexToWorldT(),l=[];if("corners"===i&&(n.setNormal(t.camera.getDirectionOfProjection()),l=n.handleEvent(e,t.apiSpecificRenderWindow)),"faces"===i){var u=[1-o[0],1-o[1],1-o[2]],c=[(a[0]+a[1])/2,(a[2]+a[3])/2,(a[4]+a[5])/2];n.setOrigin(TJ(c,s)),n.setNormal(DJ(u,s)),l=n.handleEvent(e,t.apiSpecificRenderWindow)}if("edges"===i){var d=o.map((function(e){return 1===e?e:0}));n.setNormal(DJ(d,s)),l=n.handleEvent(e,t.apiSpecificRenderWindow)}if(l.length){for(var p,f,h=TJ(l,t.widgetState.getWorldToIndexT()),m=0;m<3;m++)0===o[m]?a[2*m]=h[m]:2===o[m]&&(a[2*m+1]=h[m]);return(p=t.activeState).setOrigin.apply(p,w(l)),(f=t.widgetState.getCroppingPlanes()).setPlanes.apply(f,w(a)),Ae.EVENT_ABORT}}}return Ae.VOID},t.camera=t.renderer.getActiveCamera(),t.classHierarchy.push("vtkImageCroppingWidgetProp")}var kJ=CY.createBuilder();kJ.addField({name:"indexToWorldT",initialValue:Array(16).fill(0)}).addField({name:"worldToIndexT",initialValue:Array(16).fill(0)});var MJ=CY.createBuilder().addField({name:"planes",initialValue:[0,1,0,1,0,1]}).build();kJ.addStateFromInstance({labels:["croppingPlanes"],name:"croppingPlanes",instance:MJ});for(var NJ=-1;NJ<2;NJ++)for(var RJ=-1;RJ<2;RJ++)for(var FJ=-1;FJ<2;FJ++)if(0!==NJ||0!==RJ||0!==FJ){var BJ=OJ[NJ+1]+OJ[RJ+1]+OJ[FJ+1],LJ=EJ(BJ);kJ.addStateFromMixin({labels:["handles",BJ,LJ],mixins:["name","origin","color","scale1","visible","manipulator"],name:BJ,initialValues:{scale1:10,origin:[NJ,RJ,FJ],visible:!0,name:BJ}})}function VJ(e,t){t.classHierarchy.push("vtkImageCroppingWidget");var n=null;function r(e,n){t.widgetState.getStatesWithLabel(e).forEach((function(e){e.setVisible(n)}))}e.setFaceHandlesEnabled=function(e){return r("faces",e)},e.setEdgeHandlesEnabled=function(e){return r("edges",e)},e.setCornerHandlesEnabled=function(e){return r("corners",e)},e.copyImageDataDescription=function(n){var r,i;(r=t.widgetState).setIndexToWorldT.apply(r,w(n.getIndexToWorld())),(i=t.widgetState).setWorldToIndexT.apply(i,w(n.getWorldToIndex()));var o=n.getDimensions();t.widgetState.getCroppingPlanes().setPlanes([0,o[0],0,o[1],0,o[2]]),e.modified()},e.updateHandles=function(){for(var e=t.widgetState.getCroppingPlanes().getPlanes(),n=[(e[0]+e[1])/2,(e[2]+e[3])/2,(e[4]+e[5])/2],r=[e[0],n[0],e[1]],i=[e[2],n[1],e[3]],o=[e[4],n[2],e[5]],a=t.widgetState.getIndexToWorldT(),s=function(e){return OJ[e]},l=0;l<3;l++)for(var u=0;u<3;u++)for(var c=0;c<3;c++)if(1!==l||1!==u||1!==c){var d=[l,u,c].map(s).join(""),p=TJ([r[l],i[u],o[c]],a),f=y(t.widgetState.getStatesWithLabel(d),1)[0];f.setOrigin.apply(f,w(p))}},e.delete=Ae.chain(e.delete,(function(){n&&n.unsubscribe()})),t.behavior=IJ,t.widgetState=kJ.build(),e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:IZ,labels:["handles"]},{builder:_J,labels:["corners"]}]},n=t.widgetState.getCroppingPlanes().onModified(e.updateHandles);var i=NY.newInstance(),o=DY.newInstance();t.widgetState.getStatesWithLabel("corners").forEach((function(e){return e.setManipulator(i)})),t.widgetState.getStatesWithLabel("edges").forEach((function(e){return e.setManipulator(i)})),t.widgetState.getStatesWithLabel("faces").forEach((function(e){return e.setManipulator(o)}))}var jJ={};function GJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,jJ,n),Nq.extend(e,t,n),VJ(e,t)}var UJ={newInstance:Ae.newInstance(GJ,"vtkImageCroppingWidget"),extend:GJ};function zJ(e,t){t.classHierarchy.push("vtkPlaneWidget");var n=null;e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.updateCursor=function(){switch(t.activeState.getUpdateMethodName()){case"updateFromOrigin":t.apiSpecificRenderWindow.setCursor("crosshair");break;case"updateFromPlane":t.apiSpecificRenderWindow.setCursor("move");break;case"updateFromNormal":t.apiSpecificRenderWindow.setCursor("alias");break;default:t.apiSpecificRenderWindow.setCursor("grabbing")}},e.handleLeftButtonPress=function(r){return t.activeState&&t.activeState.getActive()&&t.pickable?(n=!0,t.lineManipulator.setOrigin(t.widgetState.getOrigin()),t.planeManipulator.setOrigin(t.widgetState.getOrigin()),t.trackballManipulator.reset(r),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent(),Ae.EVENT_ABORT):Ae.VOID},e.handleMouseMove=function(r){return n&&t.pickable?e.handleEvent(r):Ae.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable&&(e.invokeEndInteractionEvent(),t.interactor.cancelAnimation(e)),n=!1,t.widgetState.deactivate()},e.handleEvent=function(n){return t.pickable&&t.activeState&&t.activeState.getActive()?(e[t.activeState.getUpdateMethodName()](n),e.invokeInteractionEvent(),Ae.EVENT_ABORT):Ae.VOID},e.updateFromOrigin=function(e){t.planeManipulator.setNormal(t.widgetState.getNormal());var n=t.planeManipulator.handleEvent(e,t.apiSpecificRenderWindow);t.widgetState.containsPoint(n)&&t.activeState.setOrigin(n)},e.updateFromPlane=function(e){var n;t.lineManipulator.setNormal(t.activeState.getNormal());var r=t.lineManipulator.handleEvent(e,t.apiSpecificRenderWindow);(n=t.widgetState).containsPoint.apply(n,w(r))&&t.activeState.setOrigin(r)},e.updateFromNormal=function(e){t.trackballManipulator.setNormal(t.activeState.getNormal());var n=t.trackballManipulator.handleEvent(e,t.apiSpecificRenderWindow);t.activeState.setNormal(n)},t.lineManipulator=DY.newInstance(),t.planeManipulator=NY.newInstance(),t.trackballManipulator=VY.newInstance()}function WJ(e,t){t.classHierarchy.push("vtkPlaneWidget"),t.widgetState=vZ.generateState(),t.behavior=zJ,t.methodsToLink=["representationStyle","sphereResolution","handleSizeRatio","axisScale","normalVisible","originVisible","planeVisible","outlineVisible"],e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:vZ}]}}var HJ={};function KJ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,HJ,n),Nq.extend(e,t,n),WJ(e,t)}var XJ={newInstance:Ae.newInstance(KJ,"vtkImplicitPlaneWidget"),extend:KJ};function qJ(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 YJ(e){for(var t=1;t0?e[1]:e[0],a=i[1]>0?e[3]:e[2],s=i[2]>0?e[5]:e[4];n[r].setOrigin(o,a,s)}},e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:$Y,labels:["---","--+","-++","-+-"],initialValues:{behavior:iq.HANDLE,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 1"}},{builder:$Y,labels:["---","+--","+-+","--+"],initialValues:{behavior:iq.HANDLE,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 2"}},{builder:$Y,labels:["+--","++-","+++","+-+"],initialValues:{behavior:iq.HANDLE,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 3"}},{builder:$Y,labels:["++-","-+-","-++","+++"],initialValues:{behavior:iq.HANDLE,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 4"}},{builder:$Y,labels:["-++","--+","+-+","+++"],initialValues:{behavior:iq.HANDLE,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 5"}},{builder:$Y,labels:["-+-","++-","+--","---"],initialValues:{behavior:iq.HANDLE,pickable:!0,activeScaleFactor:1.2,activeColor:1,useActiveColor:!0,name:"Face 6"}}]}}var eQ={};function tQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,eQ,n),Nq.extend(e,t,n),$J(e,t)}var nQ={newInstance:Ae.newInstance(tQ,"vtkInteractiveOrientationWidget"),extend:tQ},rQ=CY.createBuilder().addField({name:"posOnLine",initialValue:.5}).build();function iQ(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 oQ={TRIANGLE:"triangle",STAR:"star",ARROW_4:"arrow4points",ARROW_6:"arrow6points"};function aQ(e,t){var n=rc.newInstance(),r=Ae.newTypedArray(t.pointType,30),i=new Uint32Array(11);i[0]=10;for(var o=0;o<10;o++){var a=o%2==1?t.height:.4*t.height;r[3*o+0]=a*Math.cos((2*o-1)*Math.PI/10),r[3*o+1]=a*Math.sin((2*o-1)*Math.PI/10),r[3*o+2]=0,i[1+o]=o}return n.getPoints().setData(r,3),n.getPolys().setData(i,1),n}function sQ(e,t){var n=rc.newInstance(),r=Ae.newTypedArray(t.pointType,18),i=.5*t.height*t.thickness,o=.5*t.height-i,a=(.9*t.height+i-o-(.5*t.height-i-o))*(1-t.base);r[0]=t.width/2*-1-i,r[1]=t.height/4-o-a,r[2]=0,r[3]=0,r[4]=.9*t.height+i-o-a,r[5]=0,r[6]=t.width/2+i,r[7]=t.height/4-o-a,r[8]=0,r[9]=t.width/3,r[10]=.1*t.height-i-o-a,r[11]=0,r[12]=0,r[13]=.5*t.height-i-o-a,r[14]=0,r[15]=t.width/3*-1,r[16]=.1*t.height-i-o-a,r[17]=0;var s=Uint8Array.from([3,0,1,5,3,1,4,5,3,1,4,3,3,1,2,3]);return n.getPoints().setData(r,3),n.getPolys().setData(s,1),n}function lQ(e,t){var n=rc.newInstance(),r=Ae.newTypedArray(t.pointType,12),i=t.height/3*t.thickness,o=t.height/3-i,a=(t.height-o-(t.height/3-i-o))*(1-t.base);r[0]=t.width/2*-1,r[1]=0-o-a,r[2]=0,r[3]=0,r[4]=t.height-o-a,r[5]=0,r[6]=t.width/2,r[7]=0-o-a,r[8]=0,r[9]=0,r[10]=t.height/3-i-o-a,r[11]=0;var s=Uint8Array.from([3,0,1,3,3,1,2,3]);return n.getPoints().setData(r,3),n.getPolys().setData(s,1),n}function uQ(e,t){var n=rc.newInstance(),r=Ae.newTypedArray(t.pointType,9),i=t.height*(1-t.base);r[0]=t.width/2*-1,r[1]=0-i,r[2]=0,r[3]=0,r[4]=t.height-i,r[5]=0,r[6]=t.width/2,r[7]=0-i,r[8]=0;var o=Uint8Array.from([3,0,1,2]);return n.getPoints().setData(r,3),n.getPolys().setData(o,1),n}function cQ(e,t){var n,r=(m(n={},oQ.TRIANGLE,uQ),m(n,oQ.STAR,aQ),m(n,oQ.ARROW_4,lQ),m(n,oQ.ARROW_6,sQ),n);e.requestData=function(n,i){var o;i[0]=r[t.shape](e,t),(o=Gs.buildFromRadian()).translate.apply(o,w(t.center)).rotateFromDirections([1,0,0],t.direction).apply(i[0].getPoints().getData())}}function dQ(e){return function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,dQ(n)),Ae.obj(e,t),Ae.setGet(e,t,["height","width","thickness","base"]),Ae.setGetArray(e,t,["center","direction"],3),Ae.algo(e,t,0,1),cQ(e,t)}var fQ={newInstance:Ae.newInstance(pQ,"vtkArrow2DSource"),extend:pQ};function hQ(e,t){e.requestData=function(e,n){var r,i=rc.newInstance(),o=Ae.newTypedArray(t.pointType,48);o[0]=t.radius,o[1]=t.radius/t.width,o[2]=0,o[3]=t.radius+t.spacing,o[4]=t.radius/t.width,o[5]=0,o[6]=t.radius,o[7]=t.radius/t.width*-1,o[8]=0,o[9]=t.radius+t.spacing,o[10]=t.radius/t.width*-1,o[11]=0,o[12]=-1*t.radius,o[13]=t.radius/t.width,o[14]=0,o[15]=-1*(t.radius+t.spacing),o[16]=t.radius/t.width,o[17]=0,o[18]=-1*t.radius,o[19]=t.radius/t.width*-1,o[20]=0,o[21]=-1*(t.radius+t.spacing),o[22]=t.radius/t.width*-1,o[23]=0,o[24]=t.radius/t.width,o[25]=t.radius,o[26]=0,o[27]=t.radius/t.width,o[28]=t.radius+t.spacing,o[29]=0,o[30]=t.radius/t.width*-1,o[31]=t.radius,o[32]=0,o[33]=t.radius/t.width*-1,o[34]=t.radius+t.spacing,o[35]=0,o[36]=t.radius/t.width,o[37]=-1*t.radius,o[38]=0,o[39]=t.radius/t.width,o[40]=-1*(t.radius+t.spacing),o[41]=0,o[42]=t.radius/t.width*-1,o[43]=-1*t.radius,o[44]=0,o[45]=t.radius/t.width*-1,o[46]=-1*(t.radius+t.spacing),o[47]=0;var a=Uint8Array.from([3,0,1,2,3,2,1,3,3,4,6,5,3,6,5,7,3,8,11,9,3,8,10,11,3,12,13,15,3,12,15,14]);(r=Gs.buildFromRadian()).translate.apply(r,w(t.center)).rotateFromDirections([1,0,0],t.orientation).apply(o),i.getPoints().setData(o,3),i.getPolys().setData(a,1),n[0]=i}}var mQ={radius:1,spacing:2,width:4,pointType:"Float32Array"};function gQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.center=[0,0,0],t.orientation=[1,0,0],Object.assign(t,mQ,n),Ae.obj(e,t),Ae.setGet(e,t,["radius","spacing","width"]),Ae.setGetArray(e,t,["center","orientation"],3),Ae.algo(e,t,0,1),hQ(e,t)}var vQ={newInstance:Ae.newInstance(gQ,"vtkArrow2DSource"),extend:gQ},yQ={NONE:"voidSphere",SPHERE:"sphere",CUBE:"cube",CONE:"cone",ARROWHEAD3:"triangle",ARROWHEAD4:"4pointsArrowHead",ARROWHEAD6:"6pointsArrowHead",STAR:"star",DISK:"disk",CIRCLE:"circle",VIEWFINDER:"viewFinder"},bQ={ShapeType:yQ,Shapes2D:[yQ.ARROWHEAD3,yQ.ARROWHEAD4,yQ.ARROWHEAD6,yQ.STAR,yQ.DISK,yQ.CIRCLE,yQ.VIEWFINDER],Shapes3D:[yQ.SPHERE,yQ.CUBE,yQ.CONE],ShapesOrientable:[yQ.CONE,yQ.ARROWHEAD3,yQ.ARROWHEAD4,yQ.ARROWHEAD6]};function wQ(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 xQ(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:aP.FRONT_BUFFER,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.getRepresentationStates()[0];n.updateActorVisibility(t,r,i&&o.isVisible())}}function _Q(e){return xQ({defaultScale:1,faceCamera:null,orientation:[1,0,0],shape:SQ.SPHERE,viewMatrix:zo(new Float64Array(16))},e)}function OQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,_Q(n)),iZ.extend(e,t,n),Ae.get(e,t,["glyph","mapper","actor"]),Ae.setGetArray(e,t,["visibilityFlagArray"],2),Ae.setGetArray(e,t,["orientation"],3),Ae.setGetArray(e,t,["viewMatrix"],16),Ae.setGet(e,t,["faceCamera"]),PQ(e,t)}var TQ={newInstance:Ae.newInstance(OQ,"vtkArrowHandleRepresentation"),extend:OQ};function DQ(e){var t=[0,0,0],n=e.widgetState.getHandle1().getOrigin(),r=e.widgetState.getHandle2().getOrigin();if(!n||!r)return null;var i=e.widgetState.getPositionOnLine().getPosOnLine();return i=1-i,at(n,r,t),st(t,i),ot(t,r,t),t}function EQ(e){e.widgetState.getText().setOrigin(DQ(e))}function IQ(e,t){var n=t.getHandle1().getOrigin();if(0===e)return null!=n;var r=t.getHandle2().getOrigin();return n&&r&&!jt(n,r,0)}function kQ(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=n&&!IQ(e,t)?t.getMoveHandle():t["getHandle".concat(e+1)](),i=r.getOrigin();return i||null}function MQ(e){var t=0;return IQ(0,e)&&(t=1+IQ(1,e)),t}function NQ(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 RQ=bQ.ShapeType,FQ=["getHandle1","getHandle2","getMoveHandle"];function BQ(e,t){function n(e){return e.altKey||e.controlKey||e.shiftKey}function r(e,t){var n=at(e,t,[]);return mt(n),n}function i(n,r){var i=e.computeWorldToDisplay.apply(e,[t.renderer].concat(w(n)));return e.computeDisplayToWorld(t.renderer,r.position.x,r.position.y,i[2])}function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=kQ(e,t.widgetState),a=n?i(o,n):kQ(1-e,t.widgetState);return o&&a?r(o,a):null}function a(e){var n=o(Math.min(1,e));t.representations[e].setOrientation(n)}t.classHierarchy.push("vtkLineWidgetProp"),e.getHandle=function(e){return t.widgetState[FQ[e]]()},e.isPlaced=function(){return 2===MQ(t.widgetState)},e.placeText=function(){var n=function(){var t=e.getHandle(0).getOrigin(),n=e.getHandle(1).getOrigin(),r=1;return t&&n&&(r=t[0]<=n[0]?t[1]<=n[1]?1:-1:t[1]<=n[1]?-1:1),r}(),r=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,VQ,n),Nq.extend(e,t,n),Ae.setGet(e,t,["manipulator","isDragging"]),LQ(e,t)}var GQ={newInstance:Ae.newInstance(jQ,"vtkLineWidget"),extend:jQ};function UQ(e,t){t.painting=t.factory.getPainting(),e.handleLeftButtonPress=function(n){return t.activeState&&t.activeState.getActive()?(t.painting=!0,t.widgetState.addTrail().set(t.activeState.get("origin","up","right","direction","scale1")),e.invokeStartInteractionEvent(),Ae.EVENT_ABORT):Ae.VOID},e.handleMouseMove=function(t){return e.handleEvent(t)},e.handleLeftButtonRelease=function(){return t.painting&&(e.invokeEndInteractionEvent(),t.widgetState.clearTrailList()),t.painting=!1,t.hasFocus?Ae.EVENT_ABORT:Ae.VOID},e.handleEvent=function(n){if(t.manipulator&&t.activeState&&t.activeState.getActive()){var r,i,o,a=t.camera.getDirectionOfProjection(),s=t.camera.getViewUp(),l=[];fo(l,s,a),(r=t.activeState).setUp.apply(r,w(s)),(i=t.activeState).setRight.apply(i,l),(o=t.activeState).setDirection.apply(o,w(a)),t.manipulator.setNormal(a);var u,c,d=t.manipulator.handleEvent(n,t.apiSpecificRenderWindow);if(d.length)if((u=t.widgetState).setTrueOrigin.apply(u,w(d)),(c=t.activeState).setOrigin.apply(c,w(d)),t.painting)t.widgetState.addTrail().set(t.activeState.get("origin","up","right","direction","scale1"));return e.invokeInteractionEvent(),Ae.EVENT_ABORT}return Ae.VOID},e.grabFocus=function(){if(!t.hasFocus){t.activeState=t.widgetState.getHandle(),t.activeState.activate(),t.interactor.requestAnimation(e);var n=t.apiSpecificRenderWindow.getCanvas();n.onmouseenter=function(){t.hasFocus&&t.activeState===t.widgetState.getHandle()&&t.activeState.setVisible(!0)},n.onmouseleave=function(){t.hasFocus&&t.activeState===t.widgetState.getHandle()&&t.activeState.setVisible(!1)}}t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&t.interactor.cancelAnimation(e),t.widgetState.deactivate(),t.widgetState.getHandle().deactivate(),t.activeState=null,t.hasFocus=!1},Ae.get(e,t,["painting"])}function zQ(e,t){var n;t.classHierarchy.push("vtkPaintWidget"),t.behavior=UQ,t.widgetState=(n=t.radius,CY.createBuilder().addField({name:"trueOrigin",initialValue:[0,0,0]}).addStateFromMixin({labels:["handle"],mixins:["origin","color","scale1","orientation","manipulator","visible"],name:"handle",initialValues:{scale1:2*n,orientation:[1,0,0,0,1,0,0,0,1]}}).addDynamicMixinState({labels:["trail"],mixins:["origin","color","scale1","orientation","visible"],name:"trail",initialValues:{scale1:2*n,orientation:[1,0,0,0,1,0,0,0,1]}}).build()),e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:return[{builder:YY,labels:["handle","trail"]}];case oP.VOLUME:default:return[{builder:IZ,labels:["handle"]}]}};var r=t.widgetState.getHandle();t.manipulator=NY.newInstance(),r.setManipulator(t.manipulator);var i=e.setRadius;e.setRadius=function(e){i(e)&&r.setScale1(e)}}var WQ={manipulator:null,radius:1,painting:!1,color:[1]};function HQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,WQ,n),Nq.extend(e,t,n),Ae.get(e,t,["painting"]),Ae.setGet(e,t,["manipulator","radius","color"]),zQ(e,t)}var KQ={newInstance:Ae.newInstance(HQ,"vtkPaintWidget"),extend:HQ};function XQ(e,t){t.classHierarchy.push("vtkPolyLineWidgetProp");var n=null;function r(e){return e.altKey||e.controlKey||e.shiftKey}e.setDisplayCallback=function(e){return t.representations[0].setDisplayCallback(e)},e.handleRightButtonPress=function(n){return t.activeState&&t.activeState.getActive()&&t.pickable&&!r(n)?(t.activeState!==t.widgetState.getMoveHandle()&&(t.interactor.requestAnimation(e),t.activeState.deactivate(),t.widgetState.removeHandle(t.activeState),t.activeState=null,t.interactor.cancelAnimation(e)),e.invokeStartInteractionEvent(),e.invokeInteractionEvent(),e.invokeEndInteractionEvent(),Ae.EVENT_ABORT):Ae.VOID},e.handleLeftButtonPress=function(i){if(!t.activeState||!t.activeState.getActive()||!t.pickable||r(i))return Ae.VOID;if(t.activeState===t.widgetState.getMoveHandle()){var o=t.widgetState.getMoveHandle(),a=t.widgetState.addHandle();a.setOrigin.apply(a,w(o.getOrigin())),a.setColor(o.getColor()),a.setScale1(o.getScale1())}else n=!0,t.apiSpecificRenderWindow.setCursor("grabbing"),t.interactor.requestAnimation(e);return e.invokeStartInteractionEvent(),Ae.EVENT_ABORT},e.handleMouseMove=function(i){if(t.pickable&&t.dragable&&t.manipulator&&t.activeState&&t.activeState.getActive()&&!r(i)){t.manipulator.setOrigin(t.activeState.getOrigin()),t.manipulator.setNormal(t.camera.getDirectionOfProjection());var o=t.manipulator.handleEvent(i,t.apiSpecificRenderWindow);if(o.length&&(t.activeState===t.widgetState.getMoveHandle()||n))return t.activeState.setOrigin(o),e.invokeInteractionEvent(),Ae.EVENT_ABORT}return t.hasFocus&&t.widgetManager.disablePicking(),Ae.VOID},e.handleLeftButtonRelease=function(){n&&t.pickable?(t.apiSpecificRenderWindow.setCursor("pointer"),t.widgetState.deactivate(),t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()):t.activeState!==t.widgetState.getMoveHandle()&&t.widgetState.deactivate(),(t.hasFocus&&!t.activeState||t.activeState&&!t.activeState.getActive())&&(e.invokeEndInteractionEvent(),t.widgetManager.enablePicking(),t.interactor.render()),n=!1},e.handleKeyDown=function(t){"Escape"===t.key&&e.loseFocus()},e.grabFocus=function(){t.hasFocus||(t.activeState=t.widgetState.getMoveHandle(),t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),e.invokeStartInteractionEvent()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&(t.interactor.cancelAnimation(e),e.invokeEndInteractionEvent()),t.widgetState.deactivate(),t.widgetState.getMoveHandle().deactivate(),t.widgetState.getMoveHandle().setVisible(!1),t.activeState=null,t.hasFocus=!1,t.widgetManager.enablePicking(),t.interactor.render()}}function qQ(e,t){t.classHierarchy.push("vtkPolyLineWidget"),t.methodsToLink=["activeColor","activeScaleFactor","closePolyLine","defaultScale","glyphResolution","lineThickness","useActiveColor","scaleInPixels"],t.behavior=XQ,t.widgetState=CY.createBuilder().addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:30,visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:30}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:IZ,labels:["handles"],initialValues:{scaleInPixels:!0}},{builder:IZ,labels:["moveHandle"],initialValues:{scaleInPixels:!0}},{builder:uJ,initialValues:{textProps:{dx:12,dy:-12}},labels:["handles"]},{builder:OZ,labels:["handles","moveHandle"]}]},t.widgetState.onBoundsChange((function(e){var n=[.5*(e[0]+e[1]),.5*(e[2]+e[3]),.5*(e[4]+e[5])];t.widgetState.getMoveHandle().setOrigin(n)})),t.manipulator=NY.newInstance()}var YQ={};function ZQ(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,YQ,n),Nq.extend(e,t,n),Ae.setGet(e,t,["manipulator"]),qQ(e,t)}var JQ={newInstance:Ae.newInstance(ZQ,"vtkPolyLineWidget"),extend:ZQ};function QQ(e,t){t.classHierarchy.push("vtkRectangleContextRepresentation"),t.mapper=cy.newInstance(),t.actor=Rv.newInstance({parentProp:e}),t.mapper.setInputConnection(e.getOutputPort()),t.actor.setMapper(t.mapper),t.actor.getProperty().setOpacity(.2),t.actor.getProperty().setColor(0,1,0),e.addActor(t.actor),e.setDrawBorder=function(e){t.drawBorder=e},e.setDrawFace=function(e){t.drawFace=e},e.setOpacity=function(e){t.actor.getProperty().setOpacity(e)},e.requestData=function(n,r){if(!t.deleted){var i=e.getRepresentationStates(n[0])[0],o=rc.newInstance();if(i.getVisible()&&i.getOrigin()){var a=i.getOrigin(),s=i.getCorner(),l=[0,0,0];Yi(l,s,a);var u=i.getUp(),c=po(l,u),d=new Float32Array(12);if(d[0]=a[0],d[1]=a[1],d[2]=a[2],d[3]=a[0]+c*u[0],d[4]=a[1]+c*u[1],d[5]=a[2]+c*u[2],d[6]=s[0],d[7]=s[1],d[8]=s[2],d[9]=s[0]-c*u[0],d[10]=s[1]-c*u[1],d[11]=s[2]-c*u[2],o.getPoints().setData(d,3),t.drawFace){var p=new Uint32Array([4,0,1,2,3]);o.getPolys().setData(p,1)}if(t.drawBorder){var f=new Uint32Array([5,0,1,2,3,0]);o.getLines().setData(f,1)}}else o.getPoints().setData([],0),o.getPolys().setData([],0),o.getLines().setData([],0);r[0]=o}},e.getSelectedState=function(e,n){return t.state}}var $Q={drawBorder:!1,drawFace:!0};function e$(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,$Q,n),HY.extend(e,t,n),Ae.setGetArray(e,t,["color"],1),Ae.get(e,t,["mapper","actor"]),QQ(e,t)}var t$={newInstance:Ae.newInstance(e$,"vtkRectangleContextRepresentation"),extend:e$};function n$(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 r$(e,t){t.shapeHandle=t.widgetState.getRectangleHandle(),t.point1Handle=t.widgetState.getPoint1Handle(),t.point2Handle=t.widgetState.getPoint2Handle(),t.point1Handle.setManipulator(t.manipulator),t.point2Handle.setManipulator(t.manipulator),fJ(e,t);var n=function(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};tJ.extend(e,t,a$(n)),Ae.setGet(e,t,["manipulator","widgetState"]),o$(e,t)}var l$,u$,c$={newInstance:Ae.newInstance(s$,"vtkRectangleWidget"),extend:s$},d$={MIDDLE_MOUSE_BUTTON:0,LEFT_MOUSE_BUTTON:1,RIGHT_MOUSE_BUTTON:2},p$={TranslateAxis:"translateAxis",RotateLine:"rotateLine",TranslateCenter:"translateCenter"};m(l$={},oP.YZ_PLANE,[0,0,1]),m(l$,oP.XZ_PLANE,[0,0,1]),m(l$,oP.XY_PLANE,[0,-1,0]),oP.YZ_PLANE,oP.XZ_PLANE,oP.XY_PLANE,m(u$={},oP.YZ_PLANE,0),m(u$,oP.XZ_PLANE,1),m(u$,oP.XY_PLANE,2);function f$(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 h$(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,g$(n)),cq.extend(e,t,n),Ae.setGet(e,t,["rotationHandlePosition"]),m$(e,t)}var y$={newInstance:Ae.newInstance(v$,"vtkResliceCursorContextRepresentation"),extend:v$};function b$(e,t){var n=null,r=!1;e.resetUpdateMethod=function(){0!==t.representations.length&&t.representations[0].getSelectedState()},e.startScrolling=function(n){n&&(t.previousPosition=n),r=!0,e.resetUpdateMethod(),e.startInteraction()},e.endScrolling=function(){r=!1,e.endInteraction()},e.updateCursor=function(){switch(t.activeState.getUpdateMethodName()){case p$.TranslateCenter:t.apiSpecificRenderWindow.setCursor("move");break;case p$.RotateLine:t.apiSpecificRenderWindow.setCursor("alias");break;case p$.TranslateAxis:t.apiSpecificRenderWindow.setCursor("pointer");break;default:t.apiSpecificRenderWindow.setCursor("default")}},e.handleLeftButtonPress=function(r){if(t.activeState&&t.activeState.getActive()){n=!0;var i=t.widgetState.getActiveViewType(),o=t.widgetState.getPlanes()[i].normal;t.planeManipulator.setOrigin(t.widgetState.getCenter()),t.planeManipulator.setNormal(o),e.startInteraction()}else{if(t.widgetState.getScrollingMethod()!==d$.LEFT_MOUSE_BUTTON)return Ae.VOID;e.startScrolling(r.position)}return Ae.EVENT_ABORT},e.handleMouseMove=function(i){if(n&&t.pickable&&t.dragable)return e.handleEvent(i);if(r&&t.previousPosition.y!==i.position.y){var o=t.previousPosition.y-i.position.y;e.translateCenterOnCurrentDirection(o,i.pokedRenderer),t.previousPosition=i.position,e.invokeInternalInteractionEvent()}return Ae.VOID},e.handleLeftButtonRelease=function(){(n||r)&&e.endScrolling(),n=!1,t.widgetState.deactivate()},e.handleRightButtonPress=function(n){t.widgetState.getScrollingMethod()===d$.RIGHT_MOUSE_BUTTON&&e.startScrolling(n.position)},e.handleRightButtonRelease=function(n){t.widgetState.getScrollingMethod()===d$.RIGHT_MOUSE_BUTTON&&e.endScrolling()},e.handleStartMouseWheel=function(t){e.resetUpdateMethod(),e.startInteraction()},e.handleMouseWheel=function(t){var n=t.spinY;return r=!0,e.translateCenterOnCurrentDirection(n,t.pokedRenderer),e.invokeInternalInteractionEvent(),r=!1,Ae.EVENT_ABORT},e.handleEndMouseWheel=function(t){e.endScrolling()},e.handleMiddleButtonPress=function(n){t.widgetState.getScrollingMethod()===d$.MIDDLE_MOUSE_BUTTON&&e.startScrolling(n.position)},e.handleMiddleButtonRelease=function(n){t.widgetState.getScrollingMethod()===d$.MIDDLE_MOUSE_BUTTON&&e.endScrolling()},e.handleEvent=function(n){return t.activeState.getActive()?(e[t.activeState.getUpdateMethodName()](n),e.invokeInternalInteractionEvent(),Ae.EVENT_ABORT):Ae.VOID},e.invokeInternalInteractionEvent=function(){var n=t.activeState?t.activeState.getUpdateMethodName():"",r=n!==p$.RotateLine,i=n===p$.RotateLine;e.invokeInteractionEvent({computeFocalPointOffset:r,canUpdateFocalPoint:i})},e.startInteraction=function(){e.invokeStartInteractionEvent(),e.getViewWidgets().forEach((function(t){t.getInteractor().requestAnimation(e)}))},e.endInteraction=function(){e.invokeEndInteractionEvent(),e.getViewWidgets().forEach((function(t){t.getInteractor().cancelAnimation(e)}))},e.translateCenterOnCurrentDirection=function(n,r){var i=r.getRenderWindow().getRenderers()[0].getActiveCamera().getDirectionOfProjection(),o=st(i,-1),a=t.widgetState.getCenter(),s=t.widgetState.getImage().getSpacing(),l=i.map((function(e){return Math.abs(e)})),u=l.indexOf(Math.max.apply(Math,w(l))),c=n*(s[u]/i[u]),d=[a[0]+c*o[0],a[1]+c*o[1],a[2]+c*o[2]];d=e.getBoundedCenter(d),t.widgetState.setCenter(d),dP(t.widgetState)},e[p$.TranslateAxis]=function(n){var r=t.widgetState.getActiveLineState(),i=t.planeManipulator.handleEvent(n,t.apiSpecificRenderWindow),o=r.getPoint1(),a=r.getPoint2(),s=fP(r.getName()),l=t.widgetState["get".concat(s)](),u=at(l.getPoint2(),l.getPoint1(),[]);mt(u);var c=u,d=at(a,o,[0,0,0]);mt(d);var p=dt(d,u);1!==p&&-1!==p||ft(d,t.planeManipulator.getNormal(),c);var f=[];mu.distanceToLine(i,o,a,f);var h=dt(at(i,f,[]),c),m=ut(t.widgetState.getCenter(),c,h,[0,0,0]);m=e.getBoundedCenter(m),t.widgetState.setCenter(m),dP(t.widgetState)},e.getBoundedCenter=function(e){var n=t.widgetState.getCenter(),r=t.widgetState.getImage().getBounds();return si.containsPoint.apply(si,[r].concat(w(e)))?e:function(e,t,n){var r=[0,0,0];at(t,e,r);var i=[0,0,0];return si.intersectBox(n,e,r,i,[0,0,0]),i}(e,n,r)},e[p$.TranslateCenter]=function(n){var r=t.planeManipulator.handleEvent(n,t.apiSpecificRenderWindow);r=e.getBoundedCenter(r),t.activeState.setCenter(r),dP(t.widgetState)},e[p$.RotateLine]=function(n){var r=t.widgetState.getActiveLineState(),i=t.planeManipulator.getNormal(),o=t.planeManipulator.handleEvent(n,t.apiSpecificRenderWindow),a=t.widgetState.getCenter(),s=at(r.getPoint1(),r.getPoint2(),[]);mt(s),"point1"===t.widgetState.getActiveRotationPointName()&&st(s,-1);var l=[0,0,0];at(o,a,l),mt(l);var u=St(s,l,i);e.rotateLineInView(r,u)},e.rotateLineInView=function(n,r){var i=n.getViewType(),o=n.getInViewType(),a=t.widgetState.getPlanes()[o].normal;if(e.rotatePlane(i,r,a),t.widgetState.getKeepOrthogonality()){var s=fP(n.getName()),l=t.widgetState["get".concat(s)]().getViewType();e.rotatePlane(l,r,a)}dP(t.widgetState)},e.rotatePlane=function(e,n,r){var i=t.widgetState.getPlanes()[e],o=i.normal,a=i.viewUp,s=uP(o,r,n),l=uP(a,r,n);t.widgetState.getPlanes()[e]={normal:s,viewUp:l}},t.planeManipulator=NY.newInstance()}var w$=[1,0,0],x$=[0,1,0],S$=[0,0,1];var C$=Ae.vtkErrorMacro;function A$(e,t){var n;t.classHierarchy.push("vtkResliceCursorWidget"),t.methodsToLink=["scaleInPixels","rotationHandlePosition"],t.behavior=b$,t.widgetState=CY.createBuilder().addStateFromInstance({labels:["AxisXinY"],name:"AxisXinY",instance:CY.createBuilder().addField({name:"point1",initialValue:[0,0,-1]}).addField({name:"point2",initialValue:[0,0,1]}).addField({name:"color",initialValue:w$}).addField({name:"name",initialValue:"AxisXinY"}).addField({name:"viewType",initialValue:oP.YZ_PLANE}).addField({name:"inViewType",initialValue:oP.XZ_PLANE}).build()}).addStateFromInstance({labels:["AxisXinZ"],name:"AxisXinZ",instance:CY.createBuilder().addField({name:"point1",initialValue:[0,-1,0]}).addField({name:"point2",initialValue:[0,1,0]}).addField({name:"color",initialValue:w$}).addField({name:"name",initialValue:"AxisXinZ"}).addField({name:"viewType",initialValue:oP.YZ_PLANE}).addField({name:"inViewType",initialValue:oP.XY_PLANE}).build()}).addStateFromInstance({labels:["AxisYinX"],name:"AxisYinX",instance:CY.createBuilder().addField({name:"point1",initialValue:[0,0,-1]}).addField({name:"point2",initialValue:[0,0,1]}).addField({name:"color",initialValue:x$}).addField({name:"name",initialValue:"AxisYinX"}).addField({name:"viewType",initialValue:oP.XZ_PLANE}).addField({name:"inViewType",initialValue:oP.YZ_PLANE}).build()}).addStateFromInstance({labels:["AxisYinZ"],name:"AxisYinZ",instance:CY.createBuilder().addField({name:"point1",initialValue:[-1,0,0]}).addField({name:"point2",initialValue:[1,0,0]}).addField({name:"color",initialValue:x$}).addField({name:"name",initialValue:"AxisYinZ"}).addField({name:"viewType",initialValue:oP.XZ_PLANE}).addField({name:"inViewType",initialValue:oP.XY_PLANE}).build()}).addStateFromInstance({labels:["AxisZinX"],name:"AxisZinX",instance:CY.createBuilder().addField({name:"point1",initialValue:[0,-1,0]}).addField({name:"point2",initialValue:[0,1,0]}).addField({name:"color",initialValue:S$}).addField({name:"name",initialValue:"AxisZinX"}).addField({name:"viewType",initialValue:oP.XY_PLANE}).addField({name:"inViewType",initialValue:oP.YZ_PLANE}).build()}).addStateFromInstance({labels:["AxisZinY"],name:"AxisZinY",instance:CY.createBuilder().addField({name:"point1",initialValue:[-1,0,0]}).addField({name:"point2",initialValue:[1,0,0]}).addField({name:"color",initialValue:S$}).addField({name:"name",initialValue:"AxisZinY"}).addField({name:"viewType",initialValue:oP.XY_PLANE}).addField({name:"inViewType",initialValue:oP.XZ_PLANE}).build()}).addField({name:"center",initialValue:[0,0,0]}).addField({name:"opacity",initialValue:1}).addField({name:"activeLineState",initialValue:null}).addField({name:"activeRotationPointName",initialValue:""}).addField({name:"image",initialValue:null}).addField({name:"activeViewType",initialValue:null}).addField({name:"lineThickness",initialValue:2}).addField({name:"sphereRadius",initialValue:5}).addField({name:"showCenter",initialValue:!0}).addField({name:"updateMethodName"}).addField({name:"planes",initialValue:(n={},m(n,oP.YZ_PLANE,{normal:[1,0,0],viewUp:[0,0,1]}),m(n,oP.XZ_PLANE,{normal:[0,-1,0],viewUp:[0,0,1]}),m(n,oP.XY_PLANE,{normal:[0,0,-1],viewUp:[0,-1,0]}),n)}).addField({name:"enableRotation",initialValue:!0}).addField({name:"enableTranslation",initialValue:!0}).addField({name:"keepOrthogonality",initialValue:!1}).addField({name:"scrollingMethod",initialValue:d$.MIDDLE_MOUSE_BUTTON}).addField({name:"cameraOffsets",initialValue:{}}).addField({name:"viewUpFromViewType",initialValue:{}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case oP.XY_PLANE:return[{builder:y$,labels:["AxisXinZ","AxisYinZ"],initialValues:{axis1Name:"AxisXinZ",axis2Name:"AxisYinZ",viewType:oP.XY_PLANE,rotationEnabled:t.widgetState.getEnableRotation()}}];case oP.XZ_PLANE:return[{builder:y$,labels:["AxisXinY","AxisZinY"],initialValues:{axis1Name:"AxisXinY",axis2Name:"AxisZinY",viewType:oP.XZ_PLANE,rotationEnabled:t.widgetState.getEnableRotation()}}];case oP.YZ_PLANE:return[{builder:y$,labels:["AxisYinX","AxisZinX"],initialValues:{axis1Name:"AxisYinX",axis2Name:"AxisZinX",viewType:oP.YZ_PLANE,rotationEnabled:t.widgetState.getEnableRotation()}}];case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:default:return[]}},e.setImage=function(e){t.widgetState.setImage(e);var n=e.getCenter();t.widgetState.setCenter(n),dP(t.widgetState)},e.setCenter=function(n){t.widgetState.setCenter(n),dP(t.widgetState),e.modified()},e.updateCameraPoints=function(n,r,i,o,a){e.resetCamera(n,r,i,o),a&&function(e,n){var r=n.getActiveCamera().getFocalPoint(),i=t.widgetState.getCenter(),o=n.getRenderWindow().getViews()[0].getViewportSize(n),a=o[0]/o[1],s=at(n.worldToNormalizedDisplay.apply(n,w(r).concat([a])),n.worldToNormalizedDisplay.apply(n,w(i).concat([a])),[0,0,0]),l=t.widgetState.getCameraOffsets();l[e]=s,t.widgetState.setCameraOffsets(l)}(r,n)},e.resetCamera=function(n,r,i,o){var a,s,l=t.widgetState.getImage().getCenter(),u=n.getActiveCamera().getFocalPoint(),c=n.getActiveCamera().getPosition(),d=Math.sqrt(wt(c,u)),p=e.getPlaneNormalFromViewType(r),f=i?l:u,h=ut(f,p,d,[0,0,0]);(a=n.getActiveCamera()).setFocalPoint.apply(a,w(f)),(s=n.getActiveCamera()).setPosition.apply(s,w(h)),n.getActiveCamera().setViewUp(t.widgetState.getPlanes()[r].viewUp),function(e,n,r,i,o){var a=e.getActiveCamera().getFocalPoint(),s=e.getActiveCamera().getDistance(),l=ut(a,n,s,[0,0,0]),u=a;if(i&&(u=Pr.intersectWithLine(a,l,t.widgetState.getCenter(),n).x),o){var c=t.widgetState.getCenter(),d=e.getRenderWindow().getViews()[0].getViewportSize(e),p=d[0]/d[1],f=ot(e.worldToNormalizedDisplay.apply(e,w(c).concat([p])),t.widgetState.getCameraOffsets()[r],[0,0,0]),h=e.normalizedDisplayToWorld.apply(e,w(f).concat([p])),m=Pr.intersectWithLine(h,l,c,n);u[0]=m.x[0],u[1]=m.x[1],u[2]=m.x[2]}e.getActiveCamera().setFocalPoint(u[0],u[1],u[2]);var g=ut(u,n,s,[0,0,0]);e.getActiveCamera().setPosition(g[0],g[1],g[2]);var v=t.widgetState.getImage().getBounds();i&&e.resetCamera(v),e.resetCameraClippingRange(v)}(n,p,r,i,o)},e.updateReslicePlane=function(n,r){var i=t.widgetState.getImage().getSpacing(),o=function(n){for(var r=t.widgetState.getImage().getBounds(),i=e.getWidgetState().getCenter(),o=t.widgetState.getImage().getCenter(),a=[],s=0;s<3;s++)a[s]=-Math.abs(i[s]-o[s]),a[s]*=2;var l=Zf.newInstance();return n===oP.XZ_PLANE?(l.setOrigin(r[0]+a[0],i[1],r[4]+a[2]),l.setPoint1(r[1]-a[0],i[1],r[4]+a[2]),l.setPoint2(r[0]+a[0],i[1],r[5]-a[2])):n===oP.XY_PLANE?(l.setOrigin(r[0]+a[0],r[2]+a[1],i[2]),l.setPoint1(r[1]-a[0],r[2]+a[1],i[2]),l.setPoint2(r[0]+a[0],r[3]-a[1],i[2])):n===oP.YZ_PLANE&&(l.setOrigin(i[0],r[2]+a[1],r[4]+a[2]),l.setPoint1(i[0],r[3]-a[1],r[4]+a[2]),l.setPoint2(i[0],r[2]+a[1],r[5]-a[2])),l}(r),a=t.widgetState.getPlanes()[r],s=a.normal,l=a.viewUp;pP(o,t.widgetState.getCenter(),s,l);var u=w(o.getOrigin()),c=w(o.getPoint1()),d=w(o.getPoint2());lP(t.widgetState.getImage().getBounds(),u,c,d),o.setOrigin.apply(o,w(u)),o.setPoint1.apply(o,w(c)),o.setPoint2.apply(o,w(d));var p=o.getOrigin(),f=o.getPoint1(),h=[];at(f,p,h);var m=o.getPoint2(),g=[];at(m,p,g);for(var v=mt(h),y=mt(g),b=zo(new Float64Array(16)),x=0;x<3;x++)b[4*x+0]=h[x],b[4*x+1]=g[x],b[4*x+2]=s[x];var S=Math.abs(h[0]*i[0])+Math.abs(h[1]*i[1])+Math.abs(h[2]*i[2]),C=Math.abs(g[0]*i[0])+Math.abs(g[1]*i[1])+Math.abs(g[2]*i[2]),A=[],P=[];$h(A,[].concat(w(o.getOrigin()),[1]),b),Wo(b,b),$h(P,A,b),b[12]=P[0],b[13]=P[1],b[14]=P[2];var _=0,O=0,T=0===S?Number.MAX_SAFE_INTEGER:v/S,D=1073741823;if(T>D)C$("Invalid X extent: ",T," on view type : ",r),_=0;else for(_=1;_D)C$("Invalid Y extent:",E," on view type : ",r),O=0;else for(O=1;O2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,P$,n),Nq.extend(e,t,n),A$(e,t)}var O$={newInstance:Ae.newInstance(_$,"vtkResliceCursorWidget"),extend:_$},T$=Ae.vtkErrorMacro;function D$(e,t){t.classHierarchy.push("vtkSpline1D"),e.computeCloseCoefficients=function(e,n,r,i){T$("".concat(t.classHierarchy.slice(-1)[0]," should implement computeCloseCoefficients"))},e.computeOpenCoefficients=function(e,n,r,i){T$("".concat(t.classHierarchy.slice(-1)[0]," should implement computeOpenCoefficients"))},e.getValue=function(e,n){T$("".concat(t.classHierarchy.slice(-1)[0]," should implement getValue"))}}var E$={};function I$(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,E$,n),Ae.obj(e,t),D$(e,t)}var k$={newInstance:Ae.newInstance(I$,"vtkSpline1D"),extend:I$},M$=Ae.vtkErrorMacro;function N$(e,t){t.classHierarchy.push("vtkCardinalSpline1D"),e.computeCloseCoefficients=function(e,n,r,i){t.coefficients&&t.coefficients.length===4*e||(t.coefficients=new Float32Array(4*e));for(var o=e-1,a=1;a0;g--)t.coefficients[4*g+0]=t.coefficients[4*g+3]-t.coefficients[4*g+2]*t.coefficients[4*(g+1)+0],t.coefficients[4*g+1]=n[g]-t.coefficients[4*g+2]*t.coefficients[4*(g+1)+1];n[0]=(h-f*t.coefficients[5]-d*t.coefficients[4*(o-1)+1])/(p+f*t.coefficients[4]+d*t.coefficients[4*(o-1)+0]),n[o]=n[0];for(var v=1;v2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,R$,n),k$.extend(e,t,n),Ae.obj(e,t),N$(e,t)}var B$={newInstance:Ae.newInstance(F$,"vtkCardinalSpline1D"),extend:F$},L$=Ae.vtkErrorMacro;function V$(e,t){t.classHierarchy.push("vtkKochanekSpline1D"),e.computeCloseCoefficients=function(e,n,r,i){t.coefficients&&t.coefficients.length===4*e||(t.coefficients=new Float32Array(4*e));for(var o=e-1,a=1;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,j$,n),k$.extend(e,t,n),Ae.obj(e,t),V$(e,t)}var U$={newInstance:Ae.newInstance(G$,"vtkKochanekSpline1D"),extend:G$},z$={CARDINAL_SPLINE:"CARDINAL_SPLINE",KOCHANEK_SPLINE:"KOCHANEK_SPLINE"},W$=Ae.vtkErrorMacro;function H$(e,t){function n(e,n){0===n.length&&W$("Splines require at least one points"),1===n.length&&n.push(n[0]);var r=n.length,i=null,o=null;if(t.close){if(i=new Float32Array(r),0===t.intervals.length){o=new Float32Array(r);for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,K$,n),Ae.obj(e,t),Ae.setGet(e,t,["close","intervals"]),H$(e,t)}var q$={newInstance:Ae.newInstance(X$,"vtkSpline3D"),extend:X$},Y$=Ae.vtkWarningMacro;function Z$(e,t){t.classHierarchy.push("vtkTriangleFilter"),e.requestData=function(e,n){var r=e[0],i=r.getPoints().getData(),o=r.getPolys().getData(),a=r.getPolys().getDataType(),s=r.getPoints().getDataType(),l=[],u=[];if(t.errorCount=0,o)for(var c=0,d=!1,p=0;p3){var v=Cp.newInstance();v.setPoints(f),v.triangulate()||(Y$("Triangulation failed at cellOffset ".concat(p)),++t.errorCount);var y=v.getPointArray(),b=Math.floor(y.length/9),x=[];x.length=9;for(var S=0;S2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,J$,n),Ae.setGet(e,t,[]),Ae.get(e,t,["errorCount"]),Ae.obj(e,t),Ae.algo(e,t,1,1),Z$(e,t)}var $$={newInstance:Ae.newInstance(Q$,"vtkTriangleFilter"),extend:Q$};function e0(e,t){t.classHierarchy.push("vtkLineFilter"),e.requestData=function(e,t){var n=rc.newInstance();n.getPoints().setData(e[0].getPoints().getData()),n.getLines().setData(e[0].getLines().getData()),t[0]=n}}var t0={};function n0(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,t0,n),Ae.setGet(e,t,[]),Ae.obj(e,t),Ae.algo(e,t,1,1),e0(e,t)}var r0={newInstance:Ae.newInstance(n0,"vtkLineFilter"),extend:n0};function i0(e,t){t.classHierarchy.push("vtkSplineContextRepresentation"),t.pipelines={area:{actor:Rv.newInstance({parentProp:e}),mapper:cy.newInstance(),triangleFilter:$$.newInstance()},border:{actor:Rv.newInstance({parentProp:e}),mapper:cy.newInstance(),lineFilter:r0.newInstance()}},t.pipelines.area.triangleFilter.setInputConnection(e.getOutputPort()),t.pipelines.area.mapper.setInputConnection(t.pipelines.area.triangleFilter.getOutputPort()),t.pipelines.area.actor.setMapper(t.pipelines.area.mapper),t.pipelines.area.actor.getProperty().setOpacity(.2),t.pipelines.area.actor.getProperty().setColor(0,1,0),e.addActor(t.pipelines.area.actor),t.pipelines.border.lineFilter.setInputConnection(e.getOutputPort()),t.pipelines.border.mapper.setInputConnection(t.pipelines.border.lineFilter.getOutputPort()),t.pipelines.border.actor.setMapper(t.pipelines.border.mapper),t.pipelines.border.actor.getProperty().setOpacity(1),t.pipelines.border.actor.getProperty().setColor(.1,1,.1),t.pipelines.border.actor.setVisibility(t.outputBorder),e.addActor(t.pipelines.border.actor),e.requestData=function(n,r){var i;if(!t.deleted){var o=rc.newInstance(),a=n[0],s=e.getRepresentationStates(a).filter((function(e){return e.getVisible&&e.getVisible()&&e.getOrigin&&e.getOrigin()})),l=s.map((function(e){return e.getOrigin()}));if(l.length<=1)r[0]=o;else{var u=l.length;t.close&&l.push(l[0]);var c=q$.newInstance({close:t.close,kind:a.getSplineKind(),tension:a.getSplineTension(),bias:a.getSplineBias(),continuity:a.getSplineContinuity()});c.computeCoefficients(l);var d=new Float32Array(3*u*t.resolution),p=new Uint32Array(u*t.resolution+2);p[0]=u*t.resolution+1,p[u*t.resolution+1]=0;for(var f=0;f2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,o0,n),HY.extend(e,t,n),Ae.get(e,t,["mapper"]),Ae.setGet(e,t,["resolution","close","fill","outputBorder"]),Ae.setGetArray(e,t,["borderColor","errorBorderColor"],3),i0(e,t)}var s0={newInstance:Ae.newInstance(a0,"vtkSplineContextRepresentation"),extend:a0};function l0(e,t){t.classHierarchy.push("vtkSplineWidgetProp"),t.keysDown={},t.moveHandle=t.widgetState.getMoveHandle();var n=function(){if(null!=e.getHandleSizeInPixels()){var n=e.getHandleSizeInPixels();t.moveHandle.setScale1(n),t.widgetState.getHandleList().forEach((function(e){e.setScale1(n)}))}},r=function(){var n;(!t.lastHandle||t.keysDown.Control||!t.freeHand||ao(t.moveHandle.getOrigin(),t.lastHandle.getOrigin())>e.getFreehandMinDistance()*e.getFreehandMinDistance())&&(t.lastHandle=t.widgetState.addHandle(),t.lastHandle.setVisible(!1),(n=t.lastHandle).setOrigin.apply(n,w(t.moveHandle.getOrigin())),t.lastHandle.setColor(t.moveHandle.getColor()),t.lastHandle.setScale1(t.moveHandle.getScale1()),t.firstHandle||(t.firstHandle=t.lastHandle),t.apiSpecificRenderWindow.setCursor("grabbing"))},i=function(){var e=t.widgetState.getHandleList(),n=t.moveHandle.getScale1()*oo(t.apiSpecificRenderWindow.displayToWorld(0,0,0,t.renderer),t.apiSpecificRenderWindow.displayToWorld(1,0,0,t.renderer));return e.reduce((function(e,n){var r=e.closestHandle,i=e.closestDistance,o=ao(t.moveHandle.getOrigin(),n.getOrigin());return n!==t.moveHandle?{closestHandle:o0&&(e.invokeEndInteractionEvent(),e.getResetAfterPointPlacement()?e.reset():e.loseFocus());else if("Escape"===r)e.reset(),e.loseFocus(),e.invokeEndInteractionEvent();else if(("Delete"===r||"Backspace"===r)&&t.lastHandle){t.widgetState.removeHandle(t.lastHandle);var i=t.widgetState.getHandleList();t.lastHandle=i[i.length-1]}},e.handleKeyUp=function(e){var n=e.key;t.keysDown[n]=!1},e.grabFocus=function(){t.hasFocus||(t.activeState=t.moveHandle,t.activeState.activate(),t.activeState.setVisible(!0),t.interactor.requestAnimation(e),n()),t.hasFocus=!0},e.loseFocus=function(){t.hasFocus&&t.interactor.cancelAnimation(e),t.widgetState.deactivate(),t.moveHandle.deactivate(),t.moveHandle.setVisible(!1),t.activeState=null,t.interactor.render(),t.hasFocus=!1}}function u0(e,t){t.classHierarchy.push("vtkSplineWidget"),t.methodsToLink=["outputBorder","fill","borderColor","errorBorderColor"],t.behavior=l0,t.widgetState=CY.createBuilder().addField({name:"splineKind",initialValue:z$.KOCHANEK_SPLINE}).addField({name:"splineTension",initialValue:0}).addField({name:"splineContinuity",initialValue:0}).addField({name:"splineBias",initialValue:0}).addStateFromMixin({labels:["moveHandle"],mixins:["origin","color","scale1","visible"],name:"moveHandle",initialValues:{scale1:.05,visible:!1}}).addDynamicMixinState({labels:["handles"],mixins:["origin","color","scale1","visible"],name:"handle",initialValues:{scale1:.05}}).build(),e.getRepresentationsForViewType=function(e){switch(e){case oP.DEFAULT:case oP.GEOMETRY:case oP.SLICE:case oP.VOLUME:}return[{builder:IZ,labels:["handles","moveHandle"],initialValues:{scaleInPixels:!0}},{builder:s0,labels:["handles","moveHandle"]}]},t.manipulator=NY.newInstance()}var c0={freehandMinDistance:.1,allowFreehand:!0,resolution:32,defaultCursor:"pointer",handleSizeInPixels:10,resetAfterPointPlacement:!1};function d0(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object.assign(t,c0,n),Nq.extend(e,t,n),Ae.setGet(e,t,["manipulator","freehandMinDistance","allowFreehand","resolution","defaultCursor","handleSizeInPixels","resetAfterPointPlacement"]),u0(e,t)}var p0=Ae.newInstance(d0,"vtkSplineWidget"),f0={Core:AY,Manipulators:jY,Representations:kZ,Widgets3D:{vtkAngleWidget:BZ,vtkDistanceWidget:zZ,vtkEllipseWidget:wJ,vtkImageCroppingWidget:UJ,vtkImplicitPlaneWidget:XJ,vtkInteractiveOrientationWidget:nQ,vtkLineWidget:GQ,vtkPaintWidget:KQ,vtkPolyLineWidget:JQ,vtkRectangleWidget:c$,vtkResliceCursorWidget:O$,vtkShapeWidget:tJ,vtkSplineWidget:{newInstance:p0,extend:d0}}};T.Common=Bc,T.Filters=Ch,T.Imaging=gm,T.Interaction=FP,T.IO=oN,T.Proxy=QX,T.Rendering=gK,T.ThirdParty=$X,T.Widgets=f0,T.mtime=Ae.getCurrentGlobalMTime,T.macro=Ae,window.vtk=T},560:function(e,t,n){var r;!function(i){"use strict";function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,r,i,a){return o((s=o(o(t,e),o(r,a)))<<(l=i)|s>>>32-l,n);var s,l}function s(e,t,n,r,i,o,s){return a(t&n|~t&r,e,t,i,o,s)}function l(e,t,n,r,i,o,s){return a(t&r|n&~r,e,t,i,o,s)}function u(e,t,n,r,i,o,s){return a(t^n^r,e,t,i,o,s)}function c(e,t,n,r,i,o,s){return a(n^(t|~r),e,t,i,o,s)}function d(e,t){var n,r,i,a,d;e[t>>5]|=128<>>9<<4)]=t;var p=1732584193,f=-271733879,h=-1732584194,m=271733878;for(n=0;n>5]>>>t%32&255);return n}function f(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 i}function m(e){return unescape(encodeURIComponent(e))}function g(e){return function(e){return p(d(f(e),8*e.length))}(m(e))}function v(e,t){return function(e,t){var n,r,i=f(e),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=d(i,8*e.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=d(o.concat(f(t)),512+8*t.length),p(d(a.concat(r),640))}(m(e),m(t))}function y(e,t,n){return t?n?v(t,e):h(v(t,e)):n?g(e):h(g(e))}void 0===(r=function(){return y}.call(t,n,t,e))||(e.exports=r)}()},71:function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".CornerAnnotation-module-container_ofawd {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-direction: column;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.CornerAnnotation-module-row__h2Jo {\n flex: 1;\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n}\n\n.CornerAnnotation-module-topRow_MBBCI {\n align-items: flex-start;\n}\n\n.CornerAnnotation-module-middleRow_twn10 {\n align-items: center;\n}\n\n.CornerAnnotation-module-bottomRow_csfEg {\n align-items: flex-end;\n}\n\n.CornerAnnotation-module-item_nygK6 {\n flex: 1;\n padding: 5px;\n}\n\n.CornerAnnotation-module-east_z89aY {\n text-align: right;\n}\n\n.CornerAnnotation-module-west_gZVru {\n text-align: left;\n}\n\n.CornerAnnotation-module-north_CIGLI {\n text-align: center;\n}\n\n.CornerAnnotation-module-south_Z3ZDo {\n text-align: center;\n}\n\n.CornerAnnotation-module-northEast_S63B_ {\n}\n\n.CornerAnnotation-module-northWest_WRQ8R {\n}\n\n.CornerAnnotation-module-southEast_kCLSn {\n}\n\n.CornerAnnotation-module-southWest__cLh6 {\n}\n\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/CornerAnnotation/CornerAnnotation.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,oBAAoB;EACpB,8BAA8B;EAC9B,sBAAsB;EACtB,yBAAiB;KAAjB,sBAAiB;MAAjB,qBAAiB;UAAjB,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,WAAW;EACX,YAAY;AACd;;AAEA;EACE,OAAO;EACP,aAAa;EACb,8BAA8B;EAC9B,mBAAmB;AACrB;;AAEA;EAEE,uBAAuB;AACzB;;AAEA;EAEE,mBAAmB;AACrB;;AAEA;EAEE,qBAAqB;AACvB;;AAEA;EACE,OAAO;EACP,YAAY;AACd;;AAEA;EAEE,iBAAiB;AACnB;;AAEA;EAEE,gBAAgB;AAClB;;AAEA;EAEE,kBAAkB;AACpB;;AAEA;EAEE,kBAAkB;AACpB;;AAEA;AAEA;;AAEA;AAEA;;AAEA;AAEA;;AAEA;AAEA",sourcesContent:[".container {\n display: flex;\n align-items: stretch;\n justify-content: space-between;\n flex-direction: column;\n user-select: none;\n z-index: 100;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n\n.row {\n flex: 1;\n display: flex;\n justify-content: space-between;\n flex-direction: row;\n}\n\n.topRow {\n composes: row;\n align-items: flex-start;\n}\n\n.middleRow {\n composes: row;\n align-items: center;\n}\n\n.bottomRow {\n composes: row;\n align-items: flex-end;\n}\n\n.item {\n flex: 1;\n padding: 5px;\n}\n\n.east {\n composes: item;\n text-align: right;\n}\n\n.west {\n composes: item;\n text-align: left;\n}\n\n.north {\n composes: item;\n text-align: center;\n}\n\n.south {\n composes: item;\n text-align: center;\n}\n\n.northEast {\n composes: east;\n}\n\n.northWest {\n composes: west;\n}\n\n.southEast {\n composes: east;\n}\n\n.southWest {\n composes: west;\n}\n\n"],sourceRoot:""}]),a.locals={container:"CornerAnnotation-module-container_ofawd",row:"CornerAnnotation-module-row__h2Jo",topRow:"CornerAnnotation-module-topRow_MBBCI CornerAnnotation-module-row__h2Jo",middleRow:"CornerAnnotation-module-middleRow_twn10 CornerAnnotation-module-row__h2Jo",bottomRow:"CornerAnnotation-module-bottomRow_csfEg CornerAnnotation-module-row__h2Jo",item:"CornerAnnotation-module-item_nygK6",east:"CornerAnnotation-module-east_z89aY CornerAnnotation-module-item_nygK6",west:"CornerAnnotation-module-west_gZVru CornerAnnotation-module-item_nygK6",north:"CornerAnnotation-module-north_CIGLI CornerAnnotation-module-item_nygK6",south:"CornerAnnotation-module-south_Z3ZDo CornerAnnotation-module-item_nygK6",northEast:"CornerAnnotation-module-northEast_S63B_ CornerAnnotation-module-east_z89aY CornerAnnotation-module-item_nygK6",northWest:"CornerAnnotation-module-northWest_WRQ8R CornerAnnotation-module-west_gZVru CornerAnnotation-module-item_nygK6",southEast:"CornerAnnotation-module-southEast_kCLSn CornerAnnotation-module-east_z89aY CornerAnnotation-module-item_nygK6",southWest:"CornerAnnotation-module-southWest__cLh6 CornerAnnotation-module-west_gZVru CornerAnnotation-module-item_nygK6"},t.Z=a},631:function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".FPSMonitor-module-verticalContainer_Dvbqu {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.FPSMonitor-module-horizontalContainer_hGfO_ {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.FPSMonitor-module-leftPane_jWhl_ {\n flex: none;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.FPSMonitor-module-rightPane__UiBn {\n flex: 1;\n display: grid;\n grid-template-columns: auto auto;\n grid-auto-rows: 1.5em;\n grid-column-gap: 5px;\n grid-row-gap: 2px;\n padding: 10px;\n}\n\n.FPSMonitor-module-title_NJ6cH {\n flex: 1;\n font-weight: bold;\n padding: 5px 10px 0 10px;\n}\n\n.FPSMonitor-module-graph_WWsV0 {\n flex: none;\n border: solid 1px black;\n margin: 10px ;\n border-radius: 2px;\n overflow: hidden;\n}\n\n.FPSMonitor-module-label_ZywEo {\n font-weight: bold;\n text-transform: capitalize;\n text-align: right;\n align-self: center;\n}\n\n.FPSMonitor-module-value_wVvRn {\n font-style: italic;\n text-align: center;\n align-self: center;\n}\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/FPSMonitor/FPSMonitor.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,sBAAsB;EACtB,2BAA2B;EAC3B,oBAAoB;AACtB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,2BAA2B;AAC7B;;AAEA;EACE,UAAU;EACV,aAAa;EACb,sBAAsB;EACtB,2BAA2B;EAC3B,oBAAoB;AACtB;;AAEA;EACE,OAAO;EACP,aAAa;EACb,gCAAgC;EAChC,qBAAqB;EACrB,oBAAoB;EACpB,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,OAAO;EACP,iBAAiB;EACjB,wBAAwB;AAC1B;;AAEA;EACE,UAAU;EACV,uBAAuB;EACvB,aAAa;EACb,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,iBAAiB;EACjB,0BAA0B;EAC1B,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,kBAAkB;AACpB",sourcesContent:[".verticalContainer {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.horizontalContainer {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n}\n\n.leftPane {\n flex: none;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n}\n\n.rightPane {\n flex: 1;\n display: grid;\n grid-template-columns: auto auto;\n grid-auto-rows: 1.5em;\n grid-column-gap: 5px;\n grid-row-gap: 2px;\n padding: 10px;\n}\n\n.title {\n flex: 1;\n font-weight: bold;\n padding: 5px 10px 0 10px;\n}\n\n.graph {\n flex: none;\n border: solid 1px black;\n margin: 10px ;\n border-radius: 2px;\n overflow: hidden;\n}\n\n.label {\n font-weight: bold;\n text-transform: capitalize;\n text-align: right;\n align-self: center;\n}\n\n.value {\n font-style: italic;\n text-align: center;\n align-self: center;\n}\n"],sourceRoot:""}]),a.locals={verticalContainer:"FPSMonitor-module-verticalContainer_Dvbqu",horizontalContainer:"FPSMonitor-module-horizontalContainer_hGfO_",leftPane:"FPSMonitor-module-leftPane_jWhl_",rightPane:"FPSMonitor-module-rightPane__UiBn",title:"FPSMonitor-module-title_NJ6cH",graph:"FPSMonitor-module-graph_WWsV0",label:"FPSMonitor-module-label_ZywEo",value:"FPSMonitor-module-value_wVvRn"},t.Z=a},995:function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".Slider-module-cursor__9kcc {\n position: absolute;\n border-radius: 50%;\n box-sizing: border-box;\n cursor: move;\n}\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/Slider/Slider.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;EACtB,YAAY;AACd",sourcesContent:[".cursor {\n position: absolute;\n border-radius: 50%;\n box-sizing: border-box;\n cursor: move;\n}\n"],sourceRoot:""}]),a.locals={cursor:"Slider-module-cursor__9kcc"},t.Z=a},734:function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".VolumeController-module-container_qCp35 {\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_HXO1y {\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_J4i_h {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.VolumeController-module-button_J4i_h svg {\n width: 1rem;\n height: 1rem;\n}\n\n.VolumeController-module-sliderEntry_a_uTX {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.VolumeController-module-sliderIcon_IIGYF {\n height: 1rem;\n}\n\n.VolumeController-module-slider_GyThe {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.VolumeController-module-piecewiseEditor_HDGVV {\n flex: 1;\n}\n\n.VolumeController-module-select_hTmED {\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_hTmED select:focus {\n outline: none;\n border: none;\n}\n\n.VolumeController-module-presets_CnkzZ {\n}\n\n.VolumeController-module-shadow_C3BHt {\n}\n\n.VolumeController-module-buttonDarkBG_K3iiZ {\n}\n\n.VolumeController-module-presetsDarkBG_tZw7A {\n color: white;\n}\n\n.VolumeController-module-presetsDarkBG_tZw7A option {\n color: black;\n}\n\n.VolumeController-module-shadowDarkBG__QXkl {\n color: white;\n}\n\n.VolumeController-module-shadowDarkBG__QXkl option {\n color: black;\n}\n\n.VolumeController-module-buttonBrightBG_xIXeC {\n}\n\n.VolumeController-module-presetsBrightBG_wpEYO {\n color: black;\n}\n\n.VolumeController-module-presetsBrightBG_wpEYO option {\n color: white;\n}\n\n.VolumeController-module-shadowBrightBG__EQix {\n color: black;\n}\n\n.VolumeController-module-shadowBrightBG__EQix option {\n color: white;\n}\n","",{version:3,sources:["webpack://./Sources/Interaction/UI/VolumeController/VolumeController.module.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,8BAA8B;EAC9B,kBAAkB;EAClB,QAAQ;EACR,SAAS;EACT,oCAAoC;EACpC,kBAAkB;EAClB,YAAY;EACZ,yBAAyB;EACzB,sBAAsB;AACxB;;AAEA;EACE,aAAa;EACb,mBAAmB;EACnB,OAAO;EACP,mBAAmB;EACnB,8BAA8B;AAChC;;AAEA;EACE,eAAe;EACf,WAAW;EACX,gBAAgB;EAChB,iBAAiB;AACnB;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,OAAO;EACP,aAAa;EACb,mBAAmB;EACnB,mBAAmB;AACrB;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,OAAO;EACP,gBAAgB;EAChB,UAAU;AACZ;;AAEA;EACE,OAAO;AACT;;AAEA;EACE,OAAO;EACP,YAAY;EACZ,uBAAuB;EACvB,YAAY;EACZ,YAAY;EACZ,qBAAqB;EACrB,UAAU;AACZ;;AAEA;EACE,aAAa;EACb,YAAY;AACd;;AAEA;AAEA;;AAEA;AAEA;;AAEA;AAEA;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd;;AAEA;AAEA;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd;;AAEA;EAEE,YAAY;AACd;;AAEA;EACE,YAAY;AACd",sourcesContent:[".container {\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.line {\n display: flex;\n flex-direction: row;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n\n.button {\n cursor: pointer;\n width: 1rem;\n margin-left: 5px;\n margin-right: 5px;\n}\n\n.button svg {\n width: 1rem;\n height: 1rem;\n}\n\n.sliderEntry {\n flex: 1;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.sliderIcon {\n composes: button;\n height: 1rem;\n}\n\n.slider {\n flex: 1;\n min-height: 1rem;\n width: 5px;\n}\n\n.piecewiseEditor {\n flex: 1;\n}\n\n.select {\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.select select:focus {\n outline: none;\n border: none;\n}\n\n.presets {\n composes: select;\n}\n\n.shadow {\n composes: select;\n}\n\n.buttonDarkBG {\n composes: button;\n}\n\n.presetsDarkBG {\n composes: presets;\n color: white;\n}\n\n.presetsDarkBG option {\n color: black;\n}\n\n.shadowDarkBG {\n composes: shadow;\n color: white;\n}\n\n.shadowDarkBG option {\n color: black;\n}\n\n.buttonBrightBG {\n composes: button;\n}\n\n.presetsBrightBG {\n composes: presets;\n color: black;\n}\n\n.presetsBrightBG option {\n color: white;\n}\n\n.shadowBrightBG {\n composes: shadow;\n color: black;\n}\n\n.shadowBrightBG option {\n color: white;\n}\n"],sourceRoot:""}]),a.locals={container:"VolumeController-module-container_qCp35",line:"VolumeController-module-line_HXO1y",button:"VolumeController-module-button_J4i_h",sliderEntry:"VolumeController-module-sliderEntry_a_uTX",sliderIcon:"VolumeController-module-sliderIcon_IIGYF VolumeController-module-button_J4i_h",slider:"VolumeController-module-slider_GyThe",piecewiseEditor:"VolumeController-module-piecewiseEditor_HDGVV",select:"VolumeController-module-select_hTmED",presets:"VolumeController-module-presets_CnkzZ VolumeController-module-select_hTmED",shadow:"VolumeController-module-shadow_C3BHt VolumeController-module-select_hTmED",buttonDarkBG:"VolumeController-module-buttonDarkBG_K3iiZ VolumeController-module-button_J4i_h",presetsDarkBG:"VolumeController-module-presetsDarkBG_tZw7A VolumeController-module-presets_CnkzZ VolumeController-module-select_hTmED",shadowDarkBG:"VolumeController-module-shadowDarkBG__QXkl VolumeController-module-shadow_C3BHt VolumeController-module-select_hTmED",buttonBrightBG:"VolumeController-module-buttonBrightBG_xIXeC VolumeController-module-button_J4i_h",presetsBrightBG:"VolumeController-module-presetsBrightBG_wpEYO VolumeController-module-presets_CnkzZ VolumeController-module-select_hTmED",shadowBrightBG:"VolumeController-module-shadowBrightBG__EQix VolumeController-module-shadow_C3BHt VolumeController-module-select_hTmED"},t.Z=a},406:function(e,t,n){"use strict";var r=n(15),i=n.n(r),o=n(645),a=n.n(o)()(i());a.push([e.id,".RenderWindowWithControlBar-module-rootContainer_yvTqc {\n position: relative;\n}\n\n.RenderWindowWithControlBar-module-renderWindow_Y_G_t {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.RenderWindowWithControlBar-module-control_MzAvM {\n z-index: 1;\n position: absolute;\n}\n","",{version:3,sources:["webpack://./Sources/Rendering/Misc/RenderWindowWithControlBar/RenderWindowWithControlBar.module.css"],names:[],mappings:"AAAA;EACE,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,MAAM;EACN,OAAO;EACP,QAAQ;EACR,SAAS;AACX;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB",sourcesContent:[".rootContainer {\n position: relative;\n}\n\n.renderWindow {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n}\n\n.control {\n z-index: 1;\n position: absolute;\n}\n"],sourceRoot:""}]),a.locals={rootContainer:"RenderWindowWithControlBar-module-rootContainer_yvTqc",renderWindow:"RenderWindowWithControlBar-module-renderWindow_Y_G_t",control:"RenderWindowWithControlBar-module-control_MzAvM"},t.Z=a},645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s>2,s=(3&t)<<4|n>>4,l=1>6:64,u=2>4,n=(15&a)<<4|(s=o.indexOf(e.charAt(u++)))>>2,r=(3&s)<<6|(l=o.indexOf(e.charAt(u++))),p[c++]=t,64!==s&&(p[c++]=n),64!==l&&(p[c++]=r);return p}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("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 i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new a("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=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}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s>>8^o[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var o=i,a=r+n;e^=-1;for(var s=r;s>>8^o[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r=null;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=r?"uint8array":"array";function l(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,a),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},l.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n>>=8;return r}function i(e,t,n,i,a,c){var d,p,f=e.file,h=e.compression,m=c!==s.utf8encode,g=o.transformTo("string",c(f.name)),v=o.transformTo("string",s.utf8encode(f.name)),y=f.comment,b=o.transformTo("string",c(y)),w=o.transformTo("string",s.utf8encode(y)),x=v.length!==f.name.length,S=w.length!==y.length,C="",A="",P="",_=f.dir,O=f.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var D=0;t&&(D|=8),m||!x&&!S||(D|=2048);var E=0,I=0;_&&(E|=16),"UNIX"===a?(I=798,E|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(f.unixPermissions,_)):(I=20,E|=function(e){return 63&(e||0)}(f.dosPermissions)),d=O.getUTCHours(),d<<=6,d|=O.getUTCMinutes(),d<<=5,d|=O.getUTCSeconds()/2,p=O.getUTCFullYear()-1980,p<<=4,p|=O.getUTCMonth()+1,p<<=5,p|=O.getUTCDate(),x&&(A=r(1,1)+r(l(g),4)+v,C+="up"+r(A.length,2)+A),S&&(P=r(1,1)+r(l(b),4)+w,C+="uc"+r(P.length,2)+P);var k="";return k+="\n\0",k+=r(D,2),k+=h.magic,k+=r(d,2),k+=r(p,2),k+=r(T.crc32,4),k+=r(T.compressedSize,4),k+=r(T.uncompressedSize,4),k+=r(g.length,2),k+=r(C.length,2),{fileRecord:u.LOCAL_FILE_HEADER+k+g+C,dirRecord:u.CENTRAL_FILE_HEADER+r(I,2)+k+r(b.length,2)+"\0\0\0\0"+r(E,4)+r(i,4)+g+C+b}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),l=e("../crc32"),u=e("../signature");function c(e,t,n,r){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=[]}o.inherits(c,a),c.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,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},c.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return u.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(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},c.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.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))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.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},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.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},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.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},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.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=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.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}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[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}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}},t.exports=r},{}],29:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),s=e("../support"),l=e("../external"),u=null;if(s.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function c(e,t){return new l.Promise((function(n,i){var o=[],s=e._internalType,l=e._outputType,u=e._mimeType;e.on("data",(function(e,n){o.push(e),t&&t(n)})).on("error",(function(e){o=[],i(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(l,function(e,t){var n,r=0,i=null,o=0;for(n=0;n>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,a=e.length,l=new Array(2*a);for(t=n=0;t>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(u,a),u.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var a=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}(t),l=t;a!==t.length&&(i.uint8array?(l=t.subarray(0,a),this.leftOver=t.subarray(a,t.length)):(l=t.slice(0,a),this.leftOver=t.slice(a,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},u.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=u,r.inherits(c,a),c.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("set-immediate-shim"),s=e("./external");function l(e){return e}function u(e,t){for(var n=0;n>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=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,u[r++]=56320|1023&i)}return l(u,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s>>8^o[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),l=e("./messages"),u=0,c=4,d=0,p=-2,f=-1,h=4,m=2,g=8,v=9,y=286,b=30,w=19,x=2*y+1,S=15,C=3,A=258,P=A+C+1,_=42,O=113,T=1,D=2,E=3,I=4;function k(e,t){return e.msg=l[t],t}function M(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(i.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 F(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,R(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function L(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function V(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-P?e.strstart-(e.w_size-P):0,u=e.window,c=e.w_mask,d=e.prev,p=e.strstart+A,f=u[o+a-1],h=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===h&&u[n+a-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&ol&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,n,r,o,l,u,c,d,p,f,h=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-P)){for(i.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;r=e.head[--t],e.head[t]=h<=r?r-h:0,--n;);for(t=n=h;r=e.prev[--t],e.prev[t]=h<=r?r-h:0,--n;);o+=h}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,d=e.strstart+e.lookahead,f=void 0,(p=o)<(f=u.avail_in)&&(f=p),n=0===f?0:(u.avail_in-=f,i.arraySet(c,u.input,u.next_in,f,d),1===u.state.wrap?u.adler=a(u.adler,c,f,d):2===u.state.wrap&&(u.adler=s(u.adler,c,f,d)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=n,e.lookahead+e.insert>=C)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===u)return T;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,F(e,!1),0===e.strm.avail_out))return T;if(e.strstart-e.block_start>=e.w_size-P&&(F(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===c?(F(e,!0),0===e.strm.avail_out?E:I):(e.strstart>e.block_start&&(F(e,!1),e.strm.avail_out),T)})),new z(4,4,8,4,G),new z(4,5,16,8,G),new z(4,6,32,32,G),new z(4,4,16,16,U),new z(8,16,32,32,U),new z(8,16,128,128,U),new z(8,32,128,256,U),new z(32,128,258,1024,U),new z(32,258,258,4096,U)],n.deflateInit=function(e,t){return X(e,t,g,15,8,0)},n.deflateInit2=X,n.deflateReset=K,n.deflateResetKeep=H,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?p:(e.state.gzhead=t,d):p},n.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||5>8&255),B(i,i.gzhead.time>>16&255),B(i,i.gzhead.time>>24&255),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(B(i,255&i.gzhead.extra.length),B(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(B(i,0),B(i,0),B(i,0),B(i,0),B(i,0),B(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),B(i,3),i.status=O);else{var f=g+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=O,L(i,f),0!==i.strstart&&(L(i,e.adler>>>16),L(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),R(e),a=i.pending,i.pending!==i.pending_buf_size));)B(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),R(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),R(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexa&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&R(e),i.pending+2<=i.pending_buf_size&&(B(i,255&e.adler),B(i,e.adler>>8&255),e.adler=0,i.status=O)):i.status=O),0!==i.pending){if(R(e),0===e.avail_out)return i.last_flush=-1,d}else if(0===e.avail_in&&M(t)<=M(n)&&t!==c)return k(e,-5);if(666===i.status&&0!==e.avail_in)return k(e,-5);if(0!==e.avail_in||0!==i.lookahead||t!==u&&666!==i.status){var h=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===u)return T;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(F(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===c?(F(e,!0),0===e.strm.avail_out?E:I):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?T:D}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=A){if(j(e),e.lookahead<=A&&t===u)return T;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=o._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(F(e,!1),0===e.strm.avail_out))return T}return e.insert=0,t===c?(F(e,!0),0===e.strm.avail_out?E:I):e.last_lit&&(F(e,!1),0===e.strm.avail_out)?T:D}(i,t):r[i.level].func(i,t);if(h!==E&&h!==I||(i.status=666),h===T||h===E)return 0===e.avail_out&&(i.last_flush=-1),d;if(h===D&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(N(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),R(e),0===e.avail_out))return i.last_flush=-1,d}return t!==c?d:i.wrap<=0?1:(2===i.wrap?(B(i,255&e.adler),B(i,e.adler>>8&255),B(i,e.adler>>16&255),B(i,e.adler>>24&255),B(i,255&e.total_in),B(i,e.total_in>>8&255),B(i,e.total_in>>16&255),B(i,e.total_in>>24&255)):(L(i,e.adler>>>16),L(i,65535&e.adler)),R(e),0=n.w_size&&(0===s&&(N(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,t,h-n.w_size,n.w_size,0),t=f,h=n.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=h,e.next_in=0,e.input=t,j(n);n.lookahead>=C;){for(r=n.strstart,o=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=w=b>>>24,h-=w,0==(w=b>>>16&255))_[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(f&(1<>>=w,h-=w),h<15&&(f+=P[r++]<>>=w=b>>>24,h-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=g[(65535&b)+(f&(1<>>=w,h-=w,(w=o-a)>3,f&=(1<<(h-=x<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){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 r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(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=p,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(f),t.distcode=t.distdyn=new r.Buf32(h),t.sane=1,t.back=-1,c):d}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):d}function b(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||15=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,j,2,0),x=w=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&w)){e.msg="unknown compression method",n.mode=30;break}if(x-=4,R=8+(15&(w>>>=4)),0===n.wbits)n.wbits=R;else if(R>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(j[0]=255&w,j[1]=w>>>8&255,n.check=o(n.check,j,2,0)),x=w=0,n.mode=3;case 3:for(;x<32;){if(0===y)break e;y--,w+=f[g++]<>>8&255,j[2]=w>>>16&255,j[3]=w>>>24&255,n.check=o(n.check,j,4,0)),x=w=0,n.mode=4;case 4:for(;x<16;){if(0===y)break e;y--,w+=f[g++]<>8),512&n.flags&&(j[0]=255&w,j[1]=w>>>8&255,n.check=o(n.check,j,2,0)),x=w=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===y)break e;y--,w+=f[g++]<>>8&255,n.check=o(n.check,j,2,0)),x=w=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(y<(_=n.length)&&(_=y),_&&(n.head&&(R=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,g,_,R)),512&n.flags&&(n.check=o(n.check,f,_,g)),y-=_,g+=_,n.length-=_),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;for(_=0;R=f[g+_++],n.head&&R&&n.length<65536&&(n.head.name+=String.fromCharCode(R)),R&&_>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(0===y)break e;y--,w+=f[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===y)break e;y--,w+=f[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(A(n),n.mode=20,6!==t)break;w>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}w>>>=2,x-=2;break;case 14:for(w>>>=7&x,x-=7&x;x<32;){if(0===y)break e;y--,w+=f[g++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&w,x=w=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(_=n.length){if(y<_&&(_=y),b<_&&(_=b),0===_)break e;r.arraySet(h,f,g,_,v),y-=_,g+=_,b-=_,v+=_,n.length-=_;break}n.mode=12;break;case 17:for(;x<14;){if(0===y)break e;y--,w+=f[g++]<>>=5,x-=5,n.ndist=1+(31&w),w>>>=5,x-=5,n.ncode=4+(15&w),w>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[G[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,B={bits:n.lenbits},F=s(0,n.lens,0,19,n.lencode,0,n.work,B),n.lenbits=B.bits,F){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,I=65535&V,!((D=V>>>24)<=x);){if(0===y)break e;y--,w+=f[g++]<>>=D,x-=D,n.lens[n.have++]=I;else{if(16===I){for(L=D+2;x>>=D,x-=D,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}R=n.lens[n.have-1],_=3+(3&w),w>>>=2,x-=2}else if(17===I){for(L=D+3;x>>=D)),w>>>=3,x-=3}else{for(L=D+7;x>>=D)),w>>>=7,x-=7}if(n.have+_>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;_--;)n.lens[n.have++]=R}}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},F=s(l,n.lens,0,n.nlen,n.lencode,0,n.work,B),n.lenbits=B.bits,F){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,B={bits:n.distbits},F=s(u,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,B),n.distbits=B.bits,F){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(6<=y&&258<=b){e.next_out=v,e.avail_out=b,e.next_in=g,e.avail_in=y,n.hold=w,n.bits=x,a(e,C),v=e.next_out,h=e.output,b=e.avail_out,g=e.next_in,f=e.input,y=e.avail_in,w=n.hold,x=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(V=n.lencode[w&(1<>>16&255,I=65535&V,!((D=V>>>24)<=x);){if(0===y)break e;y--,w+=f[g++]<>k)])>>>16&255,I=65535&V,!(k+(D=V>>>24)<=x);){if(0===y)break e;y--,w+=f[g++]<>>=k,x-=k,n.back+=k}if(w>>>=D,x-=D,n.back+=D,n.length=I,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(L=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(V=n.distcode[w&(1<>>16&255,I=65535&V,!((D=V>>>24)<=x);){if(0===y)break e;y--,w+=f[g++]<>k)])>>>16&255,I=65535&V,!(k+(D=V>>>24)<=x);){if(0===y)break e;y--,w+=f[g++]<>>=k,x-=k,n.back+=k}if(w>>>=D,x-=D,n.back+=D,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=I,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(L=n.extra;x>>=n.extra,x-=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===b)break e;if(_=C-b,n.offset>_){if((_=n.offset-_)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}O=_>n.wnext?(_-=n.wnext,n.wsize-_):n.wnext-_,_>n.length&&(_=n.length),T=n.window}else T=h,O=v-n.offset,_=n.length;for(b<_&&(_=b),b-=_,n.length-=_;h[v++]=T[O++],--_;);0===n.length&&(n.mode=21);break;case 26:if(0===b)break e;h[v++]=n.length,b--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===y)break e;y--,w|=f[g++]<y?(w=B[L+d[A]],M[N+d[A]]):(w=96,0),f=1<>D)+(h-=f)]=b<<24|w<<16|x|0,0!==h;);for(f=1<>=1;if(0!==f?(k&=f-1,k+=f):k=0,A++,0==--R[C]){if(C===_)break;C=t[n+d[A]]}if(O>>7)]}function B(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function L(e,t,n){e.bi_valid>m-n?(e.bi_buf|=t<>m-e.bi_valid,e.bi_valid+=n-m):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function G(e,t,n){var r,i,o=new Array(h+1),a=0;for(r=1;r<=h;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=j(o[s]++,s))}}function U(e){var t;for(t=0;t>1;1<=n;n--)H(e,o,n);for(i=l;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],H(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,H(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,d=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,g=t.stat_desc.max_length,v=0;for(o=0;o<=h;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return i;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return o;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=a&&(a=s)):a=s=n+5,n+4<=a&&-1!==t?J(e,t,n,r):4===e.strategy||s===a?(L(e,2+(r?1:0),3),K(e,P,_)):(L(e,4+(r?1:0),3),function(e,t,n,r){var i;for(L(e,t-257,5),L(e,n-1,5),L(e,r-4,4),i=0;i>>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*(T[n]+u+1)]++,e.dyn_dtree[2*F(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){L(e,2,3),V(e,v,P),function(e){16===e.bi_valid?(B(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=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}},{}],54:[function(e,t,n){"use strict";t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}},{}]},{},[10])(10)},987:function(e,t,n){"use strict";var r;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=n(414),s=Object.prototype.propertyIsEnumerable,l=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===o.call(e),r=a(e),s=t&&"[object String]"===o.call(e),p=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=u&&n;if(s&&e.length>0&&!i.call(e,0))for(var m=0;m0)for(var g=0;g=0&&"[object Function]"===t.call(e.callee)),r}},666:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),a=new T(r||[]);return o._invoke=function(e,t,n){var r=d;return function(i,o){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=P(a,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=h,n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",m={};function g(){}function v(){}function y(){}var b={};l(b,o,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(D([])));x&&x!==n&&r.call(x,o)&&(b=x);var S=y.prototype=g.prototype=Object.create(b);function C(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,o,a,s){var l=c(e[i],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(d).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function P(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method))return m;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var i=c(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function D(e){if(e){var n=e[o];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(l&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:D(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},377:function(e,t,n){var r=n(832),i=n(652),o=n(801),a=n(30),s=n(618),l=n(309),u=n(971);u.alea=r,u.xor128=i,u.xorwow=o,u.xorshift7=a,u.xor4096=s,u.tychei=l,e.exports=u},832:function(e,t,n){var r;!function(e,i,o){function a(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n>>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 s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function l(e,t){var n=new a(e),r=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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.alea=l}(0,e=n.nmd(e),n.amdD)},309:function(e,t,n){var r;!function(e,i,o){function a(e){var t=this,n="";t.next=function(){var e=t.b,n=t.c,r=t.d,i=t.a;return e=e<<25^e>>>7^n,n=n-r|0,r=r<<24^r>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.tychei=l}(0,e=n.nmd(e),n.amdD)},652:function(e,t,n){var r;!function(e,i,o){function a(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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xor128=l}(0,e=n.nmd(e),n.amdD)},618:function(e,t,n){var r;!function(e,i,o){function a(e){var t=this;t.next=function(){var e,n,r=t.w,i=t.X,o=t.i;return t.w=r=r+1640531527|0,n=i[o+34&127],e=i[o=o+1&127],n^=n<<13,e^=e<<17,n^=n>>>15,e^=e>>>12,n=i[o]=n^e,t.i=o,n+(r^r>>>16)|0},function(e,t){var n,r,i,o,a,s=[],l=128;for(t===(0|t)?(r=t,t=null):(t+="\0",r=0,l=Math.max(l,t.length)),i=0,o=-32;o>>15,r^=r<<4,r^=r>>>13,o>=0&&(a=a+1640531527|0,i=0==(n=s[127&o]^=r+a)?i+1:0);for(i>=128&&(s[127&(t&&t.length||0)]=-1),i=127,o=512;o>0;--o)r=s[i+34&127],n=s[i=i+1&127],r^=r<<13,n^=n<<17,r^=r>>>15,n^=n>>>12,s[i]=r^n;e.w=a,e.X=s,e.i=i}(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function l(e,t){null==e&&(e=+new Date);var n=new a(e),r=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,r&&(r.X&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xor4096=l}(0,e=n.nmd(e),n.amdD)},30:function(e,t,n){var r;!function(e,i,o){function a(e){var t=this;t.next=function(){var e,n,r=t.x,i=t.i;return e=r[i],n=(e^=e>>>7)^e<<24,n^=(e=r[i+1&7])^e>>>10,n^=(e=r[i+3&7])^e>>>3,n^=(e=r[i+4&7])^e<<7,e=r[i+7&7],n^=(e^=e<<13)^e<<9,r[i]=n,t.i=i+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 s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function l(e,t){null==e&&(e=+new Date);var n=new a(e),r=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,r&&(r.x&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xorshift7=l}(0,e=n.nmd(e),n.amdD)},801:function(e,t,n){var r;!function(e,i,o){function a(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 s(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 l(e,t){var n=new a(e),r=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,r&&("object"==typeof r&&s(r,n),i.state=function(){return s(n,{})}),i}i&&i.exports?i.exports=l:n.amdD&&n.amdO?void 0===(r=function(){return l}.call(t,n,t,i))||(i.exports=r):this.xorwow=l}(0,e=n.nmd(e),n.amdD)},971:function(e,t,n){var r;!function(i,o,a){var s,l=256,u=a.pow(l,6),c=a.pow(2,52),d=2*c,p=255;function f(e,t,n){var r=[],p=v(g((t=1==t?{entropy:!0}:t||{}).entropy?[e,y(o)]:null==e?function(){try{var e;return s&&(e=s.randomBytes)?e=e(l):(e=new Uint8Array(l),(i.crypto||i.msCrypto).getRandomValues(e)),y(e)}catch(e){var t=i.navigator,n=t&&t.plugins;return[+new Date,i,n,i.screen,y(o)]}}():e,3),r),f=new h(r),b=function(){for(var e=f.g(6),t=u,n=0;e=d;)e/=2,t/=2,n>>>=1;return(e+n)/t};return b.int32=function(){return 0|f.g(4)},b.quick=function(){return f.g(4)/4294967296},b.double=b,v(y(f.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&m(r,f),e.state=function(){return m(f,{})}),n?(a.random=e,t):e})(b,p,"global"in t?t.global:this==a,t.state)}function h(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i 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\nuniform vec4 ipScalarRangeMin;\nuniform vec4 ipScalarRangeMax;\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 trilinear values from multiple z slices\n#ifdef vtkTrilinearOn\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\nbool valueWithinScalarRange(vec4 val, vec4 min, vec4 max) {\n bool withinRange = false;\n #if vtkNumComponents == 1\n if (val.r >= min.r && val.r <= max.r) {\n withinRange = true;\n }\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents == 2\n if (val.r >= min.r && val.r <= max.r &&\n val.g >= min.g && val.g <= max.g) {\n withinRange = true;\n }\n #endif\n #if defined(vtkIndependentComponentsOn) && vtkNumComponents >= 3\n if (all(greaterThanEqual(val, ipScalarRangeMin)) &&\n all(lessThanEqual(val, ipScalarRangeMax))) {\n withinRange = true;\n }\n #endif\n return withinRange;\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 || vtkBlendMode == 4 //AVERAGE_INTENSITY_BLEND || ADDITIVE_BLEND\n vec4 sum = vec4(0.);\n\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\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 if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n // Sum the values across each step in the path\n sum += tValue;\n }\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 IPScalarRange to disregard scalar values, not in the range of interest, from the average computation\n if (valueWithinScalarRange(tValue, ipScalarRangeMin, ipScalarRangeMax)) {\n sum += tValue;\n\n stepsTraveled++;\n }\n\n #if vtkBlendMode == 3 // Average\n sum /= vec4(stepsTraveled, stepsTraveled, stepsTraveled, 1.0);\n #endif\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 (abs(result) < 1e-6)\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"},123:function(e){e.exports="//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 vertexDC;\n\nvarying vec3 vertexVCVSOutput;\nuniform mat4 PCVCMatrix;\n\nuniform float dcxmin;\nuniform float dcxmax;\nuniform float dcymin;\nuniform float dcymax;\n\nvoid main()\n{\n // dcsmall is the device coords reduced to the\n // x y area covered by the volume\n vec4 dcsmall = vec4(\n dcxmin + 0.5 * (vertexDC.x + 1.0) * (dcxmax - dcxmin),\n dcymin + 0.5 * (vertexDC.y + 1.0) * (dcymax - dcymin),\n vertexDC.z,\n vertexDC.w);\n vec4 vcpos = PCVCMatrix * dcsmall;\n vertexVCVSOutput = vcpos.xyz/vcpos.w;\n gl_Position = dcsmall;\n}\n"},379:function(e){"use strict";var t=[];function n(e){for(var n=-1,r=0;r{const a=this._messageId++;this._messages.set(a,[i,o,r]),this._worker.postMessage([a,t,e],n||[])}))}postMessage(e=null,t=[],n){return new Promise(((r,i)=>{const o=this._messageId++;this._messages.set(o,[r,i,n]),this._worker.postMessage([o,e],t||[])}))}emit(e,...t){this._worker.postMessage({eventName:e,args:t})}_onMessage(e){if(!Array.isArray(e.data)&&e.data.eventName)return super.emit(e.data.eventName,...e.data.args);const[t,...n]=e.data;if(1===t)this._onEvent(...n);else{if(0!==t)throw new Error(`Wrong message type '${t}'`);this._onResult(...n)}}_onResult(e,t,n){const[r,i]=this._messages.get(e);return this._messages.delete(e),1===t?r(n):i(n)}_onEvent(e,t,n){const[,,r]=this._messages.get(e);r&&r(t,n)}}},544:function(e){e.exports=class{constructor(){Object.defineProperty(this,"__listeners",{value:{},enumerable:!1,writable:!1})}emit(e,...t){if(!this.__listeners[e])return this;for(const n of this.__listeners[e])n(...t);return this}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}on(e,t){return this.__listeners[e]||(this.__listeners[e]=[]),this.__listeners[e].push(t),this}off(e,t){return this.__listeners[e]=t?this.__listeners[e].filter((e=>e!==t)):[],this}}},477:function(e){"use strict";e.exports=function(e,t,n,r){var i=self||window;try{try{var o;try{o=new i.Blob([e])}catch(t){(o=new(i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder)).append(e),o=o.getBlob()}var a=i.URL||i.webkitURL,s=a.createObjectURL(o),l=new i[t](s,n);return a.revokeObjectURL(s),l}catch(r){return new i[t]("data:application/javascript,".concat(encodeURIComponent(e)),n)}}catch(e){if(!r)throw Error("Inline worker is not supported");return new i[t](r,n)}}},420:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=184)}([function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(240)),r(n(251)),r(n(175)),r(n(107)),r(n(29)),r(n(73)),r(n(106)),r(n(30)),r(n(252)),r(n(52)),r(n(97)),r(n(253)),r(n(37)),r(n(51)),r(n(173)),r(n(176)),r(n(172)),r(n(108)),r(n(254)),r(n(255)),r(n(256)),r(n(72)),r(n(177)),r(n(105)),r(n(17)),r(n(257)),r(n(12)),r(n(174))},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(212);t.FixedSizeSet=i.FixedSizeSet;var o=n(213);t.ObjectCache=o.ObjectCache;var a=n(214);t.CompareCache=a.CompareCache;var s=n(215);t.Lazy=s.Lazy;var l=n(216);function u(e,t,n){if(m(e))e.forEach((function(e,r){return t.call(n,r,e)}));else for(var r in e)e.hasOwnProperty(r)&&t.call(n,r,e[r])}function c(e){var t,n;if(d(e))return e;if(f(e)){var i=[];try{for(var o=r(e),a=o.next();!a.done;a=o.next()){var s=a.value;i.push(c(s))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}if(p(e)){for(var l in i={},e)if(e.hasOwnProperty(l)){var u=e[l];i[l]=c(u)}return i}return e}function d(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)}function p(e){var t=typeof e;return!!e&&("function"===t||"object"===t)}function f(e){return Array.isArray(e)}function h(e){return e instanceof Set}function m(e){return e instanceof Map}function g(e){if(p(e)){var t=Object.getPrototypeOf(e),n=t.constructor;return t&&n&&"function"==typeof n&&n instanceof n&&Function.prototype.toString.call(n)===Function.prototype.toString.call(Object)}return!1}t.StringWalker=l.StringWalker,t.applyMixin=function(e,t){for(var n=[],r=2;r>6|192;else{if(i>55295&&i<56320){if(++r>=e.length)throw new Error("Incomplete surrogate pair.");var o=e.charCodeAt(r);if(o<56320||o>57343)throw new Error("Invalid surrogate character.");i=65536+((1023&i)<<10)+(1023&o),t[n++]=i>>18|240,t[n++]=i>>12&63|128}else t[n++]=i>>12|224;t[n++]=i>>6&63|128}t[n++]=63&i|128}}return t.subarray(0,n)},t.utf8Decode=function(e){for(var t="",n=0;n127)if(r>191&&r<224){if(n>=e.length)throw new Error("Incomplete 2-byte sequence.");r=(31&r)<<6|63&e[n++]}else if(r>223&&r<240){if(n+1>=e.length)throw new Error("Incomplete 3-byte sequence.");r=(15&r)<<12|(63&e[n++])<<6|63&e[n++]}else{if(!(r>239&&r<248))throw new Error("Unknown multi-byte start.");if(n+2>=e.length)throw new Error("Incomplete 4-byte sequence.");r=(7&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++]}if(r<=65535)t+=String.fromCharCode(r);else{if(!(r<=1114111))throw new Error("Code point exceeds UTF-16 limit.");r-=65536,t+=String.fromCharCode(r>>10|55296),t+=String.fromCharCode(1023&r|56320)}}return t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.Before=0]="Before",e[e.Equal=1]="Equal",e[e.After=2]="After"}(t.BoundaryPosition||(t.BoundaryPosition={})),function(e){e[e.None=0]="None",e[e.Capturing=1]="Capturing",e[e.AtTarget=2]="AtTarget",e[e.Bubbling=3]="Bubbling"}(t.EventPhase||(t.EventPhase={})),function(e){e[e.Element=1]="Element",e[e.Attribute=2]="Attribute",e[e.Text=3]="Text",e[e.CData=4]="CData",e[e.EntityReference=5]="EntityReference",e[e.Entity=6]="Entity",e[e.ProcessingInstruction=7]="ProcessingInstruction",e[e.Comment=8]="Comment",e[e.Document=9]="Document",e[e.DocumentType=10]="DocumentType",e[e.DocumentFragment=11]="DocumentFragment",e[e.Notation=12]="Notation"}(t.NodeType||(t.NodeType={})),function(e){e[e.Disconnected=1]="Disconnected",e[e.Preceding=2]="Preceding",e[e.Following=4]="Following",e[e.Contains=8]="Contains",e[e.ContainedBy=16]="ContainedBy",e[e.ImplementationSpecific=32]="ImplementationSpecific"}(t.Position||(t.Position={})),function(e){e[e.Accept=1]="Accept",e[e.Reject=2]="Reject",e[e.Skip=3]="Skip"}(t.FilterResult||(t.FilterResult={})),function(e){e[e.All=4294967295]="All",e[e.Element=1]="Element",e[e.Attribute=2]="Attribute",e[e.Text=4]="Text",e[e.CDataSection=8]="CDataSection",e[e.EntityReference=16]="EntityReference",e[e.Entity=32]="Entity",e[e.ProcessingInstruction=64]="ProcessingInstruction",e[e.Comment=128]="Comment",e[e.Document=256]="Document",e[e.DocumentType=512]="DocumentType",e[e.DocumentFragment=1024]="DocumentFragment",e[e.Notation=2048]="Notation"}(t.WhatToShow||(t.WhatToShow={})),function(e){e[e.StartToStart=0]="StartToStart",e[e.StartToEnd=1]="StartToEnd",e[e.EndToEnd=2]="EndToEnd",e[e.EndToStart=3]="EndToStart"}(t.HowToCompare||(t.HowToCompare={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(241);t.Cast=r.Cast;var i=n(150);t.Guard=i.Guard;var o=n(242);t.EmptySet=o.EmptySet},function(e,t,n){var r=n(11),i=n(55).f,o=n(21),a=n(25),s=n(80),l=n(119),u=n(123);e.exports=function(e,t){var n,c,d,p,f,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(c in t){if(p=t[c],d=e.noTargetGet?(f=i(n,c))&&f.value:n[c],!u(m?c:h+(g?".":"#")+c,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&o(p,"sham",!0),a(n,c,p,e)}}},function(e,t,n){var r=n(11),i=n(81),o=n(14),a=n(58),s=n(86),l=n(124),u=i("wks"),c=r.Symbol,d=l?c:c&&c.withoutSetter||a;e.exports=function(e){return o(u,e)||(s&&o(c,e)?u[e]=c[e]:u[e]=d("Symbol."+e)),u[e]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(29),o=function(){function e(){this._features={mutationObservers:!0,customElements:!0,slots:!0,steps:!0},this._window=null,this._compareCache=new r.CompareCache,this._rangeList=new r.FixedSizeSet}return e.prototype.setFeatures=function(e){if(void 0===e&&(e=!0),r.isObject(e))for(var t in e)this._features[t]=e[t]||!1;else for(var t in this._features)this._features[t]=e},Object.defineProperty(e.prototype,"features",{get:function(){return this._features},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"window",{get:function(){return null===this._window&&(this._window=i.create_window()),this._window},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"compareCache",{get:function(){return this._compareCache},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rangeList",{get:function(){return this._rangeList},enumerable:!0,configurable:!0}),Object.defineProperty(e,"instance",{get:function(){return e._instance||(e._instance=new e),e._instance},enumerable:!0,configurable:!0}),e}();t.dom=o.instance},function(e,t,n){"use strict";var r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(228));t.base64=i;var o=r(n(146));t.byte=o;var a=r(n(147));t.byteSequence=a;var s=r(n(96));t.codePoint=s;var l=r(n(232));t.json=l;var u=r(n(233));t.list=u;var c=r(n(234));t.map=c;var d=r(n(235));t.namespace=d;var p=r(n(236));t.queue=p;var f=r(n(237));t.set=f;var h=r(n(238));t.stack=h;var m=r(n(239));t.string=m},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,n){void 0===n&&(n="");var r=e.call(this,n)||this;return r.name=t,r}return i(t,e),t}(Error);t.DOMException=o;var a=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"DOMStringSizeError",t)||this}return i(t,e),t}(o);t.DOMStringSizeError=a;var s=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"WrongDocumentError","The object is in the wrong document. "+t)||this}return i(t,e),t}(o);t.WrongDocumentError=s;var l=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NoDataAllowedError",t)||this}return i(t,e),t}(o);t.NoDataAllowedError=l;var u=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NoModificationAllowedError","The object can not be modified. "+t)||this}return i(t,e),t}(o);t.NoModificationAllowedError=u;var c=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotSupportedError","The operation is not supported. "+t)||this}return i(t,e),t}(o);t.NotSupportedError=c;var d=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InUseAttributeError",t)||this}return i(t,e),t}(o);t.InUseAttributeError=d;var p=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidStateError","The object is in an invalid state. "+t)||this}return i(t,e),t}(o);t.InvalidStateError=p;var f=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidModificationError","The object can not be modified in this way. "+t)||this}return i(t,e),t}(o);t.InvalidModificationError=f;var h=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NamespaceError","The operation is not allowed by Namespaces in XML. [XMLNS] "+t)||this}return i(t,e),t}(o);t.NamespaceError=h;var m=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidAccessError","The object does not support the operation or argument. "+t)||this}return i(t,e),t}(o);t.InvalidAccessError=m;var g=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"ValidationError",t)||this}return i(t,e),t}(o);t.ValidationError=g;var v=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"TypeMismatchError",t)||this}return i(t,e),t}(o);t.TypeMismatchError=v;var y=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"SecurityError","The operation is insecure. "+t)||this}return i(t,e),t}(o);t.SecurityError=y;var b=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NetworkError","A network error occurred. "+t)||this}return i(t,e),t}(o);t.NetworkError=b;var w=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"AbortError","The operation was aborted. "+t)||this}return i(t,e),t}(o);t.AbortError=w;var x=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"URLMismatchError","The given URL does not match another URL. "+t)||this}return i(t,e),t}(o);t.URLMismatchError=x;var S=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"QuotaExceededError","The quota has been exceeded. "+t)||this}return i(t,e),t}(o);t.QuotaExceededError=S;var C=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"TimeoutError","The operation timed out. "+t)||this}return i(t,e),t}(o);t.TimeoutError=C;var A=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidNodeTypeError","The supplied node is incorrect or has an incorrect ancestor for this operation. "+t)||this}return i(t,e),t}(o);t.InvalidNodeTypeError=A;var P=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"DataCloneError","The object can not be cloned. "+t)||this}return i(t,e),t}(o);t.DataCloneError=P;var _=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotImplementedError","The DOM method is not implemented by this module. "+t)||this}return i(t,e),t}(o);t.NotImplementedError=_;var O=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"HierarchyRequestError","The operation would yield an incorrect node tree. "+t)||this}return i(t,e),t}(o);t.HierarchyRequestError=O;var T=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"NotFoundError","The object can not be found here. "+t)||this}return i(t,e),t}(o);t.NotFoundError=T;var D=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"IndexSizeError","The index is not in the allowed range. "+t)||this}return i(t,e),t}(o);t.IndexSizeError=D;var E=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"SyntaxError","The string did not match the expected pattern. "+t)||this}return i(t,e),t}(o);t.SyntaxError=E;var I=function(e){function t(t){return void 0===t&&(t=""),e.call(this,"InvalidCharacterError","The string contains invalid characters. "+t)||this}return i(t,e),t}(o);t.InvalidCharacterError=I},function(e,t,n){"use strict";var r=n(53),i=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],o=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===i.indexOf(t))throw new r('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===o.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(78))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.idl_defineConst=function(e,t,n){Object.defineProperty(e,t,{writable:!1,enumerable:!0,configurable:!1,value:n})}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(16),i=n(115),o=n(18),a=n(56),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(8);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(2);function a(e,t,n){if(void 0===n&&(n=!1),n&&i.Guard.isElementNode(t)&&i.Guard.isShadowRoot(t.shadowRoot)&&t.shadowRoot._firstChild)return t.shadowRoot._firstChild;if(t._firstChild)return t._firstChild;if(t===e)return null;if(t._nextSibling)return t._nextSibling;for(var r=t._parent;r&&r!==e;){if(r._nextSibling)return r._nextSibling;r=r._parent}return null}function s(){var e;return(e={})[Symbol.iterator]=function(){return{next:function(){return{done:!0,value:null}}}},e}function l(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);for(var i=t?e:a(e,e,n);i&&r&&!r(i);)i=a(e,i,n);return i}function u(e,t,n,r,i){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var o=a(e,t,r);o&&i&&!i(o);)o=a(e,o,r);return o}function c(e,t,n,r){var i;return void 0===t&&(t=!1),void 0===n&&(n=!1),t||0!==e._children.size?((i={})[Symbol.iterator]=function(){var i=t?e:a(e,e,n);return{next:function(){for(;i&&r&&!r(i);)i=a(e,i,n);if(null===i)return{done:!0,value:null};var t={done:!1,value:i};return i=a(e,i,n),t}}},i):s()}function d(e,t,n){void 0===t&&(t=!1);for(var r=t?e:e._parent;r&&n&&!n(r);)r=r._parent;return r}function p(e,t,n,r){void 0===n&&(n=!1);for(var i=t._parent;i&&r&&!r(i);)i=i._parent;return i}function f(e){return i.Guard.isDocumentTypeNode(e)?0:i.Guard.isCharacterDataNode(e)?e._data.length:e._children.size}function h(e,t){if(void 0===t&&(t=!1),t){var n=h(e,!1);return i.Guard.isShadowRoot(n)?h(n._host,!0):n}return e._parent?h(e._parent):e}function m(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var o=n?e:r&&i.Guard.isShadowRoot(e)?e._host:e._parent;null!==o;){if(o===t)return!0;o=r&&i.Guard.isShadowRoot(o)?o._host:o._parent}return!1}function g(e){for(var t=h(e),n=0,r=l(t);null!==r;){if(n++,r===e)return n;r=u(t,r)}return-1}t.tree_getFirstDescendantNode=l,t.tree_getNextDescendantNode=u,t.tree_getDescendantNodes=c,t.tree_getDescendantElements=function(e,t,n,r){var o;return void 0===t&&(t=!1),void 0===n&&(n=!1),t||0!==e._children.size?((o={})[Symbol.iterator]=function(){var o=c(e,t,n,(function(e){return i.Guard.isElementNode(e)}))[Symbol.iterator](),a=o.next().value;return{next:function(){for(;a&&r&&!r(a);)a=o.next().value;if(null===a)return{done:!0,value:null};var e={done:!1,value:a};return a=o.next().value,e}}},o):s()},t.tree_getSiblingNodes=function(e,t,n){var r;return void 0===t&&(t=!1),e._parent&&0!==e._parent._children.size?((r={})[Symbol.iterator]=function(){var r=e._parent?e._parent._firstChild:null;return{next:function(){for(;r&&(n&&!n(r)||!t&&r===e);)r=r._nextSibling;if(null===r)return{done:!0,value:null};var i={done:!1,value:r};return r=r._nextSibling,i}}},r):s()},t.tree_getFirstAncestorNode=d,t.tree_getNextAncestorNode=p,t.tree_getAncestorNodes=function(e,t,n){var r;return void 0===t&&(t=!1),t||e._parent?((r={})[Symbol.iterator]=function(){var r=d(e,t,n);return{next:function(){if(null===r)return{done:!0,value:null};var e={done:!1,value:r};return r=p(0,r,t,n),e}}},r):s()},t.tree_getCommonAncestor=function(e,t){if(e===t)return e._parent;for(var n=[],r=[],i=d(e,!0);null!==i;)n.push(i),i=p(0,i,!0);for(var o=d(t,!0);null!==o;)r.push(o),o=p(0,o,!0);for(var a=n.length,s=r.length,l=null,u=Math.min(a,s);u>0;u--){var c=n[--a];if(c!==r[--s])break;l=c}return l},t.tree_getFollowingNode=function(e,t){if(t._firstChild)return t._firstChild;if(t._nextSibling)return t._nextSibling;for(;;){var n=t._parent;if(null===n||n===e)return null;if(n._nextSibling)return n._nextSibling;t=n}},t.tree_getPrecedingNode=function(e,t){return t===e?null:t._previousSibling?(t=t._previousSibling)._lastChild?t._lastChild:t:t._parent},t.tree_isConstrained=function e(t){var n,i,a,s,l,u;switch(t._nodeType){case o.NodeType.Document:var c=!1,d=!1;try{for(var p=r(t._children),f=p.next();!f.done;f=p.next())switch(f.value._nodeType){case o.NodeType.ProcessingInstruction:case o.NodeType.Comment:break;case o.NodeType.DocumentType:if(c||d)return!1;c=!0;break;case o.NodeType.Element:if(d)return!1;d=!0;break;default:return!1}}catch(e){n={error:e}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}break;case o.NodeType.DocumentFragment:case o.NodeType.Element:try{for(var h=r(t._children),m=h.next();!m.done;m=h.next())switch(m.value._nodeType){case o.NodeType.Element:case o.NodeType.Text:case o.NodeType.ProcessingInstruction:case o.NodeType.CData:case o.NodeType.Comment:break;default:return!1}}catch(e){a={error:e}}finally{try{m&&!m.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}break;case o.NodeType.DocumentType:case o.NodeType.Text:case o.NodeType.ProcessingInstruction:case o.NodeType.CData:case o.NodeType.Comment:return!t.hasChildNodes()}try{for(var g=r(t._children),v=g.next();!v.done;v=g.next())if(!e(v.value))return!1}catch(e){l={error:e}}finally{try{v&&!v.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}return!0},t.tree_nodeLength=f,t.tree_isEmpty=function(e){return 0===f(e)},t.tree_rootNode=h,t.tree_isDescendantOf=function(e,t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!1);for(var i=l(e,n,r);null!==i;){if(i===t)return!0;i=u(e,i,n,r)}return!1},t.tree_isAncestorOf=m,t.tree_isHostIncludingAncestorOf=function e(t,n,r){if(void 0===r&&(r=!1),m(t,n,r))return!0;var o=h(t);return!(!i.Guard.isDocumentFragmentNode(o)||null===o._host||!e(o._host,n,r))},t.tree_isSiblingOf=function(e,t,n){return void 0===n&&(n=!1),e!==t?null!==e._parent&&e._parent===t._parent:!!n},t.tree_isPreceding=function(e,t){var n=g(e),r=g(t);return-1!==n&&-1!==r&&h(e)===h(t)&&rn},t.tree_isParentOf=function(e,t){return e._parent===t},t.tree_isChildOf=function(e,t){return t._parent===e},t.tree_previousSibling=function(e){return e._previousSibling},t.tree_nextSibling=function(e){return e._nextSibling},t.tree_firstChild=function(e){return e._firstChild},t.tree_lastChild=function(e){return e._lastChild},t.tree_treePosition=g,t.tree_index=function(e){for(var t=0;null!==e._previousSibling;)t++,e=e._previousSibling;return t},t.tree_retarget=function(e,t){for(;;){if(!e||!i.Guard.isNode(e))return e;var n=h(e);if(!i.Guard.isShadowRoot(n))return e;if(t&&i.Guard.isNode(t)&&m(n,t,!0,!0))return e;e=n.host}}},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){"use strict";var r=n(24),i=n(130),o=n(49),a=n(43),s=n(88),l=a.set,u=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(90),i=n(25),o=n(202);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,n){var r=n(16),i=n(15),o=n(40);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(137).charAt,i=n(43),o=n(88),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(11),i=n(203),o=n(19),a=n(21),s=n(5),l=s("iterator"),u=s("toStringTag"),c=o.values;for(var d in i){var p=r[d],f=p&&p.prototype;if(f){if(f[l]!==c)try{a(f,l,c)}catch(e){f[l]=c}if(f[u]||a(f,u,d),i[d])for(var h in o)if(f[h]!==o[h])try{a(f,h,o[h])}catch(e){f[h]=o[h]}}}},function(e,t,n){var r=n(41),i=n(35);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(11),i=n(21),o=n(14),a=n(80),s=n(117),l=n(43),u=l.get,c=l.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var l=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),c(n).source=d.join("string"==typeof t?t:"")),e!==r?(l?!p&&e[t]&&(u=!0):delete e[t],u?e[t]=n:i(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},function(e,t,n){var r=n(47),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(35);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(16),i=n(8),o=n(14),a=Object.defineProperty,s={},l=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var n=[][e],u=!!o(t,"ACCESSORS")&&t.ACCESSORS,c=o(t,0)?t[0]:l,d=o(t,1)?t[1]:void 0;return s[e]=!!n&&!i((function(){if(u&&!r)return!0;var e={length:-1};u?a(e,1,{enumerable:!0,get:l}):e[1]=1,n.call(e,c,d)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(148),i=n(149),o=n(151),a=n(98),s=n(153),l=n(154),u=n(155),c=n(99),d=n(100),p=n(156),f=n(157),h=n(101),m=n(158),g=n(159),v=n(160),y=n(161),b=n(162),w=n(163),x=n(164),S=n(165),C=n(166),A=n(167),P=n(168),_=n(169),O=n(170);t.create_domImplementation=function(e){return r.DOMImplementationImpl._create(e)},t.create_window=function(){return i.WindowImpl._create()},t.create_xmlDocument=function(){return new o.XMLDocumentImpl},t.create_document=function(){return new a.DocumentImpl},t.create_abortController=function(){return new s.AbortControllerImpl},t.create_abortSignal=function(){return l.AbortSignalImpl._create()},t.create_documentType=function(e,t,n,r){return u.DocumentTypeImpl._create(e,t,n,r)},t.create_element=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_htmlElement=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_htmlUnknownElement=function(e,t,n,r){return c.ElementImpl._create(e,t,n,r)},t.create_documentFragment=function(e){return d.DocumentFragmentImpl._create(e)},t.create_shadowRoot=function(e,t){return p.ShadowRootImpl._create(e,t)},t.create_attr=function(e,t){return f.AttrImpl._create(e,t)},t.create_text=function(e,t){return h.TextImpl._create(e,t)},t.create_cdataSection=function(e,t){return m.CDATASectionImpl._create(e,t)},t.create_comment=function(e,t){return g.CommentImpl._create(e,t)},t.create_processingInstruction=function(e,t,n){return v.ProcessingInstructionImpl._create(e,t,n)},t.create_htmlCollection=function(e,t){return void 0===t&&(t=function(){return!0}),y.HTMLCollectionImpl._create(e,t)},t.create_nodeList=function(e){return b.NodeListImpl._create(e)},t.create_nodeListStatic=function(e,t){return w.NodeListStaticImpl._create(e,t)},t.create_namedNodeMap=function(e){return x.NamedNodeMapImpl._create(e)},t.create_range=function(e,t){return S.RangeImpl._create(e,t)},t.create_nodeIterator=function(e,t,n){return C.NodeIteratorImpl._create(e,t,n)},t.create_treeWalker=function(e,t){return A.TreeWalkerImpl._create(e,t)},t.create_nodeFilter=function(){return P.NodeFilterImpl._create()},t.create_mutationRecord=function(e,t,n,r,i,o,a,s,l){return _.MutationRecordImpl._create(e,t,n,r,i,o,a,s,l)},t.create_domTokenList=function(e,t){return O.DOMTokenListImpl._create(e,t)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(17),a=n(3),s=n(72),l=new Map;function u(e,t){if(t!==e._root&&o.tree_isAncestorOf(e._reference,t,!0)){if(e._pointerBeforeReference)for(;;){var n=o.tree_getFollowingNode(e._root,t);if(null!==n&&o.tree_isDescendantOf(e._root,n,!0)&&!o.tree_isDescendantOf(t,n,!0))return void(e._reference=n);if(null===n)return void(e._pointerBeforeReference=!1)}if(null===t._previousSibling)null!==t._parent&&(e._reference=t._parent);else{for(var r=t._previousSibling,i=o.tree_getFirstDescendantNode(t._previousSibling,!0,!1);null!==i;)null!==i&&(r=i),i=o.tree_getNextDescendantNode(t._previousSibling,i,!0,!1);e._reference=r}}}function c(e,t,n,r,i){if(a.Guard.isSlot(e)&&"name"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,s.shadowTree_assignSlotablesForATree(o.tree_rootNode(e))}}function d(e,t,n,r,i){if(a.Guard.isSlotable(e)&&"slot"===t&&null===i){if(r===n)return;if(null===r&&""===n)return;if(""===r&&null===n)return;e._name=null===r||""===r?"":r,s.shadowTree_isAssigned(e)&&s.shadowTree_assignSlotables(e._assignedSlot),s.shadowTree_assignASlot(e)}}function p(e,t,n,r){"id"===t&&null===r&&(e._uniqueIdentifier=n||void 0)}t.dom_runRemovingSteps=function(e,t){},t.dom_runCloningSteps=function(e,t,n,r){},t.dom_runAdoptingSteps=function(e,t){},t.dom_runAttributeChangeSteps=function(e,t,n,o,a){var s,l;i.dom.features.slots&&(d.call(e,e,t,n,o,a),c.call(e,e,t,n,o,a)),p.call(e,e,t,o,a);try{for(var u=r(e._attributeChangeSteps),f=u.next();!f.done;f=u.next())f.value.call(e,e,t,n,o,a)}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=u.return)&&l.call(u)}finally{if(s)throw s.error}}},t.dom_runInsertionSteps=function(e){},t.dom_runNodeIteratorPreRemovingSteps=function(e,t){u.call(e,e,t)},t.dom_hasSupportedTokens=function(e){return l.has(e)},t.dom_getSupportedTokens=function(e){return l.get(e)||new Set},t.dom_runEventConstructingSteps=function(e){},t.dom_runChildTextContentChangeSteps=function(e){}},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(46),a=n(44),s=n(16),l=n(86),u=n(124),c=n(8),d=n(14),p=n(59),f=n(13),h=n(18),m=n(27),g=n(24),v=n(56),y=n(40),b=n(60),w=n(61),x=n(82),S=n(190),C=n(85),A=n(55),P=n(15),_=n(79),O=n(21),T=n(25),D=n(81),E=n(57),I=n(45),k=n(58),M=n(5),N=n(125),R=n(126),F=n(62),B=n(43),L=n(36).forEach,V=E("hidden"),j=M("toPrimitive"),G=B.set,U=B.getterFor("Symbol"),z=Object.prototype,W=i.Symbol,H=o("JSON","stringify"),K=A.f,X=P.f,q=S.f,Y=_.f,Z=D("symbols"),J=D("op-symbols"),Q=D("string-to-symbol-registry"),$=D("symbol-to-string-registry"),ee=D("wks"),te=i.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=s&&c((function(){return 7!=b(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=K(z,t);r&&delete z[t],X(e,t,n),r&&e!==z&&X(z,t,r)}:X,ie=function(e,t){var n=Z[e]=b(W.prototype);return G(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},oe=u?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof W},ae=function(e,t,n){e===z&&ae(J,t,n),h(e);var r=v(t,!0);return h(n),d(Z,r)?(n.enumerable?(d(e,V)&&e[V][r]&&(e[V][r]=!1),n=b(n,{enumerable:y(0,!1)})):(d(e,V)||X(e,V,y(1,{})),e[V][r]=!0),re(e,r,n)):X(e,r,n)},se=function(e,t){h(e);var n=g(t),r=w(n).concat(de(n));return L(r,(function(t){s&&!le.call(n,t)||ae(e,t,n[t])})),e},le=function(e){var t=v(e,!0),n=Y.call(this,t);return!(this===z&&d(Z,t)&&!d(J,t))&&(!(n||!d(this,t)||!d(Z,t)||d(this,V)&&this[V][t])||n)},ue=function(e,t){var n=g(e),r=v(t,!0);if(n!==z||!d(Z,r)||d(J,r)){var i=K(n,r);return!i||!d(Z,r)||d(n,V)&&n[V][r]||(i.enumerable=!0),i}},ce=function(e){var t=q(g(e)),n=[];return L(t,(function(e){d(Z,e)||d(I,e)||n.push(e)})),n},de=function(e){var t=e===z,n=q(t?J:g(e)),r=[];return L(n,(function(e){!d(Z,e)||t&&!d(z,e)||r.push(Z[e])})),r};l||(T((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=k(e),n=function(e){this===z&&n.call(J,e),d(this,V)&&d(this[V],t)&&(this[V][t]=!1),re(this,t,y(1,e))};return s&&ne&&re(z,t,{configurable:!0,set:n}),ie(t,e)}).prototype,"toString",(function(){return U(this).tag})),T(W,"withoutSetter",(function(e){return ie(k(e),e)})),_.f=le,P.f=ae,A.f=ue,x.f=S.f=ce,C.f=de,N.f=function(e){return ie(M(e),e)},s&&(X(W.prototype,"description",{configurable:!0,get:function(){return U(this).description}}),a||T(z,"propertyIsEnumerable",le,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:W}),L(w(ee),(function(e){R(e)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=String(e);if(d(Q,t))return Q[t];var n=W(t);return Q[t]=n,$[n]=t,n},keyFor:function(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(d($,e))return $[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(e,t){return void 0===t?b(e):se(b(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ce,getOwnPropertySymbols:de}),r({target:"Object",stat:!0,forced:c((function(){C.f(1)}))},{getOwnPropertySymbols:function(e){return C.f(m(e))}}),H&&r({target:"JSON",stat:!0,forced:!l||c((function(){var e=W();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(f(t)||void 0!==e)&&!oe(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!oe(t))return t}),i[1]=t,H.apply(null,i)}}),W.prototype[j]||O(W.prototype,j,W.prototype.valueOf),F(W,"Symbol"),I[V]=!0},function(e,t,n){"use strict";var r=n(4),i=n(16),o=n(11),a=n(14),s=n(13),l=n(15).f,u=n(119),c=o.Symbol;if(i&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var d={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new c(e):void 0===e?c():c(e);return""===e&&(d[t]=!0),t};u(p,c);var f=p.prototype=c.prototype;f.constructor=p;var h=f.toString,m="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;l(f,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=h.call(e);if(a(d,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){n(126)("iterator")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(70),u=n(3),c=n(9),d=n(0),p=n(152),f=n(12),h=function(e){function t(){var t=e.call(this)||this;return t._parent=null,t._firstChild=null,t._lastChild=null,t._previousSibling=null,t._nextSibling=null,t}return i(t,e),Object.defineProperty(t.prototype,"_childNodes",{get:function(){return this.__childNodes||(this.__childNodes=d.create_nodeList(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_nodeDocument",{get:function(){return this._nodeDocumentOverride||a.dom.window._associatedDocument},set:function(e){this._nodeDocumentOverride=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_registeredObserverList",{get:function(){return this.__registeredObserverList||(this.__registeredObserverList=[])},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this._nodeType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeName",{get:function(){return u.Guard.isElementNode(this)?this._htmlUppercasedQualifiedName:u.Guard.isAttrNode(this)?this._qualifiedName:u.Guard.isExclusiveTextNode(this)?"#text":u.Guard.isCDATASectionNode(this)?"#cdata-section":u.Guard.isProcessingInstructionNode(this)?this._target:u.Guard.isCommentNode(this)?"#comment":u.Guard.isDocumentNode(this)?"#document":u.Guard.isDocumentTypeNode(this)?this._name:u.Guard.isDocumentFragmentNode(this)?"#document-fragment":""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"baseURI",{get:function(){return p.urlSerializer(this._nodeDocument._URL)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConnected",{get:function(){return u.Guard.isElementNode(this)&&d.shadowTree_isConnected(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this._nodeType===s.NodeType.Document?null:this._nodeDocument},enumerable:!0,configurable:!0}),t.prototype.getRootNode=function(e){return d.tree_rootNode(this,!!e&&e.composed)},Object.defineProperty(t.prototype,"parentNode",{get:function(){return this._nodeType===s.NodeType.Attribute?null:this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this._parent&&u.Guard.isElementNode(this._parent)?this._parent:null},enumerable:!0,configurable:!0}),t.prototype.hasChildNodes=function(){return null!==this._firstChild},Object.defineProperty(t.prototype,"childNodes",{get:function(){return this._childNodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this._firstChild},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this._lastChild},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this._previousSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this._nextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return u.Guard.isAttrNode(this)?this._value:u.Guard.isCharacterDataNode(this)?this._data:null},set:function(e){null===e&&(e=""),u.Guard.isAttrNode(this)?d.attr_setAnExistingAttributeValue(this,e):u.Guard.isCharacterDataNode(this)&&d.characterData_replaceData(this,0,this._data.length,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"textContent",{get:function(){return u.Guard.isDocumentFragmentNode(this)||u.Guard.isElementNode(this)?d.text_descendantTextContent(this):u.Guard.isAttrNode(this)?this._value:u.Guard.isCharacterDataNode(this)?this._data:null},set:function(e){null===e&&(e=""),u.Guard.isDocumentFragmentNode(this)||u.Guard.isElementNode(this)?d.node_stringReplaceAll(e,this):u.Guard.isAttrNode(this)?d.attr_setAnExistingAttributeValue(this,e):u.Guard.isCharacterDataNode(this)&&d.characterData_replaceData(this,0,d.tree_nodeLength(this),e)},enumerable:!0,configurable:!0}),t.prototype.normalize=function(){for(var e,t,n,r,i=[],s=d.tree_getFirstDescendantNode(this,!1,!1,(function(e){return u.Guard.isExclusiveTextNode(e)}));null!==s;)i.push(s),s=d.tree_getNextDescendantNode(this,s,!1,!1,(function(e){return u.Guard.isExclusiveTextNode(e)}));for(var l=0;lC;C++)if((p||C in w)&&(y=x(v=w[C],C,b),e))if(t)P[C]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return C;case 2:l.call(P,v)}else if(c)return!1;return d?-1:u||c?c:P}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t1)throw new s.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has "+y+" element nodes.");if(1===y){try{for(var S=r(t._children),C=S.next();!C.done;C=S.next())if(C.value._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("The document node already has a document element node.")}catch(e){a={error:e}}finally{try{C&&!C.done&&(u=S.return)&&u.call(S)}finally{if(a)throw a.error}}if(n){if(v===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");for(var A=n._nextSibling;A;){if(A._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");A=A._nextSibling}}}}else if(g===l.NodeType.Element){try{for(var P=r(t._children),_=P.next();!_.done;_=P.next())if(_.value._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Document already has a document element node. Node is "+e.nodeName+".")}catch(e){c={error:e}}finally{try{_&&!_.done&&(d=P.return)&&d.call(P)}finally{if(c)throw c.error}}if(n){if(v===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+e.nodeName+".");for(A=n._nextSibling;A;){if(A._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+e.nodeName+".");A=A._nextSibling}}}else if(g===l.NodeType.DocumentType){try{for(var O=r(t._children),T=O.next();!T.done;T=O.next())if(T.value._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Document already has a document type node. Node is "+e.nodeName+".")}catch(e){p={error:e}}finally{try{T&&!T.done&&(h=O.return)&&h.call(O)}finally{if(p)throw p.error}}if(n)for(var D=n._previousSibling;D;){if(D._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+e.nodeName+".");D=D._previousSibling}else for(D=t._firstChild;D;){if(D._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+e.nodeName+".");D=D._nextSibling}}}function w(e,t,n){b(e,t,n);var r=n;return r===e&&(r=e._nextSibling),y.document_adopt(e,t._nodeDocument),x(e,t,r),e}function x(e,t,n,i){var s,h;if(null!==n||e._nodeType===l.NodeType.DocumentFragment){var y=e._nodeType===l.NodeType.DocumentFragment?e._children.size:1;if(null!==n&&0!==a.dom.rangeList.size){var b=f.tree_index(n);try{for(var w=r(a.dom.rangeList),x=w.next();!x.done;x=w.next()){var C=x.value;C._start[0]===t&&C._start[1]>b&&(C._start[1]+=y),C._end[0]===t&&C._end[1]>b&&(C._end[1]+=y)}}catch(e){s={error:e}}finally{try{x&&!x.done&&(h=w.return)&&h.call(w)}finally{if(s)throw s.error}}}var A=e._nodeType===l.NodeType.DocumentFragment?new(Array.bind.apply(Array,o([void 0],e._children))):[e];if(e._nodeType===l.NodeType.DocumentFragment)for(;e._firstChild;)S(e._firstChild,e,!0);a.dom.features.mutationObservers&&e._nodeType===l.NodeType.DocumentFragment&&g.observer_queueTreeMutationRecord(e,[],A,null,null);for(var P=n?n._previousSibling:t._lastChild,_=null===n?-1:f.tree_index(n),O=0;Ox&&A._start[1]--,A._end[0]===t&&A._end[1]>x&&A._end[1]--}}catch(e){i={error:e}}finally{try{C&&!C.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}try{for(var P=r(a.dom.rangeList),_=P.next();!_.done;_=P.next())(A=_.value)._start[0]===t&&A._start[1]>x&&(A._start[1]-=1),A._end[0]===t&&A._end[1]>x&&(A._end[1]-=1)}catch(e){s={error:e}}finally{try{_&&!_.done&&(l=P.return)&&l.call(P)}finally{if(s)throw s.error}}}if(a.dom.features.steps)try{for(var O=r(h.nodeIterator_iteratorList()),T=O.next();!T.done;T=O.next()){var D=T.value;D._root._nodeDocument===e._nodeDocument&&v.dom_runNodeIteratorPreRemovingSteps(D,e)}}catch(e){d={error:e}}finally{try{T&&!T.done&&(y=O.return)&&y.call(O)}finally{if(d)throw d.error}}var E=e._previousSibling,I=e._nextSibling;u.Guard.isDocumentNode(t)&&u.Guard.isElementNode(e)&&(t._documentElement=null),e._parent=null,t._children.delete(e);var k=e._previousSibling,M=e._nextSibling;e._previousSibling=null,e._nextSibling=null,k&&(k._nextSibling=M),M&&(M._previousSibling=k),k||(t._firstChild=M),M||(t._lastChild=k),a.dom.features.slots&&u.Guard.isSlotable(e)&&null!==e._assignedSlot&&m.shadowTree_isAssigned(e)&&m.shadowTree_assignSlotables(e._assignedSlot),a.dom.features.slots&&u.Guard.isShadowRoot(f.tree_rootNode(t))&&u.Guard.isSlot(t)&&c.isEmpty(t._assignedNodes)&&m.shadowTree_signalASlotChange(t),a.dom.features.slots&&null!==f.tree_getFirstDescendantNode(e,!0,!1,(function(e){return u.Guard.isSlot(e)}))&&(m.shadowTree_assignSlotablesForATree(f.tree_rootNode(t)),m.shadowTree_assignSlotablesForATree(e)),a.dom.features.steps&&v.dom_runRemovingSteps(e,t),a.dom.features.customElements&&u.Guard.isCustomElementNode(e)&&p.customElement_enqueueACustomElementCallbackReaction(e,"disconnectedCallback",[]);for(var N=f.tree_getFirstDescendantNode(e,!1,!0);null!==N;)a.dom.features.steps&&v.dom_runRemovingSteps(N,e),a.dom.features.customElements&&u.Guard.isCustomElementNode(N)&&p.customElement_enqueueACustomElementCallbackReaction(N,"disconnectedCallback",[]),N=f.tree_getNextDescendantNode(e,N,!1,!0);if(a.dom.features.mutationObservers)for(var R=f.tree_getFirstAncestorNode(t,!0);null!==R;){try{for(var F=(b=void 0,r(R._registeredObserverList)),B=F.next();!B.done;B=F.next()){var L=B.value;L.options.subtree&&e._registeredObserverList.push({observer:L.observer,options:L.options,source:L})}}catch(e){b={error:e}}finally{try{B&&!B.done&&(w=F.return)&&w.call(F)}finally{if(b)throw b.error}}R=f.tree_getNextAncestorNode(t,R,!0)}a.dom.features.mutationObservers&&(n||g.observer_queueTreeMutationRecord(t,[],[e],E,I)),a.dom.features.steps&&u.Guard.isTextNode(e)&&v.dom_runChildTextContentChangeSteps(t)}t.mutation_ensurePreInsertionValidity=b,t.mutation_preInsert=w,t.mutation_insert=x,t.mutation_append=function(e,t){return w(e,t,null)},t.mutation_replace=function(e,t,n){var i,o,u,c,d,p,h,m;if(n._nodeType!==l.NodeType.Document&&n._nodeType!==l.NodeType.DocumentFragment&&n._nodeType!==l.NodeType.Element)throw new s.HierarchyRequestError("Only document, document fragment and element nodes can contain child nodes. Parent node is "+n.nodeName+".");if(f.tree_isHostIncludingAncestorOf(n,t,!0))throw new s.HierarchyRequestError("The node to be inserted cannot be an ancestor of parent node. Node is "+t.nodeName+", parent node is "+n.nodeName+".");if(e._parent!==n)throw new s.NotFoundError("The reference child node cannot be found under parent node. Child node is "+e.nodeName+", parent node is "+n.nodeName+".");if(t._nodeType!==l.NodeType.DocumentFragment&&t._nodeType!==l.NodeType.DocumentType&&t._nodeType!==l.NodeType.Element&&t._nodeType!==l.NodeType.Text&&t._nodeType!==l.NodeType.ProcessingInstruction&&t._nodeType!==l.NodeType.CData&&t._nodeType!==l.NodeType.Comment)throw new s.HierarchyRequestError("Only document fragment, document type, element, text, processing instruction, cdata section or comment nodes can be inserted. Node is "+t.nodeName+".");if(t._nodeType===l.NodeType.Text&&n._nodeType===l.NodeType.Document)throw new s.HierarchyRequestError("Cannot insert a text node as a child of a document node. Node is "+t.nodeName+".");if(t._nodeType===l.NodeType.DocumentType&&n._nodeType!==l.NodeType.Document)throw new s.HierarchyRequestError("A document type node can only be inserted under a document node. Parent node is "+n.nodeName+".");if(n._nodeType===l.NodeType.Document)if(t._nodeType===l.NodeType.DocumentFragment){var v=0;try{for(var b=r(t._children),w=b.next();!w.done;w=b.next()){var C=w.value;if(C._nodeType===l.NodeType.Element)v++;else if(C._nodeType===l.NodeType.Text)throw new s.HierarchyRequestError("Cannot insert text a node as a child of a document node. Node is "+C.nodeName+".")}}catch(e){i={error:e}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(i)throw i.error}}if(v>1)throw new s.HierarchyRequestError("A document node can only have one document element node. Document fragment to be inserted has "+v+" element nodes.");if(1===v){try{for(var A=r(n._children),P=A.next();!P.done;P=A.next())if((I=P.value)._nodeType===l.NodeType.Element&&I!==e)throw new s.HierarchyRequestError("The document node already has a document element node.")}catch(e){u={error:e}}finally{try{P&&!P.done&&(c=A.return)&&c.call(A)}finally{if(u)throw u.error}}for(var _=e._nextSibling;_;){if(_._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node.");_=_._nextSibling}}}else if(t._nodeType===l.NodeType.Element){try{for(var O=r(n._children),T=O.next();!T.done;T=O.next())if((I=T.value)._nodeType===l.NodeType.Element&&I!==e)throw new s.HierarchyRequestError("Document already has a document element node. Node is "+t.nodeName+".")}catch(e){d={error:e}}finally{try{T&&!T.done&&(p=O.return)&&p.call(O)}finally{if(d)throw d.error}}for(_=e._nextSibling;_;){if(_._nodeType===l.NodeType.DocumentType)throw new s.HierarchyRequestError("Cannot insert an element node before a document type node. Node is "+t.nodeName+".");_=_._nextSibling}}else if(t._nodeType===l.NodeType.DocumentType){try{for(var D=r(n._children),E=D.next();!E.done;E=D.next()){var I;if((I=E.value)._nodeType===l.NodeType.DocumentType&&I!==e)throw new s.HierarchyRequestError("Document already has a document type node. Node is "+t.nodeName+".")}}catch(e){h={error:e}}finally{try{E&&!E.done&&(m=D.return)&&m.call(D)}finally{if(h)throw h.error}}for(var k=e._previousSibling;k;){if(k._nodeType===l.NodeType.Element)throw new s.HierarchyRequestError("Cannot insert a document type node before an element node. Node is "+t.nodeName+".");k=k._previousSibling}}var M=e._nextSibling;M===t&&(M=t._nextSibling);var N=e._previousSibling;y.document_adopt(t,n._nodeDocument);var R=[];null!==e._parent&&(R.push(e),S(e,e._parent,!0));var F=[];return t._nodeType===l.NodeType.DocumentFragment?F=Array.from(t._children):F.push(t),x(t,n,M,!0),a.dom.features.mutationObservers&&g.observer_queueTreeMutationRecord(n,F,R,N,M),e},t.mutation_replaceAll=function(e,t){var n,i;null!==e&&y.document_adopt(e,t._nodeDocument);var o=Array.from(t._children),s=[];e&&e._nodeType===l.NodeType.DocumentFragment?s=Array.from(e._children):null!==e&&s.push(e);try{for(var u=r(o),c=u.next();!c.done;c=u.next())S(c.value,t,!0)}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}null!==e&&x(e,t,null,!0),a.dom.features.mutationObservers&&g.observer_queueTreeMutationRecord(t,s,o,null,null)},t.mutation_preRemove=function(e,t){if(e._parent!==t)throw new s.NotFoundError("The child node cannot be found under parent node. Child node is "+e.nodeName+", parent node is "+t.nodeName+".");return S(e,t),e},t.mutation_remove=S},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n0?r:n)(e)}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t){e.exports={}},function(e,t,n){"use strict";n(31),n(32),n(33),n(220),n(64),n(19),n(65),n(20),n(68),n(66),n(92),n(144),n(22),n(94),n(23);var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t/g,">");this.text(n)},e.prototype._serializeDocumentFragmentNS=function(e,t,n,i,o){var a,s;try{for(var l=r(e.childNodes),u=l.next();!u.done;u=l.next()){var c=u.value;this._serializeNodeNS(c,t,n,i,o)}}catch(e){a={error:e}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},e.prototype._serializeDocumentFragment=function(e,t){var n,i;try{for(var o=r(e._children),a=o.next();!a.done;a=o.next()){var s=a.value;this._serializeNode(s,t)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype._serializeDocumentType=function(e,t){if(t&&!c.xml_isPubidChar(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!c.xml_isLegalChar(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");this.docType(e.name,e.publicId,e.systemId)},e.prototype._serializeProcessingInstruction=function(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!c.xml_isLegalChar(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");this.instruction(e.target,e.data)},e.prototype._serializeCData=function(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");this.cdata(e.data)},e.prototype._serializeAttributesNS=function(e,t,n,i,o,a){var l,d,p=[],f=a?new s.LocalNameSet:void 0;try{for(var h=r(e.attributes),m=h.next();!m.done;m=h.next()){var g=m.value;if(a||o||null!==g.namespaceURI){if(a&&f&&f.has(g.namespaceURI,g.localName))throw new Error("Element contains duplicate attributes (well-formed required).");a&&f&&f.set(g.namespaceURI,g.localName);var v=g.namespaceURI,y=null;if(null!==v)if(y=t.get(g.prefix,v),v===u.namespace.XMLNS){if(g.value===u.namespace.XML||null===g.prefix&&o||null!==g.prefix&&(!(g.localName in i)||i[g.localName]!==g.value)&&t.has(g.localName,g.value))continue;if(a&&g.value===u.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(a&&""===g.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===g.prefix&&(y="xmlns")}else null===y&&(y=null===g.prefix||t.hasPrefix(g.prefix)&&!t.has(g.prefix,v)?this._generatePrefix(v,t,n):g.prefix,p.push([null,"xmlns",y,this._serializeAttributeValue(v,a)]));if(a&&(-1!==g.localName.indexOf(":")||!c.xml_isName(g.localName)||"xmlns"===g.localName&&null===v))throw new Error("Attribute local name contains invalid characters (well-formed required).");p.push([v,y,g.localName,this._serializeAttributeValue(g.value,a)])}else p.push([null,null,g.localName,this._serializeAttributeValue(g.value,a)])}}catch(e){l={error:e}}finally{try{m&&!m.done&&(d=h.return)&&d.call(h)}finally{if(l)throw l.error}}return p},e.prototype._serializeAttributes=function(e,t){var n,i,o=[],a=t?{}:void 0;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value;if(t){if(t&&a&&u.localName in a)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&a&&(a[u.localName]=!0),t&&(-1!==u.localName.indexOf(":")||!c.xml_isName(u.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");o.push([null,null,u.localName,this._serializeAttributeValue(u.value,t)])}else o.push([null,null,u.localName,this._serializeAttributeValue(u.value,t)])}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e.prototype._recordNamespaceInformation=function(e,t,n){var i,o,a=null;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var c=l.value,d=c.namespaceURI,p=c.prefix;if(d===u.namespace.XMLNS){if(null===p){a=c.value;continue}var f=c.localName,h=c.value;if(h===u.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value.toString();return n.value++,t.set(r,e),r},e.prototype._serializeAttributeValue=function(e,t){if(t&&null!==e&&!c.xml_isLegalChar(e))throw new Error("Invalid characters in attribute value.");return null===e?"":e.replace(/(?!&([^&;]*);)&/g,"&").replace(//g,">").replace(/"/g,""")},e._VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),e}();t.BaseWriter=d},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(3),s=n(7),l=n(29),u=n(17),c=n(97);function d(){var e=o.dom.window;e._mutationObserverMicrotaskQueued||(e._mutationObserverMicrotaskQueued=!0,Promise.resolve().then((function(){p()})))}function p(){var e,t,n,i,l=o.dom.window;l._mutationObserverMicrotaskQueued=!1;var u=s.set.clone(l._mutationObservers),d=s.set.clone(l._signalSlots);s.set.empty(l._signalSlots);var p=function(e){var t=s.list.clone(e._recordQueue);s.list.empty(e._recordQueue);for(var n=0;n"+e+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;f=r?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=u("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete f.prototype[a[n]];return f()};s[c]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[c]=e):n=f(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(121),i=n(84);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(15).f,i=n(14),o=n(5)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(8),i=n(5),o=n(129),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";var r=n(4),i=n(122).indexOf,o=n(48),a=n(28),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,u=o("indexOf"),c=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:l||!u||!c},{indexOf:function(e){return l?s.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(16),i=n(15).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(25),i=n(18),o=n(8),a=n(136),s=RegExp.prototype,l=s.toString,u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),c="toString"!=l.name;(u||c)&&r(RegExp.prototype,"toString",(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in s)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(138),n(20),n(66),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),s=n(2),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=a.applyDefaults(n,{format:"object",wellFormed:!1,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){return this._currentList=[],this._currentIndex=0,this._listRegister=[this._currentList],this.serializeNode(e,this._writerOptions.wellFormed),this._process(this._currentList,this._writerOptions)},t.prototype._process=function(e,t){var n,r,i,o,l,u,c;if(0===e.length)return{};for(var d={},p=!1,f=0,h=0,m=0,g=0,v=0;v2)try{for(var c=o(e),d=c.next();!d.done;d=c.next()){var p=d.value;t[r+(s++).toString()]=p}}catch(e){l={error:e}}finally{try{d&&!d.done&&(u=c.return)&&u.call(c)}finally{if(l)throw l.error}}else t[i>1?r+(s++).toString():r]=e;return s},t.prototype.beginElement=function(e){var t,n,r=[];if(0===this._currentList.length)this._currentList.push(((t={})[e]=r,t));else{var i=this._currentList[this._currentList.length-1];this._isElementNode(i,e)?0!==i[e].length&&a.isArray(i[e][0])?i[e].push(r):i[e]=[i[e],r]:this._currentList.push(((n={})[e]=r,n))}this._currentIndex++,this._listRegister.length>this._currentIndex?this._listRegister[this._currentIndex]=r:this._listRegister.push(r),this._currentList=r},t.prototype.endElement=function(){this._currentList=this._listRegister[--this._currentIndex]},t.prototype.attribute=function(e,t){var n,r;if(0===this._currentList.length)this._currentList.push({"@":(n={},n[e]=t,n)});else{var i=this._currentList[this._currentList.length-1];this._isAttrNode(i)?i["@"][e]=t:this._currentList.push({"@":(r={},r[e]=t,r)})}},t.prototype.comment=function(e){if(0===this._currentList.length)this._currentList.push({"!":e});else{var t=this._currentList[this._currentList.length-1];this._isCommentNode(t)?a.isArray(t["!"])?t["!"].push(e):t["!"]=[t["!"],e]:this._currentList.push({"!":e})}},t.prototype.text=function(e){if(0===this._currentList.length)this._currentList.push({"#":e});else{var t=this._currentList[this._currentList.length-1];this._isTextNode(t)?a.isArray(t["#"])?t["#"].push(e):t["#"]=[t["#"],e]:this._currentList.push({"#":e})}},t.prototype.instruction=function(e,t){var n=""===t?e:e+" "+t;if(0===this._currentList.length)this._currentList.push({"?":n});else{var r=this._currentList[this._currentList.length-1];this._isInstructionNode(r)?a.isArray(r["?"])?r["?"].push(n):r["?"]=[r["?"],n]:this._currentList.push({"?":n})}},t.prototype.cdata=function(e){if(0===this._currentList.length)this._currentList.push({$:e});else{var t=this._currentList[this._currentList.length-1];this._isCDATANode(t)?a.isArray(t.$)?t.$.push(e):t.$=[t.$,e]:this._currentList.push({$:e})}},t.prototype._isAttrNode=function(e){return"@"in e},t.prototype._isTextNode=function(e){return"#"in e},t.prototype._isCommentNode=function(e){return"!"in e},t.prototype._isInstructionNode=function(e){return"?"in e},t.prototype._isCDATANode=function(e){return"$"in e},t.prototype._isElementNode=function(e,t){return t in e},t.prototype._getAttrKey=function(){return this._builderOptions.convert.att},t.prototype._getNodeKey=function(e){switch(e){case s.NodeType.Comment:return this._builderOptions.convert.comment;case s.NodeType.Text:return this._builderOptions.convert.text;case s.NodeType.ProcessingInstruction:return this._builderOptions.convert.ins;case s.NodeType.CData:return this._builderOptions.convert.cdata;default:throw new Error("Invalid node type.")}},t}(n(50).BaseWriter);t.ObjectWriter=l},function(e,t,n){"use strict";var r=n(4),i=n(93);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._items={},this._nullItems={}}return e.prototype.set=function(e,t){null===e?this._nullItems[t]=!0:(this._items[e]||(this._items[e]={}),this._items[e][t]=!0)},e.prototype.has=function(e,t){return null===e?!0===this._nullItems[t]:!!this._items[e]&&!0===this._items[e][t]},e}();t.LocalNameSet=r},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=n(3),a=n(0),s=function(){function e(){}return Object.defineProperty(e.prototype,"_eventListenerList",{get:function(){return this.__eventListenerList||(this.__eventListenerList=[])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_eventHandlerMap",{get:function(){return this.__eventHandlerMap||(this.__eventHandlerMap={})},enumerable:!0,configurable:!0}),e.prototype.addEventListener=function(e,t,n){void 0===n&&(n={passive:!1,once:!1,capture:!1});var i,s=r(a.eventTarget_flattenMore(n),3),l=s[0],u=s[1],c=s[2];t&&(i=o.Guard.isEventListener(t)?t:{handleEvent:t},a.eventTarget_addEventListener(this,{type:e,callback:i,capture:l,passive:u,once:c,removed:!1}))},e.prototype.removeEventListener=function(e,t,n){void 0===n&&(n={capture:!1});var r=a.eventTarget_flatten(n);if(t)for(var i=0;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t",amp:"&",quot:'"',apos:"'"},e}();t.BaseReader=i},function(e,t,n){"use strict";var r=n(39);e.exports=r.DEFAULT=new r({include:[n(54)],explicit:[n(299),n(300),n(301)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(185);t.XMLBuilderImpl=r.XMLBuilderImpl;var i=n(304);t.XMLBuilderCBImpl=i.XMLBuilderCBImpl;var o=n(183);t.builder=o.builder,t.create=o.create,t.fragment=o.fragment,t.convert=o.convert;var a=n(309);t.createCB=a.createCB,t.fragmentCB=a.fragmentCB},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,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(11),i=n(21);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(44),i=n(118);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(121),i=n(84).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(47),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(8);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(127);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(4),i=n(195),o=n(132),a=n(133),s=n(62),l=n(21),u=n(25),c=n(5),d=n(44),p=n(49),f=n(131),h=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,g=c("iterator"),v=function(){return this};e.exports=function(e,t,n,c,f,y,b){i(n,t,c);var w,x,S,C=function(e){if(e===f&&T)return T;if(!m&&e in _)return _[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+" Iterator",P=!1,_=e.prototype,O=_[g]||_["@@iterator"]||f&&_[f],T=!m&&O||C(f),D="Array"==t&&_.entries||O;if(D&&(w=o(D.call(new e)),h!==Object.prototype&&w.next&&(d||o(w)===h||(a?a(w,h):"function"!=typeof w[g]&&l(w,g,v)),s(w,A,!0,!0),d&&(p[A]=v))),"values"==f&&O&&"values"!==O.name&&(P=!0,T=function(){return O.call(this)}),d&&!b||_[g]===T||l(_,g,T),p[t]=T,f)if(x={values:C("values"),keys:y?T:C("keys"),entries:C("entries")},b)for(S in x)(m||P||!(S in _))&&u(_,S,x[S]);else r({target:t,proto:!0,forced:m||P},x);return x}},function(e,t,n){"use strict";var r=n(4),i=n(13),o=n(59),a=n(83),s=n(26),l=n(24),u=n(134),c=n(5),d=n(63),p=n(28),f=d("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),m=c("species"),g=[].slice,v=Math.max;r({target:"Array",proto:!0,forced:!f||!h},{slice:function(e,t){var n,r,c,d=l(this),p=s(d.length),f=a(e,p),h=a(void 0===t?p:t,p);if(o(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[m])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(d,f,h);for(r=new(void 0===n?Array:n)(v(h-f,0)),c=0;f0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",f)),p&&(n=new RegExp("^"+h+"$(?!\\s)",f)),c&&(t=a.lastIndex),r=s.call(u?n:a,g),u?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:c&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),p&&r&&r.length>1&&l.call(r[0],n,(function(){for(i=1;i]*>)/g,m=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n,r){var g=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,y=g?"$":"$0";return[function(n,r){var i=l(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!g&&v||"string"==typeof r&&-1===r.indexOf(y)){var o=n(t,e,this,r);if(o.done)return o.value}var l=i(e),f=String(this),h="function"==typeof r;h||(r=String(r));var m=l.global;if(m){var w=l.unicode;l.lastIndex=0}for(var x=[];;){var S=c(l,f);if(null===S)break;if(x.push(S),!m)break;""===String(S[0])&&(l.lastIndex=u(f,a(l.lastIndex),w))}for(var C,A="",P=0,_=0;_=P&&(A+=f.slice(P,T)+M,P=T+O.length)}return A+f.slice(P)}];function b(e,n,r,i,a,s){var l=r+e.length,u=i.length,c=m;return void 0!==a&&(a=o(a),c=h),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>u){var d=f(c/10);return 0===d?t:d<=u?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this._items={},this._nullItems=[]}return e.prototype.copy=function(){var t=new e;for(var n in this._items)t._items[n]=this._items[n].slice(0);return t._nullItems=this._nullItems.slice(0),t},e.prototype.get=function(e,t){var n=null===t?this._nullItems:this._items[t]||null;if(null===n)return null;for(var r=null,i=0;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=0;M--)if(null!==(R=k[M]).shadowAdjustedTarget){I=R;break}if(null!==I)if(l.Guard.isNode(I.shadowAdjustedTarget)&&l.Guard.isShadowRoot(p.tree_rootNode(I.shadowAdjustedTarget,!0)))d=!0;else if(l.Guard.isNode(I.relatedTarget)&&l.Guard.isShadowRoot(p.tree_rootNode(I.relatedTarget,!0)))d=!0;else for(var N=0;N=0;M--)null!==(R=k[M]).shadowAdjustedTarget?e._eventPhase=s.EventPhase.AtTarget:e._eventPhase=s.EventPhase.Capturing,b(R,e,"capturing",i);for(M=0;M0&&null!==(l=i[a-1]).shadowAdjustedTarget)&&(t._target=l.shadowAdjustedTarget)}if(t._relatedTarget=e.relatedTarget,t._touchTargetList=e.touchTargetList,!t._stopPropagationFlag){t._currentTarget=e.invocationTarget;var u=t._currentTarget._eventListenerList,c=new(Array.bind.apply(Array,o([void 0],u)));if(!w(t,c,n,e,r)&&t._isTrusted){var d=t._type;"animationend"===d?t._type="webkitAnimationEnd":"animationiteration"===d?t._type="webkitAnimationIteration":"animationstart"===d?t._type="webkitAnimationStart":"transitionend"===d&&(t._type="webkitTransitionEnd"),w(t,c,n,e,r),t._type=d}}}function w(e,t,n,r,i){void 0===i&&(i={value:!1});for(var o=!1,a=0;a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(6),l=n(2),u=n(9),c=n(34),d=n(3),p=n(1),f=n(7),h=n(152),m=n(0),g=n(12),v=function(e){function t(){var t=e.call(this)||this;return t._children=new Set,t._encoding={name:"UTF-8",labels:["unicode-1-1-utf-8","utf-8","utf8"]},t._contentType="application/xml",t._URL={scheme:"about",username:"",password:"",host:null,port:null,path:["blank"],query:null,fragment:null,_cannotBeABaseURLFlag:!0,_blobURLEntry:null},t._origin=null,t._type="xml",t._mode="no-quirks",t._documentElement=null,t._hasNamespaces=!1,t._nodeDocumentOverwrite=null,t}return i(t,e),Object.defineProperty(t.prototype,"_nodeDocument",{get:function(){return this._nodeDocumentOverwrite||this},set:function(e){this._nodeDocumentOverwrite=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"implementation",{get:function(){return this._implementation||(this._implementation=m.create_domImplementation(this))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"URL",{get:function(){return h.urlSerializer(this._URL)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentURI",{get:function(){return this.URL},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"origin",{get:function(){return"null"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"compatMode",{get:function(){return"quirks"===this._mode?"BackCompat":"CSS1Compat"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"characterSet",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"charset",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputEncoding",{get:function(){return this._encoding.name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"contentType",{get:function(){return this._contentType},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"doctype",{get:function(){var e,t;try{for(var n=o(this._children),r=n.next();!r.done;r=n.next()){var i=r.value;if(d.Guard.isDocumentTypeNode(i))return i}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"documentElement",{get:function(){return this._documentElement},enumerable:!0,configurable:!0}),t.prototype.getElementsByTagName=function(e){return m.node_listOfElementsWithQualifiedName(e,this)},t.prototype.getElementsByTagNameNS=function(e,t){return m.node_listOfElementsWithNamespace(e,t,this)},t.prototype.getElementsByClassName=function(e){return m.node_listOfElementsWithClassNames(e,this)},t.prototype.createElement=function(e,t){if(!m.xml_isName(e))throw new u.InvalidCharacterError;"html"===this._type&&(e=e.toLowerCase());var n=null;void 0!==t&&(n=p.isString(t)?t:t.is);var r="html"===this._type||"application/xhtml+xml"===this._contentType?f.namespace.HTML:null;return m.element_createAnElement(this,e,r,null,n,!0)},t.prototype.createElementNS=function(e,t,n){return m.document_internalCreateElementNS(this,e,t,n)},t.prototype.createDocumentFragment=function(){return m.create_documentFragment(this)},t.prototype.createTextNode=function(e){return m.create_text(this,e)},t.prototype.createCDATASection=function(e){if("html"===this._type)throw new u.NotSupportedError;if(-1!==e.indexOf("]]>"))throw new u.InvalidCharacterError;return m.create_cdataSection(this,e)},t.prototype.createComment=function(e){return m.create_comment(this,e)},t.prototype.createProcessingInstruction=function(e,t){if(!m.xml_isName(e))throw new u.InvalidCharacterError;if(-1!==t.indexOf("?>"))throw new u.InvalidCharacterError;return m.create_processingInstruction(this,e,t)},t.prototype.importNode=function(e,t){if(void 0===t&&(t=!1),d.Guard.isDocumentNode(e)||d.Guard.isShadowRoot(e))throw new u.NotSupportedError;return m.node_clone(e,this,t)},t.prototype.adoptNode=function(e){if(d.Guard.isDocumentNode(e))throw new u.NotSupportedError;if(d.Guard.isShadowRoot(e))throw new u.HierarchyRequestError;return m.document_adopt(e,this),e},t.prototype.createAttribute=function(e){if(!m.xml_isName(e))throw new u.InvalidCharacterError;return"html"===this._type&&(e=e.toLowerCase()),m.create_attr(this,e)},t.prototype.createAttributeNS=function(e,t){var n=a(m.namespace_validateAndExtract(e,t),3),r=n[0],i=n[1],o=n[2],s=m.create_attr(this,o);return s._namespace=r,s._namespacePrefix=i,s},t.prototype.createEvent=function(e){return m.event_createLegacyEvent(e)},t.prototype.createRange=function(){var e=m.create_range();return e._start=[this,0],e._end=[this,0],e},t.prototype.createNodeIterator=function(e,t,n){void 0===t&&(t=l.WhatToShow.All),void 0===n&&(n=null);var r=m.create_nodeIterator(e,e,!0);return r._whatToShow=t,r._iteratorCollection=m.create_nodeList(e),p.isFunction(n)?(r._filter=m.create_nodeFilter(),r._filter.acceptNode=n):r._filter=n,r},t.prototype.createTreeWalker=function(e,t,n){void 0===t&&(t=l.WhatToShow.All),void 0===n&&(n=null);var r=m.create_treeWalker(e,e);return r._whatToShow=t,p.isFunction(n)?(r._filter=m.create_nodeFilter(),r._filter.acceptNode=n):r._filter=n,r},t.prototype._getTheParent=function(e){return"load"===e._type?null:s.dom.window},t.prototype.getElementById=function(e){throw new Error("Mixin: NonElementParentNode not implemented.")},Object.defineProperty(t.prototype,"children",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"firstElementChild",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lastElementChild",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"childElementCount",{get:function(){throw new Error("Mixin: ParentNode not implemented.")},enumerable:!0,configurable:!0}),t.prototype.prepend=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(2),l=n(34),u=n(9),c=n(7),d=n(0),p=n(12),f=function(e){function t(){var t=e.call(this)||this;return t._children=new Set,t._namespace=null,t._namespacePrefix=null,t._localName="",t._customElementState="undefined",t._customElementDefinition=null,t._is=null,t._shadowRoot=null,t._attributeList=d.create_namedNodeMap(t),t._attributeChangeSteps=[],t._name="",t._assignedSlot=null,t}return i(t,e),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return this._namespace},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"prefix",{get:function(){return this._namespacePrefix},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"localName",{get:function(){return this._localName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this._htmlUppercasedQualifiedName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"id",{get:function(){return d.element_getAnAttributeValue(this,"id")},set:function(e){d.element_setAnAttributeValue(this,"id",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return d.element_getAnAttributeValue(this,"class")},set:function(e){d.element_setAnAttributeValue(this,"class",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){var e=d.element_getAnAttributeByName("class",this);return null===e&&(e=d.create_attr(this._nodeDocument,"class")),d.create_domTokenList(this,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"slot",{get:function(){return d.element_getAnAttributeValue(this,"slot")},set:function(e){d.element_setAnAttributeValue(this,"slot",e)},enumerable:!0,configurable:!0}),t.prototype.hasAttributes=function(){return 0!==this._attributeList.length},Object.defineProperty(t.prototype,"attributes",{get:function(){return this._attributeList},enumerable:!0,configurable:!0}),t.prototype.getAttributeNames=function(){var e,t,n=[];try{for(var r=o(this._attributeList),i=r.next();!i.done;i=r.next()){var a=i.value;n.push(a._qualifiedName)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},t.prototype.getAttribute=function(e){var t=d.element_getAnAttributeByName(e,this);return t?t._value:null},t.prototype.getAttributeNS=function(e,t){var n=d.element_getAnAttributeByNamespaceAndLocalName(e,t,this);return n?n._value:null},t.prototype.setAttribute=function(e,t){if(!d.xml_isName(e))throw new u.InvalidCharacterError;this._namespace===c.namespace.HTML&&"html"===this._nodeDocument._type&&(e=e.toLowerCase());for(var n=null,r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(2),s=n(71),l=n(0),u=n(12),c=function(e){function t(t){void 0===t&&(t="");var n=e.call(this,t)||this;return n._name="",n._assignedSlot=null,n}return i(t,e),Object.defineProperty(t.prototype,"wholeText",{get:function(){var e,t,n="";try{for(var r=o(l.text_contiguousTextNodes(this,!0)),i=r.next();!i.done;i=r.next())n+=i.value._data}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),t.prototype.splitText=function(e){return l.text_split(this,e)},Object.defineProperty(t.prototype,"assignedSlot",{get:function(){throw new Error("Mixin: Slotable not implemented.")},enumerable:!0,configurable:!0}),t._create=function(e,n){void 0===n&&(n="");var r=new t(n);return r._nodeDocument=e,r},t}(s.CharacterDataImpl);t.TextImpl=c,u.idl_defineConst(c.prototype,"_nodeType",a.NodeType.Text)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return Object.defineProperty(e.prototype,"_startNode",{get:function(){return this._start[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_startOffset",{get:function(){return this._start[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_endNode",{get:function(){return this._end[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_endOffset",{get:function(){return this._end[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_collapsed",{get:function(){return this._start[0]===this._end[0]&&this._start[1]===this._end[1]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startContainer",{get:function(){return this._startNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startOffset",{get:function(){return this._startOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endContainer",{get:function(){return this._endNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"endOffset",{get:function(){return this._endOffset},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"collapsed",{get:function(){return this._collapsed},enumerable:!0,configurable:!0}),e}();t.AbstractRangeImpl=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(e){this._activeFlag=!1,this._root=e,this._whatToShow=r.WhatToShow.All,this._filter=null}return Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"whatToShow",{get:function(){return this._whatToShow},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filter",{get:function(){return this._filter},enumerable:!0,configurable:!0}),e}();t.TraverserImpl=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(0),o=n(12),a=function(){function e(e,t){this._target=null,this._relatedTarget=null,this._touchTargetList=[],this._path=[],this._currentTarget=null,this._eventPhase=r.EventPhase.None,this._stopPropagationFlag=!1,this._stopImmediatePropagationFlag=!1,this._canceledFlag=!1,this._inPassiveListenerFlag=!1,this._composedFlag=!1,this._initializedFlag=!1,this._dispatchFlag=!1,this._isTrusted=!1,this._bubbles=!1,this._cancelable=!1,this._type=e,t&&(this._bubbles=t.bubbles||!1,this._cancelable=t.cancelable||!1,this._composedFlag=t.composed||!1),this._initializedFlag=!0,this._timeStamp=(new Date).getTime()}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"srcElement",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},enumerable:!0,configurable:!0}),e.prototype.composedPath=function(){var e=[],t=this._path;if(0===t.length)return e;var n=this._currentTarget;if(null===n)throw new Error("Event currentTarget is null.");e.push(n);for(var r=0,i=0,o=t.length-1;o>=0;){if(t[o].rootOfClosedTree&&i++,t[o].invocationTarget===n){r=o;break}t[o].slotInClosedTree&&i--,o--}var a=i,s=i;for(o=r-1;o>=0;)t[o].rootOfClosedTree&&a++,a<=s&&e.unshift(t[o].invocationTarget),t[o].slotInClosedTree&&--a0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),a=n(3),s=n(1),l=n(99),u=n(73),c=n(17),d=n(173),p=n(30),f=n(52),h=n(37);t.document_elementInterface=function(e,t){return l.ElementImpl},t.document_internalCreateElementNS=function(e,t,n,i){var o=r(d.namespace_validateAndExtract(t,n),3),a=o[0],l=o[1],u=o[2],c=null;return void 0!==i&&(c=s.isString(i)?i:i.is),f.element_createAnElement(e,u,a,l,c,!0)},t.document_adopt=function(e,t){var n,r;if(e._nodeDocument!==t||null!==e._parent){var s=e._nodeDocument;if(e._parent&&h.mutation_remove(e,e._parent),t!==s)for(var l=c.tree_getFirstDescendantNode(e,!0,!0);null!==l;){if(l._nodeDocument=t,a.Guard.isElementNode(l))try{for(var d=(n=void 0,i(l._attributeList._asArray())),f=d.next();!f.done;f=d.next())f.value._nodeDocument=t}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}o.dom.features.customElements&&a.Guard.isElementNode(l)&&"custom"===l._customElementState&&u.customElement_enqueueACustomElementCallbackReaction(l,"adoptedCallback",[s,t]),o.dom.features.steps&&p.dom_runAdoptingSteps(l,s),l=c.tree_getNextDescendantNode(e,l,!0,!0)}}}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(9),s=n(17),l=n(51),u=n(30);t.characterData_replaceData=function(e,t,n,c){var d,p,f=s.tree_nodeLength(e);if(t>f)throw new a.IndexSizeError("Offset exceeds character data length. Offset: "+t+", Length: "+f+", Node is "+e.nodeName+".");t+n>f&&(n=f-t),i.dom.features.mutationObservers&&l.observer_queueMutationRecord("characterData",e,null,null,e._data,[],[],null,null);var h=e._data.substring(0,t)+c+e._data.substring(t+n);e._data=h;try{for(var m=r(i.dom.rangeList),g=m.next();!g.done;g=m.next()){var v=g.value;v._start[0]===e&&v._start[1]>t&&v._start[1]<=t+n&&(v._start[1]=t),v._end[0]===e&&v._end[1]>t&&v._end[1]<=t+n&&(v._end[1]=t),v._start[0]===e&&v._start[1]>t+n&&(v._start[1]+=c.length-n),v._end[0]===e&&v._end[1]>t+n&&(v._end[1]+=c.length-n)}}catch(e){d={error:e}}finally{try{g&&!g.done&&(p=m.return)&&p.call(m)}finally{if(d)throw d.error}}i.dom.features.steps&&o.Guard.isTextNode(e)&&null!==e._parent&&u.dom_runChildTextContentChangeSteps(e._parent)},t.characterData_substringData=function(e,t,n){var r=s.tree_nodeLength(e);if(t>r)throw new a.IndexSizeError("Offset exceeds character data length. Offset: "+t+", Length: "+r+", Node is "+e.nodeName+".");return t+n>r?e._data.substr(t):e._data.substr(t,n)}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(7);function s(e){var t=a.string.splitAStringOnASCIIWhitespace(e);return new Set(t)}function l(e){return i(e).join(" ")}t.orderedSet_parse=s,t.orderedSet_serialize=l,t.orderedSet_sanitize=function(e){return l(s(e))},t.orderedSet_contains=function(e,t,n){var r,i,a,s;try{for(var l=o(t),u=l.next();!u.done;u=l.next()){var c=u.value,d=!1;try{for(var p=(a=void 0,o(e)),f=p.next();!f.done;f=p.next()){var h=f.value;if(n){if(h===c){d=!0;break}}else if(h.toUpperCase()===c.toUpperCase()){d=!0;break}}}catch(e){a={error:e}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}if(!d)return!1}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!0}},function(e,t,n){"use strict";n(179),Object.defineProperty(t,"__esModule",{value:!0});var r=n(262),i=n(110),o=n(1);i.dom.setFeatures(!1),t.createDocument=function(){var e=(new r.DOMImplementation).createDocument(null,"root",null);return e.documentElement&&e.removeChild(e.documentElement),e},t.sanitizeInput=function(e,t){if(null==e)return e;if(void 0===t)return e+"";var n="";e+="";for(var r=0;r=32&&i<=55295||i>=57344&&i<=65533)n+=e.charAt(r);else if(i>=55296&&i<=56319&&r=56320&&a<=57343?(i=1024*(i-55296)+a-56320+65536,n+=String.fromCodePoint(i),r++):n+=o.isString(t)?t:t(e.charAt(r),r,e)}else n+=o.isString(t)?t:t(e.charAt(r),r,e)}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(153);t.AbortController=i.AbortControllerImpl;var o=n(154);t.AbortSignal=o.AbortSignalImpl;var a=n(102);t.AbstractRange=a.AbstractRangeImpl;var s=n(157);t.Attr=s.AttrImpl;var l=n(158);t.CDATASection=l.CDATASectionImpl;var u=n(71);t.CharacterData=u.CharacterDataImpl;var c=n(263),d=n(159);t.Comment=d.CommentImpl;var p=n(171);t.CustomEvent=p.CustomEventImpl;var f=n(100);t.DocumentFragment=f.DocumentFragmentImpl;var h=n(98);t.Document=h.DocumentImpl;var m=n(264),g=n(155);t.DocumentType=g.DocumentTypeImpl;var v=n(6);t.dom=v.dom;var y=n(148);t.DOMImplementation=y.DOMImplementationImpl;var b=n(170);t.DOMTokenList=b.DOMTokenListImpl;var w=n(99);t.Element=w.ElementImpl;var x=n(104);t.Event=x.EventImpl;var S=n(70);t.EventTarget=S.EventTargetImpl;var C=n(161);t.HTMLCollection=C.HTMLCollectionImpl;var A=n(265);t.MutationObserver=A.MutationObserverImpl;var P=n(169);t.MutationRecord=P.MutationRecordImpl;var _=n(164);t.NamedNodeMap=_.NamedNodeMapImpl;var O=n(168);t.NodeFilter=O.NodeFilterImpl;var T=n(34);t.Node=T.NodeImpl;var D=n(166);t.NodeIterator=D.NodeIteratorImpl;var E=n(162);t.NodeList=E.NodeListImpl;var I=n(163);t.NodeListStatic=I.NodeListStaticImpl;var k=n(266),M=n(267),N=n(268),R=n(160);t.ProcessingInstruction=R.ProcessingInstructionImpl;var F=n(165);t.Range=F.RangeImpl;var B=n(156);t.ShadowRoot=B.ShadowRootImpl;var L=n(269),V=n(270);t.StaticRange=V.StaticRangeImpl;var j=n(101);t.Text=j.TextImpl;var G=n(103);t.Traverser=G.TraverserImpl;var U=n(167);t.TreeWalker=U.TreeWalkerImpl;var z=n(149);t.Window=z.WindowImpl;var W=n(151);t.XMLDocument=W.XMLDocumentImpl,r.applyMixin(w.ElementImpl,c.ChildNodeImpl),r.applyMixin(u.CharacterDataImpl,c.ChildNodeImpl),r.applyMixin(g.DocumentTypeImpl,c.ChildNodeImpl),r.applyMixin(h.DocumentImpl,m.DocumentOrShadowRootImpl),r.applyMixin(B.ShadowRootImpl,m.DocumentOrShadowRootImpl),r.applyMixin(w.ElementImpl,k.NonDocumentTypeChildNodeImpl),r.applyMixin(u.CharacterDataImpl,k.NonDocumentTypeChildNodeImpl),r.applyMixin(h.DocumentImpl,M.NonElementParentNodeImpl),r.applyMixin(f.DocumentFragmentImpl,M.NonElementParentNodeImpl),r.applyMixin(h.DocumentImpl,N.ParentNodeImpl),r.applyMixin(f.DocumentFragmentImpl,N.ParentNodeImpl),r.applyMixin(w.ElementImpl,N.ParentNodeImpl),r.applyMixin(j.TextImpl,L.SlotableImpl),r.applyMixin(w.ElementImpl,L.SlotableImpl)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.EOF=0]="EOF",e[e.Declaration=1]="Declaration",e[e.DocType=2]="DocType",e[e.Element=3]="Element",e[e.Text=4]="Text",e[e.CDATA=5]="CDATA",e[e.PI=6]="PI",e[e.Comment=7]="Comment",e[e.ClosingTag=8]="ClosingTag"}(t.TokenType||(t.TokenType={}))},function(e,t,n){"use strict";n(64),n(20),n(66);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){var n=this,r=this._builderOptions,i=null;return o.isFunction(t)?i=this.parse(e,t.apply(this)):o.isArray(t)||o.isSet(t)?o.forEachArray(t,(function(t){return i=n.parse(e,t)}),this):o.isMap(t)||o.isObject(t)?o.forEachObject(t,(function(t,a){if(o.isFunction(a)&&(a=a.apply(n)),r.ignoreConverters||0!==t.indexOf(r.convert.att))if(r.ignoreConverters||0!==t.indexOf(r.convert.text))if(r.ignoreConverters||0!==t.indexOf(r.convert.cdata))if(r.ignoreConverters||0!==t.indexOf(r.convert.comment))if(r.ignoreConverters||0!==t.indexOf(r.convert.ins)){if((o.isArray(a)||o.isSet(a))&&o.isEmpty(a));else if((o.isMap(a)||o.isObject(a))&&o.isEmpty(a))i=n.element(e,void 0,n.sanitize(t))||i;else if(r.keepNullNodes||null!=a)if(o.isArray(a)||o.isSet(a))o.forEachArray(a,(function(r){var o={};o[t]=r,i=n.parse(e,o)}),n);else if(o.isMap(a)||o.isObject(a))(s=n.element(e,void 0,n.sanitize(t)))&&(i=s,n.parse(s,a));else if(null!=a&&""!==a){var s;(s=n.element(e,void 0,n.sanitize(t)))&&(i=s,n.text(s,n._decodeText(n.sanitize(a))))}else i=n.element(e,void 0,n.sanitize(t))||i}else if(o.isString(a)){var l=a.indexOf(" "),u=-1===l?a:a.substr(0,l),c=-1===l?"":a.substr(l+1);i=n.instruction(e,n.sanitize(u),n.sanitize(c))||i}else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){var r=t.indexOf(" "),o=-1===r?t:t.substr(0,r),a=-1===r?"":t.substr(r+1);i=n.instruction(e,n.sanitize(o),n.sanitize(a))||i}),n):o.forEachObject(a,(function(t,r){return i=n.instruction(e,n.sanitize(t),n.sanitize(r))||i}),n);else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){return i=n.comment(e,n.sanitize(t))||i}),n):i=n.comment(e,n.sanitize(a))||i;else o.isArray(a)||o.isSet(a)?o.forEachArray(a,(function(t){return i=n.cdata(e,n.sanitize(t))||i}),n):i=n.cdata(e,n.sanitize(a))||i;else i=o.isMap(a)||o.isObject(a)?n.parse(e,a):n.text(e,n._decodeText(n.sanitize(a)))||i;else if(t===r.convert.att){if(o.isArray(a)||o.isSet(a))throw new Error("Invalid attribute: "+a.toString()+". "+e._debugInfo());o.forEachObject(a,(function(t,r){i=n.attribute(e,void 0,n.sanitize(t),n._decodeAttributeValue(n.sanitize(r)))||i}))}else i=n.attribute(e,void 0,n.sanitize(t.substr(r.convert.att.length)),n._decodeAttributeValue(n.sanitize(a)))||i}),this):(r.keepNullNodes||null!=t)&&(i=this.text(e,this._decodeText(this.sanitize(t)))||i),i||e},t}(n(75).BaseReader);t.ObjectReader=a},function(e,t,n){"use strict";var r=n(39);e.exports=new r({explicit:[n(286),n(287),n(288)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){this.level=0,this._builderOptions=e,this._writerOptions=e};t.BaseCBWriter=r},function(e,t,n){var r=n(16),i=n(8),o=n(116);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(11),i=n(13),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(118),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(11),i=n(80),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(14),i=n(187),o=n(55),a=n(15);e.exports=function(e,t){for(var n=i(t),s=a.f,l=o.f,u=0;ul;)r(s,n=t[l++])&&(~o(u,n)||u.push(n));return u}},function(e,t,n){var r=n(24),i=n(26),o=n(83),a=function(e){return function(t,n,a){var s,l=r(t),u=i(l.length),c=o(a,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(8),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=l&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(86);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(5);t.f=r},function(e,t,n){var r=n(120),i=n(14),o=n(125),a=n(15).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(13),i=n(59),o=n(5)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r,i,o=n(11),a=n(193),s=o.process,l=s&&s.versions,u=l&&l.v8;u?i=(r=u.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(5),i=n(60),o=n(15),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){"use strict";var r,i,o,a=n(132),s=n(21),l=n(14),u=n(5),c=n(44),d=u("iterator"),p=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):p=!0),null==r&&(r={}),c||l(r,d)||s(r,d,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){var r=n(14),i=n(27),o=n(57),a=n(196),s=o("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){var r=n(18),i=n(197);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){"use strict";var r=n(56),i=n(15),o=n(40);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(90),i=n(42),o=n(5)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){"use strict";var r=n(18);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(47),i=n(35),o=function(e){return function(t,n){var o,a,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){var r=n(4),i=n(27),o=n(61);r({target:"Object",stat:!0,forced:n(8)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(123),a=n(25),s=n(140),l=n(141),u=n(142),c=n(13),d=n(8),p=n(208),f=n(62),h=n(209);e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),v=m?"set":"add",y=i[e],b=y&&y.prototype,w=y,x={},S=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof y||!(g||b.forEach&&!d((function(){(new y).entries().next()})))))w=n.getConstructor(t,e,m,v),s.REQUIRED=!0;else if(o(e,!0)){var C=new w,A=C[v](g?{}:-0,1)!=C,P=d((function(){C.has(1)})),_=p((function(e){new y(e)})),O=!g&&d((function(){for(var e=new y,t=5;t--;)e[v](t,t);return!e.has(-0)}));_||((w=t((function(t,n){u(t,w,e);var r=h(new y,t,w);return null!=n&&l(n,r[v],r,m),r}))).prototype=b,b.constructor=w),(P||O)&&(S("delete"),S("has"),m&&S("get")),(O||A)&&S(v),g&&b.clear&&delete b.clear}return x[e]=w,r({global:!0,forced:w!=y},x),f(w,e),g||n.setStrong(w,e,m),w}},function(e,t,n){var r=n(45),i=n(13),o=n(14),a=n(15).f,s=n(58),l=n(204),u=s("meta"),c=0,d=Object.isExtensible||function(){return!0},p=function(e){a(e,u,{value:{objectID:"O"+ ++c,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,u)){if(!d(e))return"F";if(!t)return"E";p(e)}return e[u].objectID},getWeakData:function(e,t){if(!o(e,u)){if(!d(e))return!0;if(!t)return!1;p(e)}return e[u].weakData},onFreeze:function(e){return l&&f.REQUIRED&&d(e)&&!o(e,u)&&p(e),e}};r[u]=!0},function(e,t,n){var r=n(18),i=n(205),o=n(26),a=n(87),s=n(206),l=n(207),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,d){var p,f,h,m,g,v,y,b=a(t,n,c?2:1);if(d)p=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(i(f)){for(h=0,m=o(e.length);m>h;h++)if((g=c?b(r(y=e[h])[0],y[1]):b(e[h]))&&g instanceof u)return g;return new u(!1)}p=f.call(e)}for(v=p.next;!(y=v.call(p)).done;)if("object"==typeof(g=l(p,b,y.value,c))&&g&&g instanceof u)return g;return new u(!1)}).stop=function(e){return new u(!0,e)}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var r=n(15).f,i=n(60),o=n(210),a=n(87),s=n(142),l=n(141),u=n(88),c=n(211),d=n(16),p=n(140).fastKey,f=n(43),h=f.set,m=f.getterFor;e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t),h(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=r&&l(r,e[u],e,n)})),f=m(t),g=function(e,t,n){var r,i,o=f(e),a=v(e,t);return a?a.value=n:(o.last=a={index:i=p(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),d?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},v=function(e,t){var n,r=f(e),i=p(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=f(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=f(this),n=v(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),d?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=f(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!v(this,e)}}),o(c.prototype,n?{get:function(e){var t=v(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&r(c.prototype,"size",{get:function(){return f(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=m(t),o=m(r);u(e,t,(function(e,t){h(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){"use strict";var r,i=n(4),o=n(55).f,a=n(26),s=n(222),l=n(35),u=n(224),c=n(44),d="".endsWith,p=Math.min,f=u("endsWith");i({target:"String",proto:!0,forced:!(!c&&!f&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||f)},{endsWith:function(e){var t=String(l(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:p(a(n),r),o=String(e);return d?d.call(t,o,i):t.slice(i-o.length,i)===o}})},function(e,t,n){"use strict";(function(e){var r=n(229),i=n(230),o=n(231);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.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 j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function m(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 D(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return P(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){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=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){var o,a=1,s=e.length,l=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;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){for(var d=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function P(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:u>223?3:u>191?2:1;if(i+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function R(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,o){return o||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function B(e,t,n,r,o){return o||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}t.Buffer=l,t.SlowBuffer=function(e){return+e!=e&&(e=0),l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.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===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),d=0;di)&&(n=i),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 w(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},l.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&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);k(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return B(this,e,t,!1,n)},l.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;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=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 G(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(78))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isASCIIByte=function(e){return e>=0&&e<=127}},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t=65&&n<=90&&(e[t]=n+32)}},t.byteUppercase=function(e){for(var t=0;t=97&&n<=122&&(e[t]=n-32)}},t.byteCaseInsensitiveMatch=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n=65&&r<=90&&(r+=32),i>=65&&i<=90&&(i+=32),r!==i)return!1}return!0},t.startsWith=function(e,t){for(var n=0;;){if(n>=e.length)return!1;if(n>=t.length)return!0;if(e[n]!==t[n])return!1;n++}},t.byteLessThan=function(e,t){for(var n=0;;){if(n>=e.length)return!1;if(n>=t.length)return!0;var r=e[n],i=t[n];if(ri)return!1;n++}},t.isomorphicDecode=function(e){return String.fromCodePoint.apply(String,i(e))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=n(7),o=n(0),a=n(12),s=function(){function e(e){this._associatedDocument=e||r.dom.window.document}return e.prototype.createDocumentType=function(e,t,n){return o.namespace_validate(e),o.create_documentType(this._associatedDocument,e,t,n)},e.prototype.createDocument=function(e,t,n){void 0===n&&(n=null);var r=o.create_xmlDocument(),a=null;return t&&(a=o.document_internalCreateElementNS(r,e,t)),n&&r.appendChild(n),a&&r.appendChild(a),r._origin=this._associatedDocument._origin,e===i.namespace.HTML?r._contentType="application/xhtml+xml":e===i.namespace.SVG?r._contentType="image/svg+xml":r._contentType="application/xml",r},e.prototype.createHTMLDocument=function(e){var t=o.create_document();t._type="html",t._contentType="text/html",t.appendChild(o.create_documentType(t,"html","",""));var n=o.element_createAnElement(t,"html",i.namespace.HTML);t.appendChild(n);var r=o.element_createAnElement(t,"head",i.namespace.HTML);if(n.appendChild(r),void 0!==e){var a=o.element_createAnElement(t,"title",i.namespace.HTML);r.appendChild(a);var s=o.create_text(t,e);a.appendChild(s)}var l=o.element_createAnElement(t,"body",i.namespace.HTML);return n.appendChild(l),t._origin=this._associatedDocument._origin,t},e.prototype.hasFeature=function(){return!0},e._create=function(t){return new e(t)},e}();t.DOMImplementationImpl=s,a.idl_defineConst(s.prototype,"_ID","@oozcitak/dom")},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(1),s=n(0),l=function(e){function t(){var t=e.call(this)||this;return t._signalSlots=new Set,t._mutationObserverMicrotaskQueued=!1,t._mutationObservers=new Set,t._iteratorList=new a.FixedSizeSet,t._associatedDocument=s.create_document(),t}return i(t,e),Object.defineProperty(t.prototype,"document",{get:function(){return this._associatedDocument},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"event",{get:function(){return this._currentEvent},enumerable:!0,configurable:!0}),t._create=function(){return new t},t}(o.EventTargetImpl);t.WindowImpl=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){}return e.isNode=function(e){return!!e&&void 0!==e._nodeType},e.isDocumentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Document},e.isDocumentTypeNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.DocumentType},e.isDocumentFragmentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.DocumentFragment},e.isAttrNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Attribute},e.isCharacterDataNode=function(t){if(!e.isNode(t))return!1;var n=t._nodeType;return n===r.NodeType.Text||n===r.NodeType.ProcessingInstruction||n===r.NodeType.Comment||n===r.NodeType.CData},e.isTextNode=function(t){return e.isNode(t)&&(t._nodeType===r.NodeType.Text||t._nodeType===r.NodeType.CData)},e.isExclusiveTextNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Text},e.isCDATASectionNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.CData},e.isCommentNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Comment},e.isProcessingInstructionNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.ProcessingInstruction},e.isElementNode=function(t){return e.isNode(t)&&t._nodeType===r.NodeType.Element},e.isCustomElementNode=function(t){return e.isElementNode(t)&&"custom"===t._customElementState},e.isShadowRoot=function(e){return!!e&&void 0!==e.host},e.isMouseEvent=function(e){return!!e&&void 0!==e.screenX&&null!=e.screenY},e.isSlotable=function(t){return!!t&&void 0!==t._name&&void 0!==t._assignedSlot&&(e.isTextNode(t)||e.isElementNode(t))},e.isSlot=function(t){return!!t&&void 0!==t._name&&void 0!==t._assignedNodes&&e.isElementNode(t)},e.isWindow=function(e){return!!e&&void 0!==e.navigator},e.isEventListener=function(e){return!!e&&void 0!==e.handleEvent},e.isRegisteredObserver=function(e){return!!e&&void 0!==e.observer&&void 0!==e.options},e.isTransientRegisteredObserver=function(t){return!!t&&void 0!==t.source&&e.isRegisteredObserver(t)},e}();t.Guard=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(){return e.call(this)||this}return i(t,e),t}(n(98).DocumentImpl);t.XMLDocumentImpl=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var o,a=n(1),s=n(243),l=n(7),u=n(244),c={ftp:21,file:null,http:80,https:443,ws:80,wss:443},d=/[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,p=/[ "<>`]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,f=/[ "<>`#?{}]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[ "<>`#?{}/:;=@\[\]\\\^\|]|[\0-\x1F\x7F-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,m=/[0-9A-Za-z!\$&-\/:;=\?@_~\xA0-\uD7FF\uE000-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uD83E\uD840-\uD87E\uD880-\uD8BE\uD8C0-\uD8FE\uD900-\uD93E\uD940-\uD97E\uD980-\uD9BE\uD9C0-\uD9FE\uDA00-\uDA3E\uDA40-\uDA7E\uDA80-\uDABE\uDAC0-\uDAFE\uDB00-\uDB3E\uDB40-\uDB7E\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDC00-\uDFFD]/,g=/[\0\t\f\r #%/:?@\[\\\]]/;function v(e){void 0!==o&&o.call(null,"Validation Error: "+e)}function y(){return{scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null}}function b(e){return e in c}function w(e){return b(e.scheme)}function x(e){return c[e]||null}function S(e){return""!==e.username||""!==e.password}function C(e,t){var n,i;void 0===t&&(t=!1);var o=e.scheme+":";if(null!==e.host?(o+="//",S(e)&&(o+=e.username,""!==e.password&&(o+=":"+e.password),o+="@"),o+=A(e.host),null!==e.port&&(o+=":"+e.port)):null===e.host&&"file"===e.scheme&&(o+="//"),e._cannotBeABaseURLFlag)o+=e.path[0];else try{for(var a=r(e.path),s=a.next();!s.done;s=a.next())o+="/"+s.value}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return null!==e.query&&(o+="?"+e.query),t||null===e.fragment||(o+="#"+e.fragment),o}function A(e){return a.isNumber(e)?P(e):a.isArray(e)?"["+_(e)+"]":e}function P(e){for(var t="",n=e,r=1;r<=4;r++)t=(n%256).toString()+t,4!==r&&(t="."+t),n=Math.floor(n/256);return t}function _(e){for(var t="",n=null,r=-1,i=0,o=0,a=0;a<8;a++)if(0===e[a]){i=1;for(var s=a+1;s<8&&0===e[s];s++)i++;i>o&&(o=i,r=a)}o>1&&(n=r);for(var l=!1,u=0;u<8;u++)l&&0===e[u]||(l&&(l=!1),n!==u?(t+=e[u].toString(16),7!==u&&(t+=":")):(t+=0===u?"::":":",l=!0));return t}function O(e,t,n,i,o){var u,c,g,y;if(void 0===i){i={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,_cannotBeABaseURLFlag:!1,_blobURLEntry:null};var C=/^[\u0000-\u001F\u0020]+/,A=/[\u0000-\u001F\u0020]+$/;(C.test(e)||A.test(e))&&v("Input string contains leading or trailing control characters or space."),e=(e=e.replace(C,"")).replace(A,"")}var P=/[\u0009\u000A\u000D]/g;P.test(e)&&v("Input string contains tab or newline characters."),e=e.replace(P,"");var _=void 0===o?s.ParserState.SchemeStart:o;void 0===t&&(t=null);for(var O=void 0===n||"replacement"===n||"UTF-16BE"===n||"UTF-16LE"===n?"UTF-8":n,R="",F=!1,B=!1,L=!1,V=new a.StringWalker(e);;){switch(_){case s.ParserState.SchemeStart:if(l.codePoint.ASCIIAlpha.test(V.c()))R+=V.c().toLowerCase(),_=s.ParserState.Scheme;else{if(void 0!==o)return v("Invalid scheme start character."),null;_=s.ParserState.NoScheme,V.pointer--}break;case s.ParserState.Scheme:if(l.codePoint.ASCIIAlphanumeric.test(V.c())||"+"===V.c()||"-"===V.c()||"."===V.c())R+=V.c().toLowerCase();else{if(":"!==V.c()){if(void 0===o){R="",_=s.ParserState.NoScheme,V.pointer=0;continue}return v("Invalid input string."),null}if(void 0!==o){if(b(i.scheme)&&!b(R))return i;if(!b(i.scheme)&&b(R))return i;if((S(i)||null!==i.port)&&"file"===R)return i;if("file"===i.scheme&&(""===i.host||null===i.host))return i}if(i.scheme=R,void 0!==o)return i.port===x(i.scheme)&&(i.port=null),i;R="","file"===i.scheme?(V.remaining().startsWith("//")||v("Invalid file URL scheme, '//' expected."),_=s.ParserState.File):w(i)&&null!==t&&t.scheme===i.scheme?_=s.ParserState.SpecialRelativeOrAuthority:w(i)?_=s.ParserState.SpecialAuthoritySlashes:V.remaining().startsWith("/")?(_=s.ParserState.PathOrAuthority,V.pointer++):(i._cannotBeABaseURLFlag=!0,i.path.push(""),_=s.ParserState.CannotBeABaseURLPath)}break;case s.ParserState.NoScheme:if(null===t||t._cannotBeABaseURLFlag&&"#"!==V.c())return v("Invalid input string."),null;t._cannotBeABaseURLFlag&&"#"===V.c()?(i.scheme=t.scheme,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",i._cannotBeABaseURLFlag=!0,_=s.ParserState.Fragment):"file"!==t.scheme?(_=s.ParserState.Relative,V.pointer--):(_=s.ParserState.File,V.pointer--);break;case s.ParserState.SpecialRelativeOrAuthority:"/"===V.c()&&V.remaining().startsWith("/")?(_=s.ParserState.SpecialAuthorityIgnoreSlashes,V.pointer++):(v("Invalid input string."),_=s.ParserState.Relative,V.pointer--);break;case s.ParserState.PathOrAuthority:"/"===V.c()?_=s.ParserState.Authority:(_=s.ParserState.Path,V.pointer--);break;case s.ParserState.Relative:if(null===t)throw new Error("Invalid parser state. Base URL is null.");switch(i.scheme=t.scheme,V.c()){case"":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query=t.query;break;case"/":_=s.ParserState.RelativeSlash;break;case"?":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query="",_=s.ParserState.Query;break;case"#":i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",_=s.ParserState.Fragment;break;default:w(i)&&"\\"===V.c()?(v("Invalid input string."),_=s.ParserState.RelativeSlash):(i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,i.path=l.list.clone(t.path),0!==i.path.length&&i.path.splice(i.path.length-1,1),_=s.ParserState.Path,V.pointer--)}break;case s.ParserState.RelativeSlash:if(!w(i)||"/"!==V.c()&&"\\"!==V.c())if("/"===V.c())_=s.ParserState.Authority;else{if(null===t)throw new Error("Invalid parser state. Base URL is null.");i.username=t.username,i.password=t.password,i.host=t.host,i.port=t.port,_=s.ParserState.Path,V.pointer--}else"\\"===V.c()&&v("Invalid input string."),_=s.ParserState.SpecialAuthorityIgnoreSlashes;break;case s.ParserState.SpecialAuthoritySlashes:"/"===V.c()&&V.remaining().startsWith("/")?(_=s.ParserState.SpecialAuthorityIgnoreSlashes,V.pointer++):(v("Expected '//'."),_=s.ParserState.SpecialAuthorityIgnoreSlashes,V.pointer--);break;case s.ParserState.SpecialAuthorityIgnoreSlashes:"/"!==V.c()&&"\\"!==V.c()?(_=s.ParserState.Authority,V.pointer--):v("Unexpected '/' or '\\'.");break;case s.ParserState.Authority:if("@"===V.c()){v("Unexpected '@'."),F&&(R="%40"+R),F=!0;try{for(var G=(u=void 0,r(R)),U=G.next();!U.done;U=G.next()){var W=U.value;if(":"!==W||L){var H=z(W,h);L?i.password+=H:i.username+=H}else L=!0}}catch(e){u={error:e}}finally{try{U&&!U.done&&(c=G.return)&&c.call(G)}finally{if(u)throw u.error}}R=""}else if(""===V.c()||"/"===V.c()||"?"===V.c()||"#"===V.c()||w(i)&&"\\"===V.c()){if(F&&""===R)return v("Invalid input string."),null;V.pointer-=R.length+1,R="",_=s.ParserState.Host}else R+=V.c();break;case s.ParserState.Host:case s.ParserState.Hostname:if(void 0!==o&&"file"===i.scheme)V.pointer--,_=s.ParserState.FileHost;else if(":"!==V.c()||B)if(""===V.c()||"/"===V.c()||"?"===V.c()||"#"===V.c()||w(i)&&"\\"===V.c()){if(V.pointer--,w(i)&&""===R)return v("Invalid input string."),null;if(void 0!==o&&""===R&&(S(i)||null!==i.port))return v("Invalid input string."),i;if(null===(X=N(R,!w(i))))return null;if(i.host=X,R="",_=s.ParserState.PathStart,void 0!==o)return i}else"["===V.c()&&(B=!0),"]"===V.c()&&(B=!1),R+=V.c();else{if(""===R)return v("Invalid input string."),null;if(null===(X=N(R,!w(i))))return null;if(i.host=X,R="",_=s.ParserState.Port,o===s.ParserState.Hostname)return i}break;case s.ParserState.Port:if(l.codePoint.ASCIIDigit.test(V.c()))R+=V.c();else{if(!(""===V.c()||"/"===V.c()||"?"===V.c()||"#"===V.c()||w(i)&&"\\"===V.c()||o))return v("Invalid input string."),null;if(""!==R&&""!==R){var K=parseInt(R,10);if(K>Math.pow(2,16)-1)return v("Invalid port number."),null;i.port=K===x(i.scheme)?null:K,R=""}if(void 0!==o)return i;_=s.ParserState.PathStart,V.pointer--}break;case s.ParserState.File:if(i.scheme="file","/"===V.c()||"\\"===V.c())"\\"===V.c()&&v("Invalid input string."),_=s.ParserState.FileSlash;else if(null!==t&&"file"===t.scheme)switch(V.c()){case"":i.host=t.host,i.path=l.list.clone(t.path),i.query=t.query;break;case"?":i.host=t.host,i.path=l.list.clone(t.path),i.query="",_=s.ParserState.Query;break;case"#":i.host=t.host,i.path=l.list.clone(t.path),i.query=t.query,i.fragment="",_=s.ParserState.Fragment;break;default:M(V.substring())?v("Unexpected windows drive letter in input string."):(i.host=t.host,i.path=l.list.clone(t.path),E(i)),_=s.ParserState.Path,V.pointer--}else _=s.ParserState.Path,V.pointer--;break;case s.ParserState.FileSlash:"/"===V.c()||"\\"===V.c()?("\\"===V.c()&&v("Invalid input string."),_=s.ParserState.FileHost):(null===t||"file"!==t.scheme||M(V.substring())||(I(t.path[0])?i.path.push(t.path[0]):i.host=t.host),_=s.ParserState.Path,V.pointer--);break;case s.ParserState.FileHost:if(""===V.c()||"/"===V.c()||"\\"===V.c()||"?"===V.c()||"#"===V.c())if(V.pointer--,void 0===o&&k(R))v("Unexpected windows drive letter in input string."),_=s.ParserState.Path;else if(""===R){if(i.host="",void 0!==o)return i;_=s.ParserState.PathStart}else{var X;if(null===(X=N(R,!w(i))))return null;if("localhost"===X&&(X=""),i.host=X,void 0!==o)return i;R="",_=s.ParserState.PathStart}else R+=V.c();break;case s.ParserState.PathStart:w(i)?("\\"===V.c()&&v("Invalid input string."),_=s.ParserState.Path,"/"!==V.c()&&"\\"!==V.c()&&V.pointer--):void 0===o&&"?"===V.c()?(i.query="",_=s.ParserState.Query):void 0===o&&"#"===V.c()?(i.fragment="",_=s.ParserState.Fragment):""!==V.c()&&(_=s.ParserState.Path,"/"!==V.c()&&V.pointer--);break;case s.ParserState.Path:if(""===V.c()||"/"===V.c()||w(i)&&"\\"===V.c()||void 0===o&&("?"===V.c()||"#"===V.c())){if(w(i)&&"\\"===V.c()&&v("Invalid input string."),D(R))E(i),"/"===V.c()||w(i)&&"\\"===V.c()||i.path.push("");else if(!T(R)||"/"===V.c()||w(i)&&"\\"===V.c()){if(!T(R)){if("file"===i.scheme&&0===i.path.length&&k(R)){null!==i.host&&""!==i.host&&(v("Invalid input string."),i.host="");var q=Array.from(R);R=q.slice(0,1)+":"+q.slice(2)}i.path.push(R)}}else i.path.push("");if(R="","file"===i.scheme&&(""===V.c()||"?"===V.c()||"#"===V.c()))for(;i.path.length>1&&""===i.path[0];)v("Invalid input string."),i.path.splice(0,1);"?"===V.c()&&(i.query="",_=s.ParserState.Query),"#"===V.c()&&(i.fragment="",_=s.ParserState.Fragment)}else m.test(V.c())||"%"===V.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==V.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(V.remaining())||v("Percent encoded character must be followed by two hex digits."),R+=z(V.c(),f);break;case s.ParserState.CannotBeABaseURLPath:"?"===V.c()?(i.query="",_=s.ParserState.Query):"#"===V.c()?(i.fragment="",_=s.ParserState.Fragment):(""===V.c()||m.test(V.c())||"%"===V.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==V.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(V.remaining())||v("Percent encoded character must be followed by two hex digits."),""!==V.c()&&(i.path[0]+=z(V.c(),d)));break;case s.ParserState.Query:if("UTF-8"===O||w(i)&&"ws"!==i.scheme&&"wss"!==i.scheme||(O="UTF-8"),void 0===o&&"#"===V.c())i.fragment="",_=s.ParserState.Fragment;else if(""!==V.c()){if(m.test(V.c())||"%"===V.c()||v("Character is not a URL code point or a percent encoded character."),"%"!==V.c()||/^[0-9a-fA-F][0-9a-fA-F]/.test(V.remaining())||v("Percent encoded character must be followed by two hex digits."),"UTF-8"!==O.toUpperCase())throw new Error("Only UTF-8 encoding is supported.");var Y=a.utf8Encode(V.c());if(Y.length>=3&&38===Y[0]&&35===Y[1]&&59===Y[Y.length-1])Y=Y.subarray(2,Y.length-1),i.query+="%26%23"+l.byteSequence.isomorphicDecode(Y)+"%3B";else try{for(var Z=(g=void 0,r(Y)),J=Z.next();!J.done;J=Z.next()){var Q=J.value;Q<33||Q>126||34===Q||35===Q||60===Q||62===Q||39===Q&&w(i)?i.query+=j(Q):i.query+=String.fromCharCode(Q)}}catch(e){g={error:e}}finally{try{J&&!J.done&&(y=Z.return)&&y.call(Z)}finally{if(g)throw g.error}}}break;case s.ParserState.Fragment:""===V.c()||("\0"===V.c()?v("NULL character in input string."):(m.test(V.c())||"%"===V.c()||v("Unexpected character in fragment string."),"%"!==V.c()||/^[A-Za-z0-9][A-Za-z0-9]/.test(V.remaining())||v("Unexpected character in fragment string."),i.fragment+=z(V.c(),p)))}if(V.eof)break;V.pointer++}return i}function T(e){return"."===e||"%2e"===e.toLowerCase()}function D(e){var t=e.toLowerCase();return".."===t||".%2e"===t||"%2e."===t||"%2e%2e"===t}function E(e){var t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&I(t[0])||e.path.splice(e.path.length-1,1))}function I(e){return e.length>=2&&l.codePoint.ASCIIAlpha.test(e[0])&&":"===e[1]}function k(e){return e.length>=2&&l.codePoint.ASCIIAlpha.test(e[0])&&(":"===e[1]||"|"===e[1])}function M(e){return e.length>=2&&k(e)&&(2===e.length||"/"===e[2]||"\\"===e[2]||"?"===e[2]||"#"===e[2])}function N(e,t){if(void 0===t&&(t=!1),e.startsWith("["))return e.endsWith("]")?B(e.substring(1,e.length-1)):(v("Expected ']' after '['."),null);if(t)return L(e);var n=K(a.utf8Decode(U(e)));if(null===n)return v("Invalid domain."),null;if(g.test(n))return v("Invalid domain."),null;var r=F(n);return null===r||a.isNumber(r)?r:n}function R(e,t){void 0===t&&(t={value:!1});var n=10;return e.startsWith("0x")||e.startsWith("0X")?(t.value=!0,e=e.substr(2),n=16):e.length>=2&&"0"===e[0]&&(t.value=!0,e=e.substr(1),n=8),""===e?0:(10===n?/^[0-9]+$/:16===n?/^[0-9A-Fa-f]+$/:/^[0-7]+$/).test(e)?parseInt(e,n):null}function F(e){var t,n,i,o,a={value:!1},s=e.split(".");if(""===s[s.length-1]&&(a.value=!0,s.length>1&&s.pop()),s.length>4)return e;var l=[];try{for(var u=r(s),c=u.next();!c.done;c=u.next()){var d=c.value;if(""===d)return e;if(null===(y=R(d,a)))return e;l.push(y)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}a.value&&v("Invalid IP v4 address.");for(var p=0;p255&&(v("Invalid IP v4 address."),p=Math.pow(256,5-l.length))return v("Invalid IP v4 address."),null;var f=l[l.length-1];l.pop();var h=0;try{for(var m=r(l),g=m.next();!g.done;g=m.next()){var y;f+=(y=g.value)*Math.pow(256,3-h),h++}}catch(e){i={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(i)throw i.error}}return f}function B(e){var t,n=[0,0,0,0,0,0,0,0],r=0,o=null,s=new a.StringWalker(e);if(":"===s.c()){if(!s.remaining().startsWith(":"))return v("Invalid IP v6 address."),null;s.pointer+=2,o=r+=1}for(;""!==s.c();){if(8===r)return v("Invalid IP v6 address."),null;if(":"!==s.c()){for(var u=0,c=0;c<4&&l.codePoint.ASCIIHexDigit.test(s.c());)u=16*u+parseInt(s.c(),16),s.pointer++,c++;if("."===s.c()){if(0===c)return v("Invalid IP v6 address."),null;if(s.pointer-=c,r>6)return v("Invalid IP v6 address."),null;for(var d=0;""!==s.c();){var p=null;if(d>0){if(!("."===s.c()&&d<4))return v("Invalid IP v6 address."),null;s.pointer++}if(!l.codePoint.ASCIIDigit.test(s.c()))return v("Invalid IP v6 address."),null;for(;l.codePoint.ASCIIDigit.test(s.c());){var f=parseInt(s.c(),10);if(null===p)p=f;else{if(0===p)return v("Invalid IP v6 address."),null;p=10*p+f}if(p>255)return v("Invalid IP v6 address."),null;s.pointer++}if(null===p)return v("Invalid IP v6 address."),null;n[r]=256*n[r]+p,2!=++d&&4!==d||r++}if(4!==d)return v("Invalid IP v6 address."),null;break}if(":"===s.c()){if(s.pointer++,""===s.c())return v("Invalid IP v6 address."),null}else if(""!==s.c())return v("Invalid IP v6 address."),null;n[r]=u,r++}else{if(null!==o)return v("Invalid IP v6 address."),null;s.pointer++,o=++r}}if(null!==o){var h=r-o;for(r=7;0!==r&&h>0;)t=i([n[o+h-1],n[r]],2),n[r]=t[0],n[o+h-1]=t[1],r--,h--}else if(null===o&&8!==r)return v("Invalid IP v6 address."),null;return n}function L(e){var t,n;if(/[\x00\t\f\r #/:?@\[\\\]]/.test(e))return v("Invalid host string."),null;var i="";try{for(var o=r(e),a=o.next();!a.done;a=o.next())i+=z(a.value,d)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function V(e){return null}function j(e){return"%"+("00"+e.toString(16).toUpperCase()).slice(-2)}function G(e){for(var t=function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},n=new Uint8Array(e.length),r=0,i=0;i=e.length-2)n[r]=o,r++;else if(37!==o||t(e[i+1])&&t(e[i+2])){var s=parseInt(a.utf8Decode(Uint8Array.of(e[i+1],e[i+2])),16);n[r]=s,r++,i+=2}else n[r]=o,r++}return n.subarray(0,r)}function U(e){return G(a.utf8Encode(e))}function z(e,t){var n,i;if(!t.test(e))return e;var o=a.utf8Encode(e),s="";try{for(var l=r(o),u=l.next();!u.done;u=l.next())s+=j(u.value)}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s}function W(e){var t,n,i,o,s=[],l=[];try{for(var u=r(e),c=u.next();!c.done;c=u.next()){var d=c.value;38===d?(s.push(Uint8Array.from(l)),l=[]):l.push(d)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}0!==l.length&&s.push(Uint8Array.from(l));var p=[];try{for(var f=r(s),h=f.next();!h.done;h=f.next()){var m=h.value;if(0!==m.length){for(var g=m.indexOf(61),v=-1!==g?m.slice(0,g):m,y=-1!==g?m.slice(g+1):new Uint8Array,b=0;b=48&&s<=57||s>=65&&s<=90||95===s||s>=97&&s<=122?String.fromCodePoint(s):j(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function K(e,t){void 0===t&&(t=!1);var n=u.domainToASCII(e);return""===n?(v("Invalid domain name."),null):n}t.setValidationErrorCallback=function(e){o=e},t.newURL=y,t.isSpecialScheme=b,t.isSpecial=w,t.defaultPort=x,t.includesCredentials=S,t.cannotHaveAUsernamePasswordPort=function(e){return null===e.host||""===e.host||e._cannotBeABaseURLFlag||"file"===e.scheme},t.urlSerializer=C,t.hostSerializer=A,t.iPv4Serializer=P,t.iPv6Serializer=_,t.urlParser=function(e,t,n){var r=O(e,t,n);return null===r?null:("blob"!==r.scheme||(r._blobURLEntry=null),r)},t.basicURLParser=O,t.setTheUsername=function(e,t){var n,i,o="";try{for(var a=r(t),s=a.next();!s.done;s=a.next())o+=z(s.value,h)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}e.username=o},t.setThePassword=function(e,t){var n,i,o="";try{for(var a=r(t),s=a.next();!s.done;s=a.next())o+=z(s.value,h)}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}e.password=o},t.isSingleDotPathSegment=T,t.isDoubleDotPathSegment=D,t.shorten=E,t.isNormalizedWindowsDriveLetter=I,t.isWindowsDriveLetter=k,t.startsWithAWindowsDriveLetter=M,t.hostParser=N,t.iPv4NumberParser=R,t.iPv4Parser=F,t.iPv6Parser=B,t.opaqueHostParser=L,t.resolveABlobURL=V,t.percentEncode=j,t.percentDecode=G,t.stringPercentDecode=U,t.utf8PercentEncode=z,t.hostEquals=function(e,t){return e===t},t.urlEquals=function(e,t,n){return void 0===n&&(n=!1),C(e,n)===C(t,n)},t.urlEncodedStringParser=function(e){return W(a.utf8Encode(e))},t.urlEncodedParser=W,t.urlEncodedByteSerializer=H,t.urlEncodedSerializer=function(e,t){var n,i;if("UTF-8"!==(void 0===t||"replacement"===t||"UTF-16BE"===t||"UTF-16LE"===t?"UTF-8":t).toUpperCase())throw new Error("Only UTF-8 encoding is supported.");var o="";try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=H(a.utf8Encode(u[0])),d=u[1];d=H(a.utf8Encode(d)),""!==o&&(o+="&"),o+=c+"="+d}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},t.origin=function e(t){switch(t.scheme){case"blob":t._blobURLEntry;var n=O(t.path[0]);return null===n?s.OpaqueOrigin:e(n);case"ftp":case"http":case"https":case"ws":case"wss":return[t.scheme,null===t.host?"":t.host,t.port,null];default:return s.OpaqueOrigin}},t.domainToASCII=K,t.domainToUnicode=function(e,t){void 0===t&&(t=!1);var n=u.domainToUnicode(e);return""===n&&v("Invalid domain name."),n},t.asciiSerializationOfAnOrigin=function(e){if(""===e[0]&&""===e[1]&&null===e[2]&&null===e[3])return"null";var t=e[0]+"://"+A(e[1]);return null!==e[2]&&(t+=":"+e[2].toString()),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(){this._signal=r.create_abortSignal()}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},enumerable:!0,configurable:!0}),e.prototype.abort=function(){r.abort_signalAbort(this._signal)},e}();t.AbortControllerImpl=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(70),a=n(0),s=function(e){function t(){var t=e.call(this)||this;return t._abortedFlag=!1,t._abortAlgorithms=new Set,t}return i(t,e),Object.defineProperty(t.prototype,"aborted",{get:function(){return this._abortedFlag},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onabort",{get:function(){return a.event_getterEventHandlerIDLAttribute(this,"onabort")},set:function(e){a.event_setterEventHandlerIDLAttribute(this,"onabort",e)},enumerable:!0,configurable:!0}),t._create=function(){return new t},t}(o.EventTargetImpl);t.AbortSignalImpl=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(34),s=n(12),l=function(e){function t(t,n,r){var i=e.call(this)||this;return i._name="",i._publicId="",i._systemId="",i._name=t,i._publicId=n,i._systemId=r,i}return i(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this._publicId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this._systemId},enumerable:!0,configurable:!0}),t.prototype.before=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),a=n(0),s=function(){function e(e){return this._live=!0,this._filter=null,this._length=0,this._root=e,new Proxy(this,this)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._root._children.size},enumerable:!0,configurable:!0}),e.prototype.item=function(e){if(e<0||e>this.length-1)return null;if(e=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(1),a=function(){function e(e){return this._live=!1,this._items=[],this._length=0,this._root=e,this._items=[],this._filter=function(e){return!0},new Proxy(this,this)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!0,configurable:!0}),e.prototype.item=function(e){return e<0||e>this.length-1?null:this._items[e]},e.prototype.keys=function(){var e;return(e={})[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.length?{done:!0,value:null}:{done:!1,value:e++}}.bind(this)}}.bind(this),e},e.prototype.values=function(){var e;return(e={})[Symbol.iterator]=function(){var e=this[Symbol.iterator]();return{next:function(){return e.next()}}}.bind(this),e},e.prototype.entries=function(){var e;return(e={})[Symbol.iterator]=function(){var e=this[Symbol.iterator](),t=0;return{next:function(){var n=e.next();return n.done?{done:!0,value:null}:{done:!1,value:[t++,n.value]}}}}.bind(this),e},e.prototype[Symbol.iterator]=function(){var e=this._items[Symbol.iterator]();return{next:function(){return e.next()}}},e.prototype.forEach=function(e,t){var n,o;void 0===t&&(t=i.dom.window);var a=0;try{for(var s=r(this._items),l=s.next();!l.done;l=s.next()){var u=l.value;e.call(t,u,a++,this)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},e.prototype.get=function(e,t,n){if(!o.isString(t))return Reflect.get(e,t,n);var r=Number(t);return isNaN(r)?Reflect.get(e,t,n):e._items[r]||void 0},e.prototype.set=function(e,t,n,r){if(!o.isString(t))return Reflect.set(e,t,n,r);var i=Number(t);return isNaN(i)?Reflect.set(e,t,n,r):i>=0&&i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(6),s=n(2),l=n(102),u=n(9),c=n(0),d=n(12),p=n(3),f=function(e){function t(){var t=e.call(this)||this,n=a.dom.window._associatedDocument;return t._start=[n,0],t._end=[n,0],a.dom.rangeList.add(t),t}return i(t,e),Object.defineProperty(t.prototype,"commonAncestorContainer",{get:function(){for(var e=this._start[0];!c.tree_isAncestorOf(this._end[0],e,!0);){if(null===e._parent)throw new Error("Parent node is null.");e=e._parent}return e},enumerable:!0,configurable:!0}),t.prototype.setStart=function(e,t){c.range_setTheStart(this,e,t)},t.prototype.setEnd=function(e,t){c.range_setTheEnd(this,e,t)},t.prototype.setStartBefore=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheStart(this,t,c.tree_index(e))},t.prototype.setStartAfter=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheStart(this,t,c.tree_index(e)+1)},t.prototype.setEndBefore=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheEnd(this,t,c.tree_index(e))},t.prototype.setEndAfter=function(e){var t=e._parent;if(null===t)throw new u.InvalidNodeTypeError;c.range_setTheEnd(this,t,c.tree_index(e)+1)},t.prototype.collapse=function(e){e?this._end=this._start:this._start=this._end},t.prototype.selectNode=function(e){c.range_select(e,this)},t.prototype.selectNodeContents=function(e){if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;var t=c.tree_nodeLength(e);this._start=[e,0],this._end=[e,t]},t.prototype.compareBoundaryPoints=function(e,t){if(e!==s.HowToCompare.StartToStart&&e!==s.HowToCompare.StartToEnd&&e!==s.HowToCompare.EndToEnd&&e!==s.HowToCompare.EndToStart)throw new u.NotSupportedError;if(c.range_root(this)!==c.range_root(t))throw new u.WrongDocumentError;var n,r;switch(e){case s.HowToCompare.StartToStart:n=this._start,r=t._start;break;case s.HowToCompare.StartToEnd:n=this._end,r=t._start;break;case s.HowToCompare.EndToEnd:n=this._end,r=t._end;break;case s.HowToCompare.EndToStart:n=this._start,r=t._end;break;default:throw new u.NotSupportedError}var i=c.boundaryPoint_position(n,r);return i===s.BoundaryPosition.Before?-1:i===s.BoundaryPosition.After?1:0},t.prototype.deleteContents=function(){var e,t,n,r;if(!c.range_collapsed(this)){var i=this._startNode,a=this._startOffset,s=this._endNode,l=this._endOffset;if(i===s&&p.Guard.isCharacterDataNode(i))c.characterData_replaceData(i,a,l-a,"");else{var u,d,f=[];try{for(var h=o(c.range_getContainedNodes(this)),m=h.next();!m.done;m=h.next()){var g=(w=m.value)._parent;null!==g&&c.range_isContained(g,this)||f.push(w)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}if(c.tree_isAncestorOf(s,i,!0))u=i,d=a;else{for(var v=i;null!==v._parent&&!c.tree_isAncestorOf(s,v._parent,!0);)v=v._parent;if(null===v._parent)throw new Error("Parent node is null.");u=v._parent,d=c.tree_index(v)+1}p.Guard.isCharacterDataNode(i)&&c.characterData_replaceData(i,a,c.tree_nodeLength(i)-a,"");try{for(var y=o(f),b=y.next();!b.done;b=y.next()){var w;(w=b.value)._parent&&c.mutation_remove(w,w._parent)}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}p.Guard.isCharacterDataNode(s)&&c.characterData_replaceData(s,0,l,""),this._start=[u,d],this._end=[u,d]}}},t.prototype.extractContents=function(){return c.range_extract(this)},t.prototype.cloneContents=function(){return c.range_cloneTheContents(this)},t.prototype.insertNode=function(e){return c.range_insert(e,this)},t.prototype.surroundContents=function(e){var t,n;try{for(var r=o(c.range_getPartiallyContainedNodes(this)),i=r.next();!i.done;i=r.next()){var a=i.value;if(!p.Guard.isTextNode(a))throw new u.InvalidStateError}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}if(p.Guard.isDocumentNode(e)||p.Guard.isDocumentTypeNode(e)||p.Guard.isDocumentFragmentNode(e))throw new u.InvalidNodeTypeError;var s=c.range_extract(this);0!==e._children.size&&c.mutation_replaceAll(null,e),c.range_insert(e,this),c.mutation_append(s,e),c.range_select(e,this)},t.prototype.cloneRange=function(){return c.create_range(this._start,this._end)},t.prototype.detach=function(){a.dom.rangeList.delete(this)},t.prototype.isPointInRange=function(e,t){if(c.tree_rootNode(e)!==c.range_root(this))return!1;if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;if(t>c.tree_nodeLength(e))throw new u.IndexSizeError;var n=[e,t];return c.boundaryPoint_position(n,this._start)!==s.BoundaryPosition.Before&&c.boundaryPoint_position(n,this._end)!==s.BoundaryPosition.After},t.prototype.comparePoint=function(e,t){if(c.tree_rootNode(e)!==c.range_root(this))throw new u.WrongDocumentError;if(p.Guard.isDocumentTypeNode(e))throw new u.InvalidNodeTypeError;if(t>c.tree_nodeLength(e))throw new u.IndexSizeError;var n=[e,t];return c.boundaryPoint_position(n,this._start)===s.BoundaryPosition.Before?-1:c.boundaryPoint_position(n,this._end)===s.BoundaryPosition.After?1:0},t.prototype.intersectsNode=function(e){if(c.tree_rootNode(e)!==c.range_root(this))return!1;var t=e._parent;if(null===t)return!0;var n=c.tree_index(e);return c.boundaryPoint_position([t,n],this._end)===s.BoundaryPosition.Before&&c.boundaryPoint_position([t,n+1],this._start)===s.BoundaryPosition.After},t.prototype.toString=function(){var e,t,n="";if(this._startNode===this._endNode&&p.Guard.isTextNode(this._startNode))return this._startNode._data.substring(this._startOffset,this._endOffset);p.Guard.isTextNode(this._startNode)&&(n+=this._startNode._data.substring(this._startOffset));try{for(var r=o(c.range_getContainedNodes(this)),i=r.next();!i.done;i=r.next()){var a=i.value;p.Guard.isTextNode(a)&&(n+=a._data)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return p.Guard.isTextNode(this._endNode)&&(n+=this._endNode._data.substring(0,this._endOffset)),n},t._create=function(e,n){var r=new t;return e&&(r._start=e),n&&(r._end=n),r},t.START_TO_START=0,t.START_TO_END=1,t.END_TO_END=2,t.END_TO_START=3,t}(l.AbstractRangeImpl);t.RangeImpl=f,d.idl_defineConst(f.prototype,"START_TO_START",0),d.idl_defineConst(f.prototype,"START_TO_END",1),d.idl_defineConst(f.prototype,"END_TO_END",2),d.idl_defineConst(f.prototype,"END_TO_START",3)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(103),a=n(0),s=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i._iteratorCollection=void 0,i._reference=n,i._pointerBeforeReference=r,a.nodeIterator_iteratorList().add(i),i}return i(t,e),Object.defineProperty(t.prototype,"referenceNode",{get:function(){return this._reference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pointerBeforeReferenceNode",{get:function(){return this._pointerBeforeReference},enumerable:!0,configurable:!0}),t.prototype.nextNode=function(){return a.nodeIterator_traverse(this,!0)},t.prototype.previousNode=function(){return a.nodeIterator_traverse(this,!1)},t.prototype.detach=function(){a.nodeIterator_iteratorList().delete(this)},t._create=function(e,n,r){return new t(e,n,r)},t}(o.TraverserImpl);t.NodeIteratorImpl=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),a=n(103),s=n(0),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._current=n,r}return i(t,e),Object.defineProperty(t.prototype,"currentNode",{get:function(){return this._current},set:function(e){this._current=e},enumerable:!0,configurable:!0}),t.prototype.parentNode=function(){for(var e=this._current;null!==e&&e!==this._root;)if(null!==(e=e._parent)&&s.traversal_filter(this,e)===o.FilterResult.Accept)return this._current=e,e;return null},t.prototype.firstChild=function(){return s.treeWalker_traverseChildren(this,!0)},t.prototype.lastChild=function(){return s.treeWalker_traverseChildren(this,!1)},t.prototype.nextSibling=function(){return s.treeWalker_traverseSiblings(this,!0)},t.prototype.previousNode=function(){for(var e=this._current;e!==this._root;){for(var t=e._previousSibling;t;){e=t;for(var n=s.traversal_filter(this,e);n!==o.FilterResult.Reject&&e._lastChild;)e=e._lastChild,n=s.traversal_filter(this,e);if(n===o.FilterResult.Accept)return this._current=e,e;t=e._previousSibling}if(e===this._root||null===e._parent)return null;if(e=e._parent,s.traversal_filter(this,e)===o.FilterResult.Accept)return this._current=e,e}return null},t.prototype.previousSibling=function(){return s.treeWalker_traverseSiblings(this,!1)},t.prototype.nextNode=function(){for(var e=this._current,t=o.FilterResult.Accept;;){for(;t!==o.FilterResult.Reject&&e._firstChild;)if(e=e._firstChild,(t=s.traversal_filter(this,e))===o.FilterResult.Accept)return this._current=e,e;for(var n=null,r=e;null!==r;){if(r===this._root)return null;if(null!==(n=r._nextSibling)){e=n;break}r=r._parent}if((t=s.traversal_filter(this,e))===o.FilterResult.Accept)return this._current=e,e}},t._create=function(e,n){return new t(e,n)},t}(a.TraverserImpl);t.TreeWalkerImpl=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(12),o=function(){function e(){}return e.prototype.acceptNode=function(e){return r.FilterResult.Accept},e._create=function(){return new e},e.FILTER_ACCEPT=1,e.FILTER_REJECT=2,e.FILTER_SKIP=3,e.SHOW_ALL=4294967295,e.SHOW_ELEMENT=1,e.SHOW_ATTRIBUTE=2,e.SHOW_TEXT=4,e.SHOW_CDATA_SECTION=8,e.SHOW_ENTITY_REFERENCE=16,e.SHOW_ENTITY=32,e.SHOW_PROCESSING_INSTRUCTION=64,e.SHOW_COMMENT=128,e.SHOW_DOCUMENT=256,e.SHOW_DOCUMENT_TYPE=512,e.SHOW_DOCUMENT_FRAGMENT=1024,e.SHOW_NOTATION=2048,e}();t.NodeFilterImpl=o,i.idl_defineConst(o.prototype,"FILTER_ACCEPT",1),i.idl_defineConst(o.prototype,"FILTER_REJECT",2),i.idl_defineConst(o.prototype,"FILTER_SKIP",3),i.idl_defineConst(o.prototype,"SHOW_ALL",4294967295),i.idl_defineConst(o.prototype,"SHOW_ELEMENT",1),i.idl_defineConst(o.prototype,"SHOW_ATTRIBUTE",2),i.idl_defineConst(o.prototype,"SHOW_TEXT",4),i.idl_defineConst(o.prototype,"SHOW_CDATA_SECTION",8),i.idl_defineConst(o.prototype,"SHOW_ENTITY_REFERENCE",16),i.idl_defineConst(o.prototype,"SHOW_ENTITY",32),i.idl_defineConst(o.prototype,"SHOW_PROCESSING_INSTRUCTION",64),i.idl_defineConst(o.prototype,"SHOW_COMMENT",128),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT",256),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT_TYPE",512),i.idl_defineConst(o.prototype,"SHOW_DOCUMENT_FRAGMENT",1024),i.idl_defineConst(o.prototype,"SHOW_NOTATION",2048)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t,n,r,i,o,a,s,l){this._type=e,this._target=t,this._addedNodes=n,this._removedNodes=r,this._previousSibling=i,this._nextSibling=o,this._attributeName=a,this._attributeNamespace=s,this._oldValue=l}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addedNodes",{get:function(){return this._addedNodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"removedNodes",{get:function(){return this._removedNodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this._previousSibling},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this._nextSibling},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeName",{get:function(){return this._attributeName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"attributeNamespace",{get:function(){return this._attributeNamespace},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"oldValue",{get:function(){return this._oldValue},enumerable:!0,configurable:!0}),e._create=function(t,n,r,i,o,a,s,l,u){return new e(t,n,r,i,o,a,s,l,u)},e}();t.MutationRecordImpl=r},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(9),a=n(7),s=n(0),l=function(){function e(e,t){this._element=e,this._attribute=t,this._tokenSet=new Set;var n=t._localName,r=s.element_getAnAttributeValue(e,n),o=this;this._element._attributeChangeSteps.push((function(e,t,n,r,i){t===o._attribute._localName&&null===i&&(r?o._tokenSet=s.orderedSet_parse(r):o._tokenSet.clear())})),i.dom.features.steps&&s.dom_runAttributeChangeSteps(e,n,r,r,null)}return Object.defineProperty(e.prototype,"length",{get:function(){return this._tokenSet.size},enumerable:!0,configurable:!0}),e.prototype.item=function(e){var t,n,i=0;try{for(var o=r(this._tokenSet),a=o.next();!a.done;a=o.next()){var s=a.value;if(i===e)return s;i++}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return null},e.prototype.contains=function(e){return this._tokenSet.has(e)},e.prototype.add=function(){for(var e,t,n=[],i=0;i=97&&n<=122||n>=65&&n<=90||58===n||95===n||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533||0!==t&&(45===n||46===n||n>=48&&n<=57||183===n||n>=768&&n<=879||n>=8255&&n<=8256))){if(n>=55296&&n<=56319&&t=56320&&r<=57343&&(t++,(n=1024*(n-55296)+r-56320+65536)>=65536&&n<=983039))continue}return!1}}return!0},t.xml_isQName=function(e){for(var t=!1,n=0;n=97&&r<=122||r>=65&&r<=90||95===r||r>=192&&r<=214||r>=216&&r<=246||r>=248&&r<=767||r>=880&&r<=893||r>=895&&r<=8191||r>=8204&&r<=8205||r>=8304&&r<=8591||r>=11264&&r<=12271||r>=12289&&r<=55295||r>=63744&&r<=64975||r>=65008&&r<=65533||0!==n&&(45===r||46===r||r>=48&&r<=57||183===r||r>=768&&r<=879||r>=8255&&r<=8256))){if(0===n||58!==r){if(r>=55296&&r<=56319&&n=56320&&i<=57343&&(n++,(r=1024*(r-55296)+i-56320+65536)>=65536&&r<=983039))continue}return!1}if(t)return!1;if(n===e.length-1)return!1;t=!0}}return!0},t.xml_isLegalChar=function(e){for(var t=0;t=32&&n<=55295||n>=57344&&n<=65533)){if(n>=55296&&n<=56319&&t=56320&&r<=57343&&(t++,(n=1024*(n-55296)+r-56320+65536)>=65536&&n<=1114111))continue}return!1}}return!0},t.xml_isPubidChar=function(e){for(var t=0;t=97&&n<=122||n>=65&&n<=90||n>=39&&n<=59||32===n||13===n||10===n||n>=35&&n<=37||33===n||61===n||63===n||64===n||95===n))return!1}return!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(17);t.boundaryPoint_position=function e(t,n){var o=t[0],a=t[1],s=n[0],l=n[1];if(console.assert(i.tree_rootNode(o)===i.tree_rootNode(s),"Boundary points must share the same root node."),o===s)return a===l?r.BoundaryPosition.Equal:a=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(7),s=n(29),l=n(108),u=n(30),c=n(37),d=n(52);t.node_stringReplaceAll=function(e,t){var n=null;""!==e&&(n=s.create_text(t._nodeDocument,e)),c.mutation_replaceAll(n,t)},t.node_clone=function e(t,n,a){var l,p,f,h,m;if(void 0===n&&(n=null),void 0===a&&(a=!1),null===n&&(n=t._nodeDocument),o.Guard.isElementNode(t)){m=d.element_createAnElement(n,t._localName,t._namespace,t._namespacePrefix,t._is,!1);try{for(var g=r(t._attributeList),v=g.next();!v.done;v=g.next()){var y=e(v.value,n);d.element_append(y,m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(p=g.return)&&p.call(g)}finally{if(l)throw l.error}}}else if(o.Guard.isDocumentNode(t)){var b=s.create_document();b._encoding=t._encoding,b._contentType=t._contentType,b._URL=t._URL,b._origin=t._origin,b._type=t._type,b._mode=t._mode,m=b}else if(o.Guard.isDocumentTypeNode(t))m=s.create_documentType(n,t._name,t._publicId,t._systemId);else if(o.Guard.isAttrNode(t)){var w=s.create_attr(n,t.localName);w._namespace=t._namespace,w._namespacePrefix=t._namespacePrefix,w._value=t._value,m=w}else m=o.Guard.isExclusiveTextNode(t)?s.create_text(n,t._data):o.Guard.isCDATASectionNode(t)?s.create_cdataSection(n,t._data):o.Guard.isCommentNode(t)?s.create_comment(n,t._data):o.Guard.isProcessingInstructionNode(t)?s.create_processingInstruction(n,t._target,t._data):o.Guard.isDocumentFragmentNode(t)?s.create_documentFragment(n):Object.create(t);if(o.Guard.isDocumentNode(m)?(m._nodeDocument=m,n=m):m._nodeDocument=n,i.dom.features.steps&&u.dom_runCloningSteps(m,t,n,a),a)try{for(var x=r(t._children),S=x.next();!S.done;S=x.next()){var C=e(S.value,n,!0);c.mutation_append(C,m)}}catch(e){f={error:e}}finally{try{S&&!S.done&&(h=x.return)&&h.call(x)}finally{if(f)throw f.error}}return m},t.node_equals=function e(t,n){var i,a,s,l;if(t._nodeType!==n._nodeType)return!1;if(o.Guard.isDocumentTypeNode(t)&&o.Guard.isDocumentTypeNode(n)){if(t._name!==n._name||t._publicId!==n._publicId||t._systemId!==n._systemId)return!1}else if(o.Guard.isElementNode(t)&&o.Guard.isElementNode(n)){if(t._namespace!==n._namespace||t._namespacePrefix!==n._namespacePrefix||t._localName!==n._localName||t._attributeList.length!==n._attributeList.length)return!1}else if(o.Guard.isAttrNode(t)&&o.Guard.isAttrNode(n)){if(t._namespace!==n._namespace||t._localName!==n._localName||t._value!==n._value)return!1}else if(o.Guard.isProcessingInstructionNode(t)&&o.Guard.isProcessingInstructionNode(n)){if(t._target!==n._target||t._data!==n._data)return!1}else if(o.Guard.isCharacterDataNode(t)&&o.Guard.isCharacterDataNode(n)&&t._data!==n._data)return!1;if(o.Guard.isElementNode(t)&&o.Guard.isElementNode(n)){var u={};try{for(var c=r(t._attributeList),d=c.next();!d.done;d=c.next())u[(h=d.value)._localName]=h}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}try{for(var p=r(n._attributeList),f=p.next();!f.done;f=p.next()){var h,m=f.value;if(!(h=u[m._localName]))return!1;if(!e(h,m))return!1}}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}if(t._children.size!==n._children.size)return!1;for(var g=t._children[Symbol.iterator](),v=n._children[Symbol.iterator](),y=g.next(),b=v.next();!y.done&&!b.done;){if(!e(y.value,b.value))return!1;y=g.next(),b=v.next()}return!0},t.node_listOfElementsWithQualifiedName=function(e,t){return"*"===e?s.create_htmlCollection(t):"html"===t._nodeDocument._type?s.create_htmlCollection(t,(function(t){return t._namespace===a.namespace.HTML&&t._qualifiedName===e.toLowerCase()||t._namespace!==a.namespace.HTML&&t._qualifiedName===e})):s.create_htmlCollection(t,(function(t){return t._qualifiedName===e}))},t.node_listOfElementsWithNamespace=function(e,t,n){return""===e&&(e=null),"*"===e&&"*"===t?s.create_htmlCollection(n):"*"===e?s.create_htmlCollection(n,(function(e){return e._localName===t})):"*"===t?s.create_htmlCollection(n,(function(t){return t._namespace===e})):s.create_htmlCollection(n,(function(n){return n._localName===t&&n._namespace===e}))},t.node_listOfElementsWithClassNames=function(e,t){var n=l.orderedSet_parse(e);if(0===n.size)return s.create_htmlCollection(t,(function(){return!1}));var r="quirks"!==t._nodeDocument._mode;return s.create_htmlCollection(t,(function(e){var t=e.classList;return l.orderedSet_contains(t._tokenSet,n,r)}))},t.node_locateANamespacePrefix=function e(t,n){if(t._namespace===n&&null!==t._namespacePrefix)return t._namespacePrefix;for(var r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(9),s=n(29),l=n(17),u=n(107),c=n(37);t.text_contiguousTextNodes=function(e,t){var n;return void 0===t&&(t=!1),(n={})[Symbol.iterator]=function(){for(var n=e;n&&o.Guard.isTextNode(n._previousSibling);)n=n._previousSibling;return{next:function(){if(n&&!t&&n===e&&(n=o.Guard.isTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=o.Guard.isTextNode(n._nextSibling)?n._nextSibling:null,r}}},n},t.text_contiguousExclusiveTextNodes=function(e,t){var n;return void 0===t&&(t=!1),(n={})[Symbol.iterator]=function(){for(var n=e;n&&o.Guard.isExclusiveTextNode(n._previousSibling);)n=n._previousSibling;return{next:function(){if(n&&!t&&n===e&&(n=o.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null),null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=o.Guard.isExclusiveTextNode(n._nextSibling)?n._nextSibling:null,r}}},n},t.text_descendantTextContent=function(e){for(var t="",n=l.tree_getFirstDescendantNode(e,!1,!1,(function(e){return o.Guard.isTextNode(e)}));null!==n;)t+=n._data,n=l.tree_getNextDescendantNode(e,n,!1,!1,(function(e){return o.Guard.isTextNode(e)}));return t},t.text_split=function(e,t){var n,o,d=e._data.length;if(t>d)throw new a.IndexSizeError;var p=d-t,f=u.characterData_substringData(e,t,p),h=s.create_text(e._nodeDocument,f),m=e._parent;if(null!==m){c.mutation_insert(h,m,e._nextSibling);try{for(var g=r(i.dom.rangeList),v=g.next();!v.done;v=g.next()){var y=v.value;y._start[0]===e&&y._start[1]>t&&(y._start[0]=h,y._start[1]-=t),y._end[0]===e&&y._end[1]>t&&(y._end[0]=h,y._end[1]-=t);var b=l.tree_index(e);y._start[0]===m&&y._start[1]===b+1&&y._start[1]++,y._end[0]===m&&y._end[1]===b+1&&y._end[1]++}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}}return u.characterData_replaceData(e,t,p,""),h}},function(e,t,n){"use strict";var r=n(4),i=n(41),o=n(24),a=n(48),s=[].join,l=i!=Object,u=a("join",",");r({target:"Array",proto:!0,forced:l||!u},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(4),i=n(83),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i=n(111),o=function(){function e(e,t){this._options={skipWhitespaceOnlyText:!1},this.err={line:-1,col:-1,index:-1,str:""},this._str=e,this._index=0,this._length=e.length,t&&(this._options.skipWhitespaceOnlyText=t.skipWhitespaceOnlyText||!1)}return e.prototype.nextToken=function(){if(this.eof())return{type:i.TokenType.EOF};var t=this.skipIfStartsWith("<")?this.openBracket():this.text();return this._options.skipWhitespaceOnlyText&&t.type===i.TokenType.Text&&e.isWhiteSpaceToken(t)&&(t=this.nextToken()),t},e.prototype.openBracket=function(){return this.skipIfStartsWith("?")?this.skipIfStartsWith("xml")?e.isSpace(this._str[this._index])?this.declaration():(this.seek(-3),this.pi()):this.pi():this.skipIfStartsWith("!")?this.skipIfStartsWith("--")?this.comment():this.skipIfStartsWith("[CDATA[")?this.cdata():this.skipIfStartsWith("DOCTYPE")?this.doctype():void this.throwError("Invalid '!' in opening tag."):this.skipIfStartsWith("/")?this.closeTag():this.openTag()},e.prototype.declaration=function(){for(var e="",t="",n="";!this.eof();){if(this.skipSpace(),this.skipIfStartsWith("?>"))return{type:i.TokenType.Declaration,version:e,encoding:t,standalone:n};var o=r(this.attribute(),2),a=o[0],s=o[1];"version"===a?e=s:"encoding"===a?t=s:"standalone"===a?n=s:this.throwError("Invalid attribute name: "+a)}this.throwError("Missing declaration end symbol `?>`")},e.prototype.doctype=function(){var e="",t="";this.skipSpace();var n=this.takeUntil2("[",">",!0);return this.skipSpace(),this.skipIfStartsWith("PUBLIC")?(e=this.quotedString(),t=this.quotedString()):this.skipIfStartsWith("SYSTEM")&&(t=this.quotedString()),this.skipSpace(),this.skipIfStartsWith("[")&&(this.skipUntil("]"),this.skipIfStartsWith("]")||this.throwError("Missing end bracket of DTD internal subset")),this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing doctype end symbol `>`"),{type:i.TokenType.DocType,name:n,pubId:e,sysId:t}},e.prototype.pi=function(){var e=this.takeUntilStartsWith("?>",!0);if(this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.skipSpace(),this.skipIfStartsWith("?>"))return{type:i.TokenType.PI,target:e,data:""};var t=this.takeUntilStartsWith("?>");return this.eof()&&this.throwError("Missing processing instruction end symbol `?>`"),this.seek(2),{type:i.TokenType.PI,target:e,data:t}},e.prototype.text=function(){var e=this.takeUntil("<");return{type:i.TokenType.Text,data:e}},e.prototype.comment=function(){var e=this.takeUntilStartsWith("--\x3e");return this.eof()&&this.throwError("Missing comment end symbol `--\x3e`"),this.seek(3),{type:i.TokenType.Comment,data:e}},e.prototype.cdata=function(){var e=this.takeUntilStartsWith("]]>");return this.eof()&&this.throwError("Missing CDATA end symbol `]>`"),this.seek(3),{type:i.TokenType.CDATA,data:e}},e.prototype.openTag=function(){this.skipSpace();var e=this.takeUntil2(">","/",!0);if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:i.TokenType.Element,name:e,attributes:[],selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:i.TokenType.Element,name:e,attributes:[],selfClosing:!0};for(var t=[];!this.eof();){if(this.skipSpace(),this.skipIfStartsWith(">"))return{type:i.TokenType.Element,name:e,attributes:t,selfClosing:!1};if(this.skipIfStartsWith("/>"))return{type:i.TokenType.Element,name:e,attributes:t,selfClosing:!0};var n=this.attribute();t.push(n)}this.throwError("Missing opening element tag end symbol `>`")},e.prototype.closeTag=function(){this.skipSpace();var e=this.takeUntil(">",!0);return this.skipSpace(),this.skipIfStartsWith(">")||this.throwError("Missing closing element tag end symbol `>`"),{type:i.TokenType.ClosingTag,name:e}},e.prototype.attribute=function(){this.skipSpace();var e=this.takeUntil("=",!0);return this.skipSpace(),this.skipIfStartsWith("=")||this.throwError("Missing equals sign before attribute value"),[e,this.quotedString()]},e.prototype.quotedString=function(){this.skipSpace();var t=this.take(1);e.isQuote(t)||this.throwError("Missing start quote character before quoted value");var n=this.takeUntil(t);return this.skipIfStartsWith(t)||this.throwError("Missing end quote character after quoted value"),n},e.prototype.eof=function(){return this._index>=this._length},e.prototype.skipIfStartsWith=function(e){var t=e.length;if(1===t)return this._str[this._index]===e&&(this._index++,!0);for(var n=0;nthis._length&&(this._index=this._length)},e.prototype.skipSpace=function(){for(;!this.eof()&&e.isSpace(this._str[this._index]);)this._index++},e.prototype.take=function(e){if(1===e)return this._str[this._index++];var t=this._index;return this.seek(e),this._str.slice(t,this._index)},e.prototype.takeUntil=function(t,n){void 0===n&&(n=!1);for(var r=this._index;this._indexthis._index){o=n.index;break}throw this.err={line:r,col:this._index-i,index:this._index,str:this._str.substring(i,o)},new Error(e+"\nIndex: "+this.err.index+"\nLn: "+this.err.line+", Col: "+this.err.col+"\nInput: "+this.err.str)},e.prototype[Symbol.iterator]=function(){return this._index=0,{next:function(){var e=this.nextToken();return e.type===i.TokenType.EOF?{done:!0,value:null}:{done:!1,value:e}}.bind(this)}},e}();t.XMLStringLexer=o},function(e,t,n){"use strict";var r=n(39);e.exports=new r({include:[n(182)]})},function(e,t,n){"use strict";var r=n(39);e.exports=new r({include:[n(113)],implicit:[n(289),n(290),n(291),n(292)]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(91),i=n(1),o=n(3),a=n(77),s=n(109);function l(e,t){var n=c(void 0===e||u(e)?e:r.DefaultBuilderOptions),i=u(e)?t:e,o=s.createDocument();d(o,n);var l=new a.XMLBuilderImpl(o);return void 0!==i&&l.ele(i),l}function u(e){if(!i.isPlainObject(e))return!1;for(var t in e)if(e.hasOwnProperty(t)&&!r.XMLBuilderOptionKeys.has(t))return!1;return!0}function c(e){void 0===e&&(e={});var t=i.applyDefaults(e,r.DefaultBuilderOptions);if(0===t.convert.att.length||0===t.convert.ins.length||0===t.convert.text.length||0===t.convert.cdata.length||0===t.convert.comment.length)throw new Error("JS object converter strings cannot be zero length.");return t}function d(e,t,n){var r=e;r._xmlBuilderOptions=t,r._isFragment=n}t.builder=function(e,t){var n=c(u(e)?e:r.DefaultBuilderOptions),s=o.Guard.isNode(e)||i.isArray(e)?e:t;if(void 0===s)throw new Error("Invalid arguments.");if(i.isArray(s)){for(var l=[],d=0;d0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(91),a=n(1),s=n(217),l=n(2),u=n(3),c=n(0),d=n(109),p=n(7),f=n(276),h=function(){function e(e){this._domNode=e}return Object.defineProperty(e.prototype,"node",{get:function(){return this._domNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!0,configurable:!0}),e.prototype.set=function(e){return this._options=a.applyDefaults(a.applyDefaults(this._options,e,!0),o.DefaultBuilderOptions),this},e.prototype.ele=function(t,n,i){var o,s,l,u,p,h;if(a.isObject(t))return new f.ObjectReader(this._options).parse(this,t);if(null!==t&&/^\s*0&&(void 0===e&&(e=t.slice(r+1)),t=t.slice(0,r)),void 0===e)e=n?this._options.defaultNamespace.ele:this._options.defaultNamespace.att;else if(null!==e&&"@"===e[0]){var i=e.slice(1);if(void 0===(e=this._options.namespaceAlias[i]))throw new Error("Namespace alias `"+i+"` is not defined. "+this._debugInfo())}return[e,t]},e.prototype._updateNamespace=function(t){var n,o,a,s,l=this._domNode;if(u.Guard.isElementNode(l)&&null!==t&&l.namespaceURI!==t){var d=r(c.namespace_extractQName(l.prefix?l.prefix+":"+l.localName:l.localName),2),p=d[0],f=d[1],h=c.create_element(this._doc,f,t,p);try{for(var m=i(l.attributes),g=m.next();!g.done;g=m.next()){var v=g.value,y=v.prefix?v.prefix+":"+v.localName:v.localName,b=r(c.namespace_extractQName(y),1)[0],w=v.namespaceURI;null===w&&null!==b&&(w=l.lookupNamespaceURI(b)),null===w?h.setAttribute(y,v.value):h.setAttributeNS(w,y,v.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}var x=l.parentNode;if(null===x)throw new Error("Parent node is null."+this._debugInfo());x.replaceChild(h,l),this._domNode=h;try{for(var S=i(l.childNodes),C=S.next();!C.done;C=S.next()){var A=C.value.cloneNode(!0);if(h.appendChild(A),u.Guard.isElementNode(A)){var P=r(c.namespace_extractQName(A.prefix?A.prefix+":"+A.localName:A.localName),1)[0],_=h.lookupNamespaceURI(P);new e(A)._updateNamespace(_)}}}catch(e){a={error:e}}finally{try{C&&!C.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}}},Object.defineProperty(e.prototype,"_doc",{get:function(){var e=this.node;if(u.Guard.isDocumentNode(e))return e;var t=e.ownerDocument;if(!t)throw new Error("Owner document is null. "+this._debugInfo());return t},enumerable:!0,configurable:!0}),e.prototype._debugInfo=function(e){var t=this.node,n=t.parentNode;e=e||t.nodeName;var r=n?n.nodeName:"";return r?"node: <"+e+">, parent: <"+r+">":"node: <"+e+">"},Object.defineProperty(e.prototype,"_options",{get:function(){var e=this._doc;if(void 0===e._xmlBuilderOptions)throw new Error("Builder options is not set.");return e._xmlBuilderOptions},set:function(e){this._doc._xmlBuilderOptions=e},enumerable:!0,configurable:!0}),e}();t.XMLBuilderImpl=h},function(e,t,n){var r=n(11),i=n(117),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){var r=n(46),i=n(82),o=n(85),a=n(18);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(16),i=n(15),o=n(18),a=n(61);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,l=0;s>l;)i.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(46);e.exports=r("document","documentElement")},function(e,t,n){var r=n(24),i=n(82).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(4),i=n(36).every,o=n(48),a=n(28),s=o("every"),l=a("every");r({target:"Array",proto:!0,forced:!s||!l},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(4),i=n(36).filter,o=n(63),a=n(28),s=o("filter"),l=a("filter");r({target:"Array",proto:!0,forced:!s||!l},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(46);e.exports=r("navigator","userAgent")||""},function(e,t,n){"use strict";var r=n(4),i=n(36).find,o=n(130),a=n(28),s=!0,l=a("find");"find"in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(131).IteratorPrototype,i=n(60),o=n(40),a=n(62),s=n(49),l=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,u,!1,!0),s[u]=l,e}},function(e,t,n){var r=n(8);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(4),i=n(36).map,o=n(63),a=n(28),s=o("map"),l=a("map");r({target:"Array",proto:!0,forced:!s||!l},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(4),i=n(200).left,o=n(48),a=n(28),s=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!l},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(127),i=n(27),o=n(41),a=n(26),s=function(e){return function(t,n,s,l){r(n);var u=i(t),c=o(u),d=a(u.length),p=e?d-1:0,f=e?-1:1;if(s<2)for(;;){if(p in c){l=c[p],p+=f;break}if(p+=f,e?p<0:d<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:d>p;p+=f)p in c&&(l=n(l,c[p],p,u));return l}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(4),i=n(36).some,o=n(48),a=n(28),s=o("some"),l=a("some");r({target:"Array",proto:!0,forced:!s||!l},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(90),i=n(135);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(8);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(5),i=n(49),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(135),i=n(49),o=n(5)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(18);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(5)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r=n(13),i=n(133);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){var r=n(25);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(46),i=n(15),o=n(5),a=n(16),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e=1e3),this._items=new Set,this._limit=e}return e.prototype.add=function(e){if(this._items.add(e),this._items.size>this._limit){var t=this._items.values().next();t.done||this._items.delete(t.value)}return this},e.prototype.delete=function(e){return this._items.delete(e)},e.prototype.has=function(e){return this._items.has(e)},e.prototype.clear=function(){this._items.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this._items.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){var n=this;this._items.forEach((function(r){return e.call(t,r,r,n)}))},e.prototype.keys=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.keys())];case 1:return e.sent(),[2]}}))},e.prototype.values=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.values())];case 1:return e.sent(),[2]}}))},e.prototype.entries=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.entries())];case 1:return e.sent(),[2]}}))},e.prototype[Symbol.iterator]=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items)];case 1:return e.sent(),[2]}}))},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"FixedSizeSet"},enumerable:!0,configurable:!0}),e}();t.FixedSizeSet=o},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e){void 0===e&&(e=1e3),this._items=new Map,this._limit=e}return e.prototype.get=function(e){return this._items.get(e)},e.prototype.set=function(e,t){if(this._items.set(e,t),this._items.size>this._limit){var n=this._items.keys().next();n.done||this._items.delete(n.value)}},e.prototype.delete=function(e){return this._items.delete(e)},e.prototype.has=function(e){return this._items.has(e)},e.prototype.clear=function(){this._items.clear()},Object.defineProperty(e.prototype,"size",{get:function(){return this._items.size},enumerable:!0,configurable:!0}),e.prototype.forEach=function(e,t){this._items.forEach((function(n,r){return e.call(t,r,n)}))},e.prototype.keys=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.keys())];case 1:return e.sent(),[2]}}))},e.prototype.values=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.values())];case 1:return e.sent(),[2]}}))},e.prototype.entries=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items.entries())];case 1:return e.sent(),[2]}}))},e.prototype[Symbol.iterator]=function(){return r(this,(function(e){switch(e.label){case 0:return[5,i(this._items)];case 1:return e.sent(),[2]}}))},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"ObjectCache"},enumerable:!0,configurable:!0}),e}();t.ObjectCache=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){void 0===e&&(e=1e3),this._items=new Map,this._limit=e}return e.prototype.check=function(e,t){if(this._items.get(e)===t)return!0;if(this._items.get(t)===e)return!1;var n=Math.random()<.5;if(n?this._items.set(e,t):this._items.set(t,e),this._items.size>this._limit){var r=this._items.keys().next();r.done||this._items.delete(r.value)}return n},e}();t.CompareCache=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._initialized=!1,this._value=void 0,this._initFunc=e}return Object.defineProperty(e.prototype,"value",{get:function(){return this._initialized||(this._value=this._initFunc(),this._initialized=!0),this._value},enumerable:!0,configurable:!0}),e}();t.Lazy=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this._pointer=0,this._chars=Array.from(e),this._length=this._chars.length}return Object.defineProperty(e.prototype,"eof",{get:function(){return this._pointer>=this._length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.codePoint=function(){if(void 0===this._codePoint)if(this.eof)this._codePoint=-1;else{var e=this._chars[this._pointer].codePointAt(0);this._codePoint=void 0!==e?e:-1}return this._codePoint},e.prototype.c=function(){return void 0===this._c&&(this._c=this.eof?"":this._chars[this._pointer]),this._c},e.prototype.remaining=function(){return void 0===this._remaining&&(this._remaining=this.eof?"":this._chars.slice(this._pointer+1).join("")),this._remaining},e.prototype.substring=function(){return void 0===this._substring&&(this._substring=this.eof?"":this._chars.slice(this._pointer).join("")),this._substring},Object.defineProperty(e.prototype,"pointer",{get:function(){return this._pointer},set:function(e){e!==this._pointer&&(this._pointer=e,this._codePoint=void 0,this._c=void 0,this._remaining=void 0,this._substring=void 0)},enumerable:!0,configurable:!0}),e}();t.StringWalker=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(218);t.MapWriter=r.MapWriter;var i=n(258);t.XMLWriter=i.XMLWriter;var o=n(67);t.ObjectWriter=o.ObjectWriter;var a=n(260);t.JSONWriter=a.JSONWriter;var s=n(261);t.YAMLWriter=s.YAMLWriter},function(e,t,n){"use strict";n(19),n(219),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(67),s=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=o.applyDefaults(n,{format:"map",wellFormed:!1,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){var t=o.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1,verbose:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e);return this._convertObject(n)},t.prototype._convertObject=function(e){if(o.isArray(e)){for(var t=0;t=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=d("concat"),v=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!m||!g},{concat:function(e){var t,n,r,i,o,a=s(this),d=c(a,0),p=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");u(d,p++,o)}return d.length=p,d}})},function(e,t,n){"use strict";var r=n(8);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){var r=n(223);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(13),i=n(42),o=n(5)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(5)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";n(68);var r=n(25),i=n(8),o=n(5),a=n(93),s=n(21),l=o("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$
")})),c="$0"==="a".replace(/./,"$0"),d=o("replace"),p=!!/./[d]&&""===/./[d]("a","$0"),f=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var h=o(e),m=!i((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!u||!c||p)||"split"===e&&!f){var v=/./[h],y=n(h,""[e],(function(e,t,n,r,i){return t.exec===a?m&&!i?{done:!0,value:v.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=y[0],w=y[1];r(String.prototype,e,b),r(RegExp.prototype,h,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}d&&s(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(137).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(42),i=n(93);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var r=n(96);t.forgivingBase64Encode=function(t){return e.from(t).toString("base64")},t.forgivingBase64Decode=function(t){return""===t?"":((t=t.replace(r.ASCIIWhiteSpace,"")).length%4==0&&(t.endsWith("==")?t=t.substr(0,t.length-2):t.endsWith("=")&&(t=t.substr(0,t.length-1))),t.length%4==1?null:/[0-9A-Za-z+/]/.test(t)?e.from(t,"base64").toString("utf8"):null)}}).call(this,n(145).Buffer)},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,d=s>0?a-4:a;for(n=0;n>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;as?s:a+16383));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s0)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 c(e,t,n){for(var i,o,a=[],s=t;s>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,c=-7,d=n?i-1:0,p=n?-1:1,f=e[t+d];for(d+=p,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+e[t+d],d+=p,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+d],d+=p,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),o-=u}return(f?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?p/l:p*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=c?(s=0,a=c):a+d>=1?(s=(t*l-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[n+f]=255&s,f+=h,s/=256,i-=8);for(a=a<0;e[n+f]=255&a,f+=h,a/=256,u-=8);e[n+f-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);function o(e){var t,n;if(null===e||i.isString(e)||i.isNumber(e))return e;if(i.isArray(e)){var a=new Array;try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value;a.push(o(u))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}if(i.isObject(e)){for(var c in a=new Map,e)if(e.hasOwnProperty(c)){var d=e[c];a.set(c,o(d))}return a}return e}t.parseJSONFromBytes=function(e){var t=i.utf8Decode(e);return JSON.parse.call(void 0,t)},t.serializeJSONToBytes=function(e){var t=JSON.stringify.call(void 0,e);return i.utf8Encode(t)},t.parseJSONIntoInfraValues=function(e){return o(JSON.parse.call(void 0,e))},t.convertAJSONDerivedJavaScriptValueToAnInfraValue=o},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(1);t.append=function(e,t){e.push(t)},t.extend=function(e,t){e.push.apply(e,o(t))},t.prepend=function(e,t){e.unshift(t)},t.replace=function(e,t,n){var r,i,o=0;try{for(var l=a(e),u=l.next();!u.done;u=l.next()){var c=u.value;if(s.isFunction(t))t.call(null,c)&&(e[o]=n);else if(c===t)return void(e[o]=n);o++}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}},t.insert=function(e,t,n){e.splice(n,0,t)},t.remove=function(e,t){for(var n=e.length;n--;){var r=e[n];if(s.isFunction(t))t.call(null,r)&&e.splice(n,1);else if(r===t)return void e.splice(n,1)}},t.empty=function(e){e.length=0},t.contains=function(e,t){var n,r;try{for(var i=a(e),o=i.next();!o.done;o=i.next()){var l=o.value;if(s.isFunction(t)){if(t.call(null,l))return!0}else if(l===t)return!0}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1},t.size=function(e,t){var n,r;if(void 0===t)return e.length;var i=0;try{for(var o=a(e),s=o.next();!s.done;s=o.next()){var l=s.value;t.call(null,l)&&i++}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t.isEmpty=function(e){return 0===e.length},t.forEach=function(e,t){var n,i,o,s,l,u;return r(this,(function(r){switch(r.label){case 0:return void 0!==t?[3,2]:[5,a(e)];case 1:return r.sent(),[3,9];case 2:r.trys.push([2,7,8,9]),n=a(e),i=n.next(),r.label=3;case 3:return i.done?[3,6]:(o=i.value,t.call(null,o)?[4,o]:[3,5]);case 4:r.sent(),r.label=5;case 5:return i=n.next(),[3,3];case 6:return[3,9];case 7:return s=r.sent(),l={error:s},[3,9];case 8:try{i&&!i.done&&(u=n.return)&&u.call(n)}finally{if(l)throw l.error}return[7];case 9:return[2]}}))},t.clone=function(e){return new(Array.bind.apply(Array,o([void 0],e)))},t.sortInAscendingOrder=function(e,t){return e.sort((function(e,n){return t.call(null,e,n)?-1:1}))},t.sortInDescendingOrder=function(e,t){return e.sort((function(e,n){return t.call(null,e,n)?1:-1}))}},function(e,t,n){"use strict";var r=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(96),o=n(147),a=n(146),s=n(1);function l(e,t){for(var n=0;;){var r=n=65&&l<=90?String.fromCodePoint(l+32):s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i}function p(e){return e.replace(/^[\t\n\f\r ]+/,"").replace(/[\t\n\f\r ]+$/,"")}function f(e,t,n){if(!s.isArray(t))return f(e,Array.from(t),n);for(var r="";n.position=97&&l<=122?String.fromCodePoint(l-32):s}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i},t.asciiCaseInsensitiveMatch=function(e,t){return d(e)===d(t)},t.asciiEncode=function(e){return console.assert(c(e),"asciiEncode requires an ASCII string."),u(e)},t.asciiDecode=function(e){var t,n;try{for(var i=r(e),s=i.next();!s.done;s=i.next()){var l=s.value;console.assert(a.isASCIIByte(l),"asciiDecode requires an ASCII byte sequence.")}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o.isomorphicDecode(e)},t.stripNewlines=function(e){return e.replace(/[\n\r]/g,"")},t.normalizeNewlines=function(e){return e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")},t.stripLeadingAndTrailingASCIIWhitespace=p,t.stripAndCollapseASCIIWhitespace=function(e){return p(e.replace(/[\t\n\f\r ]{2,}/g," "))},t.collectASequenceOfCodePoints=f,t.skipASCIIWhitespace=h,t.strictlySplit=function e(t,n){if(!s.isArray(t))return e(Array.from(t),n);var r={position:0},i=[],o=f((function(e){return n!==e}),t,r);for(i.push(o);r.position=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(97);t.abort_add=function(e,t){t._abortedFlag||t._abortAlgorithms.add(e)},t.abort_remove=function(e,t){t._abortAlgorithms.delete(e)},t.abort_signalAbort=function(e){var t,n;if(!e._abortedFlag){e._abortedFlag=!0;try{for(var o=r(e._abortAlgorithms),a=o.next();!a.done;a=o.next())a.value.call(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}e._abortAlgorithms.clear(),i.event_fireAnEvent("abort",e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(150),i=function(){function e(){}return e.asNode=function(e){if(r.Guard.isNode(e))return e;throw new Error("Invalid object. Node expected.")},e}();t.Cast=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return Object.defineProperty(e.prototype,"size",{get:function(){return 0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){throw new Error("Cannot add to an empty set.")},e.prototype.clear=function(){},e.prototype.delete=function(e){return!1},e.prototype.forEach=function(e,t){},e.prototype.has=function(e){return!1},e.prototype[Symbol.iterator]=function(){return new i},e.prototype.entries=function(){return new i},e.prototype.keys=function(){return new i},e.prototype.values=function(){return new i},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"EmptySet"},enumerable:!0,configurable:!0}),e}();t.EmptySet=r;var i=function(){function e(){}return e.prototype[Symbol.iterator]=function(){return this},e.prototype.next=function(){return{done:!0,value:null}},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SchemeStart=0]="SchemeStart",e[e.Scheme=1]="Scheme",e[e.NoScheme=2]="NoScheme",e[e.SpecialRelativeOrAuthority=3]="SpecialRelativeOrAuthority",e[e.PathOrAuthority=4]="PathOrAuthority",e[e.Relative=5]="Relative",e[e.RelativeSlash=6]="RelativeSlash",e[e.SpecialAuthoritySlashes=7]="SpecialAuthoritySlashes",e[e.SpecialAuthorityIgnoreSlashes=8]="SpecialAuthorityIgnoreSlashes",e[e.Authority=9]="Authority",e[e.Host=10]="Host",e[e.Hostname=11]="Hostname",e[e.Port=12]="Port",e[e.File=13]="File",e[e.FileSlash=14]="FileSlash",e[e.FileHost=15]="FileHost",e[e.PathStart=16]="PathStart",e[e.Path=17]="Path",e[e.CannotBeABaseURLPath=18]="CannotBeABaseURLPath",e[e.Query=19]="Query",e[e.Fragment=20]="Fragment"}(t.ParserState||(t.ParserState={})),t.OpaqueOrigin=["","",null,null]},function(e,t,n){"use strict";var r=n(245),i=n(247);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return i.isString(e)&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),p=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,h=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(248);function b(e,t,n){if(e&&i.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,n),r}o.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),s=-1!==o&&o127?M+="x":M+=k[N];if(!M.match(f)){var F=E.slice(0,O),B=E.slice(O+1),L=k.match(h);L&&(F.push(L[1]),B.unshift(L[2])),B.length&&(b="/"+B.join(".")+b),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=r.toASCII(this.hostname));var V=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+V,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[S])for(O=0,I=c.length;O0)&&n.host.split("@"))&&(n.auth=D.shift(),n.host=n.hostname=D.shift())),n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!C.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var P=C.slice(-1)[0],_=(n.host||e.host||C.length>1)&&("."===P||".."===P)||""===P,O=0,T=C.length;T>=0;T--)"."===(P=C[T])?C.splice(T,1):".."===P?(C.splice(T,1),O++):O&&(C.splice(T,1),O--);if(!x&&!S)for(;O--;O)C.unshift("..");!x||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),_&&"/"!==C.join("/").substr(-1)&&C.push("");var D,E=""===C[0]||C[0]&&"/"===C[0].charAt(0);return A&&(n.hostname=n.host=E?"":C.length?C.shift():"",(D=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=D.shift(),n.host=n.hostname=D.shift())),(x=x||n.host&&C.length)&&!E&&C.unshift(""),C.length?n.pathname=C.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(e,r){var i;!function(o){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof r&&r;a.global!==a&&a.window!==a&&a.self;var s,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,h=String.fromCharCode;function m(e){throw new RangeError(p[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(d,".")).split("."),t).join(".")}function y(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(t+=h((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+h(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=36)e=f(e/35);return f(r+36*e/(e+38))}function S(e){var t,n,r,i,o,a,s,u,c,d,p,h=[],g=e.length,v=0,y=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r=128&&m("not-basic"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=g&&m("invalid-input"),((u=(p=e.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:36)>=36||u>f((l-v)/a))&&m("overflow"),v+=u*a,!(u<(c=s<=w?1:s>=w+26?26:s-w));s+=36)a>f(l/(d=36-c))&&m("overflow"),a*=d;w=x(v-o,t=h.length+1,0==o),f(v/t)>l-y&&m("overflow"),y+=f(v/t),v%=t,h.splice(v++,0,y)}return b(h)}function C(e){var t,n,r,i,o,a,s,u,c,d,p,g,v,b,S,C=[];for(g=(e=y(e)).length,t=128,n=0,o=72,a=0;a=t&&pf((l-n)/(v=r+1))&&m("overflow"),n+=(s-t)*v,t=s,a=0;al&&m("overflow"),p==t){for(u=n,c=36;!(u<(d=c<=o?1:c>=o+26?26:c-o));c+=36)S=u-d,b=36-d,C.push(h(w(d+S%b,0))),u=f(S/b);C.push(h(w(u,0))),o=x(n,v,r==i),n=0,++r}++n,++t}return C.join("")}s={version:"1.4.1",ucs2:{decode:y,encode:b},decode:S,encode:C,toASCII:function(e){return v(e,(function(e){return c.test(e)?"xn--"+C(e):e}))},toUnicode:function(e){return v(e,(function(e){return u.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return s}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(246)(e),n(78))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(249),t.encode=t.stringify=n(250)},function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var c=0;c=0?(d=m.substr(0,g),p=m.substr(g+1)):(d=m,p=""),f=decodeURIComponent(d),h=decodeURIComponent(p),r(a,f)?i(a[f])?a[f].push(h):a[f]=[a[f],h]:a[f]=h}return a};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?o(a(e),(function(a){var s=encodeURIComponent(r(a))+n;return i(e[a])?o(e[a],(function(e){return s+encodeURIComponent(r(e))})).join(t):s+encodeURIComponent(r(e[a]))})).join(t):s?encodeURIComponent(r(s))+n+encodeURIComponent(r(e)):""};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1);function o(e){return i.isBoolean(e)?e:e.capture||!1}t.eventTarget_flatten=o,t.eventTarget_flattenMore=function(e){var t=o(e),n=!1,r=!1;return i.isBoolean(e)||(n=e.once||!1,r=e.passive||!1),[t,r,n]},t.eventTarget_addEventListener=function(e,t){if(null!==t.callback){for(var n=0;n=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(29);t.parentNode_convertNodesIntoANode=function(e,t){for(var n,a,s=null,l=0;l=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t0;I--){var k;if(b(k=E[I],e)){D=k;break}}var M,N,R=[];try{for(var F=r(P._children),B=F.next();!B.done;B=F.next())if(y(z=B.value,e)){if(l.Guard.isDocumentTypeNode(z))throw new s.HierarchyRequestError;R.push(z)}}catch(e){i={error:e}}finally{try{B&&!B.done&&(a=F.return)&&a.call(F)}finally{if(i)throw i.error}}if(c.tree_isAncestorOf(C,x,!0))M=x,N=S;else{for(var L=x;null!==L._parent&&!c.tree_isAncestorOf(C,L._parent);)L=L._parent;if(null===L._parent)throw new Error("Parent node is null.");M=L._parent,N=1+c.tree_index(L)}if(l.Guard.isCharacterDataNode(_))(V=f.node_clone(x))._data=p.characterData_substringData(x,S,c.tree_nodeLength(x)-S),h.mutation_append(V,v),p.characterData_replaceData(x,S,c.tree_nodeLength(x)-S,"");else if(null!==_){var V=f.node_clone(_);h.mutation_append(V,v);var j=w(u.create_range([x,S],[_,c.tree_nodeLength(_)]));h.mutation_append(j,V)}try{for(var G=r(R),U=G.next();!U.done;U=G.next()){var z=U.value;h.mutation_append(z,v)}}catch(e){d={error:e}}finally{try{U&&!U.done&&(m=G.return)&&m.call(G)}finally{if(d)throw d.error}}return l.Guard.isCharacterDataNode(D)?((V=f.node_clone(C))._data=p.characterData_substringData(C,0,A),h.mutation_append(V,v),p.characterData_replaceData(C,0,A,"")):null!==D&&(V=f.node_clone(D),h.mutation_append(V,v),j=w(u.create_range([D,0],[C,A])),h.mutation_append(j,V)),e._start=[M,N],e._end=[M,N],v}t.range_collapsed=g,t.range_root=v,t.range_isContained=y,t.range_isPartiallyContained=b,t.range_setTheStart=function(e,t,n){if(l.Guard.isDocumentTypeNode(t))throw new s.InvalidNodeTypeError;if(n>c.tree_nodeLength(t))throw new s.IndexSizeError;var r=[t,n];v(e)===c.tree_rootNode(t)&&d.boundaryPoint_position(r,e._end)!==a.BoundaryPosition.After||(e._end=r),e._start=r},t.range_setTheEnd=function(e,t,n){if(l.Guard.isDocumentTypeNode(t))throw new s.InvalidNodeTypeError;if(n>c.tree_nodeLength(t))throw new s.IndexSizeError;var r=[t,n];v(e)===c.tree_rootNode(t)&&d.boundaryPoint_position(r,e._start)!==a.BoundaryPosition.Before||(e._start=r),e._end=r},t.range_select=function(e,t){var n=e._parent;if(null===n)throw new s.InvalidNodeTypeError;var r=c.tree_index(e);t._start=[n,r],t._end=[n,r+1]},t.range_extract=w,t.range_cloneTheContents=function e(t){var n,i,a,d,m,v,x=u.create_documentFragment(t._startNode._nodeDocument);if(g(t))return x;var S=t._startNode,C=t._startOffset,A=t._endNode,P=t._endOffset;S===A&&l.Guard.isCharacterDataNode(S)&&((B=f.node_clone(S))._data=p.characterData_substringData(S,C,P-C),h.mutation_append(B,x));for(var _=S;!c.tree_isAncestorOf(A,_,!0);){if(null===_._parent)throw new Error("Parent node is null.");_=_._parent}var O=null;if(!c.tree_isAncestorOf(A,S,!0))try{for(var T=r(_._children),D=T.next();!D.done;D=T.next())if(b(M=D.value,t)){O=M;break}}catch(e){n={error:e}}finally{try{D&&!D.done&&(i=T.return)&&i.call(T)}finally{if(n)throw n.error}}var E=null;if(!c.tree_isAncestorOf(S,A,!0))for(var I=o(_._children),k=I.length-1;k>0;k--){var M;if(b(M=I[k],t)){E=M;break}}var N=[];try{for(var R=r(_._children),F=R.next();!F.done;F=R.next())if(y(G=F.value,t)){if(l.Guard.isDocumentTypeNode(G))throw new s.HierarchyRequestError;N.push(G)}}catch(e){a={error:e}}finally{try{F&&!F.done&&(d=R.return)&&d.call(R)}finally{if(a)throw a.error}}if(l.Guard.isCharacterDataNode(O))(B=f.node_clone(S))._data=p.characterData_substringData(S,C,c.tree_nodeLength(S)-C),h.mutation_append(B,x);else if(null!==O){var B=f.node_clone(O);h.mutation_append(B,x);var L=e(u.create_range([S,C],[O,c.tree_nodeLength(O)]));h.mutation_append(L,B)}try{for(var V=r(N),j=V.next();!j.done;j=V.next()){var G=j.value;B=f.node_clone(G),h.mutation_append(B,x)}}catch(e){m={error:e}}finally{try{j&&!j.done&&(v=V.return)&&v.call(V)}finally{if(m)throw m.error}}return l.Guard.isCharacterDataNode(E)?((B=f.node_clone(A))._data=p.characterData_substringData(A,0,P),h.mutation_append(B,x)):null!==E&&(B=f.node_clone(E),x.append(B),L=w(u.create_range([E,0],[A,P])),h.mutation_append(L,B)),x},t.range_insert=function(e,t){var n,i;if(l.Guard.isProcessingInstructionNode(t._startNode)||l.Guard.isCommentNode(t._startNode)||l.Guard.isTextNode(t._startNode)&&null===t._startNode._parent||t._startNode===e)throw new s.HierarchyRequestError;var o,a=null;if(l.Guard.isTextNode(t._startNode))a=t._startNode;else{var u=0;try{for(var d=r(t._startNode._children),p=d.next();!p.done;p=d.next()){var f=p.value;if(u===t._startOffset){a=f;break}u++}}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}}if(null===a)o=t._startNode;else{if(null===a._parent)throw new Error("Parent node is null.");o=a._parent}h.mutation_ensurePreInsertionValidity(e,o,a),l.Guard.isTextNode(t._startNode)&&(a=m.text_split(t._startNode,t._startOffset)),e===a&&(a=e._nextSibling),null!==e._parent&&h.mutation_remove(e,e._parent);var v=null===a?c.tree_nodeLength(o):c.tree_index(a);l.Guard.isDocumentFragmentNode(e)?v+=c.tree_nodeLength(e):v++,h.mutation_preInsert(e,o,a),g(t)&&(t._end=[o,v])},t.range_getContainedNodes=function(e){var t;return(t={})[Symbol.iterator]=function(){var t=e.commonAncestorContainer,n=c.tree_getFirstDescendantNode(t);return{next:function(){for(;n&&!y(n,e);)n=c.tree_getNextDescendantNode(t,n);if(null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=c.tree_getNextDescendantNode(t,n),r}}},t},t.range_getPartiallyContainedNodes=function(e){var t;return(t={})[Symbol.iterator]=function(){var t=e.commonAncestorContainer,n=c.tree_getFirstDescendantNode(t);return{next:function(){for(;n&&!b(n,e);)n=c.tree_getNextDescendantNode(t,n);if(null===n)return{done:!0,value:null};var r={done:!1,value:n};return n=c.tree_getNextDescendantNode(t,n),r}}},t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9);t.selectors_scopeMatchASelectorsString=function(e,t){throw new r.NotSupportedError}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(105);t.treeWalker_traverseChildren=function(e,t){for(var n=t?e._current._firstChild:e._current._lastChild;null!==n;){var o=i.traversal_filter(e,n);if(o===r.FilterResult.Accept)return e._current=n,n;if(o===r.FilterResult.Skip){var a=t?n._firstChild:n._lastChild;if(null!==a){n=a;continue}}for(;null!==n;){var s=t?n._nextSibling:n._previousSibling;if(null!==s){n=s;break}var l=n._parent;if(null===l||l===e._root||l===e._current)return null;n=l}}return null},t.treeWalker_traverseSiblings=function(e,t){var n=e._current;if(n===e._root)return null;for(;;){for(var o=t?n._nextSibling:n._previousSibling;null!==o;){n=o;var a=i.traversal_filter(e,n);if(a===r.FilterResult.Accept)return e._current=n,n;o=t?n._firstChild:n._lastChild,a!==r.FilterResult.Reject&&null!==o||(o=t?n._nextSibling:n._previousSibling)}if(null===(n=n._parent)||n===e._root)return null;if(i.traversal_filter(e,n)===r.FilterResult.Accept)return null}}},function(e,t,n){"use strict";n(89),n(74);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),a=n(2),s=n(50),l=n(3),u=function(e){function t(t,n){var r=e.call(this,t)||this;return r._indentation={},r._lengthToLastNewline=0,r._writerOptions=o.applyDefaults(n,{wellFormed:!1,headless:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,width:0,allowEmptyTags:!1,indentTextOnlyNodes:!1,spaceBeforeSlash:!1}),r}return i(t,e),t.prototype.serialize=function(e){return this._refs={suppressPretty:!1,emptyNode:!1,markup:""},e.nodeType!==a.NodeType.Document||this._writerOptions.headless||this.declaration(this._builderOptions.version,this._builderOptions.encoding,this._builderOptions.standalone),this.serializeNode(e,this._writerOptions.wellFormed),this._writerOptions.prettyPrint&&this._refs.markup.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(this._refs.markup=this._refs.markup.slice(0,-this._writerOptions.newline.length)),this._refs.markup},t.prototype.declaration=function(e,t,n){this._beginLine(),this._refs.markup+='",this._endLine()},t.prototype.docType=function(e,t,n){this._beginLine(),this._refs.markup+=t&&n?"':t?"':n?"':"",this._endLine()},t.prototype.openTagBegin=function(e){this._beginLine(),this._refs.markup+="<"+e},t.prototype.openTagEnd=function(e,t,n){if(this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._writerOptions.prettyPrint&&!t&&!n){for(var r=!0,i=!0,o=this.currentNode.firstChild,a=0,s=0;o;){if(l.Guard.isExclusiveTextNode(o))s++;else{if(!l.Guard.isCDATASectionNode(o)){r=!1,i=!1;break}a++}""!==o.data&&(i=!1),o=o.nextSibling}this._refs.suppressPretty=!this._writerOptions.indentTextOnlyNodes&&r&&(a<=1&&0===s||0===a),this._refs.emptyNode=i}(n||t||this._refs.emptyNode)&&this._writerOptions.allowEmptyTags?this._refs.markup+=">":this._refs.markup+=n?" />":t||this._refs.emptyNode?this._writerOptions.spaceBeforeSlash?" />":"/>":">",this._endLine()},t.prototype.closeTag=function(e){this._refs.emptyNode||(this._beginLine(),this._refs.markup+=""),this._refs.suppressPretty=!1,this._refs.emptyNode=!1,this._endLine()},t.prototype.attribute=function(e,t){var n=e+'="'+t+'"';this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._refs.markup.length-this._lengthToLastNewline+1+n.length>this._writerOptions.width?(this._endLine(),this._beginLine(),this._refs.markup+=this._indent(1)+n):this._refs.markup+=" "+n},t.prototype.text=function(e){""!==e&&(this._beginLine(),this._refs.markup+=e,this._endLine())},t.prototype.cdata=function(e){""!==e&&(this._beginLine(),this._refs.markup+="",this._endLine())},t.prototype.comment=function(e){this._beginLine(),this._refs.markup+="\x3c!--"+e+"--\x3e",this._endLine()},t.prototype.instruction=function(e,t){this._beginLine(),this._refs.markup+="",this._endLine()},t.prototype._beginLine=function(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._indent(this._writerOptions.offset+this.level))},t.prototype._endLine=function(){this._writerOptions.prettyPrint&&!this._refs.suppressPretty&&(this._refs.markup+=this._writerOptions.newline,this._lengthToLastNewline=this._refs.markup.length)},t.prototype._indent=function(e){if(e<=0)return"";if(void 0!==this._indentation[e])return this._indentation[e];var t=this._writerOptions.indent.repeat(e);return this._indentation[e]=t,t},t}(s.BaseWriter);t.XMLWriter=u},function(e,t,n){"use strict";var r=n(47),i=n(35);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(178),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(67),s=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r._writerOptions=s.applyDefaults(n,{wellFormed:!1,prettyPrint:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),r}return i(t,e),t.prototype.serialize=function(e){var t=s.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e);return this._beginLine(this._writerOptions,0)+this._convertObject(n,this._writerOptions)},t.prototype._convertObject=function(e,t,n){var r,i,a=this;void 0===n&&(n=0);var l="",u=this._isLeafNode(e);if(s.isArray(e)){l+="[";var c=e.length,d=0;try{for(var p=o(e),f=p.next();!f.done;f=p.next()){var h=f.value;l+=this._endLine(t,n+1)+this._beginLine(t,n+1)+this._convertObject(h,t,n+1),d0?new Array(n).join(e.indent):""},t.prototype._endLine=function(e,t){return e.prettyPrint?e.newline:""},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t.prototype._isLeafNode=function(e){return this._descendantCount(e)<=1},t.prototype._descendantCount=function(e,t){var n=this;return void 0===t&&(t=0),s.isArray(e)?s.forEachArray(e,(function(e){return t+=n._descendantCount(e,t)}),this):s.isObject(e)?s.forEachObject(e,(function(e,r){return t+=n._descendantCount(r,t)}),this):t++,t},t}(n(50).BaseWriter);t.JSONWriter=l},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(178),n(89),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var a=n(67),s=n(1),l=function(e){function t(t,n){var r=e.call(this,t)||this;if(r._writerOptions=s.applyDefaults(n,{wellFormed:!1,indent:" ",newline:"\n",offset:0,group:!1,verbose:!1}),r._writerOptions.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(r._writerOptions.offset<0)throw new Error("YAML offset should be zero or a positive number.");return r}return i(t,e),t.prototype.serialize=function(e){var t=s.applyDefaults(this._writerOptions,{format:"object",wellFormed:!1}),n=new a.ObjectWriter(this._builderOptions,t).serialize(e),r=this._beginLine(this._writerOptions,0)+"---"+this._endLine(this._writerOptions)+this._convertObject(n,this._writerOptions,0);return r.slice(-this._writerOptions.newline.length)===this._writerOptions.newline&&(r=r.slice(0,-this._writerOptions.newline.length)),r},t.prototype._convertObject=function(e,t,n,r){var i,a,l=this;void 0===r&&(r=!1);var u="";if(s.isArray(e))try{for(var c=o(e),d=c.next();!d.done;d=c.next()){var p=d.value;u+=this._beginLine(t,n,!0),s.isObject(p)?s.isEmpty(p)?u+='""'+this._endLine(t):u+=this._convertObject(p,t,n,!0):u+=this._val(p)+this._endLine(t)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}else s.forEachObject(e,(function(e,i){r?(u+=l._key(e),r=!1):u+=l._beginLine(t,n)+l._key(e),s.isObject(i)?s.isEmpty(i)?u+=' ""'+l._endLine(t):u+=l._endLine(t)+l._convertObject(i,t,n+1):u+=" "+l._val(i)+l._endLine(t)}),this);return u},t.prototype._beginLine=function(e,t,n){void 0===n&&(n=!1);var r=e.offset+t+1,i=new Array(r).join(e.indent);return n?i.substr(0,i.length-2)+"-"+i.substr(-1,1):i},t.prototype._endLine=function(e){return e.newline},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(50).BaseWriter);t.YAMLWriter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(110).dom.setFeatures(!0);var r=n(110);t.DOMImplementation=r.DOMImplementation;var i=n(271);t.DOMParser=i.DOMParser;var o=n(274);t.XMLSerializer=o.XMLSerializer},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(0),o=function(){function e(){}return e.prototype.before=function(){for(var e=[],t=0;t=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),o=n(3),a=n(7),s=function(){function e(e){this._nodeList=[],this._recordQueue=[],this._callback=e;var t=i.dom.window;a.set.append(t._mutationObservers,this)}return e.prototype.observe=function(e,t){var n,i;if(void 0===(t=t||{childList:!1,subtree:!1}).attributeOldValue&&void 0===t.attributeFilter||void 0!==t.attributes||(t.attributes=!0),void 0!==t.characterDataOldValue&&void 0===t.characterData&&(t.characterData=!0),!t.childList&&!t.attributes&&!t.characterData)throw new TypeError;if(t.attributeOldValue&&!t.attributes)throw new TypeError;if(void 0!==t.attributeFilter&&!t.attributes)throw new TypeError;if(t.characterDataOldValue&&!t.characterData)throw new TypeError;var s=!1,l=t,u=function(e){var t,n;if(e.observer===c){s=!0;try{for(var i=(t=void 0,r(c._nodeList)),u=i.next();!u.done;u=i.next()){var d=u.value;a.list.remove(d._registeredObserverList,(function(t){return o.Guard.isTransientRegisteredObserver(t)&&t.source===e}))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.options=l}},c=this;try{for(var d=r(e._registeredObserverList),p=d.next();!p.done;p=d.next())u(p.value)}catch(e){n={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}s||(e._registeredObserverList.push({observer:this,options:t}),this._nodeList.push(e))},e.prototype.disconnect=function(){var e,t,n=this;try{for(var i=r(this._nodeList),o=i.next();!o.done;o=i.next()){var s=o.value;a.list.remove(s._registeredObserverList,(function(e){return e.observer===n}))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this._recordQueue=[]},e.prototype.takeRecords=function(){var e=this._recordQueue;return this._recordQueue=[],e},e}();t.MutationObserverImpl=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=function(){function e(){}return Object.defineProperty(e.prototype,"previousElementSibling",{get:function(){for(var e=r.Cast.asNode(this)._previousSibling;e;){if(r.Guard.isElementNode(e))return e;e=e._previousSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextElementSibling",{get:function(){for(var e=r.Cast.asNode(this)._nextSibling;e;){if(r.Guard.isElementNode(e))return e;e=e._nextSibling}return null},enumerable:!0,configurable:!0}),e}();t.NonDocumentTypeChildNodeImpl=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),i=n(0),o=function(){function e(){}return e.prototype.getElementById=function(e){for(var t=i.tree_getFirstDescendantNode(r.Cast.asNode(this),!1,!1,(function(e){return r.Guard.isElementNode(e)}));null!==t;){if(t._uniqueIdentifier===e)return t;t=i.tree_getNextDescendantNode(r.Cast.asNode(this),t,!1,!1,(function(e){return r.Guard.isElementNode(e)}))}return null},e}();t.NonElementParentNodeImpl=o},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(0),a=function(){function e(){}return Object.defineProperty(e.prototype,"children",{get:function(){return o.create_htmlCollection(i.Cast.asNode(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){for(var e=i.Cast.asNode(this)._firstChild;e;){if(i.Guard.isElementNode(e))return e;e=e._nextSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){for(var e=i.Cast.asNode(this)._lastChild;e;){if(i.Guard.isElementNode(e))return e;e=e._previousSibling}return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){var e,t,n=0;try{for(var o=r(i.Cast.asNode(this)._children),a=o.next();!a.done;a=o.next()){var s=a.value;i.Guard.isElementNode(s)&&n++}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},enumerable:!0,configurable:!0}),e.prototype.prepend=function(){for(var e=[],t=0;t0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(180),a=n(111),s=n(7),l=n(0),u=n(69),c=function(){function e(){}return e.prototype.parse=function(e){for(var t,n,c,d,p=new o.XMLStringLexer(e,{skipWhitespaceOnlyText:!0}),f=l.create_document(),h=f,m=p.nextToken();m.type!==a.TokenType.EOF;){switch(m.type){case a.TokenType.Declaration:var g=m;if("1.0"!==g.version)throw new Error("Invalid xml version: "+g.version);break;case a.TokenType.DocType:var v=m;if(!l.xml_isPubidChar(v.pubId))throw new Error("DocType public identifier does not match PubidChar construct.");if(!l.xml_isLegalChar(v.sysId)||-1!==v.sysId.indexOf('"')&&-1!==v.sysId.indexOf("'"))throw new Error("DocType system identifier contains invalid characters.");h.appendChild(f.implementation.createDocumentType(v.name,v.pubId,v.sysId));break;case a.TokenType.CDATA:var y=m;if(!l.xml_isLegalChar(y.data)||-1!==y.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters.");h.appendChild(f.createCDATASection(y.data));break;case a.TokenType.Comment:var b=m;if(!l.xml_isLegalChar(b.data)||-1!==b.data.indexOf("--")||b.data.endsWith("-"))throw new Error("Comment data contains invalid characters.");h.appendChild(f.createComment(b.data));break;case a.TokenType.PI:var w=m;if(-1!==w.target.indexOf(":")||/^xml$/i.test(w.target))throw new Error("Processing instruction target contains invalid characters.");if(!l.xml_isLegalChar(w.data)||-1!==w.data.indexOf("?>"))throw new Error("Processing instruction data contains invalid characters.");h.appendChild(f.createProcessingInstruction(w.target,w.data));break;case a.TokenType.Text:var x=m;if(!l.xml_isLegalChar(x.data))throw new Error("Text data contains invalid characters.");h.appendChild(f.createTextNode(this._decodeText(x.data)));break;case a.TokenType.Element:var S=m,C=r(l.namespace_extractQName(S.name),2),A=C[0],P=C[1];if(-1!==P.indexOf(":")||!l.xml_isName(P))throw new Error("Node local name contains invalid characters.");if("xmlns"===A)throw new Error("An element cannot have the 'xmlns' prefix.");var _=h.lookupNamespaceURI(A),O={};try{for(var T=(t=void 0,i(S.attributes)),D=T.next();!D.done;D=T.next()){var E=r(D.value,2),I=E[0],k=E[1];if("xmlns"===I)_=k;else{var M=r(l.namespace_extractQName(I),2),N=M[0],R=M[1];"xmlns"===N&&(R===A&&(_=k),O[R]=k)}}}catch(e){t={error:e}}finally{try{D&&!D.done&&(n=T.return)&&n.call(T)}finally{if(t)throw t.error}}var F=null!==_?f.createElementNS(_,S.name):f.createElement(S.name);h.appendChild(F);var B=new u.LocalNameSet;try{for(var L=(c=void 0,i(S.attributes)),V=L.next();!V.done;V=L.next()){var j=r(V.value,2),G=(I=j[0],k=j[1],r(l.namespace_extractQName(I),2)),U=(N=G[0],R=G[1],null);if("xmlns"===N||null===N&&"xmlns"===R?U=s.namespace.XMLNS:null!==(U=F.lookupNamespaceURI(N))&&F.isDefaultNamespace(U)?U=null:null===U&&null!==N&&(U=O[N]||null),B.has(U,R))throw new Error("Element contains duplicate attributes.");if(B.set(U,R),U===s.namespace.XMLNS&&k===s.namespace.XMLNS)throw new Error("XMLNS namespace is reserved.");if(-1!==R.indexOf(":")||!l.xml_isName(R))throw new Error("Attribute local name contains invalid characters.");if("xmlns"===N&&""===k)throw new Error("Empty XML namespace is not allowed.");null!==U?F.setAttributeNS(U,I,this._decodeAttributeValue(k)):F.setAttribute(I,this._decodeAttributeValue(k))}}catch(e){c={error:e}}finally{try{V&&!V.done&&(d=L.return)&&d.call(L)}finally{if(c)throw c.error}}S.selfClosing||(h=F);break;case a.TokenType.ClosingTag:if(m.name!==h.nodeName)throw new Error("Closing tag name does not match opening tag name.");h._parent&&(h=h._parent)}m=p.nextToken()}return f},e.prototype._decodeText=function(e){return null==e?e:e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},e.prototype._decodeAttributeValue=function(e){return null==e?e:e.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},e}();t.XMLParserImpl=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(275);t.XMLSerializer=r.XMLSerializerImpl},function(e,t,n){"use strict";var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(69),a=n(95),s=n(9),l=n(7),u=n(0),c=function(){function e(){}return e.prototype.serializeToString=function(e){return this._xmlSerialization(e,!1)},e.prototype._xmlSerialization=function(e,t){if(void 0===e._nodeDocument||e._nodeDocument._hasNamespaces){var n=new a.NamespacePrefixMap;n.set("xml",l.namespace.XML);try{return this._serializeNodeNS(e,null,n,{value:1},t)}catch(e){throw new s.InvalidStateError}}else try{return this._serializeNode(e,t)}catch(e){throw new s.InvalidStateError}},e.prototype._serializeNodeNS=function(e,t,n,r,o){switch(e.nodeType){case i.NodeType.Element:return this._serializeElementNS(e,t,n,r,o);case i.NodeType.Document:return this._serializeDocumentNS(e,t,n,r,o);case i.NodeType.Comment:return this._serializeComment(e,o);case i.NodeType.Text:return this._serializeText(e,o);case i.NodeType.DocumentFragment:return this._serializeDocumentFragmentNS(e,t,n,r,o);case i.NodeType.DocumentType:return this._serializeDocumentType(e,o);case i.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,o);case i.NodeType.CData:return this._serializeCData(e,o);default:throw new Error("Unknown node type: "+e.nodeType)}},e.prototype._serializeNode=function(e,t){switch(e.nodeType){case i.NodeType.Element:return this._serializeElement(e,t);case i.NodeType.Document:return this._serializeDocument(e,t);case i.NodeType.Comment:return this._serializeComment(e,t);case i.NodeType.Text:return this._serializeText(e,t);case i.NodeType.DocumentFragment:return this._serializeDocumentFragment(e,t);case i.NodeType.DocumentType:return this._serializeDocumentType(e,t);case i.NodeType.ProcessingInstruction:return this._serializeProcessingInstruction(e,t);case i.NodeType.CData:return this._serializeCData(e,t);default:throw new Error("Unknown node type: "+e.nodeType)}},e.prototype._serializeElementNS=function(t,n,i,o,a){var s,c;if(a&&(-1!==t.localName.indexOf(":")||!u.xml_isName(t.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");var d="<",p="",f=!1,h=!1,m=i.copy(),g={},v=this._recordNamespaceInformation(t,m,g),y=n,b=t.namespaceURI;if(y===b)null!==v&&(h=!0),d+=p=b===l.namespace.XML?"xml:"+t.localName:t.localName;else{var w=t.prefix,x=null;if(null===w&&b===v||(x=m.get(w,b)),"xmlns"===w){if(a)throw new Error("An element cannot have the 'xmlns' prefix (well-formed required).");x=w}null!==x?(p=x+":"+t.localName,null!==v&&v!==l.namespace.XML&&(y=v||null),d+=p):null!==w?(w in g&&(w=this._generatePrefix(b,m,o)),m.set(w,b),d+=p+=w+":"+t.localName,d+=" xmlns:"+w+'="'+this._serializeAttributeValue(b,a)+'"',null!==v&&(y=v||null)):null===v||null!==v&&v!==b?(h=!0,y=b,d+=p+=t.localName,d+=' xmlns="'+this._serializeAttributeValue(b,a)+'"'):(y=b,d+=p+=t.localName)}d+=this._serializeAttributesNS(t,m,o,g,h,a);var S=b===l.namespace.HTML;if(S&&0===t.childNodes.length&&e._VoidElementNames.has(t.localName)?(d+=" /",f=!0):S||0!==t.childNodes.length||(d+="/",f=!0),d+=">",f)return d;if(S&&"template"===t.localName);else try{for(var C=r(t._children||t.childNodes),A=C.next();!A.done;A=C.next()){var P=A.value;d+=this._serializeNodeNS(P,y,m,o,a)}}catch(e){s={error:e}}finally{try{A&&!A.done&&(c=C.return)&&c.call(C)}finally{if(s)throw s.error}}return d+""},e.prototype._serializeDocumentNS=function(e,t,n,i,o){var a,s;if(o&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");var l="";try{for(var u=r(e._children||e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;l+=this._serializeNodeNS(d,t,n,i,o)}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return l},e.prototype._serializeComment=function(e,t){if(t&&(!u.xml_isLegalChar(e.data)||-1!==e.data.indexOf("--")||e.data.endsWith("-")))throw new Error("Comment data contains invalid characters (well-formed required).");return"\x3c!--"+e.data+"--\x3e"},e.prototype._serializeText=function(e,t){if(t&&!u.xml_isLegalChar(e.data))throw new Error("Text data contains invalid characters (well-formed required).");for(var n="",r=0;r"===i?">":i}return n},e.prototype._serializeDocumentFragmentNS=function(e,t,n,i,o){var a,s,l="";try{for(var u=r(e._children||e.childNodes),c=u.next();!c.done;c=u.next()){var d=c.value;l+=this._serializeNodeNS(d,t,n,i,o)}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}return l},e.prototype._serializeDocumentType=function(e,t){if(t&&!u.xml_isPubidChar(e.publicId))throw new Error("DocType public identifier does not match PubidChar construct (well-formed required).");if(t&&(!u.xml_isLegalChar(e.systemId)||-1!==e.systemId.indexOf('"')&&-1!==e.systemId.indexOf("'")))throw new Error("DocType system identifier contains invalid characters (well-formed required).");return e.publicId&&e.systemId?"':e.publicId?"':e.systemId?"':""},e.prototype._serializeProcessingInstruction=function(e,t){if(t&&(-1!==e.target.indexOf(":")||/^xml$/i.test(e.target)))throw new Error("Processing instruction target contains invalid characters (well-formed required).");if(t&&(!u.xml_isLegalChar(e.data)||-1!==e.data.indexOf("?>")))throw new Error("Processing instruction data contains invalid characters (well-formed required).");return""},e.prototype._serializeCData=function(e,t){if(t&&-1!==e.data.indexOf("]]>"))throw new Error("CDATA contains invalid characters (well-formed required).");return""},e.prototype._serializeAttributesNS=function(e,t,n,i,a,s){var c,d,p="",f=s?new o.LocalNameSet:void 0;try{for(var h=r(e.attributes),m=h.next();!m.done;m=h.next()){var g=m.value;if(a||s||null!==g.namespaceURI){if(s&&f&&f.has(g.namespaceURI,g.localName))throw new Error("Element contains duplicate attributes (well-formed required).");s&&f&&f.set(g.namespaceURI,g.localName);var v=g.namespaceURI,y=null;if(null!==v)if(y=t.get(g.prefix,v),v===l.namespace.XMLNS){if(g.value===l.namespace.XML||null===g.prefix&&a||null!==g.prefix&&(!(g.localName in i)||i[g.localName]!==g.value)&&t.has(g.localName,g.value))continue;if(s&&g.value===l.namespace.XMLNS)throw new Error("XMLNS namespace is reserved (well-formed required).");if(s&&""===g.value)throw new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required).");"xmlns"===g.prefix&&(y="xmlns")}else null===y&&(p+=" xmlns:"+(y=null===g.prefix||t.hasPrefix(g.prefix)&&!t.has(g.prefix,v)?this._generatePrefix(v,t,n):g.prefix)+'="'+this._serializeAttributeValue(v,s)+'"');if(p+=" ",null!==y&&(p+=y+":"),s&&(-1!==g.localName.indexOf(":")||!u.xml_isName(g.localName)||"xmlns"===g.localName&&null===v))throw new Error("Attribute local name contains invalid characters (well-formed required).");p+=g.localName+'="'+this._serializeAttributeValue(g.value,s)+'"'}else p+=" "+g.localName+'="'+this._serializeAttributeValue(g.value,s)+'"'}}catch(e){c={error:e}}finally{try{m&&!m.done&&(d=h.return)&&d.call(h)}finally{if(c)throw c.error}}return p},e.prototype._recordNamespaceInformation=function(e,t,n){var i,o,a=null;try{for(var s=r(e.attributes),u=s.next();!u.done;u=s.next()){var c=u.value,d=c.namespaceURI,p=c.prefix;if(d===l.namespace.XMLNS){if(null===p){a=c.value;continue}var f=c.localName,h=c.value;if(h===l.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){i={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}return a},e.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value;return n.value++,t.set(r,e),r},e.prototype._serializeAttributeValue=function(e,t){if(t&&null!==e&&!u.xml_isLegalChar(e))throw new Error("Invalid characters in attribute value.");if(null===e)return"";for(var n="",r=0;r"===i?">":i}return n},e.prototype._serializeElement=function(e,t){var n,i;if(t&&(-1!==e.localName.indexOf(":")||!u.xml_isName(e.localName)))throw new Error("Node local name contains invalid characters (well-formed required).");var o=!1,a=e.localName,s="<"+a;if(s+=this._serializeAttributes(e,t),0===e._children.size&&(s+="/",o=!0),s+=">",o)return s;try{for(var l=r(e._children),c=l.next();!c.done;c=l.next()){var d=c.value;s+=this._serializeNode(d,t)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(n)throw n.error}}return s+""},e.prototype._serializeDocument=function(e,t){var n,i;if(t&&null===e.documentElement)throw new Error("Missing document element (well-formed required).");var o="";try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;o+=this._serializeNode(l,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype._serializeDocumentFragment=function(e,t){var n,i,o="";try{for(var a=r(e._children),s=a.next();!s.done;s=a.next()){var l=s.value;o+=this._serializeNode(l,t)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},e.prototype._serializeAttributes=function(e,t){var n,i,o="",a=t?{}:void 0;try{for(var s=r(e.attributes),l=s.next();!l.done;l=s.next()){var c=l.value;if(t&&a&&c.localName in a)throw new Error("Element contains duplicate attributes (well-formed required).");if(t&&a&&(a[c.localName]=!0),t&&(-1!==c.localName.indexOf(":")||!u.xml_isName(c.localName)))throw new Error("Attribute local name contains invalid characters (well-formed required).");o+=" "+c.localName+'="'+this._serializeAttributeValue(c.value,t)+'"'}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o},e._VoidElementNames=new Set(["area","base","basefont","bgsound","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]),e}();t.XMLSerializerImpl=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(277);t.XMLReader=r.XMLReader;var i=n(112);t.ObjectReader=i.ObjectReader;var o=n(280);t.JSONReader=o.JSONReader;var a=n(281);t.YAMLReader=a.YAMLReader},function(e,t,n){"use strict";n(31),n(32),n(33),n(19),n(65),n(20),n(22),n(23);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var s=n(180),l=n(111),u=n(7),c=n(0),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){for(var n,r,i,d,p=new s.XMLStringLexer(t,{skipWhitespaceOnlyText:!0}),f=e,h=e,m=p.nextToken();m.type!==l.TokenType.EOF;){switch(m.type){case l.TokenType.Declaration:var g=m,v=this.sanitize(g.version);if("1.0"!==v)throw new Error("Invalid xml version: "+v);var y={version:v};g.encoding&&(y.encoding=this.sanitize(g.encoding)),g.standalone&&(y.standalone="yes"===this.sanitize(g.standalone)),h.set(y);break;case l.TokenType.DocType:var b=m;h=this.docType(h,this.sanitize(b.name),this.sanitize(b.pubId),this.sanitize(b.sysId))||h;break;case l.TokenType.CDATA:var w=m;h=this.cdata(h,this.sanitize(w.data))||h;break;case l.TokenType.Comment:var x=m;h=this.comment(h,this.sanitize(x.data))||h;break;case l.TokenType.PI:var S=m;h=this.instruction(h,this.sanitize(S.target),this.sanitize(S.data))||h;break;case l.TokenType.Text:var C=m;h=this.text(h,this._decodeText(this.sanitize(C.data)))||h;break;case l.TokenType.Element:var A=m,P=this.sanitize(A.name),_=o(c.namespace_extractQName(P),1)[0],O=h.node.lookupNamespaceURI(_),T={};try{for(var D=(n=void 0,a(A.attributes)),E=D.next();!E.done;E=D.next()){var I=o(E.value,2),k=I[0],M=I[1];if(k=this.sanitize(k),M=this.sanitize(M),"xmlns"===k)O=M;else{var N=o(c.namespace_extractQName(k),2),R=N[0],F=N[1];"xmlns"===R&&(F===_&&(O=M),T[F]=M)}}}catch(e){n={error:e}}finally{try{E&&!E.done&&(r=D.return)&&r.call(D)}finally{if(n)throw n.error}}var B=null!==O?this.element(h,O,P):this.element(h,void 0,P);if(void 0===B)break;h.node===e.node&&(f=B);try{for(var L=(i=void 0,a(A.attributes)),V=L.next();!V.done;V=L.next()){var j=o(V.value,2);k=j[0],M=j[1],k=this.sanitize(k),M=this.sanitize(M);var G=o(c.namespace_extractQName(k),2),U=(R=G[0],F=G[1],null);"xmlns"===R||null===R&&"xmlns"===F?U=u.namespace.XMLNS:null!==(U=B.node.lookupNamespaceURI(R))&&B.node.isDefaultNamespace(U)?U=null:null===U&&null!==R&&(U=T[R]||null),null!==U?this.attribute(B,U,k,this._decodeAttributeValue(M)):this.attribute(B,void 0,k,this._decodeAttributeValue(M))}}catch(e){i={error:e}}finally{try{V&&!V.done&&(d=L.return)&&d.call(L)}finally{if(i)throw i.error}}A.selfClosing||(h=B);break;case l.TokenType.ClosingTag:h.node.parentNode&&(h=h.up())}m=p.nextToken()}return f},t}(n(75).BaseReader);t.XMLReader=d},function(e,t,n){var r=n(4),i=n(279);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){"use strict";var r=n(16),i=n(8),o=n(61),a=n(85),s=n(79),l=n(27),u=n(41),c=Object.assign,d=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=l(e),i=arguments.length,c=1,d=a.f,p=s.f;i>c;)for(var f,h=u(arguments[c++]),m=d?o(h).concat(d(h)):o(h),g=m.length,v=0;g>v;)f=m[v++],r&&!p.call(h,f)||(n[f]=h[f]);return n}:c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(112),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){return new o.ObjectReader(this._builderOptions).parse(e,JSON.parse(t))},t}(n(75).BaseReader);t.JSONReader=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(112),a=n(75),s=n(282),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype._parse=function(e,t){var n=s.safeLoad(t);if(void 0===n)throw new Error("Unable to parse YAML document.");return new o.ObjectReader(this._builderOptions).parse(e,n)},t}(a.BaseReader);t.YAMLReader=l},function(e,t,n){"use strict";var r=n(283);e.exports=r},function(e,t,n){"use strict";var r=n(284),i=n(303);function o(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(10),e.exports.Schema=n(39),e.exports.FAILSAFE_SCHEMA=n(113),e.exports.JSON_SCHEMA=n(182),e.exports.CORE_SCHEMA=n(181),e.exports.DEFAULT_SAFE_SCHEMA=n(54),e.exports.DEFAULT_FULL_SCHEMA=n(76),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=i.dump,e.exports.safeDump=i.safeDump,e.exports.YAMLException=n(53),e.exports.MINIMAL_SCHEMA=n(113),e.exports.SAFE_SCHEMA=n(54),e.exports.DEFAULT_SCHEMA=n(76),e.exports.scan=o("scan"),e.exports.parse=o("parse"),e.exports.compose=o("compose"),e.exports.addConstructor=o("addConstructor")},function(e,t,n){"use strict";var r=n(38),i=n(53),o=n(285),a=n(54),s=n(76),l=Object.prototype.hasOwnProperty,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,c=/[\x85\u2028\u2029]/,d=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,f=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function m(e){return 10===e||13===e}function g(e){return 9===e||32===e}function v(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function w(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var S=new Array(256),C=new Array(256),A=0;A<256;A++)S[A]=w(A)?1:0,C[A]=w(A);function P(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _(e,t){return new i(t,new o(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function O(e,t){throw _(e,t)}function T(e,t){e.onWarning&&e.onWarning.call(null,_(e,t))}var D={YAML:function(e,t,n){var r,i,o;null!==e.version&&O(e,"duplication of %YAML directive"),1!==n.length&&O(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&O(e,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&O(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&T(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&O(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],p.test(r)||O(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&O(e,'there is a previously declared suffix for "'+r+'" tag handle'),f.test(i)||O(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};function E(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=r.repeat("\n",t-1))}function B(e,t){var n,r,i=e.tag,o=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&v(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,N(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,j(e,t,3,!1,!0),a.push(e.result),N(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)O(e,"bad indentation of a sequence entry");else if(e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt?w=1:e.lineIndent===t?w=0:e.lineIndentt)&&(j(e,t,4,!0,i)&&(m?f=e.result:h=e.result),m||(k(e,c,d,p,f,h,o,a),p=f=h=null),N(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)O(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?O(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?O(e,"repeat of an indentation width identifier"):(d=t+o-1,c=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!m(a)&&0!==a)}for(;0!==a;){for(M(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!c||e.lineIndentd&&(d=e.lineIndent),m(a))p++;else{if(e.lineIndent0){for(i=a,o=0;i>0;i--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:O(e,"expected hexadecimal character");e.result+=x(o),e.position++}else O(e,"unknown escape sequence");n=r=e.position}else m(s)?(E(e,n,r,!0),F(e,N(e,!1,t)),n=r=e.position):e.position===e.lineStart&&R(e)?O(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}O(e,"unexpected end of the stream within a double quoted scalar")}(e,f)?P=!0:function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!v(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&O(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||O(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],N(e,!0,-1),!0}(e)?(P=!0,null===e.tag&&null===e.anchor||O(e,"alias node should not have any properties")):function(e,t,n){var r,i,o,a,s,l,u,c,d=e.kind,p=e.result;if(v(c=e.input.charCodeAt(e.position))||y(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(v(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",i=o=e.position,a=!1;0!==c;){if(58===c){if(v(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===c){if(v(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&R(e)||n&&y(c))break;if(m(c)){if(s=e.line,l=e.lineStart,u=e.lineIndent,N(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}a&&(E(e,i,o,!1),F(e,e.line-s),i=o=e.position,a=!1),g(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return E(e,i,o,!1),!!e.result||(e.kind=d,e.result=p,!1)}(e,f,1===n)&&(P=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===w&&(P=u&&B(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&O(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),c=0,d=e.implicitTypes.length;c tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):O(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):O(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||P}function G(e){var t,n,r,i,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(i=e.input.charCodeAt(e.position))&&(N(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==i));){for(a=!0,i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&O(e,"directive name must not be less than one character in length");0!==i;){for(;g(i);)i=e.input.charCodeAt(++e.position);if(35===i){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&!m(i));break}if(m(i))break;for(t=e.position;0!==i&&!v(i);)i=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==i&&M(e),l.call(D,n)?D[n](e,n,r):T(e,'unknown document directive "'+n+'"')}N(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,N(e,!0,-1)):a&&O(e,"directives end mark is expected"),j(e,e.lineIndent-1,4,!1,!0),N(e,!0,-1),e.checkLineBreaks&&c.test(e.input.slice(o,e.position))&&T(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&R(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,N(e,!0,-1)):e.position0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",e)+n+s+o+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=i},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(38),i=n(10);function o(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new i("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,i=0,s=!1;if(!r)return!1;if("-"!==(t=e[i])&&"+"!==t||(t=e[++i]),"0"===t){if(i+1===r)return!0;if("b"===(t=e[++i])){for(i++;i=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(38),i=n(10),o=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),a=/^[-+]?[0-9]+e/;e.exports=new i("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!o.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,i;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,i=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){i.unshift(parseFloat(e,10))})),t=0,r=1,i.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(10),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==i.exec(e)||null!==o.exec(e))},construct:function(e){var t,n,r,a,s,l,u,c,d=0,p=null;if(null===(t=i.exec(e))&&(t=o.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],u=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),c=new Date(Date.UTC(n,r,a,s,l,u,d)),p&&c.setTime(c.getTime()-p),c},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(10);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(145).Buffer}catch(e){}var i=n(10),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new i("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=o;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),a=i.length,s=o,l=0,u=[];for(t=0;t>16&255),u.push(l>>8&255),u.push(255&l)),l=l<<6|s.indexOf(i.charAt(t));return 0==(n=a%4*6)?(u.push(l>>16&255),u.push(l>>8&255),u.push(255&l)):18===n?(u.push(l>>10&255),u.push(l>>2&255)):12===n&&u.push(l>>4&255),r?r.from?r.from(u):new r(u):u},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",i=0,a=e.length,s=o;for(t=0;t>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]),i=(i<<8)+e[t];return 0==(n=a%3)?(r+=s[i>>18&63],r+=s[i>>12&63],r+=s[i>>6&63],r+=s[63&i]):2===n?(r+=s[i>>10&63],r+=s[i>>4&63],r+=s[i<<2&63],r+=s[64]):1===n&&(r+=s[i>>2&63],r+=s[i<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";var r=n(10),i=Object.prototype.hasOwnProperty,o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],u=e;for(t=0,n=u.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(302)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var i=n(10);e.exports=new i("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",i=r.parse(n,{range:!0}),o=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"ArrowFunctionExpression"!==i.body[0].expression.type&&"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach((function(e){o.push(e.name)})),t=i.body[0].expression.body.range,"BlockStatement"===i.body[0].expression.body.type?new Function(o,n.slice(t[0]+1,t[1]-1)):new Function(o,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(3),o=n(8),a=n(15);function s(e,t,n){var a=null,s=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?s:null,u=!1;if(t){u="boolean"==typeof t.comment&&t.comment;var c="boolean"==typeof t.attachComment&&t.attachComment;(u||c)&&((a=new r.CommentHandler).attach=c,t.comment=!0,l=s)}var d,p=!1;t&&"string"==typeof t.sourceType&&(p="module"===t.sourceType),d=t&&"boolean"==typeof t.jsx&&t.jsx?new i.JSXParser(e,t,l):new o.Parser(e,t,l);var f=p?d.parseModule():d.parseScript();return u&&a&&(f.comments=a.comments),d.config.tokens&&(f.tokens=d.tokens),d.config.tolerant&&(f.errors=d.errorHandler.errors),f}t.parse=s,t.parseModule=function(e,t,n){var r=t||{};return r.sourceType="module",s(e,r,n)},t.parseScript=function(e,t,n){var r=t||{};return r.sourceType="script",s(e,r,n)},t.tokenize=function(e,t,n){var r,i=new a.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var r=this.trailing[n];r.start>=e.end.offset&&t.unshift(r.comment)}return this.trailing.length=0,t}var i=this.stack[this.stack.length-1];if(i&&i.node.trailingComments){var o=i.node.trailingComments[0];o&&o.range[0]>=e.end.offset&&(t=i.node.trailingComments,delete i.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&(o=this.stack[this.stack.length-1])&&o.start>=e.start.offset;)t=o.node,this.stack.pop();if(t){for(var r=(t.leadingComments?t.leadingComments.length:0)-1;r>=0;--r){var i=t.leadingComments[r];i.range[1]<=e.start.offset&&(n.unshift(i),t.leadingComments.splice(r,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(r=this.leading.length-1;r>=0;--r){var o;(o=this.leading[r]).start<=e.start.offset&&(n.unshift(o.comment),this.leading.splice(r,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),i=this.findLeadingComments(t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=n(4),a=n(5),s=n(6),l=n(7),u=n(8),c=n(13),d=n(14);function p(e){var t;switch(e.type){case s.JSXSyntax.JSXIdentifier:t=e.name;break;case s.JSXSyntax.JSXNamespacedName:var n=e;t=p(n.namespace)+":"+p(n.name);break;case s.JSXSyntax.JSXMemberExpression:var r=e;t=p(r.object)+"."+p(r.property)}return t}c.TokenName[100]="JSXIdentifier",c.TokenName[101]="JSXText";var f=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,a=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(n=(a="x"===s)||o.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!a);break;default:n=(n=n&&!(i&&!o.Character.isDecimalDigit(s.charCodeAt(0))))&&!(a&&!o.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var l=t.substr(1,t.length-2);i&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):i||a||!d.XHTMLEntities[l]||(t=d.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:s=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],r="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)r+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var i=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),s=46===i&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=s.length,{type:7,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,o.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var r={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;o=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(o),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new a.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),i=function(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=i;var o=function(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=o;var a=function(){this.type=r.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var s=function(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=s;var l=function(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var u=function(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=u;var c=function(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=c;var d=function(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=d;var p=function(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=p;var f=function(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=f;var h=function(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(e){this.type=r.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=i;var o=function(e){this.type=r.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=o;var a=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var s=function(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=s;var l=function(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var u=function(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=u;var c=function(e,t,n){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=c;var d=function(e,t,n){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=d;var p=function(e){this.type=r.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=p;var f=function(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=f;var h=function(e){this.type=r.Syntax.BlockStatement,this.body=e};t.BlockStatement=h;var m=function(e){this.type=r.Syntax.BreakStatement,this.label=e};t.BreakStatement=m;var g=function(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=g;var v=function(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=v;var y=function(e){this.type=r.Syntax.ClassBody,this.body=e};t.ClassBody=y;var b=function(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var w=function(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=w;var x=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=x;var S=function(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=S;var C=function(e){this.type=r.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=C;var A=function(){this.type=r.Syntax.DebuggerStatement};t.DebuggerStatement=A;var P=function(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=P;var _=function(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=_;var O=function(){this.type=r.Syntax.EmptyStatement};t.EmptyStatement=O;var T=function(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=T;var D=function(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=D;var E=function(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=E;var I=function(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=I;var k=function(e){this.type=r.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=k;var M=function(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=M;var N=function(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=N;var R=function(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i};t.ForStatement=R;var F=function(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionDeclaration=F;var B=function(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1,this.async=!1};t.FunctionExpression=B;var L=function(e){this.type=r.Syntax.Identifier,this.name=e};t.Identifier=L;var V=function(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=V;var j=function(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=j;var G=function(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=G;var U=function(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=U;var z=function(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=z;var W=function(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=W;var H=function(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t};t.Literal=H;var K=function(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=K;var X=function(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o};t.MethodDefinition=X;var q=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=q;var Y=function(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=Y;var Z=function(e){this.type=r.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=Z;var J=function(e){this.type=r.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=J;var Q=function(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a};t.Property=Q;var $=function(e,t,n,i){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:i}};t.RegexLiteral=$;var ee=function(e){this.type=r.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=r.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=r.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var re=function(e){this.type=r.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=re;var ie=function(e){this.type=r.Syntax.SpreadElement,this.argument=e};t.SpreadElement=ie;var oe=function(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=oe;var ae=function(){this.type=r.Syntax.Super};t.Super=ae;var se=function(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=se;var le=function(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var ue=function(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=ue;var ce=function(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=ce;var de=function(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=de;var pe=function(){this.type=r.Syntax.ThisExpression};t.ThisExpression=pe;var fe=function(e){this.type=r.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=fe;var he=function(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=he;var me=function(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=me;var ge=function(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=ge;var ve=function(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ve;var ye=function(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=ye;var be=function(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var we=function(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=we;var xe=function(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=xe},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(10),o=n(11),a=n(7),s=n(12),l=n(2),u=n(13),c=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(r,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(r,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(r,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(r,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,r.params,i))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,o.Messages.StrictOctalLiteral);var r=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,r));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),r=this.lookahead,i=null,s=null,l=!1,u=!1,c=!1,d=!1;if(3===r.type){var p=r.value;this.nextToken(),l=this.match("["),i=(d=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(p))}else this.match("*")?this.nextToken():(l=this.match("["),i=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===r.type&&!d&&"get"===r.value&&f)t="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod();else if(3===r.type&&!d&&"set"===r.value&&f)t="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod();else if(7===r.type&&"*"===r.value&&f)t="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0;else if(i||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!d)!l&&this.isPropertyKey(i,"__proto__")&&(e.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),s=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0;else if(3===r.type)if(p=this.finalize(n,new a.Identifier(r.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),c=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);s=this.finalize(n,new a.AssignmentPattern(p,h))}else c=!0,s=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,i,l,s,u,c))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,i=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:i},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var o=0;o")||this.expect("=>"),this.context.isBindingElement=!1,o=0;o")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(o=0;o")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,s=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[o,n.value,s],u=[r];!((r=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&r<=u[u.length-1];){s=l.pop();var c=l.pop();u.pop(),o=l.pop(),i.pop();var d=this.startNode(i[i.length-1]);l.push(this.finalize(d,new a.BinaryExpression(c,o,s)))}l.push(this.nextToken().value),u.push(r),i.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=l.length-1;t=l[p];for(var f=i.pop();p>1;){var h=i.pop(),m=f&&f.lineStart;d=this.startNode(h,m),c=l[p-1],t=this.finalize(d,new a.BinaryExpression(c,l[p-2],t)),p-=2,f=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=e.async,s=this.reinterpretAsCoverFormalsList(e);if(s){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var u=this.context.strict,c=this.context.allowStrictDirective;this.context.allowStrictDirective=s.simple;var d=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=i;var f=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=m}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var g=h.type!==l.Syntax.BlockStatement;this.context.strict&&s.firstRestricted&&this.throwUnexpectedToken(s.firstRestricted,s.message),this.context.strict&&s.stricted&&this.tolerateUnexpectedToken(s.stricted,s.message),e=i?this.finalize(f,new a.AsyncArrowFunctionExpression(s.params,h,g)):this.finalize(f,new a.ArrowFunctionExpression(s.params,h,g)),this.context.strict=u,this.context.allowStrictDirective=c,this.context.allowYield=d,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var v=e;this.scanner.isRestrictedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(v.name)&&this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var y=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(y,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),r=this.parsePattern([],e);this.context.strict&&r.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(r.name)&&this.tolerateError(o.Messages.StrictVarName);var i=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&r.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),i=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(r,i))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;r.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var i=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(i,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var r=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(r))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var r=[];!this.match("]");)if(this.match(","))this.nextToken(),r.push(null);else{if(this.match("...")){r.push(this.parseBindingRestElement(e,t));break}r.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(r))},e.prototype.parsePropertyPattern=function(e,t){var n,r,i=this.createNode(),o=!1,s=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var u=this.finalize(i,new a.Identifier(l.value));if(this.match("=")){e.push(l),s=!0,this.nextToken();var c=this.parseAssignmentExpression();r=this.finalize(this.startNode(l),new a.AssignmentPattern(u,c))}else this.match(":")?(this.expect(":"),r=this.parsePatternWithDefault(e,t)):(e.push(l),s=!0,r=u)}else o=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),r=this.parsePatternWithDefault(e,t);return this.finalize(i,new a.Property("init",n,o,r,!1,s))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),r=[];for(this.expect("{");!this.match("}");)r.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(r))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,r=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var i=this.context.allowYield;this.context.allowYield=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=i,r=this.finalize(this.startNode(n),new a.AssignmentPattern(r,o))}return r},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,o.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(o.Messages.StrictVarName);var r=null;return this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,r))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(r,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var r=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,r))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var r=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=r}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,r=null,i=null,s=null,u=!0,c=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){r=this.createNode(),this.nextToken();var d=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=d,1===p.length&&this.matchKeyword("in")){var f=p[0];f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseExpression(),r=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,u=!1):(r=this.finalize(r,new a.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){r=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(d=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=d,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(r=this.finalize(r,new a.VariableDeclaration(p,h)),this.nextToken(),e=r,t=this.parseExpression(),r=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(r=this.finalize(r,new a.VariableDeclaration(p,h)),this.nextToken(),e=r,t=this.parseAssignmentExpression(),r=null,u=!1):(this.consumeSemicolon(),r=this.finalize(r,new a.VariableDeclaration(p,h)))):(r=this.finalize(r,new a.Identifier(h)),this.nextToken(),e=r,t=this.parseExpression(),r=null)}else{var m=this.lookahead;if(d=this.context.allowIn,this.context.allowIn=!1,r=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=d,this.matchKeyword("in"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseExpression(),r=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&r.type!==l.Syntax.AssignmentExpression||this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(r),e=r,t=this.parseAssignmentExpression(),r=null,u=!1;else{if(this.match(",")){for(var g=[r];this.match(",");)this.nextToken(),g.push(this.isolateCoverGrammar(this.parseAssignmentExpression));r=this.finalize(this.startNode(m),new a.SequenceExpression(g))}this.expect(";")}}if(void 0===e&&(this.match(";")||(i=this.parseExpression()),this.expect(";"),this.match(")")||(s=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return void 0===e?this.finalize(c,new a.ForStatement(r,i,s,n)):u?this.finalize(c,new a.ForInStatement(e,t,n)):this.finalize(c,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(o.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),r="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)||this.throwError(o.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(o.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var r=[],i=!1;for(this.expect("{");!this.match("}");){var s=this.parseSwitchCase();null===s.test&&(i&&this.throwError(o.Messages.MultipleDefaultsInSwitch),i=!0),r.push(s)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,r))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var r=n,i="$"+r.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,i)&&this.throwError(o.Messages.Redeclaration,"Label",r.name),this.context.labelSet[i]=!0;var s=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),s=this.parseClassDeclaration();else if(this.matchKeyword("function")){var u=this.lookahead,c=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(u,o.Messages.StrictFunction):c.generator&&this.tolerateUnexpectedToken(u,o.Messages.GeneratorInLegacyContext),s=c}else s=this.parseStatement();delete this.context.labelSet[i],e=new a.LabeledStatement(r,s)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),r={},i=0;i0&&this.tolerateError(o.Messages.BadGetterArity);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(o.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var r=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,r,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var r=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=r}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),r="",i=null,s=null,l=!1,u=!1,c=!1,d=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(i=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,c=!0,l=this.match("["),this.match("*")?this.nextToken():i=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(d=!0,t=this.lookahead,i=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,o.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&f?(r="get",l=this.match("["),i=this.parseObjectPropertyKey(),this.context.allowYield=!1,s=this.parseGetterMethod()):"set"===t.value&&f&&(r="set",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseSetterMethod()):7===t.type&&"*"===t.value&&f&&(r="init",l=this.match("["),i=this.parseObjectPropertyKey(),s=this.parseGeneratorMethod(),u=!0),!r&&i&&this.match("(")&&(r="init",s=d?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),u=!0),r||this.throwUnexpectedToken(this.lookahead),"init"===r&&(r="method"),l||(c&&this.isPropertyKey(i,"prototype")&&this.throwUnexpectedToken(t,o.Messages.StaticPrototype),!c&&this.isPropertyKey(i,"constructor")&&(("method"!==r||!u||s&&s.generator)&&this.throwUnexpectedToken(t,o.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,o.Messages.DuplicateConstructor):e.value=!0,r="constructor")),this.finalize(n,new a.MethodDefinition(i,l,s,r,c))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var r=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var o=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(r,i,o))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,r,i))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(o.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(r,this.lookahead.value)}this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var s=[],l=null,u=!1;for(this.expect("{");!this.match("}");)u=u||this.matchKeyword("default"),s.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):u?(r=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause,this.throwError(r,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,s,l))}return e},e}();t.Parser=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(e){Object.create&&Object.defineProperty&&(n=Object.create(e),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,r){var i="Line "+t+": "+r,o=this.constructError(i,n);return o.index=e,o.lineNumber=t,o.description=r,o},e.prototype.throwError=function(e,t,n,r){throw this.createError(e,t,n,r)},e.prototype.tolerateError=function(e,t,n,r){var i=this.createError(e,t,n,r);if(!this.tolerant)throw i;this.recordError(i)},e}();t.ErrorHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=n(4),o=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function s(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,r=[];for(this.trackComment&&(r=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(++this.index,i.Character.isLineTerminator(o)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};r.push(a)}return 13===o&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,r}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},r.push(a)),r},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(i.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(o)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},o={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(o)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(i.Character.isWhiteSpace(n))++this.index;else if(i.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2,r=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,r=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(r))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,r=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,r=0;r1114111||"}"!==e)&&this.throwUnexpectedToken(),i.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!i.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=i.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),i.Character.isIdentifierPart(t));)n+=e=i.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&i.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=s(e);return!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+s(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+s(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var r=this.index;this.index=t,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=r}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&i.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),i.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(i.Character.isIdentifierStart(t)||i.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(i.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&i.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(i.Character.isIdentifierStart(this.source.charCodeAt(this.index))||i.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var i=parseInt(t||n,16);return i>1114111&&r.throwUnexpectedToken(o.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(n)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];r.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],i.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(i.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!i.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,r=this.scanHexEscape("u");if(null!==r)for(e+=r;n=55296&&e<57343&&i.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(10),i=n(12),o=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(r=this.values[this.curly-4])&&!this.beforeFunctionExpression(r);else if("function"===this.values[this.curly-4]){var r;t=!(r=this.values[this.curly-5])||!this.beforeFunctionExpression(r)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t0?e.charCodeAt(o-1):null,f=f&&v(a,s)}else{for(o=0;or&&" "!==e[p+1],p=o);else if(!g(a))return 5;s=o>0?e.charCodeAt(o-1):null,f=f&&v(a,s)}c=c||d&&o-p-1>r&&" "!==e[p+1]}return u||c?n>9&&y(e)?5:c?4:3:f&&!i(e)?1:2}function w(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==c.indexOf(t))return"'"+t+"'";var o=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n"+x(t,e.indent)+S(f(function(e,t){for(var n,r,i,o=/(\n+)([^\n]*)/g,a=(i=-1!==(i=e.indexOf("\n"))?i:e.length,o.lastIndex=i,C(e.slice(0,i),t)),s="\n"===e[0]||" "===e[0];r=o.exec(e);){var l=r[1],u=r[2];n=" "===u[0],a+=l+(s||n||""===u?"":"\n")+C(u,t),s=n}return a}(t,a),o));case 5:return'"'+function(e){for(var t,n,r,i="",o=0;o=55296&&t<=56319&&(n=e.charCodeAt(o+1))>=56320&&n<=57343?(i+=d(1024*(t-55296)+n-56320+65536),o++):i+=!(r=u[t])&&g(t)?e[o]:r||d(t);return i}(t)+'"';default:throw new i("impossible error: invalid scalar style")}}()}function x(e,t){var n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(!r||"\n"!==e[e.length-2]&&"\n"!==e?r?"":"-":"+")+"\n"}function S(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function C(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,l="";n=i.exec(e);)(s=n.index)-o>t&&(r=a>o?a:s,l+="\n"+e.slice(o,r),o=r+1),a=s;return l+="\n",e.length-o>t&&a>o?l+=e.slice(o,a)+"\n"+e.slice(a+1):l+=e.slice(o),l.slice(1)}function A(e,t,n){var r,o,a,u,c,d;for(a=0,u=(o=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+d+'" style');r=c.represent[d](t,d)}e.dump=r}return!0}return!1}function P(e,t,n,r,o,a){e.tag=null,e.dump=n,A(e,n,!1)||A(e,n,!0);var l=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var u,c,d="[object Object]"===l||"[object Array]"===l;if(d&&(c=-1!==(u=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||c||2!==e.indent&&t>0)&&(o=!1),c&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(d&&c&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(function(e,t,n,r){var o,a,s,l,u,c,d="",p=e.tag,f=Object.keys(n);if(!0===e.sortKeys)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new i("sortKeys must be a boolean or a function");for(o=0,a=f.length;o1024)&&(e.dump&&10===e.dump.charCodeAt(0)?c+="?":c+="? "),c+=e.dump,u&&(c+=h(e,t)),P(e,t+1,l,!0,u)&&(e.dump&&10===e.dump.charCodeAt(0)?c+=":":c+=": ",d+=c+=e.dump));e.tag=p,e.dump=d||"{}"}(e,t,e.dump,o),c&&(e.dump="&ref_"+u+e.dump)):(function(e,t,n){var r,i,o,a,s,l="",u=e.tag,c=Object.keys(n);for(r=0,i=c.length;r1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),P(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=u,e.dump="{"+l+"}"}(e,t,e.dump),c&&(e.dump="&ref_"+u+" "+e.dump));else if("[object Array]"===l){var p=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(function(e,t,n,r){var i,o,a="",s=e.tag;for(i=0,o=n.length;i "+e.dump)}return!0}function _(e,t){var n,r,i=[],o=[];for(function e(t,n,r){var i,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=n.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(n.push(t),Array.isArray(t))for(o=0,a=t.length;o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var s=n(91),l=n(1),u=n(183),c=n(0),d=n(7),p=n(95),f=n(69),h=n(3),m=n(305),g=n(306),v=n(307),y=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return r._hasDeclaration=!1,r._docTypeName="",r._hasDocumentElement=!1,r._currentElementSerialized=!1,r._openTags=[],r._ended=!1,r._fragment=n,r._options=l.applyDefaults(t||{},s.DefaultXMLBuilderCBOptions),r._builderOptions={defaultNamespace:r._options.defaultNamespace,namespaceAlias:r._options.namespaceAlias},"json"===r._options.format?r._writer=new g.JSONCBWriter(r._options):"yaml"===r._options.format?r._writer=new v.YAMLCBWriter(r._options):r._writer=new m.XMLCBWriter(r._options),void 0!==r._options.data&&r.on("data",r._options.data),void 0!==r._options.end&&r.on("end",r._options.end),void 0!==r._options.error&&r.on("error",r._options.error),r._prefixMap=new p.NamespacePrefixMap,r._prefixMap.set("xml",d.namespace.XML),r._prefixIndex={value:1},r._push(r._writer.frontMatter()),r}return i(t,e),t.prototype.ele=function(e,t,n){var r,i;if(l.isObject(e)||l.isString(e)&&(/^\s*/g,">");return this._push(this._writer.text(n)),this},t.prototype.ins=function(e,t){var n;void 0===t&&(t=""),this._serializeOpenTag(!0);try{n=u.fragment(this._builderOptions).ins(e,t).first().node}catch(e){return this.emit("error",e),this}return this._options.wellFormed&&(-1!==n.target.indexOf(":")||/^xml$/i.test(n.target))?(this.emit("error",new Error("Processing instruction target contains invalid characters (well-formed required).")),this):this._options.wellFormed&&!c.xml_isLegalChar(n.data)?(this.emit("error",Error("Processing instruction data contains invalid characters (well-formed required).")),this):(this._push(this._writer.instruction(n.target,n.data)),this)},t.prototype.dat=function(e){var t;this._serializeOpenTag(!0);try{t=u.fragment(this._builderOptions).dat(e).first().node}catch(e){return this.emit("error",e),this}return this._push(this._writer.cdata(t.data)),this},t.prototype.dec=function(e){return void 0===e&&(e={version:"1.0"}),this._fragment?(this.emit("error",Error("Cannot insert an XML declaration into a document fragment.")),this):this._hasDeclaration?(this.emit("error",Error("XML declaration is already inserted.")),this):(this._push(this._writer.declaration(e.version||"1.0",e.encoding,e.standalone)),this._hasDeclaration=!0,this)},t.prototype.dtd=function(e){if(this._fragment)return this.emit("error",Error("Cannot insert a DocType declaration into a document fragment.")),this;if(""!==this._docTypeName)return this.emit("error",new Error("DocType declaration is already inserted.")),this;if(this._hasDocumentElement)return this.emit("error",new Error("Cannot insert DocType declaration after document element.")),this;var t;try{t=u.create().dtd(e).first().node}catch(e){return this.emit("error",e),this}return this._options.wellFormed&&!c.xml_isPubidChar(t.publicId)?(this.emit("error",new Error("DocType public identifier does not match PubidChar construct (well-formed required).")),this):this._options.wellFormed&&(!c.xml_isLegalChar(t.systemId)||-1!==t.systemId.indexOf('"')&&-1!==t.systemId.indexOf("'"))?(this.emit("error",new Error("DocType system identifier contains invalid characters (well-formed required).")),this):(this._docTypeName=e.name,this._push(this._writer.docType(e.name,t.publicId,t.systemId)),this)},t.prototype.import=function(e){var t,n,r=u.fragment().set(this._options);try{r.import(e)}catch(e){return this.emit("error",e),this}try{for(var i=o(r.node.childNodes),a=i.next();!a.done;a=i.next()){var s=a.value;this._fromNode(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},t.prototype.up=function(){return this._serializeOpenTag(!1),this._serializeCloseTag(),this},t.prototype.end=function(){for(this._serializeOpenTag(!1);this._openTags.length>0;)this._serializeCloseTag();return this._push(null),this},t.prototype._serializeOpenTag=function(e){if(!this._currentElementSerialized&&void 0!==this._currentElement){var n=this._currentElement.node;if(!this._options.wellFormed||-1===n.localName.indexOf(":")&&c.xml_isName(n.localName)){var r="",i=!1,o=this._prefixMap.copy(),a={},s=this._recordNamespaceInformation(n,o,a),l=0===this._openTags.length?null:this._openTags[this._openTags.length-1][1],u=n.namespaceURI;if(null===u&&(u=l),l===u)null!==s&&(i=!0),r=u===d.namespace.XML?"xml:"+n.localName:n.localName,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r));else{var p=n.prefix,f=null;if(null===p&&u===s||(f=o.get(p,u)),"xmlns"===p){if(this._options.wellFormed)return void this.emit("error",new Error("An element cannot have the 'xmlns' prefix (well-formed required)."));f=p}null!==f?(r=f+":"+n.localName,null!==s&&s!==d.namespace.XML&&(l=s||null),this._writer.beginElement(r),this._push(this._writer.openTagBegin(r))):null!==p?(p in a&&(p=this._generatePrefix(u,o,this._prefixIndex)),o.set(p,u),r+=p+":"+n.localName,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)),this._push(this._writer.attribute("xmlns:"+p,this._serializeAttributeValue(u,this._options.wellFormed))),null!==s&&(l=s||null)):null===s||null!==s&&s!==u?(i=!0,r+=n.localName,l=u,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)),this._push(this._writer.attribute("xmlns",this._serializeAttributeValue(u,this._options.wellFormed)))):(r+=n.localName,l=u,this._writer.beginElement(r),this._push(this._writer.openTagBegin(r)))}this._serializeAttributes(n,o,this._prefixIndex,a,i,this._options.wellFormed);var h=u===d.namespace.HTML;h&&!e&&t._VoidElementNames.has(n.localName)?(this._push(this._writer.openTagEnd(r,!0,!0)),this._writer.endElement(r)):h||e?this._push(this._writer.openTagEnd(r,!1,!1)):(this._push(this._writer.openTagEnd(r,!0,!1)),this._writer.endElement(r)),this._currentElementSerialized=!0,this._openTags.push([r,l,this._prefixMap,e]),this._isPrefixMapModified(this._prefixMap,o)&&(this._prefixMap=o),this._writer.level++}else this.emit("error",new Error("Node local name contains invalid characters (well-formed required)."))}},t.prototype._serializeCloseTag=function(){this._writer.level--;var e=this._openTags.pop();if(void 0!==e){var t=a(e,4),n=t[0],r=(t[1],t[2]),i=t[3];this._prefixMap=r,i&&(this._push(this._writer.closeTag(n)),this._writer.endElement(n))}else this.emit("error",new Error("Last element is undefined."))},t.prototype._push=function(e){null===e?(this._ended=!0,this.emit("end")):this._ended?this.emit("error",new Error("Cannot push to ended stream.")):0!==e.length&&(this._writer.hasData=!0,this.emit("data",e,this._writer.level))},t.prototype._fromNode=function(e){var t,n,r,i;if(h.Guard.isElementNode(e)){var a=e.prefix?e.prefix+":"+e.localName:e.localName;null!==e.namespaceURI?this.ele(e.namespaceURI,a):this.ele(a);try{for(var s=o(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.prefix?u.prefix+":"+u.localName:u.localName;null!==u.namespaceURI?this.att(u.namespaceURI,c,u.value):this.att(c,u.value)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}try{for(var d=o(e.childNodes),p=d.next();!p.done;p=d.next()){var f=p.value;this._fromNode(f)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}this.up()}else h.Guard.isExclusiveTextNode(e)&&e.data?this.txt(e.data):h.Guard.isCommentNode(e)?this.com(e.data):h.Guard.isCDATASectionNode(e)?this.dat(e.data):h.Guard.isProcessingInstructionNode(e)&&this.ins(e.target,e.data)},t.prototype._serializeAttributes=function(e,t,n,r,i,a){var s,l,u=a?new f.LocalNameSet:void 0;try{for(var p=o(e.attributes),h=p.next();!h.done;h=p.next()){var m=h.value;if(a||i||null!==m.namespaceURI){if(a&&u&&u.has(m.namespaceURI,m.localName))return void this.emit("error",new Error("Element contains duplicate attributes (well-formed required)."));a&&u&&u.set(m.namespaceURI,m.localName);var g=m.namespaceURI,v=null;if(null!==g)if(v=t.get(m.prefix,g),g===d.namespace.XMLNS){if(m.value===d.namespace.XML||null===m.prefix&&i||null!==m.prefix&&(!(m.localName in r)||r[m.localName]!==m.value)&&t.has(m.localName,m.value))continue;if(a&&m.value===d.namespace.XMLNS)return void this.emit("error",new Error("XMLNS namespace is reserved (well-formed required)."));if(a&&""===m.value)return void this.emit("error",new Error("Namespace prefix declarations cannot be used to undeclare a namespace (well-formed required)."));"xmlns"===m.prefix&&(v="xmlns")}else null===v&&(v=null===m.prefix||t.hasPrefix(m.prefix)&&!t.has(m.prefix,g)?this._generatePrefix(g,t,n):m.prefix,this._push(this._writer.attribute("xmlns:"+v,this._serializeAttributeValue(g,this._options.wellFormed))));if(a&&(-1!==m.localName.indexOf(":")||!c.xml_isName(m.localName)||"xmlns"===m.localName&&null===g))return void this.emit("error",new Error("Attribute local name contains invalid characters (well-formed required)."));this._push(this._writer.attribute((null!==v?v+":":"")+m.localName,this._serializeAttributeValue(m.value,this._options.wellFormed)))}else this._push(this._writer.attribute(m.localName,this._serializeAttributeValue(m.value,this._options.wellFormed)))}}catch(e){s={error:e}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}},t.prototype._serializeAttributeValue=function(e,t){return t&&null!==e&&!c.xml_isLegalChar(e)?(this.emit("error",new Error("Invalid characters in attribute value.")),""):null===e?"":e.replace(/(?!&(lt|gt|amp|apos|quot);)&/g,"&").replace(//g,">").replace(/"/g,""")},t.prototype._recordNamespaceInformation=function(e,t,n){var r,i,a=null;try{for(var s=o(e.attributes),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.namespaceURI,p=u.prefix;if(c===d.namespace.XMLNS){if(null===p){a=u.value;continue}var f=u.localName,h=u.value;if(h===d.namespace.XML)continue;if(""===h&&(h=null),t.has(f,h))continue;t.set(f,h),n[f]=h||""}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return a},t.prototype._generatePrefix=function(e,t,n){var r="ns"+n.value;return n.value++,t.set(r,e),r},t.prototype._isPrefixMapModified=function(e,t){var n=e._items,r=t._items,i=e._nullItems,o=t._nullItems;for(var a in r){var s=n[a];if(void 0===s)return!0;var l=r[a];if(s.length!==l.length)return!0;for(var u=0;u"},t.prototype.docType=function(e,t,n){return this._beginLine()+(t&&n?"':t?"':n?"':"")},t.prototype.comment=function(e){return this._beginLine()+"\x3c!--"+e+"--\x3e"},t.prototype.text=function(e){return this._beginLine()+e},t.prototype.instruction=function(e,t){return t?this._beginLine()+"":this._beginLine()+""},t.prototype.cdata=function(e){return this._beginLine()+""},t.prototype.openTagBegin=function(e){return this._lineLength+=1+e.length,this._beginLine()+"<"+e},t.prototype.openTagEnd=function(e,t,n){return n?" />":t?this._writerOptions.allowEmptyTags?">":this._writerOptions.spaceBeforeSlash?" />":"/>":">"},t.prototype.closeTag=function(e){return this._beginLine()+""},t.prototype.attribute=function(e,t){var n=e+'="'+t+'"';return this._writerOptions.prettyPrint&&this._writerOptions.width>0&&this._lineLength+1+n.length>this._writerOptions.width?(n=this._beginLine()+this._indent(1)+n,this._lineLength=n.length,n):(this._lineLength+=1+n.length," "+n)},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){},t.prototype._beginLine=function(){if(this._writerOptions.prettyPrint){var e=(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level);return this._lineLength=e.length,e}return""},t.prototype._indent=function(e){return e<=0?"":this._writerOptions.indent.repeat(e)},t}(n(114).BaseCBWriter);t.XMLCBWriter=o},function(e,t,n){"use strict";n(74);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n._hasChildren=[],n._additionalLevel=0,n}return i(t,e),t.prototype.frontMatter=function(){return""},t.prototype.declaration=function(e,t,n){return""},t.prototype.docType=function(e,t,n){return""},t.prototype.comment=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.comment)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.text=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.text)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.instruction=function(e,t){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.ins)+this._sep()+this._val(t?e+" "+t:e)+this._sep()+"}"},t.prototype.cdata=function(e){return this._comma()+this._beginLine()+"{"+this._sep()+this._key(this._builderOptions.convert.cdata)+this._sep()+this._val(e)+this._sep()+"}"},t.prototype.attribute=function(e,t){return this._comma()+this._beginLine(1)+"{"+this._sep()+this._key(this._builderOptions.convert.att+e)+this._sep()+this._val(t)+this._sep()+"}"},t.prototype.openTagBegin=function(e){var t=this._comma()+this._beginLine()+"{"+this._sep()+this._key(e)+this._sep()+"{";return this._additionalLevel++,this.hasData=!0,t+=this._beginLine()+this._key(this._builderOptions.convert.text)+this._sep()+"[",this._hasChildren.push(!1),t},t.prototype.openTagEnd=function(e,t,n){if(t){var r=this._sep()+"]";return this._additionalLevel--,r+(this._beginLine()+"}")+this._sep()+"}"}return""},t.prototype.closeTag=function(e){var t=this._beginLine()+"]";return this._additionalLevel--,t+(this._beginLine()+"}")+this._sep()+"}"},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){this._hasChildren.pop()},t.prototype._beginLine=function(e){return void 0===e&&(e=0),this._writerOptions.prettyPrint?(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level+e):""},t.prototype._indent=function(e){return e+this._additionalLevel<=0?"":this._writerOptions.indent.repeat(e+this._additionalLevel)},t.prototype._comma=function(){var e=this._hasChildren[this._hasChildren.length-1]?",":"";return this._hasChildren.length>0&&(this._hasChildren[this._hasChildren.length-1]=!0),e},t.prototype._sep=function(){return this._writerOptions.prettyPrint?" ":""},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(114).BaseCBWriter);t.JSONCBWriter=o},function(e,t,n){"use strict";n(74);var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;if(n._rootWritten=!1,n._additionalLevel=0,t.indent.length<2)throw new Error("YAML indententation string must be at least two characters long.");if(t.offset<0)throw new Error("YAML offset should be zero or a positive number.");return n}return i(t,e),t.prototype.frontMatter=function(){return this._beginLine()+"---"},t.prototype.declaration=function(e,t,n){return""},t.prototype.docType=function(e,t,n){return""},t.prototype.comment=function(e){return this._beginLine()+this._key(this._builderOptions.convert.comment)+" "+this._val(e)},t.prototype.text=function(e){return this._beginLine()+this._key(this._builderOptions.convert.text)+" "+this._val(e)},t.prototype.instruction=function(e,t){return this._beginLine()+this._key(this._builderOptions.convert.ins)+" "+this._val(t?e+" "+t:e)},t.prototype.cdata=function(e){return this._beginLine()+this._key(this._builderOptions.convert.cdata)+" "+this._val(e)},t.prototype.attribute=function(e,t){this._additionalLevel++;var n=this._beginLine()+this._key(this._builderOptions.convert.att+e)+" "+this._val(t);return this._additionalLevel--,n},t.prototype.openTagBegin=function(e){var t=this._beginLine()+this._key(e);return this._rootWritten||(this._rootWritten=!0),this.hasData=!0,this._additionalLevel++,t+(this._beginLine(!0)+this._key(this._builderOptions.convert.text))},t.prototype.openTagEnd=function(e,t,n){return t?" "+this._val(""):""},t.prototype.closeTag=function(e){return this._additionalLevel--,""},t.prototype.beginElement=function(e){},t.prototype.endElement=function(e){},t.prototype._beginLine=function(e){return void 0===e&&(e=!1),(this.hasData?this._writerOptions.newline:"")+this._indent(this._writerOptions.offset+this.level,e)},t.prototype._indent=function(e,t){if(e+this._additionalLevel<=0)return"";var n=this._writerOptions.indent.repeat(e+this._additionalLevel);return!t&&this._rootWritten?n.substr(0,n.length-2)+"-"+n.substr(-1,1):n},t.prototype._key=function(e){return'"'+e+'":'},t.prototype._val=function(e){return JSON.stringify(e)},t}(n(114).BaseCBWriter);t.YAMLCBWriter=o},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function d(e,t,n,r){var i,o,a,s;if(u(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),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function p(){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},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=g(l,u);for(n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return h(this,e,!0)},s.prototype.rawListeners=function(e){return h(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(77);t.createCB=function(e){return new r.XMLBuilderCBImpl(e)},t.fragmentCB=function(e){return new r.XMLBuilderCBImpl(e,!0)}}])},911:function(e){"use strict";e.exports='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n Contrast\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},428:function(e){"use strict";e.exports='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n VTK-js favicon-logo\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'},338:function(e){"use strict";e.exports='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n Spacing\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n'},964:function(e){"use strict";e.exports='\n\n \x3c!-- Generator: Sketch 43.1 (39012) - http://www.bohemiancoding.com/sketch --\x3e\n Tint\n Created with Sketch.\n \n \n \n \n \n \n'},42:function(){}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.amdD=function(){throw new Error("define cannot be used indirect")},n.amdO={},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n(49)}()})); //# sourceMappingURL=vtk.js.map \ No newline at end of file